You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdevelop/languages/cpp/app_templates/kpartapp/app.h

78 lines
1.5 KiB

#ifndef _%{APPNAMEUC}_H_
#define _%{APPNAMEUC}_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <tdeapplication.h>
#include <tdeparts/mainwindow.h>
class TDEToggleAction;
/**
* This is the application "Shell". It has a menubar, toolbar, and
* statusbar but relies on the "Part" to do all the real work.
*
* @short Application Shell
* @author %{AUTHOR} <%{EMAIL}>
* @version %{VERSION}
*/
class %{APPNAME} : public KParts::MainWindow
{
Q_OBJECT
public:
/**
* Default Constructor
*/
%{APPNAME}();
/**
* Default Destructor
*/
virtual ~%{APPNAME}();
/**
* Use this method to load whatever file/URL you have
*/
void load(const KURL& url);
protected:
/**
* This method is called when it is time for the app to save its
* properties for session management purposes.
*/
void saveProperties(TDEConfig *);
/**
* This method is called when this app is restored. The TDEConfig
* object points to the session management config file that was saved
* with @ref saveProperties
*/
void readProperties(TDEConfig *);
private slots:
void fileNew();
void fileOpen();
void optionsShowToolbar();
void optionsShowStatusbar();
void optionsConfigureKeys();
void optionsConfigureToolbars();
void applyNewToolbarConfig();
private:
void setupAccel();
void setupActions();
private:
KParts::ReadWritePart *m_part;
TDEToggleAction *m_toolbarAction;
TDEToggleAction *m_statusbarAction;
};
#endif // _%{APPNAMEUC}_H_