Salome HOME
Copyright update 2022
[modules/paravis.git] / test / standalone / gui / PVViewer_Core.h
1 // Copyright (C) 2010-2022  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 SRC_PVVIEWER_PVVIEWER_CORE_H_
22 #define SRC_PVVIEWER_PVVIEWER_CORE_H_
23
24 #include <QString>
25
26 class PVServer_ServiceWrapper;
27 class PVViewer_Behaviors;
28 class LogWindow;
29 class QMainWindow;
30 class pqPVApplicationCore;
31
32 /**
33  Pure static class gathering most of the interactions with ParaView's API and ParaView's
34  start sequence.
35  */
36 class PVViewer_Core
37 {
38 public:
39   static pqPVApplicationCore * GetPVApplication();
40
41
42   //! Initialize ParaView if not yet done (once per session)
43   static bool   ParaviewInitApp(QMainWindow* aDesktop, LogWindow * w);
44   static void   ParaviewInitBehaviors(bool fullSetup=false, QMainWindow* aDesktop=0);
45   static void   ParaviewLoadConfigurations(const QString & configPath, bool force=false);
46   static void   ParaviewCleanup();
47
48 private:
49   PVViewer_Core();
50   virtual ~PVViewer_Core();
51
52   static pqPVApplicationCore* MyCoreApp;
53   static bool ConfigLoaded;
54   static PVViewer_Behaviors * ParaviewBehaviors;
55 };
56
57 #endif /* SRC_PVVIEWER_PVVIEWER_CORE_H_ */