-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpvgMainWindow.cxx
99 lines (78 loc) · 3.6 KB
/
pvgMainWindow.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*=========================================================================
Program: ParaViewGeo
Module: pvgMainWindow.cxx
Copyright (c) 2018, Kitware Inc.
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
// ParaViewGIS
#include "pvgMainWindow.h"
#include "ui_pvgMainWindow.h"
#ifdef PARAVIEW_USE_QTHELP
#include "pqHelpReaction.h"
#endif
#include "pqParaViewBehaviors.h"
#include "pqParaViewMenuBuilders.h"
class pvgMainWindow::pvgInternals : public Ui::pvgMainWindow
{
};
//-----------------------------------------------------------------------------
pvgMainWindow::pvgMainWindow()
{
this->Internals = new pvgInternals();
this->Internals->setupUi(this);
// Set up the dock window corners to give the vertical docks more room.
this->setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
this->setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
// Enable help from the properties panel.
QObject::connect(this->Internals->propertiesPanel,
SIGNAL(helpRequested(const QString&, const QString&)),
this,
SLOT(showHelpForProxy(const QString&, const QString&)));
// Populate application menus with actions.
pqParaViewMenuBuilders::buildFileMenu(*this->Internals->menuFile);
pqParaViewMenuBuilders::buildEditMenu(*this->Internals->menuEdit);
// Populate sources menu.
pqParaViewMenuBuilders::buildSourcesMenu(*this->Internals->menuSources, this);
// Populate filters menu.
pqParaViewMenuBuilders::buildFiltersMenu(*this->Internals->menuFilters, this);
// Populate Tools menu.
pqParaViewMenuBuilders::buildToolsMenu(*this->Internals->menuTools);
// setup the context menu for the pipeline browser.
// pqParaViewMenuBuilders::buildPipelineBrowserContextMenu(
// *this->Internals->pipelineBrowser->contextMenu());
// pqParaViewMenuBuilders::buildToolbars(*this);
// Setup the View menu. This must be setup after all toolbars and dockwidgets
// have been created.
pqParaViewMenuBuilders::buildViewMenu(*this->Internals->menuView, *this);
// Setup the menu to show macros.
// pqParaViewMenuBuilders::buildMacrosMenu(*this->Internals->menu_Macros);
// Setup the help menu.
pqParaViewMenuBuilders::buildHelpMenu(*this->Internals->menuHelp);
// Final step, define application behaviors. Since we want all ParaView
// behaviors, we use this convenience method.
new pqParaViewBehaviors(this, this);
}
//-----------------------------------------------------------------------------
pvgMainWindow::~pvgMainWindow()
{
delete this->Internals;
}
//-----------------------------------------------------------------------------
void pvgMainWindow::showHelpForProxy(const QString& groupname,
const QString& proxyname)
{
#ifdef PARAVIEW_USE_QTHELP
pqHelpReaction::showProxyHelp(groupname, proxyname);
#endif
}