mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
Merge pull request #16333 from thalieht/newdlg
Add Select All/None buttons in new torrent dialog
This commit is contained in:
commit
b61a818a3f
@ -201,7 +201,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||||||
|
|
||||||
m_ui->startTorrentCheckBox->setChecked(!m_torrentParams.addPaused.value_or(session->isAddTorrentPaused()));
|
m_ui->startTorrentCheckBox->setChecked(!m_torrentParams.addPaused.value_or(session->isAddTorrentPaused()));
|
||||||
|
|
||||||
m_ui->comboTTM->blockSignals(true); // the TreeView size isn't correct if the slot does it job at this point
|
m_ui->comboTTM->blockSignals(true); // the TreeView size isn't correct if the slot does its job at this point
|
||||||
m_ui->comboTTM->setCurrentIndex(session->isAutoTMMDisabledByDefault() ? 0 : 1);
|
m_ui->comboTTM->setCurrentIndex(session->isAutoTMMDisabledByDefault() ? 0 : 1);
|
||||||
m_ui->comboTTM->blockSignals(false);
|
m_ui->comboTTM->blockSignals(false);
|
||||||
|
|
||||||
@ -899,6 +899,8 @@ void AddNewTorrentDialog::setupTreeview()
|
|||||||
connect(m_ui->contentTreeView, &QAbstractItemView::clicked, m_ui->contentTreeView
|
connect(m_ui->contentTreeView, &QAbstractItemView::clicked, m_ui->contentTreeView
|
||||||
, qOverload<const QModelIndex &>(&QAbstractItemView::edit));
|
, qOverload<const QModelIndex &>(&QAbstractItemView::edit));
|
||||||
connect(m_ui->contentTreeView, &QWidget::customContextMenuRequested, this, &AddNewTorrentDialog::displayContentTreeMenu);
|
connect(m_ui->contentTreeView, &QWidget::customContextMenuRequested, this, &AddNewTorrentDialog::displayContentTreeMenu);
|
||||||
|
connect(m_ui->buttonSelectAll, &QPushButton::clicked, m_contentModel, &TorrentContentFilterModel::selectAll);
|
||||||
|
connect(m_ui->buttonSelectNone, &QPushButton::clicked, m_contentModel, &TorrentContentFilterModel::selectNone);
|
||||||
|
|
||||||
const auto contentLayout = ((m_ui->contentLayoutComboBox->currentIndex() == 0)
|
const auto contentLayout = ((m_ui->contentLayoutComboBox->currentIndex() == 0)
|
||||||
? BitTorrent::detectContentLayout(m_torrentInfo.filePaths())
|
? BitTorrent::detectContentLayout(m_torrentInfo.filePaths())
|
||||||
@ -989,9 +991,9 @@ void AddNewTorrentDialog::TMMChanged(int index)
|
|||||||
|
|
||||||
m_ui->groupBoxDownloadPath->blockSignals(true);
|
m_ui->groupBoxDownloadPath->blockSignals(true);
|
||||||
m_ui->groupBoxDownloadPath->setChecked(!downloadPath.isEmpty());
|
m_ui->groupBoxDownloadPath->setChecked(!downloadPath.isEmpty());
|
||||||
|
|
||||||
updateDiskSpaceLabel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateDiskSpaceLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddNewTorrentDialog::doNotDeleteTorrentClicked(bool checked)
|
void AddNewTorrentDialog::doNotDeleteTorrentClicked(bool checked)
|
||||||
|
@ -392,22 +392,59 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="TorrentContentTreeView" name="contentTreeView">
|
<widget class="QWidget" name="layoutWidget">
|
||||||
<property name="sizePolicy">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<item>
|
||||||
<horstretch>1</horstretch>
|
<layout class="QHBoxLayout" name="contentFilterLayout">
|
||||||
<verstretch>0</verstretch>
|
<item>
|
||||||
</sizepolicy>
|
<widget class="QPushButton" name="buttonSelectAll">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="contextMenuPolicy">
|
<string>Select All</string>
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="selectionMode">
|
</item>
|
||||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
<item>
|
||||||
</property>
|
<widget class="QPushButton" name="buttonSelectNone">
|
||||||
<property name="sortingEnabled">
|
<property name="text">
|
||||||
<bool>true</bool>
|
<string>Select None</string>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>168</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="TorrentContentTreeView" name="contentTreeView">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user