diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-09-30 16:21:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-09-30 16:22:00 +0200 |
commit | ac4dc94acc5d1e1d8fd4867730b835e2aa1fcc89 (patch) | |
tree | 8ca3dc84958e572e3f890ac3f56dfda670c63f60 /facetracknoir/ui.h | |
parent | 03a164ed74d616e8d5203142ec7e9738c8aae547 (diff) | |
parent | eb7703b4ecea5540a4c4a65faa1ff4c53fe97631 (diff) |
Merge branch 'unstable' into trackhat-ui
Sponsored-by: TrackHat
* unstable: (112 commits)
Revert "accela: try more complex deadzone algorithm"
pt: add wiki link for calibration instructions
qfc: more gray colors when graph is disabled
qfc, mapping: disallow editing and change color when checkbox disabled
qfc: don't allow editing when disabled
plugin-support: workaround multiple copies of modules
accela: change translation gain
accela: change rotation gain
pt: change extraction code
freepie-udp: add license
freepie-udp: update
accela: try more complex deadzone algorithm
accela: add helpful comment
accela: revert to more quadratic spline at start
also save if save pending when start tracking
ui: force saving if saving timer is pending
accela: slightly more linear function
pose-widget: simplify
freepie-udp: nix harmless warning
pose-widget: add comment
simple-mat: add __restrict for GNU
ui: save settings on a timer
ui: show a warning if configuration directory can't be used
aruco: tune min/max marker size
win32-joystick: fix duplicate device name selection logic
ui: no need to reset settings on tracking start
ui: save profile when combobox text changes, not merely index
ui: save current tracker/filter/proto, not last
win32-joystick: fix COM failure path
win32-joystick: nix unused variable
win32-joystick: allow for unique selection of joysticks
qfc: also draw line from function start while moving
no need to save on tracking start anymore
save axis opts, not just spline control points
tracker: change centering order again
fix typo
cmake: don't say "opentrack" twice for osx build
ui: really don't switch profiles while refreshing combobox
pt: fix type mismatch
ui: save prior to switching configs
tracker_rs: adjusted tracker's name
ui: don't reload settings if config wasn't changed
ui: save everything before switching profiles
options: return .ini basename easier
tracker_rs: more readable icon
tracker_rs: prevent potential thread starvation
ui: switch to newly-created config
ui: decruft
ui: also bail on new config if its name is ".ini"
ui: auto-refresh config list
ui: display up to 20 profiles w/o scrolling
ui: create an empty config properly in another code branch
udp-tracker: silence harmless warning
plugin-support: fix typo
plugin-support: set more sane RTLD flags
plugin-support: free modules from address space when needed
ui: rename symbol to reflect current usage
ui: move some slots to private
ui, shortcuts: these are slots, actually
ui: no need to write anything to new empty config
ui: avoid potential memory leak
ft: new game support
game-data: chomp newlines in extractor
ui: append extension in the right place
simple-mat: fix arglist SFINAE
simple-mat: can use static_cast here
nix default empty config. it gets created on its own.
ui: these aren't qt slots
ui: nix wrong headers
ui: remove GNU GPL
ui: simplify condition
props changed only
main, ui: store config files in a predefined directory
pt: show extracted points' areas and success count
close dialogs on switch to new module
...
Diffstat (limited to 'facetracknoir/ui.h')
-rw-r--r-- | facetracknoir/ui.h | 68 |
1 files changed, 23 insertions, 45 deletions
diff --git a/facetracknoir/ui.h b/facetracknoir/ui.h index 2253ec80..1abd92ff 100644 --- a/facetracknoir/ui.h +++ b/facetracknoir/ui.h @@ -1,27 +1,3 @@ -/******************************************************************************* -* MainWindow This program is a private project of the some enthusiastic -* gamers from Holland, who don't like to pay much for -* head-tracking. -* -* Copyright (C) 2010 Wim Vriend (Developing) -* Ron Hendriks (Researching and Testing) -* -* Homepage -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 3 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, see <http://www.gnu.org/licenses/>. -*********************************************************************************/ - /* Copyright (c) 2014-2015, Stanislaw Halik <sthalik@misaki.pl> * Permission to use, copy, modify, and/or distribute this @@ -39,12 +15,7 @@ #include <QTimer> #include <QSystemTrayIcon> #include <QString> - -#if !defined(_WIN32) -# include "qxt-mini/QxtGlobalShortcut" -#else -# include <windows.h> -#endif +#include <QMenu> #include "ui_main.h" @@ -69,12 +40,16 @@ class MainWindow : public QMainWindow, private State mem<QSystemTrayIcon> tray; QTimer pose_update_timer; QTimer det_timer; - mem<OptionsDialog> shortcuts_widget; + QTimer config_list_timer; + mem<OptionsDialog> options_widget; mem<MapWidget> mapping_widget; QShortcut kbd_quit; QPixmap no_feed_pixmap; mem<IProtocolDialog> pProtocolDialog; process_detector_worker det; + QMenu profile_menu; + bool is_refreshing_profiles; + QTimer save_timer; mem<dylib> current_protocol() { @@ -83,41 +58,44 @@ class MainWindow : public QMainWindow, private State void changeEvent(QEvent* e) override; - void createIconGroupBox(); void load_settings(); void updateButtonState(bool running, bool inertialp); - void fill_profile_combobox(); void display_pose(const double* mapped, const double* raw); void ensure_tray(); void set_title(const QString& game_title = QStringLiteral("")); -public slots: - void shortcutRecentered(); - void shortcutToggled(); - void shortcutZeroed(); - void bindKeyboardShortcuts(); + static bool get_new_config_name_from_dialog(QString &ret); + void set_profile(const QString& profile); + void maybe_save(); private slots: - void open(); + void _save(); void save(); - void saveAs(); void exit(); - void profileSelected(int index); + void profileSelected(QString name); void showProtocolSettings(); - void showKeyboardShortcuts(); + void show_options_dialog(); void showCurveConfiguration(); void showHeadPose(); void restore_from_tray(QSystemTrayIcon::ActivationReason); void maybe_start_profile_from_executable(); -public slots: + + void make_empty_config(); + void make_copied_config(); + void open_config_directory(); + void refresh_config_list(); + void startTracker(); void stopTracker(); + void reload_options(); +public slots: + void shortcutRecentered(); + void shortcutToggled(); + void shortcutZeroed(); public: MainWindow(); ~MainWindow(); void save_mappings(); void load_mappings(); - static QString remove_app_path(const QString full_path); static void set_working_directory(); - static void set_profile(const QString& profile); }; |