summaryrefslogtreecommitdiff
path: root/src/previewimage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-06 00:46:00 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-06 00:46:00 +0200
commitc40bbad82cc0f7bd2f1f1fa60bfc9dab727e5628 (patch)
tree70a1661b73ebfeb7aa1ff9d657c9a40061589542 /src/previewimage.cpp
parentI apologize for this. As said, I use no mouse and I couldn't (diff)
downloadrekonq-c40bbad82cc0f7bd2f1f1fa60bfc9dab727e5628.tar.xz
(Again) preparing PreviewImage for right mouse click manage
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r--src/previewimage.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp
index 60207fb3..9d9009dc 100644
--- a/src/previewimage.cpp
+++ b/src/previewimage.cpp
@@ -30,6 +30,7 @@
#include <QFile>
#include <QMovie>
+#include <QMouseEvent>
#include <KUrl>
#include <KStandardDirs>
@@ -83,8 +84,17 @@ void PreviewImage::setSiteImage()
void PreviewImage::mousePressEvent(QMouseEvent *event)
{
- Q_UNUSED(event)
- Application::instance()->loadUrl(m_url);
+ switch(event->button())
+ {
+ case Qt::LeftButton:
+ Application::instance()->loadUrl(m_url);
+ break;
+ case Qt::RightButton:
+ // TODO
+ break;
+ default:
+ QLabel::mousePressEvent(event);
+ };
}