| 1 | /* |
| 2 | Copyright 2010, David Sansome <[email protected]> |
| 3 | Copyright (C) 2005-2014 Mario Stephan <[email protected]> |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as published |
| 7 | by the Free Software Foundation; either version 2.1 of the License, or |
| 8 | (at your option) any later version. |
| 9 | |
| 10 | This program is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef RATINGWIDGET_H |
| 20 | #define RATINGWIDGET_Hcxx . . $ `src/ratingwidget.h:20:9`! |
| 21 | |
| 22 | #include <QFrame> |
| 23 | #include <QPixmap> |
| 24 | |
| 25 | class RatingPaintercxx . . $ RatingPainter# { |
| 26 | public: |
| 27 | RatingPaintercxx . . $ RatingPainter#RatingPainter(49f6e7a06ebc5aa8).(); |
| 28 | |
| 29 | static const int kStarCountcxx . . $ RatingPainter#kStarCount. = 5; |
| 30 | static const int kStarSizecxx . . $ RatingPainter#kStarSize. = 15; |
| 31 | static QRectcxx . . $ QRect# Contentscxx . . $ RatingPainter#Contents(e8513ffb6f2deb1c).(const QRectcxx . . $ QRect#& rect); |
| 32 | static double RatingForPoscxx . . $ RatingPainter#RatingForPos(374ff46153e1d7d1).(const QPointcxx . . $ QPoint#& pos, const QRectcxx . . $ QRect#& rect); |
| 33 | |
| 34 | void Paintcxx . . $ RatingPainter#Paint(bf4fba74770409a7).(QPaintercxx . . $ QPainter#* painter, const QRectcxx . . $ QRect#& rect, float rating) const; |
| 35 | |
| 36 | private: |
| 37 | QPixmapcxx . . $ QPixmap# stars_cxx . . $ RatingPainter#stars_.[kStarCountcxx . . $ RatingPainter#kStarCount.*2+1]; |
| 38 | }; |
| 39 | |
| 40 | class RatingWidgetcxx . . $ RatingWidget# : public QWidgetcxx . . $ QWidget# { |
| 41 | Q_OBJECTcxx . . $ RatingWidget#tr(75d9f1c324b4579d). |
| 42 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(float rating READ rating WRITE setRating); |
| 43 | |
| 44 | public: |
| 45 | RatingWidgetcxx . . $ RatingWidget#RatingWidget(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent = 0); |
| 46 | |
| 47 | QSizecxx . . $ QSize# sizeHintcxx . . $ RatingWidget#sizeHint(4b3b776e5ee2b367).() const; |
| 48 | |
| 49 | float ratingcxx . . $ RatingWidget#rating(5036dfe8d4170af2).() const { return rating_cxx . . $ RatingWidget#rating_.; } |
| 50 | void setRatingcxx . . $ RatingWidget#setRating(9364e6e7bff7660).(float rating); |
| 51 | |
| 52 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 53 | void RatingChangedcxx . . $ RatingWidget#RatingChanged(9364e6e7bff7660).(float rating); |
| 54 | |
| 55 | protected: |
| 56 | void paintEventcxx . . $ RatingWidget#paintEvent(f239c9e85d61a220).(QPaintEventcxx . . $ QPaintEvent#*); |
| 57 | void mousePressEventcxx . . $ RatingWidget#mousePressEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#* e); |
| 58 | void mouseMoveEventcxx . . $ RatingWidget#mouseMoveEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent#* e); |
| 59 | void leaveEventcxx . . $ RatingWidget#leaveEvent(c2473e2e70986fd7).(QEventcxx . . $ QEvent#*); |
| 60 | |
| 61 | private: |
| 62 | RatingPaintercxx . . $ RatingPainter# painter_cxx . . $ RatingWidget#painter_.; |
| 63 | float rating_cxx . . $ RatingWidget#rating_.; |
| 64 | float hover_rating_cxx . . $ RatingWidget#hover_rating_.; |
| 65 | }; |
| 66 | |
| 67 | #endif // RATINGWIDGET_H |
| 68 |