~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to utilities/searchwindow/ratingsearchutilities.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        Rating5  = 5
69
69
    };
70
70
 
71
 
    RatingComboBox(QWidget *parent = 0);
 
71
    RatingComboBox(QWidget* parent = 0);
72
72
 
73
73
    void setRatingValue(RatingValue value);
74
74
    RatingValue ratingValue() const;
84
84
 
85
85
protected:
86
86
 
87
 
    RatingComboBoxModel     *m_model;
88
 
    RatingComboBoxWidget    *m_ratingWidget;
 
87
    RatingComboBoxModel*     m_model;
 
88
    RatingComboBoxWidget*    m_ratingWidget;
89
89
 
90
90
private:
91
91
 
100
100
 
101
101
    RatingStarDrawer();
102
102
 
103
 
    QRect drawStarPolygons(QPainter *p, int numberOfStars) const;
 
103
    QRect drawStarPolygons(QPainter* p, int numberOfStars) const;
104
104
 
105
105
protected:
106
106
 
120
120
    // Sub-classing the classic RatingWidget,
121
121
    // this provides support for the Null and NoRating states.
122
122
 
123
 
    RatingComboBoxWidget(QWidget *parent = 0);
 
123
    RatingComboBoxWidget(QWidget* parent = 0);
124
124
 
125
125
    RatingComboBox::RatingValue ratingValue() const;
126
126
    void setRatingValue(RatingComboBox::RatingValue value);
135
135
 
136
136
protected:
137
137
 
138
 
    virtual void paintEvent(QPaintEvent *);
 
138
    virtual void paintEvent(QPaintEvent*);
139
139
 
140
140
    RatingComboBox::RatingValue m_value;
141
141
};
151
151
        RatingRole = Qt::UserRole
152
152
    };
153
153
 
154
 
    RatingComboBoxModel(QObject *parent = 0);
 
154
    RatingComboBoxModel(QObject* parent = 0);
155
155
 
156
 
    virtual int rowCount(const QModelIndex & parent) const;
 
156
    virtual int rowCount(const QModelIndex& parent) const;
157
157
    virtual QVariant data(const QModelIndex& index, int role) const;
158
158
    virtual QModelIndex index(int row, int column = 0, const QModelIndex& parent = QModelIndex()) const;
159
159
 
172
172
{
173
173
public:
174
174
 
175
 
    RatingComboBoxDelegate(QObject *parent = 0);
 
175
    RatingComboBoxDelegate(QObject* parent = 0);
176
176
 
177
 
    virtual QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
178
 
    virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
 
177
    virtual QSize sizeHint ( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
 
178
    virtual void paint ( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
179
179
 
180
180
protected:
181
181
 
182
 
    void drawRating(QPainter *painter, const QRect& rect, int rating, bool selectable) const;
 
182
    void drawRating(QPainter* painter, const QRect& rect, int rating, bool selectable) const;
183
183
};
184
184
 
185
185
} // namespace Digikam