mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
- Added Peers tab (not functional yet)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user