Browse Source

- COSMETIC: Use alternating row colors in transfer list (set in program preferences)

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
6f6e453ae4
  1. 1
      Changelog
  2. 2
      src/GUI.cpp
  3. 3
      src/options_imp.cpp
  4. 5
      src/preferences.h
  5. 371
      src/ui/options.ui

1
Changelog

@ -6,6 +6,7 @@
- FEATURE: Append !.qB extension to incomplete files option (libtorrent >= v0.15 only) - FEATURE: Append !.qB extension to incomplete files option (libtorrent >= v0.15 only)
- FEATURE: Torrent files/folders can be renamed - FEATURE: Torrent files/folders can be renamed
- COSMETIC: Use checkboxes to filter torrent content instead of comboboxes - COSMETIC: Use checkboxes to filter torrent content instead of comboboxes
- COSMETIC: Use alternating row colors in transfer list (set in program preferences)
* Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0 * Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0
- FEATURE: Added program option to disable splash screen - FEATURE: Added program option to disable splash screen

2
src/GUI.cpp

@ -724,7 +724,7 @@ void GUI::loadPreferences(bool configure_session) {
} }
unsigned int new_refreshInterval = Preferences::getRefreshInterval(); unsigned int new_refreshInterval = Preferences::getRefreshInterval();
transferList->setRefreshInterval(new_refreshInterval); transferList->setRefreshInterval(new_refreshInterval);
transferList->setAlternatingRowColors(Preferences::useAlternatingRowColors());
// Queueing System // Queueing System
if(Preferences::isQueueingSystemEnabled()) { if(Preferences::isQueueingSystemEnabled()) {
if(!configure_session || !BTSession->isQueueingEnabled()) { if(!configure_session || !BTSession->isQueueingEnabled()) {

3
src/options_imp.cpp

@ -181,6 +181,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
connect(checkConfirmExit, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkConfirmExit, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkSpeedInTitle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkSpeedInTitle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(spinRefreshInterval, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); connect(spinRefreshInterval, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
connect(checkAltRowColors, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkNoSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkNoSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkCloseToSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkCloseToSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkMinimizeToSysTray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkMinimizeToSysTray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
@ -360,6 +361,7 @@ void options_imp::saveOptions(){
settings.setValue(QString::fromUtf8("ExitConfirm"), confirmOnExit()); settings.setValue(QString::fromUtf8("ExitConfirm"), confirmOnExit());
settings.setValue(QString::fromUtf8("SpeedInTitleBar"), speedInTitleBar()); settings.setValue(QString::fromUtf8("SpeedInTitleBar"), speedInTitleBar());
settings.setValue(QString::fromUtf8("RefreshInterval"), getRefreshInterval()); settings.setValue(QString::fromUtf8("RefreshInterval"), getRefreshInterval());
settings.setValue(QString::fromUtf8("AlternatingRowColors"), checkAltRowColors->isChecked());
settings.setValue(QString::fromUtf8("SystrayEnabled"), systrayIntegration()); settings.setValue(QString::fromUtf8("SystrayEnabled"), systrayIntegration());
settings.setValue(QString::fromUtf8("CloseToTray"), closeToTray()); settings.setValue(QString::fromUtf8("CloseToTray"), closeToTray());
settings.setValue(QString::fromUtf8("MinimizeToTray"), minimizeToTray()); settings.setValue(QString::fromUtf8("MinimizeToTray"), minimizeToTray());
@ -565,6 +567,7 @@ void options_imp::loadOptions(){
checkConfirmExit->setChecked(Preferences::confirmOnExit()); checkConfirmExit->setChecked(Preferences::confirmOnExit());
checkSpeedInTitle->setChecked(Preferences::speedInTitleBar()); checkSpeedInTitle->setChecked(Preferences::speedInTitleBar());
spinRefreshInterval->setValue(Preferences::getRefreshInterval()); spinRefreshInterval->setValue(Preferences::getRefreshInterval());
checkAltRowColors->setChecked(Preferences::useAlternatingRowColors());
checkNoSystray->setChecked(!Preferences::systrayIntegration()); checkNoSystray->setChecked(!Preferences::systrayIntegration());
checkDisplayToolbar->setChecked(Preferences::isToolbarDisplayed()); checkDisplayToolbar->setChecked(Preferences::isToolbarDisplayed());
checkNoSplash->setChecked(Preferences::isSlashScreenDisabled()); checkNoSplash->setChecked(Preferences::isSlashScreenDisabled());

5
src/preferences.h

@ -64,6 +64,11 @@ public:
return settings.value(QString::fromUtf8("Preferences/General/RefreshInterval"), 1500).toUInt(); return settings.value(QString::fromUtf8("Preferences/General/RefreshInterval"), 1500).toUInt();
} }
static bool useAlternatingRowColors() {
QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/General/AlternatingRowColors"), true).toBool();
}
static bool systrayIntegration() { static bool systrayIntegration() {
QSettings settings("qBittorrent", "qBittorrent"); QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/General/SystrayEnabled"), true).toBool(); return settings.value(QString::fromUtf8("Preferences/General/SystrayEnabled"), true).toBool();

371
src/ui/options.ui

@ -235,15 +235,15 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>620</width> <width>602</width>
<height>495</height> <height>590</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_16"> <layout class="QVBoxLayout" name="verticalLayout_9">
<item> <item>
<widget class="QGroupBox" name="UISettingsBox"> <widget class="QGroupBox" name="UISettingsBox">
<property name="title"> <property name="title">
<string>User interface settings</string> <string>User interface</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
<item> <item>
@ -271,6 +271,22 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="lbl_i18n_info_2">
<property name="font">
<font>
<pointsize>8</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>(Requires restart)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item> <item>
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
@ -286,22 +302,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QLabel" name="lbl_i18n_info_2">
<property name="font">
<font>
<pointsize>8</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>&lt;b&gt;Note:&lt;/b&gt; Changes will be applied after qBittorrent is restarted.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<item> <item>
@ -390,48 +390,159 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout"> <widget class="QGroupBox" name="groupBox_4">
<item> <property name="title">
<widget class="QLabel" name="label_5"> <string>Transfer list</string>
<property name="text"> </property>
<string>Transfer list refresh interval:</string> <layout class="QVBoxLayout" name="verticalLayout_27">
</property> <item>
</widget> <layout class="QHBoxLayout">
</item> <item>
<item> <widget class="QLabel" name="label_5">
<widget class="QSpinBox" name="spinRefreshInterval"> <property name="text">
<property name="minimum"> <string>Refresh interval:</string>
<number>30</number> </property>
</property> </widget>
<property name="maximum"> </item>
<number>99999</number> <item>
</property> <widget class="QSpinBox" name="spinRefreshInterval">
<property name="value"> <property name="minimum">
<number>1500</number> <number>30</number>
</property> </property>
</widget> <property name="maximum">
</item> <number>99999</number>
<item> </property>
<widget class="QLabel" name="label_6"> <property name="value">
<property name="text"> <number>1500</number>
<string>ms</string> </property>
</property> </widget>
</widget> </item>
</item> <item>
<item> <widget class="QLabel" name="label_6">
<spacer> <property name="text">
<property name="orientation"> <string>ms</string>
<enum>Qt::Horizontal</enum> </property>
</property> </widget>
<property name="sizeHint" stdset="0"> </item>
<size> <item>
<width>40</width> <spacer>
<height>20</height> <property name="orientation">
</size> <enum>Qt::Horizontal</enum>
</property> </property>
</spacer> <property name="sizeHint" stdset="0">
</item> <size>
</layout> <width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkAltRowColors">
<property name="text">
<string extracomment="In transfer list, one every two rows will have grey background.">Use alternating row colors</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="ActDblClickBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QGroupBox::title {
font-weight: normal;
margin-left: -2px;
}
QGroupBox {
border-width: 0;
}</string>
</property>
<property name="title">
<string comment="Action executed when doucle-clicking on an item in transfer (download/upload) list">Action on double click:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="_4">
<item>
<widget class="QLabel" name="lblDlList_2">
<property name="text">
<string>Downloading:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="actionTorrentDlOnDblClBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Start/Stop</string>
</property>
</item>
<item>
<property name="text">
<string>Open folder</string>
</property>
</item>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblUploadList">
<property name="text">
<string>Completed:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="actionTorrentFnOnDblClBox">
<item>
<property name="text">
<string>Start/Stop</string>
</property>
</item>
<item>
<property name="text">
<string>Open folder</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
@ -485,138 +596,8 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QGroupBox" name="ActDblClickBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string comment="Action executed when doucle-clicking on an item in transfer (download/upload) list">Action on double click</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="_4">
<item>
<widget class="QLabel" name="lblDlList_2">
<property name="text">
<string>Downloading:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="actionTorrentDlOnDblClBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Start/Stop</string>
</property>
</item>
<item>
<property name="text">
<string>Open folder</string>
</property>
</item>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="_5">
<item>
<widget class="QLabel" name="lblUploadList">
<property name="text">
<string>Completed:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="actionTorrentFnOnDblClBox">
<item>
<property name="text">
<string>Start/Stop</string>
</property>
</item>
<item>
<property name="text">
<string>Open folder</string>
</property>
</item>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<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>
</layout>
</item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -637,7 +618,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>-27</y> <y>0</y>
<width>644</width> <width>644</width>
<height>504</height> <height>504</height>
</rect> </rect>
@ -2625,8 +2606,8 @@ QGroupBox {
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>452</width> <width>620</width>
<height>192</height> <height>495</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_24"> <layout class="QVBoxLayout" name="verticalLayout_24">

Loading…
Cancel
Save