summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-02-17 06:10:13 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-02-17 06:10:13 +0100
commitdaf8d590858d610e9a2702c70399c0d7bb2778ee (patch)
tree3f50d8acf803203799e4ea44be26204ed6fa21b4 /facetracknoir
parent7da215ba3abca612b30d2d66e2be35f11342a7b0 (diff)
shortcuts: allow customize whether to center on startup
Issue: #128
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/keyboard.ui145
-rw-r--r--facetracknoir/shortcut-dialog.cpp2
2 files changed, 78 insertions, 69 deletions
diff --git a/facetracknoir/keyboard.ui b/facetracknoir/keyboard.ui
index 903bb20f..cdfc0657 100644
--- a/facetracknoir/keyboard.ui
+++ b/facetracknoir/keyboard.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>461</width>
- <height>174</height>
+ <height>181</height>
</rect>
</property>
<property name="sizePolicy">
@@ -39,6 +39,45 @@
<enum>QFrame::Plain</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
+ <item row="2" column="1">
+ <widget class="QCheckBox" name="chkToggleShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QCheckBox" name="chkToggleCtrl">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Ctrl</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="chkZeroShift">
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ </item>
<item row="3" column="0">
<widget class="QLabel" name="textLabel2_6">
<property name="sizePolicy">
@@ -100,24 +139,8 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="textLabel2_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Center</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkCenterShift">
+ <item row="2" column="3">
+ <widget class="QCheckBox" name="chkToggleAlt">
<property name="maximumSize">
<size>
<width>50</width>
@@ -125,7 +148,7 @@
</size>
</property>
<property name="text">
- <string>Shift</string>
+ <string>Alt</string>
</property>
</widget>
</item>
@@ -142,8 +165,8 @@
</property>
</widget>
</item>
- <item row="2" column="3">
- <widget class="QCheckBox" name="chkToggleAlt">
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkCenterShift">
<property name="maximumSize">
<size>
<width>50</width>
@@ -151,36 +174,23 @@
</size>
</property>
<property name="text">
- <string>Alt</string>
- </property>
- </widget>
- </item>
- <item row="2" column="5">
- <widget class="QComboBox" name="cbxToggleKey">
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>0</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Select Number</string>
- </property>
- <property name="insertPolicy">
- <enum>QComboBox::InsertAlphabetically</enum>
+ <string>Shift</string>
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QCheckBox" name="chkCenterAlt">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
+ <item row="1" column="0">
+ <widget class="QLabel" name="textLabel2_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
<property name="text">
- <string>Alt</string>
+ <string>Center</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
</property>
</widget>
</item>
@@ -216,34 +226,24 @@
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkToggleShift">
- <property name="maximumSize">
+ <item row="2" column="5">
+ <widget class="QComboBox" name="cbxToggleKey">
+ <property name="minimumSize">
<size>
- <width>50</width>
- <height>16777215</height>
+ <width>90</width>
+ <height>0</height>
</size>
</property>
- <property name="text">
- <string>Shift</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QCheckBox" name="chkToggleCtrl">
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
+ <property name="toolTip">
+ <string>Select Number</string>
</property>
- <property name="text">
- <string>Ctrl</string>
+ <property name="insertPolicy">
+ <enum>QComboBox::InsertAlphabetically</enum>
</property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QCheckBox" name="chkZeroShift">
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="chkCenterAlt">
<property name="maximumSize">
<size>
<width>50</width>
@@ -251,7 +251,7 @@
</size>
</property>
<property name="text">
- <string>Shift</string>
+ <string>Alt</string>
</property>
</widget>
</item>
@@ -275,6 +275,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="center_at_startup">
+ <property name="text">
+ <string>Center at startup</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QCheckBox" name="trayp">
<property name="text">
<string>Minimize to tray</string>
diff --git a/facetracknoir/shortcut-dialog.cpp b/facetracknoir/shortcut-dialog.cpp
index f2934c15..437365b4 100644
--- a/facetracknoir/shortcut-dialog.cpp
+++ b/facetracknoir/shortcut-dialog.cpp
@@ -29,6 +29,8 @@ KeyboardShortcutDialog::KeyboardShortcutDialog()
tie_setting(s.zero.ctrl, ui.chkZeroCtrl);
tie_setting(s.s_main.tray_enabled, ui.trayp);
+
+ tie_setting(s.s_main.center_at_startup, ui.center_at_startup);
}
void KeyboardShortcutDialog::doOK() {