* Rework the Preferences UI to use tabbed interface.

This commit is contained in:
Konstantin Isakov 2009-04-10 21:23:27 +00:00
parent c7126a0281
commit 7ea278db55

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>402</width>
<height>540</height> <height>261</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -16,392 +16,509 @@
<property name="modal"> <property name="modal">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_8">
<item> <item>
<widget class="QGroupBox" name="enableTrayIcon"> <widget class="QTabWidget" name="tabWidget">
<property name="toolTip"> <property name="currentIndex">
<string>When enabled, an icon appears in the sytem tray area which can be used <number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>&amp;Interface</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="enableTrayIcon">
<property name="toolTip">
<string>When enabled, an icon appears in the sytem tray area which can be used
to open main window and perform other tasks.</string> to open main window and perform other tasks.</string>
</property> </property>
<property name="title"> <property name="title">
<string>Enable system tray icon</string> <string>Enable system tray icon</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property> </property>
<property name="flat"> <property name="flat">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="checked"> <property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QCheckBox" name="startToTray"> <widget class="QCheckBox" name="startToTray">
<property name="toolTip"> <property name="toolTip">
<string>With this on, the application starts directly to system tray without showing <string>With this on, the application starts directly to system tray without showing
its main window.</string> its main window.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Start to system tray</string> <string>Start to system tray</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="closeToTray"> <widget class="QCheckBox" name="closeToTray">
<property name="toolTip"> <property name="toolTip">
<string>With this on, an attempt to close main window would hide it instead of closing <string>With this on, an attempt to close main window would hide it instead of closing
the application.</string> the application.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Close to system tray</string> <string>Close to system tray</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="enableScanPopup"> <spacer name="verticalSpacer">
<property name="toolTip"> <property name="orientation">
<string>When enabled, a translation popup window would be shown each time <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>&amp;Scan Popup</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="enableScanPopup">
<property name="toolTip">
<string>When enabled, a translation popup window would be shown each time
you point your mouse on any word on the screen (Windows) or select you point your mouse on any word on the screen (Windows) or select
any word with mouse (Linux). When enabled, you can switch it on and any word with mouse (Linux). When enabled, you can switch it on and
off from main window or tray icon.</string> off from main window or tray icon.</string>
</property>
<property name="title">
<string>Scan popup functionality</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="startWithScanPopupOn">
<property name="toolTip">
<string>Chooses whether the scan popup mode is on by default nor not. If checked,
the program would always start with the scan popup active.</string>
</property>
<property name="text">
<string>Start with scan popup turned on</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="enableScanPopupModifiers">
<property name="toolTip">
<string>With this enabled, the popup would only show up if all chosen keys are
in the pressed state when the word selection changes.</string>
</property>
<property name="text">
<string>Only show popup when all selected keys are kept pressed:</string>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="scanPopupModifiers">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="margin">
<number>0</number>
</property> </property>
<item> <property name="title">
<layout class="QHBoxLayout" name="horizontalLayout"> <string>Enable scan popup functionality</string>
<item> </property>
<spacer name="horizontalSpacer"> <property name="checkable">
<property name="orientation"> <bool>true</bool>
<enum>Qt::Horizontal</enum> </property>
</property> <property name="checked">
<property name="sizeHint" stdset="0"> <bool>false</bool>
<size> </property>
<width>40</width> <layout class="QVBoxLayout" name="verticalLayout_4">
<height>20</height> <item>
</size> <widget class="QCheckBox" name="startWithScanPopupOn">
</property> <property name="toolTip">
</spacer> <string>Chooses whether the scan popup mode is on by default nor not. If checked,
</item> the program would always start with the scan popup active.</string>
<item> </property>
<layout class="QGridLayout" name="gridLayout"> <property name="text">
<item row="1" column="1"> <string>Start with scan popup turned on</string>
<widget class="QCheckBox" name="leftCtrl"> </property>
<property name="toolTip"> </widget>
<string>Left Ctrl only</string> </item>
</property> <item>
<property name="text"> <widget class="QCheckBox" name="enableScanPopupModifiers">
<string>Left Ctrl</string> <property name="toolTip">
</property> <string>With this enabled, the popup would only show up if all chosen keys are
</widget> in the pressed state when the word selection changes.</string>
</item> </property>
<item row="2" column="2"> <property name="text">
<widget class="QCheckBox" name="rightShift"> <string>Only show popup when all selected keys are kept pressed:</string>
<property name="toolTip"> </property>
<string>Right Shift only</string> </widget>
</property> </item>
<property name="text"> <item>
<string>Right Shift</string> <widget class="QFrame" name="scanPopupModifiers">
</property> <property name="frameShape">
</widget> <enum>QFrame::NoFrame</enum>
</item> </property>
<item row="0" column="0"> <property name="frameShadow">
<widget class="QCheckBox" name="altKey"> <enum>QFrame::Plain</enum>
<property name="toolTip"> </property>
<string>Alt key</string> <property name="lineWidth">
</property> <number>0</number>
<property name="text"> </property>
<string>Alt</string> <layout class="QVBoxLayout" name="verticalLayout_5">
</property> <property name="margin">
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="ctrlKey">
<property name="toolTip">
<string>Ctrl key</string>
</property>
<property name="text">
<string>Ctrl</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="leftAlt">
<property name="toolTip">
<string>Left Alt only</string>
</property>
<property name="text">
<string>Left Alt</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="shiftKey">
<property name="toolTip">
<string>Shift key</string>
</property>
<property name="text">
<string>Shift</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="rightAlt">
<property name="toolTip">
<string>Right Alt only</string>
</property>
<property name="text">
<string>Right Alt</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="rightCtrl">
<property name="toolTip">
<string>Right Ctrl only</string>
</property>
<property name="text">
<string>Right Ctrl</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="leftShift">
<property name="toolTip">
<string>Left Shift only</string>
</property>
<property name="text">
<string>Left Shift</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QCheckBox" name="winKey">
<property name="toolTip">
<string>Windows key or Meta key</string>
</property>
<property name="text">
<string>Win/Meta</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>0</number> <number>0</number>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <item>
<property name="margin"> <layout class="QHBoxLayout" name="horizontalLayout">
<number>0</number> <item>
</property> <spacer name="horizontalSpacer">
</layout> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</item> </property>
</layout> <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QCheckBox" name="leftCtrl">
<property name="toolTip">
<string>Left Ctrl only</string>
</property>
<property name="text">
<string>Left Ctrl</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="rightShift">
<property name="toolTip">
<string>Right Shift only</string>
</property>
<property name="text">
<string>Right Shift</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="altKey">
<property name="toolTip">
<string>Alt key</string>
</property>
<property name="text">
<string>Alt</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="ctrlKey">
<property name="toolTip">
<string>Ctrl key</string>
</property>
<property name="text">
<string>Ctrl</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="leftAlt">
<property name="toolTip">
<string>Left Alt only</string>
</property>
<property name="text">
<string>Left Alt</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="shiftKey">
<property name="toolTip">
<string>Shift key</string>
</property>
<property name="text">
<string>Shift</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="rightAlt">
<property name="toolTip">
<string>Right Alt only</string>
</property>
<property name="text">
<string>Right Alt</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="rightCtrl">
<property name="toolTip">
<string>Right Ctrl only</string>
</property>
<property name="text">
<string>Right Ctrl</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="leftShift">
<property name="toolTip">
<string>Left Shift only</string>
</property>
<property name="text">
<string>Left Shift</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QCheckBox" name="winKey">
<property name="toolTip">
<string>Windows key or Meta key</string>
</property>
<property name="text">
<string>Win/Meta</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>&amp;Audio</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="pronounceOnLoadMain">
<property name="text">
<string>Auto-pronounce words in main window</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="pronounceOnLoadPopup">
<property name="text">
<string>Auto-pronounce words in scan popup</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Program to play audio files:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="audioPlaybackProgram"/>
</item> </item>
</layout> </layout>
</widget> </item>
</item> <item>
</layout> <spacer name="verticalSpacer_2">
</widget> <property name="orientation">
</item> <enum>Qt::Vertical</enum>
<item> </property>
<widget class="QGroupBox" name="groupBox"> <property name="sizeHint" stdset="0">
<property name="title"> <size>
<string>Sound</string> <width>20</width>
</property> <height>46</height>
<layout class="QVBoxLayout" name="verticalLayout_7"> </size>
<item> </property>
<widget class="QCheckBox" name="pronounceOnLoadMain"> </spacer>
<property name="text"> </item>
<string>Auto-pronounce words in main window</string> </layout>
</property> </widget>
</widget> <widget class="QWidget" name="tab_3">
</item> <attribute name="title">
<item> <string>&amp;Network</string>
<widget class="QCheckBox" name="pronounceOnLoadPopup"> </attribute>
<property name="text"> <layout class="QVBoxLayout" name="verticalLayout_9">
<string>Auto-pronounce words in scan popup</string> <item>
</property> <spacer name="verticalSpacer_5">
</widget> <property name="orientation">
</item> <enum>Qt::Vertical</enum>
<item> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <property name="sizeHint" stdset="0">
<item> <size>
<widget class="QLabel" name="label_6"> <width>20</width>
<property name="text"> <height>40</height>
<string>Program to play audio files:</string> </size>
</property> </property>
</widget> </spacer>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="audioPlaybackProgram"/> <widget class="QGroupBox" name="useProxyServer">
</item> <property name="toolTip">
</layout> <string>Enable if you wish to use a proxy server
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="useProxyServer">
<property name="toolTip">
<string>Enable if you wish to use a proxy server
for all program's network requests.</string> for all program's network requests.</string>
</property> </property>
<property name="title"> <property name="title">
<string>Use proxy server</string> <string>Use proxy server</string>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="checked"> <property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Type:</string> <string>Type:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="proxyType"/> <widget class="QComboBox" name="proxyType"/>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Host:</string> <string>Host:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="proxyHost"/> <widget class="QLineEdit" name="proxyHost"/>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Port:</string> <string>Port:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QSpinBox" name="proxyPort"> <widget class="QSpinBox" name="proxyPort">
<property name="maximum"> <property name="maximum">
<number>65535</number> <number>65535</number>
</property> </property>
<property name="value"> <property name="value">
<number>8080</number> <number>8080</number>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>User:</string> <string>User:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="proxyUser"/> <widget class="QLineEdit" name="proxyUser"/>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="text"> <property name="text">
<string>Password:</string> <string>Password:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="proxyPassword"> <widget class="QLineEdit" name="proxyPassword">
<property name="echoMode"> <property name="echoMode">
<enum>QLineEdit::Password</enum> <enum>QLineEdit::Password</enum>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
</layout> </layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>39</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation"> <property name="orientation">