Commit bd658445 authored by Calvin Buckley's avatar Calvin Buckley 🤔 Committed by Albert Astals Cid

Menu item to toggle toolbar for QCG

parent c5fe5de8
...@@ -81,8 +81,8 @@ QCGTopLevel::QCGTopLevel() ...@@ -81,8 +81,8 @@ QCGTopLevel::QCGTopLevel()
createActions(); createActions();
createDocks(); createDocks();
createMenu();
createToolbar(); createToolbar();
createMenu();
_multiView = new MultiView(this, this); _multiView = new MultiView(this, this);
_multiView->setObjectName(QStringLiteral("MultiView")); _multiView->setObjectName(QStringLiteral("MultiView"));
...@@ -617,6 +617,7 @@ void QCGTopLevel::createMenu() ...@@ -617,6 +617,7 @@ void QCGTopLevel::createMenu()
viewMenu->addAction(_secondaryMenuAction); viewMenu->addAction(_secondaryMenuAction);
viewMenu->addAction(_groupingMenuAction); viewMenu->addAction(_groupingMenuAction);
viewMenu->addSeparator(); viewMenu->addSeparator();
viewMenu->addAction(tb->toggleViewAction());
viewMenu->addMenu(layoutMenu); viewMenu->addMenu(layoutMenu);
viewMenu->addAction(_sidebarMenuAction); viewMenu->addAction(_sidebarMenuAction);
viewMenu->addAction(_splittedToggleAction); viewMenu->addAction(_splittedToggleAction);
...@@ -660,7 +661,7 @@ void QCGTopLevel::createMenu() ...@@ -660,7 +661,7 @@ void QCGTopLevel::createMenu()
void QCGTopLevel::createToolbar() void QCGTopLevel::createToolbar()
{ {
QToolBar* tb = new QToolBar(tr("Main Toolbar"), this); tb = new QToolBar(tr("Main Toolbar"), this);
tb->setObjectName(QStringLiteral("main-toolbar")); tb->setObjectName(QStringLiteral("main-toolbar"));
addToolBar(Qt::TopToolBarArea, tb); addToolBar(Qt::TopToolBarArea, tb);
......
...@@ -236,6 +236,7 @@ private: ...@@ -236,6 +236,7 @@ private:
QAction *_configureAction, *_aboutAction, *_aboutQtAction; QAction *_configureAction, *_aboutAction, *_aboutQtAction;
QAction *_minimizeAction, *_zoomAction; QAction *_minimizeAction, *_zoomAction;
QMenu *windowMenu, *macDockMenu; QMenu *windowMenu, *macDockMenu;
QToolBar *tb;
QComboBox* _eventTypeBox; QComboBox* _eventTypeBox;
TraceFunction* _function; TraceFunction* _function;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment