##// END OF EJS Templates
Merge branch 'feature/timeWidgetAndSidePane' into develop
perrinel -
r136:a642436e9414 merge
parent child
Show More
@@ -0,0 +1,23
1 #ifndef SCIQLOP_TIMEWIDGET_H
2 #define SCIQLOP_TIMEWIDGET_H
3
4 #include <QWidget>
5
6 namespace Ui {
7 class TimeWidget;
8 } // Ui
9
10 class TimeWidget;
11
12 class TimeWidget : public QWidget {
13 Q_OBJECT
14
15 public:
16 explicit TimeWidget(QWidget *parent = 0);
17 virtual ~TimeWidget();
18
19 private:
20 Ui::TimeWidget *ui;
21 };
22
23 #endif // SCIQLOP_ SQPSIDEPANE_H
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,12
1 #include "TimeWidget/TimeWidget.h"
2 #include "ui_TimeWidget.h"
3
4 TimeWidget::TimeWidget(QWidget *parent) : QWidget{parent}, ui{new Ui::TimeWidget}
5 {
6 ui->setupUi(this);
7 }
8
9 TimeWidget::~TimeWidget()
10 {
11 delete ui;
12 }
@@ -0,0 +1,85
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>TimeWidget</class>
4 <widget class="QWidget" name="TimeWidget">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>716</width>
10 <height>48</height>
11 </rect>
12 </property>
13 <property name="sizePolicy">
14 <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
15 <horstretch>0</horstretch>
16 <verstretch>0</verstretch>
17 </sizepolicy>
18 </property>
19 <property name="windowTitle">
20 <string>Form</string>
21 </property>
22 <layout class="QHBoxLayout" name="horizontalLayout_2">
23 <item>
24 <widget class="QLabel" name="label">
25 <property name="sizePolicy">
26 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
27 <horstretch>0</horstretch>
28 <verstretch>0</verstretch>
29 </sizepolicy>
30 </property>
31 <property name="text">
32 <string>TStart :</string>
33 </property>
34 </widget>
35 </item>
36 <item>
37 <widget class="QDateTimeEdit" name="startDateTimeEdit">
38 <property name="sizePolicy">
39 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
40 <horstretch>0</horstretch>
41 <verstretch>0</verstretch>
42 </sizepolicy>
43 </property>
44 <property name="displayFormat">
45 <string>dd/MM/yyyy HH:mm:ss:zzz</string>
46 </property>
47 <property name="calendarPopup">
48 <bool>true</bool>
49 </property>
50 </widget>
51 </item>
52 <item>
53 <widget class="QLabel" name="label_2">
54 <property name="sizePolicy">
55 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
56 <horstretch>0</horstretch>
57 <verstretch>0</verstretch>
58 </sizepolicy>
59 </property>
60 <property name="text">
61 <string>TEnd :</string>
62 </property>
63 </widget>
64 </item>
65 <item>
66 <widget class="QDateTimeEdit" name="endDateTimeEdit">
67 <property name="sizePolicy">
68 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
69 <horstretch>0</horstretch>
70 <verstretch>0</verstretch>
71 </sizepolicy>
72 </property>
73 <property name="displayFormat">
74 <string>dd/MM/yyyy HH:mm:ss:zzz</string>
75 </property>
76 <property name="calendarPopup">
77 <bool>true</bool>
78 </property>
79 </widget>
80 </item>
81 </layout>
82 </widget>
83 <resources/>
84 <connections/>
85 </ui>
@@ -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 *)),
@@ -19,14 +19,14 struct VariableController::VariableControllerPrivate {
19 VariableController::VariableController(QObject *parent)
19 VariableController::VariableController(QObject *parent)
20 : QObject{parent}, impl{spimpl::make_unique_impl<VariableControllerPrivate>()}
20 : QObject{parent}, impl{spimpl::make_unique_impl<VariableControllerPrivate>()}
21 {
21 {
22 qCDebug(LOG_VariableController())
22 qCDebug(LOG_VariableController()) << tr("VariableController construction")
23 << tr("VariableController construction") << QThread::currentThread();
23 << QThread::currentThread();
24 }
24 }
25
25
26 VariableController::~VariableController()
26 VariableController::~VariableController()
27 {
27 {
28 qCDebug(LOG_VariableController())
28 qCDebug(LOG_VariableController()) << tr("VariableController destruction")
29 << tr("VariableController destruction") << QThread::currentThread();
29 << QThread::currentThread();
30 this->waitForFinish();
30 this->waitForFinish();
31 }
31 }
32
32
@@ -1,5 +1,7
1 <RCC>
1 <RCC>
2 <qresource prefix="/">
2 <qresource prefix="/">
3 <file>icones/openInspector.png</file>
3 <file>icones/openInspector.png</file>
4 <file>icones/next.png</file>
5 <file>icones/previous.png</file>
4 </qresource>
6 </qresource>
5 </RCC>
7 </RCC>
@@ -34,13 +34,6 SqpSidePane::SqpSidePane(QWidget *parent) : QWidget{parent}, ui{new Ui::SqpSideP
34 this->layout()->addWidget(m_SidePaneToolbar);
34 this->layout()->addWidget(m_SidePaneToolbar);
35
35
36 m_SidePaneToolbar->setStyleSheet(SQPSIDEPANESTYLESHEET);
36 m_SidePaneToolbar->setStyleSheet(SQPSIDEPANESTYLESHEET);
37
38 this->setStyleSheet(
39 " QWidget {"
40 "background: red;"
41
42 "border: 1px;"
43 " }");
44 }
37 }
45
38
46 SqpSidePane::~SqpSidePane()
39 SqpSidePane::~SqpSidePane()
1 NO CONTENT: file renamed from gui/ui/Sidepane/SqpSidePane.ui to gui/ui/SidePane/SqpSidePane.ui
NO CONTENT: file renamed from gui/ui/Sidepane/SqpSidePane.ui to gui/ui/SidePane/SqpSidePane.ui
@@ -3,6 +3,8
3 #include <Data/DataProviderParameters.h>
3 #include <Data/DataProviderParameters.h>
4 #include <Data/ScalarSeries.h>
4 #include <Data/ScalarSeries.h>
5
5
6 #include <cmath>
7
6 std::unique_ptr<IDataSeries>
8 std::unique_ptr<IDataSeries>
7 CosinusProvider::retrieveData(const DataProviderParameters &parameters) const
9 CosinusProvider::retrieveData(const DataProviderParameters &parameters) const
8 {
10 {
General Comments 0
You need to be logged in to leave comments. Login now