diff options
-rw-r--r-- | facetracknoir/ui.cpp | 12 | ||||
-rw-r--r-- | facetracknoir/ui.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index e22fee7a..bd1b88f7 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -12,7 +12,6 @@ #include "facetracknoir/new_file_dialog.h" #include <QFileDialog> #include <QDesktopServices> -#include <QMenu> #ifndef _WIN32 # include <unistd.h> @@ -74,12 +73,11 @@ MainWindow::MainWindow() : connect(&pose_update_timer, SIGNAL(timeout()), this, SLOT(showHeadPose())); connect(&kbd_quit, SIGNAL(activated()), this, SLOT(exit())); - auto menu = new QMenu; - menu->addAction("Create new empty config", this, SLOT(make_empty_config())); - menu->addAction("Create new copied config", this, SLOT(make_copied_config())); - menu->addAction("Open configuration directory", this, SLOT(open_config_directory())); - menu->addAction("Refresh configuration list", this, SLOT(refresh_config_list())); - ui.profile_button->setMenu(menu); + profile_menu.addAction("Create new empty config", this, SLOT(make_empty_config())); + profile_menu.addAction("Create new copied config", this, SLOT(make_copied_config())); + profile_menu.addAction("Open configuration directory", this, SLOT(open_config_directory())); + profile_menu.addAction("Refresh configuration list", this, SLOT(refresh_config_list())); + ui.profile_button->setMenu(&profile_menu); kbd_quit.setEnabled(true); diff --git a/facetracknoir/ui.h b/facetracknoir/ui.h index 4e89b143..9ecc0db9 100644 --- a/facetracknoir/ui.h +++ b/facetracknoir/ui.h @@ -15,6 +15,7 @@ #include <QTimer> #include <QSystemTrayIcon> #include <QString> +#include <QMenu> #include "ui_main.h" @@ -47,6 +48,7 @@ class MainWindow : public QMainWindow, private State mem<IProtocolDialog> pProtocolDialog; mem<ITrackerDialog> pTrackerDialog; process_detector_worker det; + QMenu profile_menu; mem<dylib> current_tracker() { |