]> ruin.nu Git - hbs.git/blobdiff - bs/bs.h
Added the possibility to add new battles.
[hbs.git] / bs / bs.h
diff --git a/bs/bs.h b/bs/bs.h
index f77c74b6ce03c06c3312c6acb62d0e37caf3b508..e25c3388d73e3ecac6a25411a46a4611d107a7c8 100644 (file)
--- a/bs/bs.h
+++ b/bs/bs.h
-/***************************************************************************
-                          bc.h  -  description
-                             -------------------
-    begin                : Sun May 27 22:13:58 CEST 2001
-    copyright            : (C) 2001 by Michael Andreen
-    email                : whale@linux.nu
- ***************************************************************************/
+#ifndef BSAPP_H
+#define BSAPP_H
+#include "ui/bsappbase.h"
+
+//My own forwards
+//class BSView;
+//class BSDoc;
+
+class BSApp : public BSAppBase
+{ 
+    Q_OBJECT
+
+public:
+    BSApp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~BSApp();
+
+public slots:
+    void fileNew();
+    void fileOpen();
+    void fileSave();
+    void fileSaveAs();
+    void filePrint();
+    void fileExit();
+    void editUndo();
+    void editRedo();
+    void editCut();
+    void editCopy();
+    void editPaste();
+    void editFind();
+    void helpIndex();
+    void helpContents();
+    void helpAbout();
+
+protected:
+//     BSView* view;
+//     BSDoc*  doc;
 
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#ifndef BC_H
-#define BC_H
-
-// include files for QT
-#include <qapp.h>
-#include <qmainwindow.h>
-#include <qaction.h>
-#include <qmenubar.h>
-#include <qpopupmenu.h>
-#include <qtoolbar.h>
-#include <qtoolbutton.h>
-#include <qstatusbar.h>
-#include <qwhatsthis.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qmsgbox.h>
-#include <qfiledialog.h>
-#include <qprinter.h>
-#include <qpainter.h>
-
-// application specific includes
-#include "bcview.h"
-#include "bcdoc.h"
-
-/**
-  * This Class is the base class for your application. It sets up the main
-  * window and providing a menubar, toolbar
-  * and statusbar. For the main view, an instance of class BcView is
-  * created which creates your view.
-  */
-class BcApp : public QMainWindow
-{
-  Q_OBJECT
-  
-  public:
-    /** construtor */
-    BcApp();
-    /** destructor */
-    ~BcApp();
-    /** initializes all QActions of the application */
-    void initActions();
-    /** initMenuBar creates the menu_bar and inserts the menuitems */
-    void initMenuBar();
-    /** this creates the toolbars. Change the toobar look and add new toolbars in this
-     * function */
-    void initToolBar();
-    /** setup the statusbar */
-    void initStatusBar();
-    /** setup the document*/
-    void initDoc();
-    /** setup the mainview*/
-    void initView();
-
-    /** overloaded for Message box on last window exit */
-    bool queryExit();
-
-  public slots:
-
-    /** generate a new document in the actual view */
-    void slotFileNew();
-    /** open a document */
-    void slotFileOpen();
-    /** save a document */
-    void slotFileSave();
-    /** save a document under a different filename*/
-    void slotFileSaveAs();
-    /** close the actual file */
-    void slotFileClose();
-    /** print the actual file */
-    void slotFilePrint();
-    /** exits the application */
-    void slotFileQuit();
-    /** put the marked text/object into the clipboard and remove
-     * it from the document */
-    void slotEditCut();
-    /** put the marked text/object into the clipboard*/
-    void slotEditCopy();
-    /** paste the clipboard into the document*/
-    void slotEditPaste();
-    /** toggle the toolbar*/
-    void slotViewToolBar(bool toggle);
-    /** toggle the statusbar*/
-    void slotViewStatusBar(bool toggle);
-
-    /** shows an about dlg*/
-    void slotHelpAbout();
-
-
-  private:
-
-    /** view is the main widget which represents your working area. The View
-     * class should handle all events of the view widget.  It is kept empty so
-     * you can create your view according to your application's needs by
-     * changing the view class.
-     */
-    BcView* view;
-    /** doc represents your actual document and is created only once. It keeps
-     * information such as filename and does the serialization of your files.
-     */
-    BcDoc *doc;
-  
-    /** file_menu contains all items of the menubar entry "File" */
-    QPopupMenu *fileMenu;
-    /** edit_menu contains all items of the menubar entry "Edit" */
-    QPopupMenu *editMenu;
-    /** view_menu contains all items of the menubar entry "View" */
-    QPopupMenu *viewMenu;
-    /** view_menu contains all items of the menubar entry "Help" */
-    QPopupMenu *helpMenu;
-    /** the main toolbar */
-    QToolBar *fileToolbar;
-    /** actions for the application initialized in initActions() and used to en/disable them
-      * according to your needs during the program */
-    QAction *fileNew;
-    QAction *fileOpen;
-    QAction *fileSave;
-    QAction *fileSaveAs;
-    QAction *fileClose;
-    QAction *filePrint;
-    QAction *fileQuit;
-
-    QAction *editCut;
-    QAction *editCopy;
-    QAction *editPaste;
-
-    QAction *viewToolBar;
-    QAction *viewStatusBar;
-
-    QAction *helpAboutApp;
 };
-#endif 
 
+#endif // BSAPP_H