QTimeSeries Homepage

Main Page   Alphabetical List   Compound List   File List   Compound Members  

qts_applicationwindow.h

00001 /*****************************************************************************
00002 **  $Id: qts_applicationwindow.h,v 1.23 2002/11/03 01:38:18 andrew23 Exp $
00003 **
00004 **  This is part of the QCad GUI
00005 **  Copyright (C) 2001 Andrew Mustun
00006 **
00007 **  This program is free software; you can redistribute it and/or modify
00008 **  it under the terms of the GNU General Public License (version 2) as
00009 **  published by the Free Software Foundation.
00010 **
00011 **  This program is distributed in the hope that it will be useful,
00012 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 **  GNU General Public License for more details.
00015 **
00016 **  You should have received a copy of the GNU General Public License
00017 **  along with this program; if not, write to the Free Software
00018 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ******************************************************************************/
00020 
00021 #ifndef QTS_APPLICATIONWINDOW_H
00022 #define QTS_APPLICATIONWINDOW_H
00023 
00024 #include <qaction.h>
00025 #include <qlayout.h>
00026 #include <qmainwindow.h>
00027 #include <qmenubar.h>
00028 #include <qpopupmenu.h>
00029 #include <qsplitter.h>
00030 #include <qstatusbar.h>
00031 #include <qtable.h>
00032 #include <qtoolbar.h>
00033 #include <qtoolbutton.h>
00034 #include <qwhatsthis.h>
00035 
00036 #include "qg_recentfiles.h"
00037 #include "qg_layerwidget.h"
00038 
00039 #include "qts_defines.h"
00040 #include "qts_document.h"
00041 #include "qts_graphicview.h"
00042 #include "qts_tableview.h"
00043 
00044 const QString QTS_VERSION = "0.3.9";
00045 const QString QTS_APPNAME = "QTimeSeries";
00046 const QString QTS_REGISTRY = "/RibbonSoft";
00047 const QString QTS_APPKEY = "/QTimeSeries/";
00048 const bool QTS_DEBUGGING = true;
00049 
00053 class QTS_ApplicationWindow: public QMainWindow {
00054     Q_OBJECT
00055 
00056 public:
00057     QTS_ApplicationWindow();
00058     ~QTS_ApplicationWindow();
00059 
00061     void initActions();
00063     void initMenuBar();
00065     void initToolBar();
00067     void initStatusBar();
00068 
00070         void initSettings();
00071         
00073         void storeSettings();
00074 
00076     void initDoc();
00078     void initView();
00079 
00081     void updateRecentFilesMenu();
00082 
00084         void updateCaption();
00085 
00087     bool queryExit();
00088 
00089 public slots:
00090 
00092     void slotFileNew();
00094     void slotFileOpen();
00099     void slotFileOpenRecent(int id);
00103     void slotFileOpen(const QString& fileName);
00107         void slotFileDataRetrieval();
00109     bool slotFileSave();
00111     bool slotFileSaveAs();
00113     void slotFileClose();
00115     void slotFilePrint();
00117     void slotFileQuit();
00118 
00120     void slotEditUndo();
00122     void slotEditRedo();
00125     void slotEditCut();
00127     void slotEditCopy();
00129     void slotEditPaste();
00130 
00132     void slotViewToolBar(bool toggle);
00134     void slotViewStatusBar(bool toggle);
00136     void slotViewLayerList(bool toggle);
00137 
00138         void slotLayersAdd();
00139     void slotLayersRemove();
00140     void slotLayersEdit();
00141         
00143     void slotHelpAbout();
00144 
00146     void slotDebugDumpEntities();
00148     void slotDebugDrawFreehand();
00150     void slotDebugOpen();
00152         void slotDebugDownload();
00153 
00155         QTS_GraphicView* getGraphicView() { return graphicView; }
00156 
00157 protected:
00158     void closeEvent(QCloseEvent*);
00159 
00160 private:
00162     QTS_GraphicView* graphicView;
00163 #ifndef QTS_NO_TABLEVIEW
00164 
00165     QTS_TableView* tableView;
00166 #endif
00167 
00168     QTS_Document* document;
00169 
00171     QG_LayerWidget* layerWidget;
00172 
00173         QG_RecentFiles* recentFiles;
00174 
00176     QPopupMenu *fileMenu;
00178     QPopupMenu *editMenu;
00180     QPopupMenu *viewMenu;
00182     QPopupMenu *drawMenu;
00184     QPopupMenu *modifyMenu;
00186         QPopupMenu* layersMenu;
00188     QPopupMenu *helpMenu;
00190     QPopupMenu *debugMenu;
00191         
00193     QToolBar *fileToolbar;
00194         
00197     QAction *fileNew;
00198     QAction *fileOpen;
00199     QAction *fileDataRetrieval;
00200     QAction *fileSave;
00201     QAction *fileSaveAs;
00202     QAction *fileClose;
00203     QAction *filePrint;
00204     QAction *fileQuit;
00205 
00206         QAction* editUndo;
00207     QAction* editRedo;
00208     QAction *editCut;
00209     QAction *editCopy;
00210     QAction *editPaste;
00211 
00212     QAction *viewToolBar;
00213     QAction *viewStatusBar;
00214         QAction *viewLayerList;
00215     QAction *viewScale;
00216     QAction *viewHolidays;
00217     QAction *viewLabels;
00218     QAction *viewThicker;
00219 
00220     QAction *viewZoomOut;
00221     QAction *viewZoomOutX;
00222     QAction *viewZoomOutY;
00223     QAction *viewZoomIn;
00224     QAction *viewZoomInX;
00225     QAction *viewZoomInY;
00226     QAction *viewZoomAuto;
00227         QAction *viewZoomAutoY;
00228         QAction *viewZoomWindow;
00229         QAction *viewZoomPan;
00230 
00231     QAction *drawFreehand;
00232     QAction *drawPoint;
00233     QAction *drawLine;
00234     QAction *drawLabel;
00235 
00236     QAction *modifyDelete;
00237     QAction *modifyDeleteFree;
00238 
00239         QAction* layersAdd;
00240     QAction* layersRemove;
00241     QAction* layersEdit;
00242 
00243     QAction *helpAboutApp;
00244         
00245     QAction *debugDumpEntities;
00246     QAction *debugDrawFreehand;
00247     QAction *debugOpen;
00248     QAction *debugDownload;
00249 };
00250 
00251 
00252 #endif
00253 

Copyright © 2002, Andrew Mustun <andrew@mustun.com>. All rights reserved.
System documentation was generated using doxygen.