Salome HOME
updated copyright message
[modules/gui.git] / src / PVViewer / PVViewer_Core.h
1 // Copyright (C) 2014-2023  CEA, EDF, OPEN CASCADE
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 PVVIEWER_CORE_H
22 #define PVVIEWER_CORE_H
23
24 #include "PVViewer.h"
25
26 #include <QString>
27
28 class PVServer_ServiceWrapper;
29 class PVViewer_Behaviors;
30 class QMainWindow;
31 class pqPVApplicationCore;
32
33 /**
34  Pure static class gathering most of the interactions with ParaView's API and ParaView's
35  start sequence.
36  */
37 class PVVIEWER_EXPORT PVViewer_Core
38 {
39 public:
40   static pqPVApplicationCore* GetPVApplication();
41   static bool ParaViewInitAppCore();
42   static pqPVApplicationCore *GetPVAppCore() { return MyCoreApp; }
43
44   //! Initialize ParaView if not yet done (once per session)
45   static bool ParaviewInitApp();
46   static void ParaviewInitBehaviors(bool = false, QMainWindow* = 0);
47   static void ParaviewLoadConfigurations(const QString&, bool = false);
48   static void ParaviewCleanup();
49
50 private:
51   PVViewer_Core();
52   virtual ~PVViewer_Core(){};
53
54   static pqPVApplicationCore* MyCoreApp;
55   static bool MyPqTabWidSingletonLoaded;
56   static bool ConfigLoaded;
57   static PVViewer_Behaviors* ParaviewBehaviors;
58 };
59
60 #endif // PVVIEWER_CORE_H