Salome HOME
a6f7ddced2101bcefff79f6e10cb7e571c883797
[modules/paravis.git] / test / standalone / gui / PLMainWindow.hxx
1 // Copyright (C) 2010-2023  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 class PVViewer_GUIElements;
35
36 /** Main window of the application.
37  */
38 class PLMainWindow: public QMainWindow {
39   Q_OBJECT
40
41 public:
42   PLMainWindow(QWidget * parent=0);
43   virtual ~PLMainWindow() {}
44
45   void finishUISetup();
46
47 protected:
48   void doOpenFile();
49   void doManagePlugins();
50
51   void doSlice();
52   void doShrink();
53
54   void cleanAll();
55   void cleanAllButSource();
56
57 signals:
58   void changedCurrentFile(QString fileName);
59   void apply();   // convenience signal to forward to the real ParaView apply
60
61 private slots:
62   void autoApplyCheck(bool);
63   void onApply();
64   void showPipeline(bool);
65   void showProp(bool);
66
67   void addTab();
68   void deleteTab();
69
70   void onFileOpen() { doOpenFile(); };
71   void slice()  { doSlice(); };
72   void shrink() { doShrink(); };
73   void managePlugins() { doManagePlugins(); };
74
75   void insertSingleView(PLViewTab *);
76   void insertMultiView(PLViewTab *);
77   void insertSpreadsheetView(PLViewTab *);
78
79   void currentTabChanged(int);
80
81   void onBuildFilterMenu();
82
83 private:
84   Ui::MainWindow _mainWindow;
85
86   PVViewer_GUIElements * _pvgui;
87
88   pqPVApplicationCore * _pAppC;
89   //pqServer * _activeServer;
90   //pqPipelineSource * _activeSource;  // last pipeline element
91   QStack<pqPipelineSource *> _simplePipeline;
92
93   bool _autoApply;
94
95   QMenu * _filterMenu;
96 };
97
98 #endif /* PLVIEWWIDGET_H_ */