X-Git-Url: http://cgit.sxemacs.org/?p=harmattan%2Fcameraplus;a=blobdiff_plain;f=src%2Ffocusrectangle.h;h=3f26764edf7dad6890032cfcd9abeb0483f035a1;hp=0a5dd41badbb8fcaeee95b84086b80e5be097abc;hb=695e8f4f85218b41a7f27af281fcebe8238a33b7;hpb=26c667771f0ad6f46ff2db33989d6d0a21467c7f diff --git a/src/focusrectangle.h b/src/focusrectangle.h index 0a5dd41..3f26764 100644 --- a/src/focusrectangle.h +++ b/src/focusrectangle.h @@ -3,7 +3,7 @@ /*! * This file is part of CameraPlus. * - * Copyright (C) 2012 Mohammed Sameer + * Copyright (C) 2012-2013 Mohammed Sameer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,21 +23,40 @@ #ifndef FOCUS_RECTANGLE_H #define FOCUS_RECTANGLE_H +#if defined(QT4) #include +#elif defined(QT5) +#include +#endif +#include +#if defined(QT4) class FocusRectangle : public QDeclarativeItem { +#elif defined(QT5) +class FocusRectangle : public QQuickPaintedItem { +#endif + Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged); public: +#if defined(QT4) FocusRectangle(QDeclarativeItem *parent = 0); +#elif defined(QT5) + FocusRectangle(QQuickItem *parent = 0); +#endif + ~FocusRectangle(); QColor color() const; void setColor(const QColor& color); +#if defined(QT4) void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); +#elif defined(QT5) + void paint(QPainter* painter); +#endif protected: void geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry);