dinver/PSViewer.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of dinver.
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 : 2004-10-26
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (ULg, Liège, Belgium)
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef PSViewer_H
00029 #define PSViewer_H
00030 
00031 #include <SciFigs.h>
00032 
00033 #include "ModelThreadInfo.h"
00034 #include "InversionThread.h"
00035 
00036 class ViewerThreadInfo
00037 {
00038 public:
00039   ViewerThreadInfo() {
00040     alreadyLoaded=0;
00041   }
00042   int alreadyLoaded;
00043 };
00044 
00045 typedef QMap<const InversionThread *, ViewerThreadInfo *> ViewerThreadMap;
00046 
00047 class PSViewer : public QWidget
00048 {
00049   Q_OBJECT
00050 public:
00051   PSViewer(QWidget * parent=0);
00052   ~PSViewer();
00053 
00054   void lockPlots();
00055   void unlockPlots();
00056   void addThreadData(InversionThread * models);
00057   const ModelThreadList& modelList() const {return _models;}
00058   void lockDataModels();
00059   void unlockDataModels();
00060   const ColorPalette * palette() const {return &_palette->palette();}
00061   bool saveParameters() const {return _saveParameters;}
00062   const InversionThread * parameterList() const {
00063     if(_threads.isEmpty()) return 0; else return _threads.begin().key();
00064   }
00065 public slots:
00066   void synchronize();
00067   void setLimits();
00068   void addPlot();
00069   void fileOpenPS();
00070   void fileSavePS();
00071   void fileSaveAsPS();
00072   AxisWindow * addPlot(int paramX, int paramY);
00073 private:
00074   GraphicSheet _sheet;
00075   ColorPaletteWidget * _palette;
00076   QVBoxLayout* _childLayout;
00077 #ifndef Q_WS_MAC
00078   QMenuBar * _menuBar;
00079 #endif
00080 
00081   ViewerThreadMap _threads;
00082   ModelThreadList _models;
00083 
00084   bool _saveParameters;
00085 
00086   void addActions();
00087 };
00088 
00089 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines