Changeset View
Changeset View
Standalone View
Standalone View
src/kratingwidget.h
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | |||||
119 | 119 | | |||
120 | public Q_SLOTS: | 120 | public Q_SLOTS: | ||
121 | /** | 121 | /** | ||
122 | * Set the current rating. Calling this method will trigger the | 122 | * Set the current rating. Calling this method will trigger the | ||
123 | * ratingChanged signal if @p rating is different from the previous rating. | 123 | * ratingChanged signal if @p rating is different from the previous rating. | ||
124 | */ | 124 | */ | ||
125 | void setRating(int rating); | 125 | void setRating(int rating); | ||
126 | 126 | | |||
127 | #if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
127 | /** | 128 | /** | ||
128 | * \deprecated use setRating( int rating ) | 129 | * \deprecated Since 5.0, use setRating(int rating) | ||
129 | */ | 130 | */ | ||
130 | #ifndef KWIDGETSADDONS_NO_DEPRECATED | 131 | KWIDGETSADDONS_DEPRECATED_VERSION(5, 0, "Use KRatingWidget::setRating(int)") | ||
131 | KWIDGETSADDONS_DEPRECATED void setRating(unsigned int rating); | 132 | void setRating(unsigned int rating); | ||
132 | #endif | 133 | #endif | ||
133 | 134 | | |||
134 | /** | 135 | /** | ||
135 | * Set the maximum allowed rating value. The default is 10 which means | 136 | * Set the maximum allowed rating value. The default is 10 which means | ||
136 | * that a rating from 1 to 10 is selectable. If \a max is uneven steps | 137 | * that a rating from 1 to 10 is selectable. If \a max is uneven steps | ||
137 | * are automatically only allowed full. | 138 | * are automatically only allowed full. | ||
138 | */ | 139 | */ | ||
139 | void setMaxRating(int max); | 140 | void setMaxRating(int max); | ||
140 | 141 | | |||
142 | #if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
141 | /** | 143 | /** | ||
142 | * \deprecated use setMaxRating( int max ) | 144 | * \deprecated Since 5.0, use setMaxRating( int max ) | ||
143 | */ | 145 | */ | ||
144 | #ifndef KWIDGETSADDONS_NO_DEPRECATED | 146 | KWIDGETSADDONS_DEPRECATED_VERSION(5, 0, "Use KRatingWidget::setMaxRating(int)") | ||
145 | KWIDGETSADDONS_DEPRECATED void setMaxRating(unsigned int max); | 147 | void setMaxRating(unsigned int max); | ||
146 | #endif | 148 | #endif | ||
147 | 149 | | |||
148 | /** | 150 | /** | ||
149 | * If half steps are enabled (the default) then | 151 | * If half steps are enabled (the default) then | ||
150 | * one rating step corresponds to half a star. | 152 | * one rating step corresponds to half a star. | ||
151 | */ | 153 | */ | ||
152 | void setHalfStepsEnabled(bool enabled); | 154 | void setHalfStepsEnabled(bool enabled); | ||
153 | 155 | | |||
156 | #if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
154 | /** | 157 | /** | ||
155 | * \deprecated Use setHalfStepsEnabled | 158 | * \deprecated Since 5.0, use setHalfStepsEnabled(bool). | ||
156 | */ | 159 | */ | ||
157 | #ifndef KWIDGETSADDONS_NO_DEPRECATED | 160 | KWIDGETSADDONS_DEPRECATED_VERSION(5, 0, "Use KRatingWidget::setHalfStepsEnabled(bool)") | ||
158 | KWIDGETSADDONS_DEPRECATED void setOnlyPaintFullSteps(bool); | 161 | void setOnlyPaintFullSteps(bool); | ||
159 | #endif | 162 | #endif | ||
160 | 163 | | |||
161 | /** | 164 | /** | ||
162 | * Set the spacing between the pixmaps. The default is 0. | 165 | * Set the spacing between the pixmaps. The default is 0. | ||
163 | */ | 166 | */ | ||
164 | void setSpacing(int); | 167 | void setSpacing(int); | ||
165 | 168 | | |||
166 | /** | 169 | /** | ||
Show All 12 Lines | |||||
179 | */ | 182 | */ | ||
180 | void setIcon(const QIcon &icon); | 183 | void setIcon(const QIcon &icon); | ||
181 | 184 | | |||
182 | /** | 185 | /** | ||
183 | * Set a custom pixmap. | 186 | * Set a custom pixmap. | ||
184 | */ | 187 | */ | ||
185 | void setCustomPixmap(const QPixmap &pixmap); | 188 | void setCustomPixmap(const QPixmap &pixmap); | ||
186 | 189 | | |||
190 | #if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 0) | ||||
187 | /** | 191 | /** | ||
188 | * Set the pixap to be used to display a rating step. | 192 | * Set the pixap to be used to display a rating step. | ||
189 | * By default the "rating" pixmap is loaded. | 193 | * By default the "rating" pixmap is loaded. | ||
190 | * | 194 | * | ||
191 | * \deprecated use setCustomPixmap | 195 | * \deprecated Since 5.0, use setCustomPixmap() | ||
192 | */ | 196 | */ | ||
193 | #ifndef KWIDGETSADDONS_NO_DEPRECATED | 197 | KWIDGETSADDONS_DEPRECATED_VERSION(5, 0, "Use KRatingWidget::setCustomPixmap(const QPixmap&)") | ||
194 | KWIDGETSADDONS_DEPRECATED void setPixmap(const QPixmap &); | 198 | void setPixmap(const QPixmap &); | ||
195 | #endif | 199 | #endif | ||
196 | 200 | | |||
197 | /** | 201 | /** | ||
198 | * Set the recommended size of the pixmaps. This is | 202 | * Set the recommended size of the pixmaps. This is | ||
199 | * only used for the sizeHint. The actual size is always | 203 | * only used for the sizeHint. The actual size is always | ||
200 | * dependent on the size of the widget itself. | 204 | * dependent on the size of the widget itself. | ||
201 | */ | 205 | */ | ||
202 | void setPixmapSize(int size); | 206 | void setPixmapSize(int size); | ||
Show All 14 Lines |