Browse Source

- All buttons work now

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
4a33917e89
  1. 2
      src/propertiesWidget.ui
  2. 16
      src/propertieswidget.cpp
  3. 2
      src/propertieswidget.h

2
src/propertiesWidget.ui

@ -730,6 +730,8 @@ @@ -730,6 +730,8 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="page_3"/>
<widget class="QWidget" name="page_4"/>
</widget>
</item>
<item>

16
src/propertieswidget.cpp

@ -171,6 +171,10 @@ QPushButton* PropertiesWidget::getButtonFromIndex(int index) { @@ -171,6 +171,10 @@ QPushButton* PropertiesWidget::getButtonFromIndex(int index) {
switch(index) {
case TRACKERS_TAB:
return trackers_button;
case URLSEEDS_TAB:
return url_seeds_button;
case FILES_TAB:
return files_button;
default:
return main_infos_button;
}
@ -187,3 +191,15 @@ void PropertiesWidget::on_trackers_button_clicked() { @@ -187,3 +191,15 @@ void PropertiesWidget::on_trackers_button_clicked() {
stackedProperties->setCurrentIndex(TRACKERS_TAB);
trackers_button->setStyleSheet(SELECTED_BUTTON_CSS);
}
void PropertiesWidget::on_url_seeds_button_clicked() {
getButtonFromIndex(stackedProperties->currentIndex())->setStyleSheet(DEFAULT_BUTTON_CSS);
stackedProperties->setCurrentIndex(URLSEEDS_TAB);
url_seeds_button->setStyleSheet(SELECTED_BUTTON_CSS);
}
void PropertiesWidget::on_files_button_clicked() {
getButtonFromIndex(stackedProperties->currentIndex())->setStyleSheet(DEFAULT_BUTTON_CSS);
stackedProperties->setCurrentIndex(FILES_TAB);
files_button->setStyleSheet(SELECTED_BUTTON_CSS);
}

2
src/propertieswidget.h

@ -66,6 +66,8 @@ protected slots: @@ -66,6 +66,8 @@ protected slots:
void loadTrackers();
void on_main_infos_button_clicked();
void on_trackers_button_clicked();
void on_url_seeds_button_clicked();
void on_files_button_clicked();
public:
PropertiesWidget(QWidget *parent, TransferListWidget *transferList, bittorrent* BTSession);

Loading…
Cancel
Save