From d96e83d517889382c8cc6441c06248c9970feaf5 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Tue, 3 Mar 2015 22:08:37 -0500 Subject: [PATCH] Main Menu Reorg. --- src/ui/MainWindow.cc | 27 ------------ src/ui/MainWindow.h | 5 --- src/ui/MainWindow.ui | 103 +++++++++---------------------------------- 3 files changed, 22 insertions(+), 113 deletions(-) diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index a9fa8aaf0..03bed4d94 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -1022,28 +1022,6 @@ void MainWindow::showSettings() settings.exec(); } -bool MainWindow::configLink(LinkInterface *link) -{ - // Go searching for this link's configuration window - QList actions = ui.menuNetwork->actions(); - - bool found(false); - - const int32_t& linkIndex(LinkManager::instance()->getLinks().indexOf(link)); - const int32_t& linkID(LinkManager::instance()->getLinks()[linkIndex]->getId()); - - foreach (QAction* action, actions) - { - if (action->data().toInt() == linkID) - { - found = true; - action->trigger(); // Show the Link Config Dialog - } - } - - return found; -} - void MainWindow::simulateLink(bool simulate) { if (simulate) { if (!simulationLink) { @@ -1440,11 +1418,6 @@ void MainWindow::loadSimulationView() } } -QList MainWindow::listLinkMenuActions() -{ - return ui.menuNetwork->actions(); -} - /// @brief Hides the spash screen if it is currently being shown void MainWindow::hideSplashScreen(void) { diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h index 5100893b2..674d59c6d 100644 --- a/src/ui/MainWindow.h +++ b/src/ui/MainWindow.h @@ -116,8 +116,6 @@ public: return lowPowerMode; } - QList listLinkMenuActions(); - void hideSplashScreen(void); /// @brief Saves the last used connection @@ -130,7 +128,6 @@ public: public slots: /** @brief Show the application settings */ void showSettings(); - bool configLink(LinkInterface *link); /** @brief Simulate a link */ void simulateLink(bool simulate); /** @brief Set the currently controlled UAS */ @@ -239,8 +236,6 @@ protected: void storeSettings(); - LinkInterface* udpLink; - QSettings settings; QActionGroup* centerStackActionGroup; diff --git a/src/ui/MainWindow.ui b/src/ui/MainWindow.ui index 85a281eee..4bf75eb80 100644 --- a/src/ui/MainWindow.ui +++ b/src/ui/MainWindow.ui @@ -58,28 +58,13 @@ File - + - - - Communication - - - - - - - Tool Widgets - - - - - Help @@ -96,26 +81,38 @@ + + + + + + + Advanced + + + + Tool Widgets + + + + + - - + + + - - + - - - :/files/images/actions/system-log-out.svg:/files/images/actions/system-log-out.svg - Exit @@ -171,17 +168,13 @@ - Manage Links + Manage Communication Links true - - - :/files/images/control/launch.svg:/files/images/control/launch.svg - Simulate @@ -190,28 +183,16 @@ - - - :/files/images/apps/utilities-system-monitor.svg:/files/images/apps/utilities-system-monitor.svg - Online Documentation - - - :/files/images/status/software-update-available.svg:/files/images/status/software-update-available.svg - Project Roadmap - - - :/files/images/categories/preferences-system.svg:/files/images/categories/preferences-system.svg - Developer Credits @@ -220,10 +201,6 @@ true - - - :/files/images/categories/applications-internet.svg:/files/images/categories/applications-internet.svg - Plan @@ -232,10 +209,6 @@ true - - - :/files/images/apps/utilities-system-monitor.svg:/files/images/apps/utilities-system-monitor.svg - Analyze @@ -244,19 +217,11 @@ true - - - :/files/images/status/network-wireless-encrypted.svg:/files/images/status/network-wireless-encrypted.svg - Fly - - - :/files/images/apps/utilities-system-monitor.svg:/files/images/apps/utilities-system-monitor.svg - New Custom Widget @@ -265,14 +230,6 @@ true - - - :/files/images/status/audio-volume-high.svg - :/files/images/status/audio-volume-muted.svg - :/files/images/status/audio-volume-muted.svg - :/files/images/status/audio-volume-high.svg - :/files/images/status/audio-volume-muted.svg:/files/images/status/audio-volume-high.svg - Mute Audio Output @@ -329,10 +286,6 @@ - - - :/files/images/status/folder-drag-accept.svg:/files/images/status/folder-drag-accept.svg - Load Custom Widget File @@ -341,10 +294,6 @@ true - - - :/files/images/categories/preferences-system.svg:/files/images/categories/preferences-system.svg - Setup @@ -367,10 +316,6 @@ true - - - :/files/images/apps/accessories-calculator.svg:/files/images/apps/accessories-calculator.svg - HIL Simulation @@ -379,10 +324,6 @@ true - - - :/files/images/apps/utilities-terminal.svg:/files/images/apps/utilities-terminal.svg - Terminal -- 2.22.0