- Added Peers tab (not functional yet)

This commit is contained in:
Christophe Dumez 2009-11-12 19:44:47 +00:00
parent bc2a4b622b
commit d8c6e2bcc6
3 changed files with 119 additions and 6 deletions

View file

@ -252,6 +252,10 @@ void PropertiesWidget::saveSettings() {
settings.setValue(QString::fromUtf8("TorrentProperties/filesColsWidth"), contentColsWidths);
}
void PropertiesWidget::loadPeers() {
// TODO
}
void PropertiesWidget::loadDynamicData() {
if(!h.is_valid()) return;
try {
@ -360,6 +364,8 @@ QPushButton* PropertiesWidget::getButtonFromIndex(int index) {
switch(index) {
case TRACKERS_TAB:
return trackers_button;
case PEERS_TAB:
return peers_button;
case URLSEEDS_TAB:
return url_seeds_button;
case FILES_TAB:
@ -391,6 +397,17 @@ void PropertiesWidget::on_trackers_button_clicked() {
}
}
void PropertiesWidget::on_peers_button_clicked() {
if(state == VISIBLE && stackedProperties->currentIndex() == PEERS_TAB) {
reduce();
} else {
slide();
getButtonFromIndex(stackedProperties->currentIndex())->setStyleSheet(DEFAULT_BUTTON_CSS);
stackedProperties->setCurrentIndex(PEERS_TAB);
peers_button->setStyleSheet(SELECTED_BUTTON_CSS);
}
}
void PropertiesWidget::on_url_seeds_button_clicked() {
if(state == VISIBLE && stackedProperties->currentIndex() == URLSEEDS_TAB) {
reduce();