diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-05-21 01:27:13 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-05-21 01:27:13 +0200 |
| commit | 186f26b71e4597e9999a3d946b0d9497255fc986 (patch) | |
| tree | 826b2accfffa4c3eb78baa58de4e8cdbd32eac60 /src/downloadlistwidgetcompact.cpp | |
| parent | 6d6444c126c59c4307873755b08fc5773b3d3955 (diff) | |
Added un-hide all option to downlods tab.
Improved performace when hiding/unhiding. There is still room for improvement for hiding but it requires refactoring the function
Diffstat (limited to 'src/downloadlistwidgetcompact.cpp')
| -rw-r--r-- | src/downloadlistwidgetcompact.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/downloadlistwidgetcompact.cpp b/src/downloadlistwidgetcompact.cpp index 898d400a..97e3655b 100644 --- a/src/downloadlistwidgetcompact.cpp +++ b/src/downloadlistwidgetcompact.cpp @@ -219,9 +219,15 @@ void DownloadListWidgetCompactDelegate::issueRemoveFromView() void DownloadListWidgetCompactDelegate::issueRestoreToView()
{
- emit restoreDownload(m_ContextIndex.row());
+ emit restoreDownload(m_ContextIndex.row());
}
+void DownloadListWidgetCompactDelegate::issueRestoreToViewAll()
+{
+ emit restoreDownload(-1);
+}
+
+
void DownloadListWidgetCompactDelegate::issueCancel()
{
emit cancelDownload(m_ContextIndex.row());
@@ -318,11 +324,15 @@ bool DownloadListWidgetCompactDelegate::editorEvent(QEvent *event, QAbstractItem }
menu.addAction(tr("Delete Installed..."), this, SLOT(issueDeleteCompleted()));
menu.addAction(tr("Delete All..."), this, SLOT(issueDeleteAll()));
- if (!hidden) {
- menu.addSeparator();
- menu.addAction(tr("Hide Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
- menu.addAction(tr("Hide All..."), this, SLOT(issueRemoveFromViewAll()));
- }
+ if (!hidden) {
+ menu.addSeparator();
+ menu.addAction(tr("Hide Installed..."), this, SLOT(issueRemoveFromViewCompleted()));
+ menu.addAction(tr("Hide All..."), this, SLOT(issueRemoveFromViewAll()));
+ }
+ if (hidden) {
+ menu.addSeparator();
+ menu.addAction(tr("Un-Hide All..."), this, SLOT(issueRestoreToViewAll()));
+ }
menu.exec(mouseEvent->globalPos());
event->accept();
|
