1 /***************************************************************************
4 begin : Sun May 27 22:13:58 CEST 2001
5 copyright : (C) 2001 by Michael Andreen
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
21 // include files for QT
23 #include <qmainwindow.h>
26 #include <qpopupmenu.h>
28 #include <qtoolbutton.h>
29 #include <qstatusbar.h>
30 #include <qwhatsthis.h>
34 #include <qfiledialog.h>
38 // application specific includes
43 * This Class is the base class for your application. It sets up the main
44 * window and providing a menubar, toolbar
45 * and statusbar. For the main view, an instance of class BcView is
46 * created which creates your view.
48 class BcApp : public QMainWindow
57 /** initializes all QActions of the application */
59 /** initMenuBar creates the menu_bar and inserts the menuitems */
61 /** this creates the toolbars. Change the toobar look and add new toolbars in this
64 /** setup the statusbar */
66 /** setup the document*/
68 /** setup the mainview*/
71 /** overloaded for Message box on last window exit */
76 /** generate a new document in the actual view */
78 /** open a document */
80 /** save a document */
82 /** save a document under a different filename*/
83 void slotFileSaveAs();
84 /** close the actual file */
86 /** print the actual file */
88 /** exits the application */
90 /** put the marked text/object into the clipboard and remove
91 * it from the document */
93 /** put the marked text/object into the clipboard*/
95 /** paste the clipboard into the document*/
97 /** toggle the toolbar*/
98 void slotViewToolBar(bool toggle);
99 /** toggle the statusbar*/
100 void slotViewStatusBar(bool toggle);
102 /** shows an about dlg*/
103 void slotHelpAbout();
108 /** view is the main widget which represents your working area. The View
109 * class should handle all events of the view widget. It is kept empty so
110 * you can create your view according to your application's needs by
111 * changing the view class.
114 /** doc represents your actual document and is created only once. It keeps
115 * information such as filename and does the serialization of your files.
119 /** file_menu contains all items of the menubar entry "File" */
120 QPopupMenu *fileMenu;
121 /** edit_menu contains all items of the menubar entry "Edit" */
122 QPopupMenu *editMenu;
123 /** view_menu contains all items of the menubar entry "View" */
124 QPopupMenu *viewMenu;
125 /** view_menu contains all items of the menubar entry "Help" */
126 QPopupMenu *helpMenu;
127 /** the main toolbar */
128 QToolBar *fileToolbar;
129 /** actions for the application initialized in initActions() and used to en/disable them
130 * according to your needs during the program */
143 QAction *viewToolBar;
144 QAction *viewStatusBar;
146 QAction *helpAboutApp;