summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kscons_kmdi/appkmdi.h
blob: fc4d73aadbcb2e7d261218a8c160f7f1e55146ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
%{H_TEMPLATE}

#ifndef _%{APPNAMEUC}KMDI_H
#define _%{APPNAMEUC}KMDI_H

#include <tqvaluelist.h>

#include <kapplication.h>
#include <kmdimainfrm.h>
#include <kurl.h>

class KToggleAction;
class KRecentFilesAction;

class kmdikonsole;
class KMdiChildView;
class TQWidgetStack;
class %{APPNAMELC}kmdiView;
class TextProperties;
class MiscProperties;

/**
 * This class serves as the main window for %{APPNAMELC}kmdi.  It handles the
 * menus, toolbars, and status bars.
 *
 * @short Main window class
 */
class %{APPNAMELC}kmdi : public KMdiMainFrm
{
	Q_OBJECT
  
	public:
		%{APPNAMELC}kmdi( KMdi::MdiMode mode );
		virtual ~%{APPNAMELC}kmdi();
		void showTipOnStart();

	public slots:
		void openURL( const KURL& );

	protected:
		virtual void dragEnterEvent(TQDragEnterEvent *event);
		virtual void dropEvent(TQDropEvent *event);
		virtual bool queryClose();

	private slots:
		void slotFileNew();
		void slotFileClose();
		void slotFileQuit();

		/// this is called when a new file is saved
		void showTip();

		void optionsShowToolbar();
		void optionsShowStatusbar();
		void optionsConfigureKeys();
		void optionsConfigureToolbars();
		void optionsPreferences();
		void newToolbarConfig();


		void changeStatusbar(const TQString& text);

		void currentChanged( KMdiChildView *current );
		bool requestClose(KMdiChildView* view);

		void settingsChanged();

	private:
		void setupAccel();
		void setupActions();

		TQValueList<%{APPNAMELC}kmdiView*> m_views;

		KToggleAction *m_toolbarAction;
		KToggleAction *m_statusbarAction;

		KParts::PartManager *m_manager;

		kmdikonsole *m_console;
};

#endif // _%{APPNAMEUC}KMDI_H