Browse Source

Merge pull request #3736 from Chocobo1/option

Cleanup in options_imp
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
5cb022c7b1
  1. 561
      src/gui/options.ui
  2. 583
      src/gui/options_imp.cpp
  3. 28
      src/gui/options_imp.h

561
src/gui/options.ui

@ -10,12 +10,6 @@
<height>591</height> <height>591</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Options</string> <string>Options</string>
</property> </property>
@ -25,22 +19,10 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<widget class="QListWidget" name="tabSelection"> <property name="childrenCollapsible">
<property name="sizePolicy"> <bool>false</bool>
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>116</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property> </property>
<widget class="QListWidget" name="tabSelection">
<property name="autoScroll"> <property name="autoScroll">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -50,9 +32,6 @@
<height>32</height> <height>32</height>
</size> </size>
</property> </property>
<property name="flow">
<enum>QListView::LeftToRight</enum>
</property>
<property name="isWrapping" stdset="0"> <property name="isWrapping" stdset="0">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -71,12 +50,6 @@
<property name="viewMode"> <property name="viewMode">
<enum>QListView::IconMode</enum> <enum>QListView::IconMode</enum>
</property> </property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="selectionRectVisible">
<bool>false</bool>
</property>
<property name="currentRow"> <property name="currentRow">
<number>0</number> <number>0</number>
</property> </property>
@ -164,6 +137,15 @@
</property> </property>
<widget class="QWidget" name="tabOptionPage1"> <widget class="QWidget" name="tabOptionPage1">
<layout class="QVBoxLayout" name="verticalLayout_10"> <layout class="QVBoxLayout" name="verticalLayout_10">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy"> <property name="sizePolicy">
@ -180,8 +162,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>474</width> <width>480</width>
<height>646</height> <height>672</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="verticalLayout_9">
@ -519,6 +501,15 @@
</widget> </widget>
<widget class="QWidget" name="tabOptionPage2"> <widget class="QWidget" name="tabOptionPage2">
<layout class="QVBoxLayout" name="verticalLayout_13"> <layout class="QVBoxLayout" name="verticalLayout_13">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QScrollArea" name="scrollArea_2"> <widget class="QScrollArea" name="scrollArea_2">
<property name="widgetResizable"> <property name="widgetResizable">
@ -1026,6 +1017,15 @@
</widget> </widget>
<widget class="QWidget" name="tabOptionPage3"> <widget class="QWidget" name="tabOptionPage3">
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QScrollArea" name="scrollArea_3"> <widget class="QScrollArea" name="scrollArea_3">
<property name="widgetResizable"> <property name="widgetResizable">
@ -1036,8 +1036,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>450</width> <width>480</width>
<height>632</height> <height>658</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_20"> <layout class="QVBoxLayout" name="verticalLayout_20">
@ -1386,12 +1386,12 @@
</item> </item>
<item> <item>
<widget class="QCheckBox" name="isProxyOnlyForTorrents"> <widget class="QCheckBox" name="isProxyOnlyForTorrents">
<property name="text">
<string>Use proxy only for torrents</string>
</property>
<property name="toolTip"> <property name="toolTip">
<string>RSS feeds, search engine, software updates or anything else other than torrent transfers and related operations (such as peer exchanges) will use a direct connection</string> <string>RSS feeds, search engine, software updates or anything else other than torrent transfers and related operations (such as peer exchanges) will use a direct connection</string>
</property> </property>
<property name="text">
<string>Use proxy only for torrents</string>
</property>
<property name="checked"> <property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -1540,13 +1540,22 @@
</widget> </widget>
</widget> </widget>
</item> </item>
<item>
<layout class="QVBoxLayout"/>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page_2"> <widget class="QWidget" name="tabSpeedPage">
<layout class="QVBoxLayout" name="verticalLayout_34"> <layout class="QVBoxLayout" name="verticalLayout_34">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QScrollArea" name="scrollArea_9"> <widget class="QScrollArea" name="scrollArea_9">
<property name="widgetResizable"> <property name="widgetResizable">
@ -1557,44 +1566,22 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>376</width> <width>502</width>
<height>431</height> <height>538</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_33"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item> <item>
<widget class="QGroupBox" name="bandwidthBox"> <widget class="QGroupBox" name="rateLimitBox">
<property name="title"> <property name="title">
<string>Global Rate Limits</string> <string>Global Rate Limits</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QGridLayout" name="rateLimitBoxLayout">
<item row="0" column="0"> <item row="0" column="2">
<widget class="QLabel" name="label_5">
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/slow_off.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QCheckBox" name="checkUploadLimit">
<property name="text">
<string>Upload:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinUploadLimit"> <widget class="QSpinBox" name="spinUploadLimit">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="suffix">
<string/>
</property>
<property name="minimum"> <property name="minimum">
<number>1</number> <number>1</number>
</property> </property>
@ -1606,28 +1593,25 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="1">
<widget class="QLabel" name="label_10"> <widget class="QCheckBox" name="checkUploadLimit">
<property name="text"> <property name="text">
<string>KiB/s</string> <string>Upload:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="0" column="3">
<widget class="QCheckBox" name="checkDownloadLimit"> <widget class="QLabel" name="label_10">
<property name="text"> <property name="text">
<string>Download:</string> <string>KiB/s</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="2">
<widget class="QSpinBox" name="spinDownloadLimit"> <widget class="QSpinBox" name="spinDownloadLimit">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="suffix">
<string/>
</property>
<property name="minimum"> <property name="minimum">
<number>1</number> <number>1</number>
</property> </property>
@ -1639,256 +1623,229 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="1" column="3">
<widget class="QLabel" name="label_13"> <widget class="QLabel" name="label_13">
<property name="text"> <property name="text">
<string>KiB/s</string> <string>KiB/s</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="0" column="0" rowspan="2">
<widget class="QLabel" name="label_5">
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/slow_off.png</pixmap>
</property>
</widget>
</item> </item>
<item row="0" column="2"> <item row="1" column="1">
<spacer> <widget class="QCheckBox" name="checkDownloadLimit">
<property name="text">
<string>Download:</string>
</property>
</widget>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>200</width> <width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="1" colspan="2">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_27">
<item>
<widget class="QCheckBox" name="checkuTP">
<property name="text">
<string>Enable bandwidth management (uTP)</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkLimituTPConnections">
<property name="text">
<string>Apply rate limit to uTP connections</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkLimitTransportOverhead">
<property name="text">
<string>Apply rate limit to transport overhead</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkLimitLocalPeerRate">
<property name="text">
<string>Apply rate limit to peers on LAN</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox_6"> <widget class="QGroupBox" name="altRateLimitBox">
<property name="title"> <property name="title">
<string>Alternative Global Rate Limits</string> <string>Alternative Rate Limits</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_11"> <layout class="QGridLayout" name="gridLayout_6">
<item> <item row="2" column="0" colspan="5">
<layout class="QGridLayout" name="gridLayout_9"> <widget class="QGroupBox" name="check_schedule">
<item row="0" column="0"> <property name="title">
<widget class="QLabel" name="label_16"> <string>Schedule the use of alternative rate limits</string>
<property name="minimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="text">
<string/>
</property> </property>
<property name="pixmap"> <property name="checkable">
<pixmap resource="../icons.qrc">:/icons/slow.png</pixmap> <bool>true</bool>
</property> </property>
<property name="scaledContents"> <property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string extracomment="from (time1 to time2)">From:</string>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="3">
<layout class="QGridLayout" name="gridLayout_8"> <widget class="QTimeEdit" name="schedule_to">
<item row="0" column="1"> <property name="wrapping">
<widget class="QSpinBox" name="spinUploadLimitAlt"> <bool>true</bool>
<property name="minimum">
<number>1</number>
</property> </property>
<property name="maximum"> <property name="displayFormat">
<number>1000000</number> <string notr="true">hh:mm</string>
</property> </property>
<property name="value"> <property name="time">
<number>10</number> <time>
<hour>20</hour>
<minute>0</minute>
<second>0</second>
</time>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_17">
<property name="text"> <property name="text">
<string>KiB/s</string> <string extracomment="time1 to time2">To:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="0" column="1">
<widget class="QSpinBox" name="spinDownloadLimitAlt"> <widget class="QTimeEdit" name="schedule_from">
<property name="enabled"> <property name="wrapping">
<bool>false</bool> <bool>true</bool>
</property> </property>
<property name="minimum"> <property name="displayFormat">
<number>1</number> <string notr="true">hh:mm</string>
</property> </property>
<property name="maximum"> <property name="calendarPopup">
<number>1000000</number> <bool>false</bool>
</property> </property>
<property name="value"> <property name="time">
<number>10</number> <time>
<hour>8</hour>
<minute>0</minute>
<second>0</second>
</time>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="2"> <item row="1" column="0">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_18">
<property name="text"> <property name="text">
<string>KiB/s</string> <string>When:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="1" column="1" colspan="3">
<widget class="QCheckBox" name="checkUploadLimitAlt"> <widget class="QComboBox" name="schedule_days">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text"> <property name="text">
<string>Upload:</string> <string>Every day</string>
</property> </property>
<property name="checked"> </item>
<bool>true</bool> <item>
<property name="text">
<string>Weekdays</string>
</property> </property>
</widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QCheckBox" name="checkDownloadLimitAlt">
<property name="text"> <property name="text">
<string>Download:</string> <string>Weekends</string>
</property> </property>
</widget>
</item> </item>
</layout> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="4">
<spacer name="horizontalSpacer_8"> <spacer name="horizontalSpacer_8">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>222</width> <width>40</width>
<height>59</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item row="0" column="0" rowspan="2">
<widget class="QGroupBox" name="check_schedule"> <widget class="QLabel" name="label_16">
<property name="title"> <property name="pixmap">
<string>Schedule the use of alternative rate limits</string> <pixmap resource="../icons.qrc">:/icons/slow.png</pixmap>
</property> </property>
<property name="checkable"> </widget>
<bool>true</bool> </item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkUploadLimitAlt">
<property name="text">
<string>Upload:</string>
</property> </property>
<property name="checked"> </widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="checkDownloadLimitAlt">
<property name="text">
<string>Download:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QSpinBox" name="spinUploadLimitAlt">
<property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> <property name="minimum">
<item> <number>1</number>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="leftMargin">
<number>5</number>
</property> </property>
<item> <property name="maximum">
<widget class="QLabel" name="label_6"> <number>1000000</number>
<property name="text"> </property>
<string extracomment="from (time1 to time2)">from</string> <property name="value">
<number>10</number>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="2">
<widget class="QTimeEdit" name="schedule_from"> <widget class="QSpinBox" name="spinDownloadLimitAlt">
<property name="wrapping"> <property name="enabled">
<bool>true</bool> <bool>false</bool>
</property> </property>
<property name="displayFormat"> <property name="minimum">
<string notr="true">hh:mm</string> <number>1</number>
</property> </property>
<property name="calendarPopup"> <property name="maximum">
<bool>false</bool> <number>1000000</number>
</property> </property>
<property name="time"> <property name="value">
<time> <number>10</number>
<hour>8</hour>
<minute>0</minute>
<second>0</second>
</time>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="3">
<widget class="QLabel" name="label_17"> <widget class="QLabel" name="label_14">
<property name="text"> <property name="text">
<string extracomment="time1 to time2">to</string> <string>KiB/s</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="3">
<widget class="QTimeEdit" name="schedule_to"> <widget class="QLabel" name="label_15">
<property name="wrapping"> <property name="text">
<bool>true</bool> <string>KiB/s</string>
</property>
<property name="displayFormat">
<string notr="true">hh:mm</string>
</property>
<property name="time">
<time>
<hour>20</hour>
<minute>0</minute>
<second>0</second>
</time>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="4">
<spacer name="horizontalSpacer_9"> <spacer name="horizontalSpacer_5">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -1901,40 +1858,44 @@
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_14"> <widget class="QGroupBox" name="rateLimitsGroupBox">
<property name="leftMargin"> <property name="title">
<number>5</number> <string>Rate Limits Settings</string>
</property> </property>
<item> <layout class="QGridLayout" name="gridLayout_8">
<widget class="QLabel" name="label_18"> <item row="4" column="0" colspan="3">
<widget class="QCheckBox" name="checkLimitLocalPeerRate">
<property name="text"> <property name="text">
<string>When:</string> <string>Apply rate limit to peers on LAN</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="3" column="0" colspan="3">
<widget class="QComboBox" name="schedule_days"> <widget class="QCheckBox" name="checkLimitTransportOverhead">
<item>
<property name="text"> <property name="text">
<string>Every day</string> <string>Apply rate limit to transport overhead</string>
</property> </property>
</widget>
</item> </item>
<item> <item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="checkuTP">
<property name="text"> <property name="text">
<string>Week days</string> <string>Enable µTP protocol</string>
</property> </property>
</widget>
</item> </item>
<item> <item row="2" column="1">
<widget class="QCheckBox" name="checkLimituTPConnections">
<property name="text"> <property name="text">
<string>Week ends</string> <string>Apply rate limit to µTP protocol</string>
</property> </property>
</item>
</widget> </widget>
</item> </item>
<item> <item row="2" column="2">
<spacer name="horizontalSpacer_10"> <spacer name="horizontalSpacer_9">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -1947,11 +1908,6 @@
</spacer> </spacer>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item>
@ -1975,6 +1931,15 @@
</widget> </widget>
<widget class="QWidget" name="tabOptionPage4"> <widget class="QWidget" name="tabOptionPage4">
<layout class="QVBoxLayout" name="verticalLayout_15"> <layout class="QVBoxLayout" name="verticalLayout_15">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QScrollArea" name="scrollArea_4"> <widget class="QScrollArea" name="scrollArea_4">
<property name="widgetResizable"> <property name="widgetResizable">
@ -2329,6 +2294,15 @@
</widget> </widget>
<widget class="QWidget" name="tabOptionPage7"> <widget class="QWidget" name="tabOptionPage7">
<layout class="QVBoxLayout"> <layout class="QVBoxLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QScrollArea" name="scrollArea_7"> <widget class="QScrollArea" name="scrollArea_7">
<property name="widgetResizable"> <property name="widgetResizable">
@ -2704,8 +2678,17 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page_3"> <widget class="QWidget" name="tabAdvancedPage">
<layout class="QVBoxLayout" name="verticalLayout_35"> <layout class="QVBoxLayout" name="verticalLayout_35">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QScrollArea" name="scrollArea_advanced"> <widget class="QScrollArea" name="scrollArea_advanced">
<property name="widgetResizable"> <property name="widgetResizable">
@ -2720,7 +2703,20 @@
<height>28</height> <height>28</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_36"/> <layout class="QVBoxLayout" name="verticalLayout_36">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget> </widget>
</widget> </widget>
</item> </item>
@ -2729,37 +2725,14 @@
</widget> </widget>
</widget> </widget>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>208</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property> </property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>tabOption</tabstop> <tabstop>tabOption</tabstop>
@ -2893,22 +2866,6 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>checkuTP</sender>
<signal>toggled(bool)</signal>
<receiver>checkLimituTPConnections</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>421</x>
<y>147</y>
</hint>
<hint type="destinationlabel">
<x>711</x>
<y>172</y>
</hint>
</hints>
</connection>
<connection> <connection>
<sender>checkMaxUploads</sender> <sender>checkMaxUploads</sender>
<signal>toggled(bool)</signal> <signal>toggled(bool)</signal>

