/***************************************************************************
doku.h - Interface Basisklasse (Control) Doku
-------------------
begin : Wed Aug 4 17:32:35 MEST 1999
copyright : (C) 1999 by Stephan Uhlmann
email : suhlmann@gmx.de
***************************************************************************/
/***************************************************************************
* *
* 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 DOKU_H
#define DOKU_H
// include files for QT
#include <qpopupmenu.h>
#include <qmainwindow.h>
#include <qaccel.h>
#include <qmenubar.h>
#include <qtoolbar.h>
#include <qpixmap.h>
#include <qtoolbutton.h>
#include <qapp.h>
#include <qstatusbar.h>
#include <qwhatsthis.h>
#include <qmsgbox.h>
#include <qfiledialog.h>
#include <qpainter.h>
// application specific includes
#include "dokuview.h"
#include "dokudoc.h"
#include "resource.h"
#include "dlgwhatinsert.h"
#include "dlgdokumentinsert.h"
#include "dlgformularinsert.h"
#include "dlgvertraginsert.h"
#include "dlgdauerauftraginsert.h"
/**
* Dies ist die Basisklasse der Applikation. Sie erstellt das Hauptfenster
* und stellt ein Menuebar, Toolbar und Statusbar zur Verfuegung. Fuer die
* Hauptview wird eine Instanz der Klasse DokuView angelegt. Weiterhin wird
* die Klasse DokuDoc instanziiert.
*/
class Doku : public QMainWindow
{
Q_OBJECT
public:
/** construtor */
Doku();
/** destructor */
~Doku();
/** 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:
/** switch argument for Statusbar help entries on slot selection */
void statusCallback(int id_);
/** open a new application window */
/** 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();
/** 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();
/** toggle the statusbar*/
void slotViewStatusBar();
/** insert document*/
void slotDocInsert();
/** modify document*/
void slotDocModify();
/** delete document*/
void slotDocDelete();
/** shows an about dlg*/
void slotHelpAbout();
/** change the status message of the whole statusbar temporary */
void slotStatusHelpMsg(const char *text);
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. */
DokuView *view;
/** doc represents your actual document and is created only once. It keeps
* information such as filename and does the serialization of your files.
*/
DokuDoc *doc;
/** file_menu contains all items of the menubar entry "File" */
QPopupMenu *file_menu;
/** edit_menu contains all items of the menubar entry "Edit" */
QPopupMenu *edit_menu;
/** view_menu contains all items of the menubar entry "View" */
QPopupMenu *view_menu;
/** view_menu contains all items of the menubar entry "Document" */
QPopupMenu *doc_menu;
/** view_menu contains all items of the menubar entry "Help" */
QPopupMenu *help_menu;
QToolBar *file_toolbar;
};
#endif
Documentation generated by uhlmann@fara2 on Mon Aug 30 20:37:52 MEST 1999