File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed
Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff 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
134143MainWindow::~MainWindow () {
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change 218218 <property name =" title" >
219219 <string >& View</string >
220220 </property >
221+ <widget class =" QMenu" name =" menuDocks" >
222+ <property name =" title" >
223+ <string >& 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" />
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 >
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 >
845851 <string >About & 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 >
You can’t perform that action at this time.
0 commit comments