diff --git a/src/UI/MainWindow.cc b/src/UI/MainWindow.cc index e03cc4108287a0e998d0d7224cde3574aa893ff6..66169d379587d3efa51b222d14925a0abebc9ad3 100644 --- a/src/UI/MainWindow.cc +++ b/src/UI/MainWindow.cc @@ -26,18 +26,12 @@ #define DCL_MENU(menu, name) [[maybe_unused]] QMenu *menu##Menu = menuBar()->addMenu(name); -#define DCL_TOOLBAR(method, name) \ - [[maybe_unused]] QToolBar *method##ToolBar = new QToolBar(tr(name), this); \ - addToolBar(method##ToolBar); - #define DCL_ACTION(method, name, tip, menu) \ [[maybe_unused]] QAction *method##Act = new QAction(tr(name), this); \ method##Act->setStatusTip(tr(tip)); \ menu##Menu->addAction(method##Act); \ connect(method##Act, &QAction::triggered, this, &MainWindow::method); -#define TOOLBAR_ADD_ACTION(toolbar, action) toolbar##ToolBar->addAction(action##Act); - #define ACTION_ADD_ICON(action, icon) action##Act->setIcon(QIcon::fromTheme(icon)); #define ACTION_ADD_SHORTCUT(action, shortcut) action##Act->setShortcut(shortcut); @@ -54,8 +48,6 @@ MainWindow::MainWindow() noexcept viewMenu = viewTmpMenu; // Save the view menu DCL_MENU(simulate, "&Simulate"); DCL_MENU(help, "&Help"); - DCL_TOOLBAR(file, "File"); - DCL_TOOLBAR(other, "Other"); DCL_ACTION(newDocument, "&New document", "Create a new document", file); DCL_ACTION(openDocument, "&Open document", "Open a document", file); @@ -78,12 +70,6 @@ MainWindow::MainWindow() noexcept ACTION_ADD_SHORTCUT(openDocument, QKeySequence::Open); ACTION_ADD_SHORTCUT(saveFile, QKeySequence::Save); - TOOLBAR_ADD_ACTION(file, newDocument); - TOOLBAR_ADD_ACTION(file, openDocument); - TOOLBAR_ADD_ACTION(file, saveFile); - TOOLBAR_ADD_ACTION(file, saveFileAs); - TOOLBAR_ADD_ACTION(other, openDialogHelp); - // Setup the tabs to display the documents documents = new QTabWidget(this); documents->setMovable(true);