Salome HOME
New simpler test for GIL in paraview.
[modules/paravis.git] / test / standalone / gui / PLMainWindow.hxx
1 // Copyright (C) 2010-2015  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author: Adrien Bruneton (CEA)
20
21 #ifndef PLVIEWWIDGET_H_
22 #define PLVIEWWIDGET_H_
23
24 #include <QMainWindow>
25 #include "ui_light_para.h"
26 #include <QStack>
27
28 class pqPVApplicationCore;
29 class pqPipelineSource;
30 class pqServer;
31 class pqProxy;
32
33 class PLViewTab;
34
35 /** Main window of the application.
36  */
37 class PLMainWindow: public QMainWindow {
38   Q_OBJECT
39
40 public:
41   PLMainWindow(QWidget * parent=0);
42   virtual ~PLMainWindow() {}
43
44   void finishUISetup();
45
46 protected:
47   void doOpenFile();
48   void doManagePlugins();
49
50   void doSlice();
51   void doShrink();
52
53   void cleanAll();
54   void cleanAllButSource();
55
56 signals:
57   void changedCurrentFile(QString fileName);
58   void apply();   // convenience signal to forward to the real ParaView apply
59
60 private slots:
61   void autoApplyCheck(bool);
62   void onApply();
63   void showPipeline(bool);
64   void showProp(bool);
65
66   void addTab();
67   void deleteTab();
68
69   void onFileOpen() { doOpenFile(); };
70   void slice()  { doSlice(); };
71   void shrink() { doShrink(); };
72   void managePlugins() { doManagePlugins(); };
73
74   void insertSingleView(PLViewTab *);
75   void insertMultiView(PLViewTab *);
76
77   void currentTabChanged(int);
78
79 private:
80   Ui::MainWindow _mainWindow;
81
82   pqPVApplicationCore * _pAppC;
83   //pqServer * _activeServer;
84   //pqPipelineSource * _activeSource;  // last pipeline element
85   QStack<pqPipelineSource *> _simplePipeline;
86
87   bool _autoApply;
88 };
89
90 #endif /* PLVIEWWIDGET_H_ */