Skip to content

Commit b39576c

Browse files
committed
Fixed Dock widgets selector
1 parent b4fec7a commit b39576c

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

libEPLViz/src/MainWindow.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
129129
qRegisterMetaType<std::string>("std::string");
130130

131131
showedPlotSetupMsg = false;
132+
133+
134+
// Create View-->docks
135+
QList<QDockWidget *> dockWidgetsList = findChildren<QDockWidget *>();
136+
for (auto *i : dockWidgetsList) {
137+
ui->menuDocks->addAction(i->toggleViewAction());
138+
}
139+
140+
ui->menuView->addAction(ui->toolBar->toggleViewAction());
132141
}
133142

134143
MainWindow::~MainWindow() {

libEPLViz/src/mainWidgets/timeLine/TimeLineWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ bool TimelineWidget::event(QEvent *event) {
5959
qDebug() << "PlotTimeline not found, this is ok";
6060
}
6161
}
62-
return QWidget::event(event);
62+
return QDockWidget::event(event);
6363
}

libEPLViz/ui/mainwindow.ui

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,14 @@
218218
<property name="title">
219219
<string>&amp;View</string>
220220
</property>
221+
<widget class="QMenu" name="menuDocks">
222+
<property name="title">
223+
<string>&amp;Docks</string>
224+
</property>
225+
</widget>
221226
<addaction name="actionFullscreen"/>
222227
<addaction name="actionStatistics"/>
228+
<addaction name="menuDocks"/>
223229
</widget>
224230
<addaction name="menuFile"/>
225231
<addaction name="menuEdit"/>
@@ -229,7 +235,7 @@
229235
<widget class="QStatusBar" name="statusBar"/>
230236
<widget class="QToolBar" name="toolBar">
231237
<property name="windowTitle">
232-
<string>toolBar</string>
238+
<string>Tool Bar</string>
233239
</property>
234240
<property name="toolButtonStyle">
235241
<enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -333,7 +339,7 @@
333339
</layout>
334340
</widget>
335341
</widget>
336-
<widget class="TimelineWidget" name="dockPlugins">
342+
<widget class="QDockWidget" name="dockPlugins">
337343
<property name="toolTip">
338344
<string>Allows plugins to be enabled to run during a playback/recording.</string>
339345
</property>
@@ -845,6 +851,14 @@
845851
<string>About &amp;Qt</string>
846852
</property>
847853
</action>
854+
<action name="actionTool_Bar">
855+
<property name="checkable">
856+
<bool>true</bool>
857+
</property>
858+
<property name="text">
859+
<string>Tool Bar</string>
860+
</property>
861+
</action>
848862
</widget>
849863
<layoutdefault spacing="6" margin="11"/>
850864
<customwidgets>

0 commit comments

Comments
 (0)