From 199bf012a87ace47044627189012b854570e3970 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 24 May 2010 14:14:00 +0200 Subject: Implemented PictureViewer class Don't call an external program for showing a picture. When an image is doubleclicked a new windows shows the picture. Pictures can still be opened in an exteral program by using the "Open with..." context menu item. --- pictureviewerinfoitem.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pictureviewerinfoitem.h (limited to 'pictureviewerinfoitem.h') diff --git a/pictureviewerinfoitem.h b/pictureviewerinfoitem.h new file mode 100644 index 0000000..25deec4 --- /dev/null +++ b/pictureviewerinfoitem.h @@ -0,0 +1,23 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#ifndef PICTUREVIEWERINFOITEM_H +#define PICTUREVIEWERINFOITEM_H + +#include + +class PictureviewerInfoItem : public QGraphicsItem { + public: + PictureviewerInfoItem(const QString &fileName, QGraphicsItem *parent = 0); + QRectF boundingRect() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); + + private: + const QString mFileName; +}; + +#endif -- cgit v1.2.3-70-g09d2