|
@@
-26,6
+26,7
|
|
26
|
#include <DataSource/DataSourceWidget.h>
|
|
26
|
#include <DataSource/DataSourceWidget.h>
|
|
27
|
#include <SidePane/SqpSidePane.h>
|
|
27
|
#include <SidePane/SqpSidePane.h>
|
|
28
|
#include <SqpApplication.h>
|
|
28
|
#include <SqpApplication.h>
|
|
|
|
|
29
|
#include <TimeWidget/TimeWidget.h>
|
|
29
|
|
|
30
|
|
|
30
|
#include <QAction>
|
|
31
|
#include <QAction>
|
|
31
|
#include <QDate>
|
|
32
|
#include <QDate>
|
|
@@
-75,9
+76,61
MainWindow::MainWindow(QWidget *parent)
|
|
75
|
m_Ui->splitter->setCollapsible(LEFTINSPECTORSIDEPANESPLITTERINDEX, false);
|
|
76
|
m_Ui->splitter->setCollapsible(LEFTINSPECTORSIDEPANESPLITTERINDEX, false);
|
|
76
|
m_Ui->splitter->setCollapsible(RIGHTINSPECTORSIDEPANESPLITTERINDEX, false);
|
|
77
|
m_Ui->splitter->setCollapsible(RIGHTINSPECTORSIDEPANESPLITTERINDEX, false);
|
|
77
|
|
|
78
|
|
|
|
|
|
79
|
|
|
|
|
|
80
|
auto leftSidePane = m_Ui->leftInspectorSidePane->sidePane();
|
|
|
|
|
81
|
auto openLeftInspectorAction = new QAction(
|
|
|
|
|
82
|
QIcon{
|
|
|
|
|
83
|
":/icones/previous.png",
|
|
|
|
|
84
|
},
|
|
|
|
|
85
|
tr("Show/hide the left inspector"), this);
|
|
|
|
|
86
|
|
|
|
|
|
87
|
|
|
|
|
|
88
|
QWidget *spacerLeftTop = new QWidget();
|
|
|
|
|
89
|
spacerLeftTop->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
|
|
|
90
|
|
|
|
|
|
91
|
QWidget *spacerLeftBottom = new QWidget();
|
|
|
|
|
92
|
spacerLeftBottom->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
|
|
|
93
|
|
|
|
|
|
94
|
leftSidePane->addWidget(spacerLeftTop);
|
|
|
|
|
95
|
leftSidePane->addAction(openLeftInspectorAction);
|
|
|
|
|
96
|
leftSidePane->addWidget(spacerLeftBottom);
|
|
|
|
|
97
|
|
|
|
|
|
98
|
|
|
|
|
|
99
|
auto rightSidePane = m_Ui->rightInspectorSidePane->sidePane();
|
|
|
|
|
100
|
auto openRightInspectorAction = new QAction(
|
|
|
|
|
101
|
QIcon{
|
|
|
|
|
102
|
":/icones/next.png",
|
|
|
|
|
103
|
},
|
|
|
|
|
104
|
tr("Show/hide the right inspector"), this);
|
|
|
|
|
105
|
|
|
|
|
|
106
|
QWidget *spacerRightTop = new QWidget();
|
|
|
|
|
107
|
spacerRightTop->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
|
|
|
108
|
|
|
|
|
|
109
|
QWidget *spacerRightBottom = new QWidget();
|
|
|
|
|
110
|
spacerRightBottom->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
|
|
|
111
|
|
|
|
|
|
112
|
rightSidePane->addWidget(spacerRightTop);
|
|
|
|
|
113
|
rightSidePane->addAction(openRightInspectorAction);
|
|
|
|
|
114
|
rightSidePane->addWidget(spacerRightBottom);
|
|
|
|
|
115
|
|
|
|
|
|
116
|
openLeftInspectorAction->setCheckable(true);
|
|
|
|
|
117
|
openRightInspectorAction->setCheckable(true);
|
|
|
|
|
118
|
|
|
|
|
|
119
|
|
|
78
|
// NOTE: These lambda could be factorized. Be careful of theirs parameters
|
|
120
|
// NOTE: These lambda could be factorized. Be careful of theirs parameters
|
|
79
|
// Lambda that defines what's happened when clicking on the leftSidePaneInspector open button
|
|
121
|
// Lambda that defines what's happened when clicking on the leftSidePaneInspector open button
|
|
80
|
auto openLeftInspector = [this](bool checked) {
|
|
122
|
auto openLeftInspector = [this, openLeftInspectorAction](bool checked) {
|
|
|
|
|
123
|
|
|
|
|
|
124
|
if (checked) {
|
|
|
|
|
125
|
openLeftInspectorAction->setIcon(QIcon{
|
|
|
|
|
126
|
":/icones/next.png",
|
|
|
|
|
127
|
});
|
|
|
|
|
128
|
}
|
|
|
|
|
129
|
else {
|
|
|
|
|
130
|
openLeftInspectorAction->setIcon(QIcon{
|
|
|
|
|
131
|
":/icones/previous.png",
|
|
|
|
|
132
|
});
|
|
|
|
|
133
|
}
|
|
81
|
|
|
134
|
|
|
82
|
// Update of the last opened geometry
|
|
135
|
// Update of the last opened geometry
|
|
83
|
if (checked) {
|
|
136
|
if (checked) {
|
|
@@
-107,7
+160,19
MainWindow::MainWindow(QWidget *parent)
|
|
107
|
};
|
|
160
|
};
|
|
108
|
|
|
161
|
|
|
109
|
// Lambda that defines what's happened when clicking on the SidePaneInspector open button
|
|
162
|
// Lambda that defines what's happened when clicking on the SidePaneInspector open button
|
|
110
|
auto openRightInspector = [this](bool checked) {
|
|
163
|
auto openRightInspector = [this, openRightInspectorAction](bool checked) {
|
|
|
|
|
164
|
|
|
|
|
|
165
|
if (checked) {
|
|
|
|
|
166
|
openRightInspectorAction->setIcon(QIcon{
|
|
|
|
|
167
|
":/icones/previous.png",
|
|
|
|
|
168
|
});
|
|
|
|
|
169
|
}
|
|
|
|
|
170
|
else {
|
|
|
|
|
171
|
openRightInspectorAction->setIcon(QIcon{
|
|
|
|
|
172
|
":/icones/next.png",
|
|
|
|
|
173
|
});
|
|
|
|
|
174
|
}
|
|
|
|
|
175
|
|
|
111
|
|
|
176
|
|
|
112
|
// Update of the last opened geometry
|
|
177
|
// Update of the last opened geometry
|
|
113
|
if (checked) {
|
|
178
|
if (checked) {
|
|
@@
-137,27
+202,14
MainWindow::MainWindow(QWidget *parent)
|
|
137
|
};
|
|
202
|
};
|
|
138
|
|
|
203
|
|
|
139
|
|
|
204
|
|
|
140
|
QToolBar *leftSidePane = m_Ui->leftInspectorSidePane->sidePane();
|
|
205
|
connect(openLeftInspectorAction, &QAction::triggered, openLeftInspector);
|
|
141
|
auto openLeftInspectorAction = leftSidePane->addAction(
|
|
206
|
connect(openRightInspectorAction, &QAction::triggered, openRightInspector);
|
|
142
|
QIcon{
|
|
|
|
|
143
|
":/icones/openInspector.png",
|
|
|
|
|
144
|
},
|
|
|
|
|
145
|
tr("Show/hide the left inspector"), openLeftInspector);
|
|
|
|
|
146
|
|
|
|
|
|
147
|
openLeftInspectorAction->setCheckable(true);
|
|
|
|
|
148
|
|
|
|
|
|
149
|
auto rightSidePane = m_Ui->rightInspectorSidePane->sidePane();
|
|
|
|
|
150
|
auto openRightInspectorAction = rightSidePane->addAction(
|
|
|
|
|
151
|
QIcon{
|
|
|
|
|
152
|
":/icones/openInspector.png",
|
|
|
|
|
153
|
},
|
|
|
|
|
154
|
tr("Show/hide the right inspector"), openRightInspector);
|
|
|
|
|
155
|
|
|
207
|
|
|
156
|
openRightInspectorAction->setCheckable(true);
|
|
|
|
|
157
|
|
|
208
|
|
|
158
|
this->menuBar()->addAction(tr("File"));
|
|
209
|
this->menuBar()->addAction(tr("File"));
|
|
159
|
auto mainToolBar = this->addToolBar(QStringLiteral("MainToolBar"));
|
|
210
|
auto mainToolBar = this->addToolBar(QStringLiteral("MainToolBar"));
|
|
160
|
mainToolBar->addAction(QStringLiteral("A1"));
|
|
211
|
|
|
|
|
|
212
|
mainToolBar->addWidget(new TimeWidget());
|
|
161
|
|
|
213
|
|
|
162
|
// Widgets / controllers connections
|
|
214
|
// Widgets / controllers connections
|
|
163
|
connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem *)),
|
|
215
|
connect(&sqpApp->dataSourceController(), SIGNAL(dataSourceItemSet(DataSourceItem *)),
|