┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/filter
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-12-31 10:59:46 +0000
committerPeter Penz <[email protected]>2010-12-31 10:59:46 +0000
commit94815093253e5db99aa100f0834cd6c74c96a91a (patch)
tree725cbfd9d8b412198a143153cbadf06f0ee724c9 /src/panels/filter
parentf7bbe21b5b2d3bc85dcba1d03494879aac9e37c7 (diff)
Lock panels per default and allow to unlock them like in Amarok.
BUG: 229811 FIXED-IN: 4.7.0 svn path=/trunk/KDE/kdebase/apps/; revision=1210424
Diffstat (limited to 'src/panels/filter')
-rw-r--r--src/panels/filter/filterpanel.cpp13
-rw-r--r--src/panels/filter/filterpanel.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/panels/filter/filterpanel.cpp b/src/panels/filter/filterpanel.cpp
index 021a2d3b8..d13d6e520 100644
--- a/src/panels/filter/filterpanel.cpp
+++ b/src/panels/filter/filterpanel.cpp
@@ -39,6 +39,7 @@
#include <kfileitem.h>
#include <kio/jobclasses.h>
#include <kio/job.h>
+#include <kmenu.h>
#include <QPushButton>
#include <QShowEvent>
@@ -140,6 +141,18 @@ void FilterPanel::showEvent(QShowEvent* event)
Panel::showEvent(event);
}
+void FilterPanel::contextMenuEvent(QContextMenuEvent* event)
+{
+ Panel::contextMenuEvent(event);
+
+ QWeakPointer<KMenu> popup = new KMenu(this);
+ foreach (QAction* action, customContextMenuActions()) {
+ popup.data()->addAction(action);
+ }
+ popup.data()->exec(QCursor::pos());
+ delete popup.data();
+}
+
void FilterPanel::slotSetUrlStatFinished(KJob* job)
{
m_lastSetUrlStatJob = 0;
diff --git a/src/panels/filter/filterpanel.h b/src/panels/filter/filterpanel.h
index c574d618e..574a9f389 100644
--- a/src/panels/filter/filterpanel.h
+++ b/src/panels/filter/filterpanel.h
@@ -52,6 +52,9 @@ protected:
/** @see QWidget::showEvent() */
virtual void showEvent(QShowEvent* event);
+ /** @see QWidget::contextMenuEvent() */
+ virtual void contextMenuEvent(QContextMenuEvent* event);
+
private slots:
void slotSetUrlStatFinished(KJob*);
void slotQueryTermChanged(const Nepomuk::Query::Term& term);