diff options
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r-- | src/previewimage.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp index 60207fb3..07eca1b0 100644 --- a/src/previewimage.cpp +++ b/src/previewimage.cpp @@ -23,18 +23,24 @@ * * ============================================================ */ + +// Self Includes #include "previewimage.h" #include "previewimage.moc" +// Local Includes #include "application.h" -#include <QFile> -#include <QMovie> - +// KDE Includes #include <KUrl> #include <KStandardDirs> #include <KDebug> +// Qt Includes +#include <QFile> +#include <QMovie> +#include <QMouseEvent> + PreviewImage::PreviewImage(const QUrl &url) : QLabel() @@ -83,8 +89,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); + }; } |