583
src/gui/options_imp.cpp

File diff suppressed because it is too large Load Diff

28
src/gui/options_imp.h

@ -34,7 +34,12 @@
#include "ui_options.h" #include "ui_options.h"
// actions on double-click on torrents // actions on double-click on torrents
enum DoubleClickAction {TOGGLE_PAUSE, OPEN_DEST, NO_ACTION}; enum DoubleClickAction
{
TOGGLE_PAUSE,
OPEN_DEST,
NO_ACTION
};
class AdvancedSettings; class AdvancedSettings;
@ -42,14 +47,24 @@ QT_BEGIN_NAMESPACE
class QCloseEvent; class QCloseEvent;
QT_END_NAMESPACE QT_END_NAMESPACE
class options_imp : public QDialog, private Ui_Preferences { class options_imp: public QDialog, private Ui_Preferences
{
Q_OBJECT Q_OBJECT
private: private:
enum Tabs {TAB_UI, TAB_DOWNLOADS, TAB_CONNECTION, TAB_SPEED, TAB_BITTORRENT, TAB_WEBUI, TAB_ADVANCED}; enum Tabs
{
TAB_UI,
TAB_DOWNLOADS,
TAB_CONNECTION,
TAB_SPEED,
TAB_BITTORRENT,
TAB_WEBUI,
TAB_ADVANCED
};
public: public:
// Constructor / Destructor // Constructor / Destructor
options_imp(QWidget *parent=0); options_imp(QWidget *parent = 0);
~options_imp(); ~options_imp();
public slots: public slots:
@ -117,8 +132,8 @@ private:
// Connection options // Connection options
int getPort() const; int getPort() const;
bool isUPnPEnabled() const; bool isUPnPEnabled() const;
QPair<int,int> getGlobalBandwidthLimits() const; QPair<int, int> getGlobalBandwidthLimits() const;
QPair<int,int> getAltGlobalBandwidthLimits() const; QPair<int, int> getAltGlobalBandwidthLimits() const;
// Bittorrent options // Bittorrent options
int getMaxConnecs() const; int getMaxConnecs() const;
int getMaxConnecsPerTorrent() const; int getMaxConnecsPerTorrent() const;
@ -163,7 +178,6 @@ private:
QList<QString> addedScanDirs; QList<QString> addedScanDirs;
// SSL Cert / key // SSL Cert / key
QByteArray m_sslCert, m_sslKey; QByteArray m_sslCert, m_sslKey;
}; };
#endif #endif

Loading…
Cancel
Save