geopsy/Engine.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of geopsy.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created: 2010-08-06
00021 **  Authors:
00022 **    Marc Wathelet (ISTerre, Grenoble, France)
00023 **
00024 ***************************************************************************/
00025 
00026 #ifndef ENGINE_H
00027 #define ENGINE_H
00028 
00029 #include "GeopsyMainWindow.h"
00030 
00031 class ToolFactory;
00032 
00033 class Engine: public QObject, public GeopsyGuiEngine
00034 {
00035   Q_OBJECT
00036 public:
00037   Engine();
00038   ~Engine();
00039 
00040   void setMainWindow(GeopsyMainWindow * w);
00041   ToolFactory * tools() const {return _tools;}
00042   GeopsyMainWindow * mainWindow() const {return _mainWindow;}
00043 
00044   virtual bool useProgress() {return true;}
00045   virtual QStatusBar * statusBar() {return _mainWindow->statusBar();}
00046   virtual ProgressBar * progressBar() {return _mainWindow->progressBar();}
00047 
00048   virtual SubPoolWindow * newTableWindow(const SubSignalPool& subPool) {return _mainWindow->newTableWindow(subPool);}
00049   virtual AbstractGraphicWindow * newGraphicWindow(const SubSignalPool& subPool) {return _mainWindow->newGraphicWindow(subPool);}
00050   virtual SubPoolWindow * newMapWindow(const SubSignalPool& subPool) {return _mainWindow->newMapWindow(subPool);}
00051   virtual SubPoolWindow * newChronogramWindow(const SubSignalPool& subPool) {return _mainWindow->newChronogramWindow(subPool);}
00052   virtual void refreshLists() {_mainWindow->refreshLists();}
00053 
00054   virtual void addWindow(QWidget * w) {_mainWindow->addWindow(w);}
00055   virtual void removeWindow(QWidget * w) {_mainWindow->removeWindow(w);}
00056   virtual void showWindow(QWidget * w) {_mainWindow->showWindow(w);}
00057   virtual void updateWindowTitle(QWidget * w) {_mainWindow->updateWindowTitle(w);}
00058 
00059   virtual void setProgressMaximum(int value) {_mainWindow->setProgressMaximum(value);}
00060   virtual int progressMaximum() {return _mainWindow->progressMaximum();}
00061   virtual void setProgressValue(int value) {_mainWindow->setProgressValue(value);}
00062   virtual int progressValue() {return _mainWindow->progressValue();}
00063   virtual void increaseProgressValue(int value=1) {_mainWindow->increaseProgressValue(value);}
00064   virtual void showMessage(QString message) {_mainWindow->showMessage(message);}
00065   virtual void showLoadedSignals(const SubSignalPool& subPool) {_mainWindow->showLoadedSignals(subPool);}
00066 public slots:
00067   void signalDataChanged(Signal * sig);
00068 private slots:
00069   void signalDataChanged();
00070 private:
00071   ToolFactory * _tools;
00072   GeopsyMainWindow * _mainWindow;
00073   EventRestrictor _signalUpdate;
00074   QSet<Signal *> _pendingUpdates;
00075 };
00076 
00077 #endif // ENGINE_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines