mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Added Peers tab (not functional yet)
This commit is contained in:
parent
bc2a4b622b
commit
d8c6e2bcc6
3 changed files with 119 additions and 6 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue