Browse Source

Improved program options

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
335e7366fd
  1. 23
      src/options_imp.cpp
  2. 3
      src/options_imp.h
  3. 922
      src/ui/options.ui

23
src/options_imp.cpp

@ -176,11 +176,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
connect(checkProxyAuth_http, SIGNAL(toggled(bool)), this, SLOT(enableHTTPProxyAuth(bool))); connect(checkProxyAuth_http, SIGNAL(toggled(bool)), this, SLOT(enableHTTPProxyAuth(bool)));
connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enablePeerProxy(int))); connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enablePeerProxy(int)));
connect(checkProxyAuth, SIGNAL(toggled(bool)), this, SLOT(enablePeerProxyAuth(bool))); connect(checkProxyAuth, SIGNAL(toggled(bool)), this, SLOT(enablePeerProxyAuth(bool)));
// Misc tab
connect(checkIPFilter, SIGNAL(toggled(bool)), this, SLOT(enableFilter(bool)));
connect(checkEnableRSS, SIGNAL(toggled(bool)), this, SLOT(enableRSS(bool)));
// Web UI tab
connect(checkWebUi, SIGNAL(toggled(bool)), this, SLOT(enableWebUi(bool)));
// Apply button is activated when a value is changed // Apply button is activated when a value is changed
// General tab // General tab
@ -824,12 +819,10 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
// Misc preferences // Misc preferences
// * IP Filter // * IP Filter
checkIPFilter->setChecked(Preferences::isFilteringEnabled()); checkIPFilter->setChecked(Preferences::isFilteringEnabled());
enableFilter(checkIPFilter->isChecked());
textFilterPath->setText(Preferences::getFilter()); textFilterPath->setText(Preferences::getFilter());
// End IP Filter // End IP Filter
// * RSS // * RSS
checkEnableRSS->setChecked(Preferences::isRSSEnabled()); checkEnableRSS->setChecked(Preferences::isRSSEnabled());
enableRSS(checkEnableRSS->isChecked());
spinRSSRefresh->setValue(Preferences::getRSSRefreshInterval()); spinRSSRefresh->setValue(Preferences::getRSSRefreshInterval());
spinRSSMaxArticlesPerFeed->setValue(Preferences::getRSSMaxArticlesPerFeed()); spinRSSMaxArticlesPerFeed->setValue(Preferences::getRSSMaxArticlesPerFeed());
// End RSS preferences // End RSS preferences
@ -841,7 +834,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
// End Queueing system preferences // End Queueing system preferences
// Web UI // Web UI
checkWebUi->setChecked(Preferences::isWebUiEnabled()); checkWebUi->setChecked(Preferences::isWebUiEnabled());
enableWebUi(checkWebUi->isChecked());
spinWebUiPort->setValue(Preferences::getWebUiPort()); spinWebUiPort->setValue(Preferences::getWebUiPort());
textWebUiUsername->setText(Preferences::getWebUiUsername()); textWebUiUsername->setText(Preferences::getWebUiUsername());
textWebUiPassword->setText(Preferences::getWebUiPassword()); textWebUiPassword->setText(Preferences::getWebUiPassword());
@ -1132,16 +1124,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
} }
} }
void options_imp::enableFilter(bool checked){
lblFilterPath->setEnabled(checked);
textFilterPath->setEnabled(checked);
browseFilterButton->setEnabled(checked);
}
void options_imp::enableRSS(bool checked) {
groupRSSSettings->setEnabled(checked);
}
void options_imp::enableUploadLimit(bool checked){ void options_imp::enableUploadLimit(bool checked){
spinUploadLimit->setEnabled(checked); spinUploadLimit->setEnabled(checked);
} }
@ -1430,11 +1412,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
// Web UI // Web UI
void options_imp::enableWebUi(bool checkBoxValue){
groupWebUiServer->setEnabled(checkBoxValue);
groupWebUiAuth->setEnabled(checkBoxValue);
}
bool options_imp::isWebUiEnabled() const bool options_imp::isWebUiEnabled() const
{ {
return checkWebUi->isChecked(); return checkWebUi->isChecked();

3
src/options_imp.h

@ -139,8 +139,6 @@ protected slots:
void enableMaxUploadsLimitPerTorrent(bool checked); void enableMaxUploadsLimitPerTorrent(bool checked);
void enableShareRatio(bool checked); void enableShareRatio(bool checked);
void enableDeleteRatio(bool checked); void enableDeleteRatio(bool checked);
void enableFilter(bool checked);
void enableRSS(bool checked);
void enableSpoofingSettings(int index); void enableSpoofingSettings(int index);
void setStyle(QString style); void setStyle(QString style);
void on_buttonBox_accepted(); void on_buttonBox_accepted();
@ -155,7 +153,6 @@ protected slots:
void enableSystrayOptions(); void enableSystrayOptions();
void disableSystrayOptions(); void disableSystrayOptions();
void setSystrayOptionsState(bool checked); void setSystrayOptionsState(bool checked);
void enableWebUi(bool checkBoxValue);
void changePage(QListWidgetItem*, QListWidgetItem*); void changePage(QListWidgetItem*, QListWidgetItem*);
void loadWindowState(); void loadWindowState();
void saveWindowState() const; void saveWindowState() const;

922
src/ui/options.ui

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save