Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

mainwindowgui.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad     *
00003  *   bjoern_erik_nilsen@hotmail.com & fredrikbk@hotmail.com                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef QTGUI_H
00021 #define QTGUI_H
00022 
00023 #include "src/config.h"
00024 #include "framebar/framebar.h"
00025 #include "frameview.h"
00026 #include "flexiblespinbox.h"
00027 #include "src/application/camerahandler.h"
00028 #include "src/application/editmenuhandler.h"
00029 #include "src/application/runanimationhandler.h"
00030 #include "src/application/modelhandler.h"
00031 #include "src/application/languagehandler.h"
00032 #include "src/application/soundhandler.h"
00033 #include "src/application/externalchangemonitor.h"
00034 #include "menuframe.h"
00035 #include "framepreferencesmenu.h"
00036 #include "toolsmenu.h"
00037 
00038 #include <qmainwindow.h>
00039 #include <qevent.h>
00040 #include <qvbox.h>
00041 #include <qhbox.h>
00042 #include <qstring.h>
00043 #include <qcolor.h>
00044 #include <qpushbutton.h>
00045 #include <qbuttongroup.h>
00046 #include <qwidgetstack.h>
00047 #include <qspinbox.h>
00048 #include <qlistbox.h>
00049 #include <qaction.h>
00050 #include <qsplitter.h>
00051 
00052 
00059 class MainWindowGUI : public QMainWindow
00060 {
00061         Q_OBJECT
00062 public:
00063         enum {SAVE, SAVE_AS, UNDO, REDO, CUT, COPY, PASTE, GOTO};
00064         
00070         MainWindowGUI(QApplication *stApp);
00071         
00075         ~MainWindowGUI();
00076         
00082         void mousePressEvent ( QMouseEvent * e );
00083         
00089         void keyPressEvent( QKeyEvent *k );
00090         
00091 private:
00092         QApplication *stApp;
00093         QSplitter *centerWidget;
00094         QVBox *bottomSplitter;
00095         QHBox *workArea;
00096         FrameBar *frameBar;
00097         FrameView *frameView;
00098         QWidgetStack *frameViewStack;
00099         
00100         //Actions
00101         QAction *newAct;
00102         QAction *openAct;
00103         QAction *mostRecentAct;
00104         QAction *secondMostRecentAct;
00105         QAction *thirdMostRecentAct;
00106         QAction *saveAct;
00107         QAction *saveAsAct;
00108         QAction *videoAct;
00109         QAction *cinerellaAct;
00110         QAction *quitAct;
00111         QAction *undoAct;
00112         QAction *redoAct;
00113         QAction *cutAct;
00114         QAction *copyAct;
00115         QAction *pasteAct;
00116         QAction *gotoFrameAct;
00117 //      QAction *disableAct;
00118         QAction *configureAct;
00119         QAction *whatsthisAct;
00120         QAction *aboutAct;
00121         QAction *helpAct;
00122         
00123         //Menues
00124         QPopupMenu *fileMenu;
00125         QPopupMenu *exportMenu;
00126         QPopupMenu *mostRecentMenu;
00127         QPopupMenu *editMenu;
00128         QPopupMenu *settingsMenu;
00129         QPopupMenu *languagesMenu;
00130         QPopupMenu *helpMenu;
00131         ToolsMenu *toolsMenu;
00132         FramePreferencesMenu *preferencesMenu;
00133         
00134         MenuFrame *gotoMenu;
00135         QGridLayout *gotoMenuGrid;
00136         QSpacerItem *space;
00137         QPushButton *gotoMenuCloseButton;
00138         
00139         //Widgets
00140         QLabel *numberDisplay;
00141         FlexibleSpinBox *gotoSpinner;
00142         QLabel *gotoFrameLabel;
00143         
00144         
00145         //Handlers
00146         ModelHandler *modelHandler;
00147         SoundHandler *soundHandler;
00148         CameraHandler *cameraHandler;
00149         EditMenuHandler *editMenuHandler;
00150         LanguageHandler *languageHandler;
00151         RunAnimationHandler *runAnimationHandler;
00152         ExternalChangeMonitor *changeMonitor;
00153         
00154         char *lastVisitedDir;
00155         
00156         
00162         void createHandlers(QApplication *stApp);
00163         
00168         void setupDirectoryMonitoring();
00169         
00175         void createAccelerators();
00176         
00180         void createActions();
00181         
00185          void createMenus();
00186         
00191         void makeFrameBar(QWidget * parent);
00192         
00197         void makePreferencesMenu(QWidget * parent);
00198         
00203         void makeViews(QWidget * parent);
00204         
00209         void makeToolsMenu(QWidget * parent);
00210         
00215         void makeGotoMenu(QWidget * parent);
00216         
00220         void makeStatusBar();
00221                 
00226         void dragEnterEvent ( QDragEnterEvent * event);
00227         
00232         void dropEvent(QDropEvent *event);
00233         
00239         void keyReleaseEvent ( QKeyEvent * k );
00240         
00246         void retranslateHelpText();
00247         
00248         
00253         void setMostRecentProject();
00254         
00258         void updateMostRecentMenu();
00259         
00260         
00261 private slots:
00262         
00269         void retranslateStrings();
00270         
00274         void newProject();
00275         
00279         void openProject();
00280         
00285         void openProject(const char *projectFile);
00286         
00290         void openMostRecent();
00291         void openSecondMostRecent();
00292         void openThirdMostRecent();
00293         
00297         void saveProject();
00298         
00302         void saveProjectAs();
00303         
00307         void showAboutDialog();
00308         
00312         void showHelpDialog();
00313         
00318         void showPreferencesMenu();
00319         
00324         void exportToVideo();
00325         
00329         void exportToCinerella();
00330         
00331 public slots:
00337         void modelSizeChanged( int modelSize );
00338         
00342         void activateMenuOptions();
00343         
00348         void closeEvent(QCloseEvent *ce);
00349 };
00350 
00351 #endif

Generated on Thu May 19 01:51:21 2005 for stopmotion.kdevelop by  doxygen 1.4.2