/*************************************************************************** * Copyright (C) 2008 by Peter Dahlberg * * pdahlberg@gmail.com * * * * 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. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef LSIM_H #define LSIM_H #include #include #include //Hauptfenster /** @author Peter Dahlberg */ class QAction; class QMenu; class QTextEdit; class QDockWidget; class SimulScene; class QActionGroup; class lsim: public QMainWindow { Q_OBJECT public: lsim(); ~lsim(); protected: void closeEvent (QCloseEvent *event); private slots: void about(); void actModeSwitcher(QAction *action); void setSceneMode(int mode); void updateDockFieldWidget(); void startCalculation(); void startTimer(); void handleDockLocationChange(); void handleUpDownActionChanges(); private: void createActions(); void createMenus(); void createToolBars(); void createStatusBar(); void createDocks(); void createScene(); GraphicsView *gview; QMenu *fileMenu; QMenu *editMenu; QMenu *helpMenu; QMenu *viewMenu; QToolBar *fileToolBar; QToolBar *editToolBar; QToolBar *upDownToolBar; struct Actions { QAction *aboutAct; QAction *exitAct; QAction *aboutQtAct; QAction *oglEnable; QAction *oglDisable; QAction *calculate; QAction *timerStart; QAction *timerStop; QAction *moveItemDown; QAction *moveItemUp; QAction *moveItemOnTop; QAction *moveItemOnBottom; QAction *itemEditModeAct; QAction *insertEFieldItemAct; QAction *insertBFieldItemAct; QAction *insertStopperItemAct; QAction *probeChargeItemPlaceAct; }; Actions acts; QActionGroup *modeChangeActGroup; QDockWidget *fieldItemEditDock; QDockWidget *probeItemDock; QDockWidget *sceneDock; SimulScene *simulscene; }; #endif