| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the tools applications of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU Lesser General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
| 19 | ** General Public License version 3 as published by the Free Software |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
| 21 | ** packaging of this file. Please review the following information to |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
| 24 | ** |
| 25 | ** GNU General Public License Usage |
| 26 | ** Alternatively, this file may be used under the terms of the GNU |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General |
| 28 | ** Public license version 3 or any later version approved by the KDE Free |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
| 31 | ** included in the packaging of this file. Please review the following |
| 32 | ** information to ensure the GNU General Public License requirements will |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
| 35 | ** |
| 36 | ** $QT_END_LICENSE$ |
| 37 | ** |
| 38 | ****************************************************************************/ |
| 39 | |
| 40 | #ifndef QTPROPERTYMANAGER_H |
| 41 | #define QTPROPERTYMANAGER_H |
| 42 | |
| 43 | #include "qtpropertybrowser.h" |
| 44 | |
| 45 | QT_BEGIN_NAMESPACE |
| 46 | |
| 47 | class QDate; |
| 48 | class QTime; |
| 49 | class QDateTime; |
| 50 | class QLocale; |
| 51 | |
| 52 | class QtGroupPropertyManager : public QtAbstractPropertyManager |
| 53 | { |
| 54 | Q_OBJECT |
| 55 | public: |
| 56 | QtGroupPropertyManager(QObject *parent = 0); |
| 57 | ~QtGroupPropertyManager(); |
| 58 | |
| 59 | protected: |
| 60 | virtual bool hasValue(const QtProperty *property) const; |
| 61 | |
| 62 | virtual void initializeProperty(QtProperty *property); |
| 63 | virtual void uninitializeProperty(QtProperty *property); |
| 64 | }; |
| 65 | |
| 66 | class QtIntPropertyManagerPrivate; |
| 67 | |
| 68 | class QtIntPropertyManager : public QtAbstractPropertyManager |
| 69 | { |
| 70 | Q_OBJECT |
| 71 | public: |
| 72 | QtIntPropertyManager(QObject *parent = 0); |
| 73 | ~QtIntPropertyManager(); |
| 74 | |
| 75 | int value(const QtProperty *property) const; |
| 76 | int minimum(const QtProperty *property) const; |
| 77 | int maximum(const QtProperty *property) const; |
| 78 | int singleStep(const QtProperty *property) const; |
| 79 | |
| 80 | public Q_SLOTS: |
| 81 | void setValue(QtProperty *property, int val); |
| 82 | void setMinimum(QtProperty *property, int minVal); |
| 83 | void setMaximum(QtProperty *property, int maxVal); |
| 84 | void setRange(QtProperty *property, int minVal, int maxVal); |
| 85 | void setSingleStep(QtProperty *property, int step); |
| 86 | Q_SIGNALS: |
| 87 | void valueChanged(QtProperty *property, int val); |
| 88 | void rangeChanged(QtProperty *property, int minVal, int maxVal); |
| 89 | void singleStepChanged(QtProperty *property, int step); |
| 90 | protected: |
| 91 | QString valueText(const QtProperty *property) const; |
| 92 | virtual void initializeProperty(QtProperty *property); |
| 93 | virtual void uninitializeProperty(QtProperty *property); |
| 94 | private: |
| 95 | QScopedPointer<QtIntPropertyManagerPrivate> d_ptr; |
| 96 | Q_DECLARE_PRIVATE(QtIntPropertyManager) |
| 97 | Q_DISABLE_COPY_MOVE(QtIntPropertyManager) |
| 98 | }; |
| 99 | |
| 100 | class QtBoolPropertyManagerPrivate; |
| 101 | |
| 102 | class QtBoolPropertyManager : public QtAbstractPropertyManager |
| 103 | { |
| 104 | Q_OBJECT |
| 105 | public: |
| 106 | QtBoolPropertyManager(QObject *parent = 0); |
| 107 | ~QtBoolPropertyManager(); |
| 108 | |
| 109 | bool value(const QtProperty *property) const; |
| 110 | |
| 111 | public Q_SLOTS: |
| 112 | void setValue(QtProperty *property, bool val); |
| 113 | Q_SIGNALS: |
| 114 | void valueChanged(QtProperty *property, bool val); |
| 115 | protected: |
| 116 | QString valueText(const QtProperty *property) const; |
| 117 | QIcon valueIcon(const QtProperty *property) const; |
| 118 | virtual void initializeProperty(QtProperty *property); |
| 119 | virtual void uninitializeProperty(QtProperty *property); |
| 120 | private: |
| 121 | QScopedPointer<QtBoolPropertyManagerPrivate> d_ptr; |
| 122 | Q_DECLARE_PRIVATE(QtBoolPropertyManager) |
| 123 | Q_DISABLE_COPY_MOVE(QtBoolPropertyManager) |
| 124 | }; |
| 125 | |
| 126 | class QtDoublePropertyManagerPrivate; |
| 127 | |
| 128 | class QtDoublePropertyManager : public QtAbstractPropertyManager |
| 129 | { |
| 130 | Q_OBJECT |
| 131 | public: |
| 132 | QtDoublePropertyManager(QObject *parent = 0); |
| 133 | ~QtDoublePropertyManager(); |
| 134 | |
| 135 | double value(const QtProperty *property) const; |
| 136 | double minimum(const QtProperty *property) const; |
| 137 | double maximum(const QtProperty *property) const; |
| 138 | double singleStep(const QtProperty *property) const; |
| 139 | int decimals(const QtProperty *property) const; |
| 140 | |
| 141 | public Q_SLOTS: |
| 142 | void setValue(QtProperty *property, double val); |
| 143 | void setMinimum(QtProperty *property, double minVal); |
| 144 | void setMaximum(QtProperty *property, double maxVal); |
| 145 | void setRange(QtProperty *property, double minVal, double maxVal); |
| 146 | void setSingleStep(QtProperty *property, double step); |
| 147 | void setDecimals(QtProperty *property, int prec); |
| 148 | Q_SIGNALS: |
| 149 | void valueChanged(QtProperty *property, double val); |
| 150 | void rangeChanged(QtProperty *property, double minVal, double maxVal); |
| 151 | void singleStepChanged(QtProperty *property, double step); |
| 152 | void decimalsChanged(QtProperty *property, int prec); |
| 153 | protected: |
| 154 | QString valueText(const QtProperty *property) const; |
| 155 | virtual void initializeProperty(QtProperty *property); |
| 156 | virtual void uninitializeProperty(QtProperty *property); |
| 157 | private: |
| 158 | QScopedPointer<QtDoublePropertyManagerPrivate> d_ptr; |
| 159 | Q_DECLARE_PRIVATE(QtDoublePropertyManager) |
| 160 | Q_DISABLE_COPY_MOVE(QtDoublePropertyManager) |
| 161 | }; |
| 162 | |
| 163 | class QtStringPropertyManagerPrivate; |
| 164 | |
| 165 | class QtStringPropertyManager : public QtAbstractPropertyManager |
| 166 | { |
| 167 | Q_OBJECT |
| 168 | public: |
| 169 | QtStringPropertyManager(QObject *parent = 0); |
| 170 | ~QtStringPropertyManager(); |
| 171 | |
| 172 | QString value(const QtProperty *property) const; |
| 173 | QRegExp regExp(const QtProperty *property) const; |
| 174 | |
| 175 | public Q_SLOTS: |
| 176 | void setValue(QtProperty *property, const QString &val); |
| 177 | void setRegExp(QtProperty *property, const QRegExp ®Exp); |
| 178 | Q_SIGNALS: |
| 179 | void valueChanged(QtProperty *property, const QString &val); |
| 180 | void regExpChanged(QtProperty *property, const QRegExp ®Exp); |
| 181 | protected: |
| 182 | QString valueText(const QtProperty *property) const; |
| 183 | virtual void initializeProperty(QtProperty *property); |
| 184 | virtual void uninitializeProperty(QtProperty *property); |
| 185 | private: |
| 186 | QScopedPointer<QtStringPropertyManagerPrivate> d_ptr; |
| 187 | Q_DECLARE_PRIVATE(QtStringPropertyManager) |
| 188 | Q_DISABLE_COPY_MOVE(QtStringPropertyManager) |
| 189 | }; |
| 190 | |
| 191 | class QtDatePropertyManagerPrivate; |
| 192 | |
| 193 | class QtDatePropertyManager : public QtAbstractPropertyManager |
| 194 | { |
| 195 | Q_OBJECT |
| 196 | public: |
| 197 | QtDatePropertyManager(QObject *parent = 0); |
| 198 | ~QtDatePropertyManager(); |
| 199 | |
| 200 | QDate value(const QtProperty *property) const; |
| 201 | QDate minimum(const QtProperty *property) const; |
| 202 | QDate maximum(const QtProperty *property) const; |
| 203 | |
| 204 | public Q_SLOTS: |
| 205 | void setValue(QtProperty *property, const QDate &val); |
| 206 | void setMinimum(QtProperty *property, const QDate &minVal); |
| 207 | void setMaximum(QtProperty *property, const QDate &maxVal); |
| 208 | void setRange(QtProperty *property, const QDate &minVal, const QDate &maxVal); |
| 209 | Q_SIGNALS: |
| 210 | void valueChanged(QtProperty *property, const QDate &val); |
| 211 | void rangeChanged(QtProperty *property, const QDate &minVal, const QDate &maxVal); |
| 212 | protected: |
| 213 | QString valueText(const QtProperty *property) const; |
| 214 | virtual void initializeProperty(QtProperty *property); |
| 215 | virtual void uninitializeProperty(QtProperty *property); |
| 216 | private: |
| 217 | QScopedPointer<QtDatePropertyManagerPrivate> d_ptr; |
| 218 | Q_DECLARE_PRIVATE(QtDatePropertyManager) |
| 219 | Q_DISABLE_COPY_MOVE(QtDatePropertyManager) |
| 220 | }; |
| 221 | |
| 222 | class QtTimePropertyManagerPrivate; |
| 223 | |
| 224 | class QtTimePropertyManager : public QtAbstractPropertyManager |
| 225 | { |
| 226 | Q_OBJECT |
| 227 | public: |
| 228 | QtTimePropertyManager(QObject *parent = 0); |
| 229 | ~QtTimePropertyManager(); |
| 230 | |
| 231 | QTime value(const QtProperty *property) const; |
| 232 | |
| 233 | public Q_SLOTS: |
| 234 | void setValue(QtProperty *property, const QTime &val); |
| 235 | Q_SIGNALS: |
| 236 | void valueChanged(QtProperty *property, const QTime &val); |
| 237 | protected: |
| 238 | QString valueText(const QtProperty *property) const; |
| 239 | virtual void initializeProperty(QtProperty *property); |
| 240 | virtual void uninitializeProperty(QtProperty *property); |
| 241 | private: |
| 242 | QScopedPointer<QtTimePropertyManagerPrivate> d_ptr; |
| 243 | Q_DECLARE_PRIVATE(QtTimePropertyManager) |
| 244 | Q_DISABLE_COPY_MOVE(QtTimePropertyManager) |
| 245 | }; |
| 246 | |
| 247 | class QtDateTimePropertyManagerPrivate; |
| 248 | |
| 249 | class QtDateTimePropertyManager : public QtAbstractPropertyManager |
| 250 | { |
| 251 | Q_OBJECT |
| 252 | public: |
| 253 | QtDateTimePropertyManager(QObject *parent = 0); |
| 254 | ~QtDateTimePropertyManager(); |
| 255 | |
| 256 | QDateTime value(const QtProperty *property) const; |
| 257 | |
| 258 | public Q_SLOTS: |
| 259 | void setValue(QtProperty *property, const QDateTime &val); |
| 260 | Q_SIGNALS: |
| 261 | void valueChanged(QtProperty *property, const QDateTime &val); |
| 262 | protected: |
| 263 | QString valueText(const QtProperty *property) const; |
| 264 | virtual void initializeProperty(QtProperty *property); |
| 265 | virtual void uninitializeProperty(QtProperty *property); |
| 266 | private: |
| 267 | QScopedPointer<QtDateTimePropertyManagerPrivate> d_ptr; |
| 268 | Q_DECLARE_PRIVATE(QtDateTimePropertyManager) |
| 269 | Q_DISABLE_COPY_MOVE(QtDateTimePropertyManager) |
| 270 | }; |
| 271 | |
| 272 | class QtKeySequencePropertyManagerPrivate; |
| 273 | |
| 274 | class QtKeySequencePropertyManager : public QtAbstractPropertyManager |
| 275 | { |
| 276 | Q_OBJECT |
| 277 | public: |
| 278 | QtKeySequencePropertyManager(QObject *parent = 0); |
| 279 | ~QtKeySequencePropertyManager(); |
| 280 | |
| 281 | QKeySequence value(const QtProperty *property) const; |
| 282 | |
| 283 | public Q_SLOTS: |
| 284 | void setValue(QtProperty *property, const QKeySequence &val); |
| 285 | Q_SIGNALS: |
| 286 | void valueChanged(QtProperty *property, const QKeySequence &val); |
| 287 | protected: |
| 288 | QString valueText(const QtProperty *property) const; |
| 289 | virtual void initializeProperty(QtProperty *property); |
| 290 | virtual void uninitializeProperty(QtProperty *property); |
| 291 | private: |
| 292 | QScopedPointer<QtKeySequencePropertyManagerPrivate> d_ptr; |
| 293 | Q_DECLARE_PRIVATE(QtKeySequencePropertyManager) |
| 294 | Q_DISABLE_COPY_MOVE(QtKeySequencePropertyManager) |
| 295 | }; |
| 296 | |
| 297 | class QtCharPropertyManagerPrivate; |
| 298 | |
| 299 | class QtCharPropertyManager : public QtAbstractPropertyManager |
| 300 | { |
| 301 | Q_OBJECT |
| 302 | public: |
| 303 | QtCharPropertyManager(QObject *parent = 0); |
| 304 | ~QtCharPropertyManager(); |
| 305 | |
| 306 | QChar value(const QtProperty *property) const; |
| 307 | |
| 308 | public Q_SLOTS: |
| 309 | void setValue(QtProperty *property, const QChar &val); |
| 310 | Q_SIGNALS: |
| 311 | void valueChanged(QtProperty *property, const QChar &val); |
| 312 | protected: |
| 313 | QString valueText(const QtProperty *property) const; |
| 314 | virtual void initializeProperty(QtProperty *property); |
| 315 | virtual void uninitializeProperty(QtProperty *property); |
| 316 | private: |
| 317 | QScopedPointer<QtCharPropertyManagerPrivate> d_ptr; |
| 318 | Q_DECLARE_PRIVATE(QtCharPropertyManager) |
| 319 | Q_DISABLE_COPY_MOVE(QtCharPropertyManager) |
| 320 | }; |
| 321 | |
| 322 | class QtEnumPropertyManager; |
| 323 | class QtLocalePropertyManagerPrivate; |
| 324 | |
| 325 | class QtLocalePropertyManager : public QtAbstractPropertyManager |
| 326 | { |
| 327 | Q_OBJECT |
| 328 | public: |
| 329 | QtLocalePropertyManager(QObject *parent = 0); |
| 330 | ~QtLocalePropertyManager(); |
| 331 | |
| 332 | QtEnumPropertyManager *subEnumPropertyManager() const; |
| 333 | |
| 334 | QLocale value(const QtProperty *property) const; |
| 335 | |
| 336 | public Q_SLOTS: |
| 337 | void setValue(QtProperty *property, const QLocale &val); |
| 338 | Q_SIGNALS: |
| 339 | void valueChanged(QtProperty *property, const QLocale &val); |
| 340 | protected: |
| 341 | QString valueText(const QtProperty *property) const; |
| 342 | virtual void initializeProperty(QtProperty *property); |
| 343 | virtual void uninitializeProperty(QtProperty *property); |
| 344 | private: |
| 345 | QScopedPointer<QtLocalePropertyManagerPrivate> d_ptr; |
| 346 | Q_DECLARE_PRIVATE(QtLocalePropertyManager) |
| 347 | Q_DISABLE_COPY_MOVE(QtLocalePropertyManager) |
| 348 | Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int)) |
| 349 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 350 | }; |
| 351 | |
| 352 | class QtPointPropertyManagerPrivate; |
| 353 | |
| 354 | class QtPointPropertyManager : public QtAbstractPropertyManager |
| 355 | { |
| 356 | Q_OBJECT |
| 357 | public: |
| 358 | QtPointPropertyManager(QObject *parent = 0); |
| 359 | ~QtPointPropertyManager(); |
| 360 | |
| 361 | QtIntPropertyManager *subIntPropertyManager() const; |
| 362 | |
| 363 | QPoint value(const QtProperty *property) const; |
| 364 | |
| 365 | public Q_SLOTS: |
| 366 | void setValue(QtProperty *property, const QPoint &val); |
| 367 | Q_SIGNALS: |
| 368 | void valueChanged(QtProperty *property, const QPoint &val); |
| 369 | protected: |
| 370 | QString valueText(const QtProperty *property) const; |
| 371 | virtual void initializeProperty(QtProperty *property); |
| 372 | virtual void uninitializeProperty(QtProperty *property); |
| 373 | private: |
| 374 | QScopedPointer<QtPointPropertyManagerPrivate> d_ptr; |
| 375 | Q_DECLARE_PRIVATE(QtPointPropertyManager) |
| 376 | Q_DISABLE_COPY_MOVE(QtPointPropertyManager) |
| 377 | Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) |
| 378 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 379 | }; |
| 380 | |
| 381 | class QtPointFPropertyManagerPrivate; |
| 382 | |
| 383 | class QtPointFPropertyManager : public QtAbstractPropertyManager |
| 384 | { |
| 385 | Q_OBJECT |
| 386 | public: |
| 387 | QtPointFPropertyManager(QObject *parent = 0); |
| 388 | ~QtPointFPropertyManager(); |
| 389 | |
| 390 | QtDoublePropertyManager *subDoublePropertyManager() const; |
| 391 | |
| 392 | QPointF value(const QtProperty *property) const; |
| 393 | int decimals(const QtProperty *property) const; |
| 394 | |
| 395 | public Q_SLOTS: |
| 396 | void setValue(QtProperty *property, const QPointF &val); |
| 397 | void setDecimals(QtProperty *property, int prec); |
| 398 | Q_SIGNALS: |
| 399 | void valueChanged(QtProperty *property, const QPointF &val); |
| 400 | void decimalsChanged(QtProperty *property, int prec); |
| 401 | protected: |
| 402 | QString valueText(const QtProperty *property) const; |
| 403 | virtual void initializeProperty(QtProperty *property); |
| 404 | virtual void uninitializeProperty(QtProperty *property); |
| 405 | private: |
| 406 | QScopedPointer<QtPointFPropertyManagerPrivate> d_ptr; |
| 407 | Q_DECLARE_PRIVATE(QtPointFPropertyManager) |
| 408 | Q_DISABLE_COPY_MOVE(QtPointFPropertyManager) |
| 409 | Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) |
| 410 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 411 | }; |
| 412 | |
| 413 | class QtSizePropertyManagerPrivate; |
| 414 | |
| 415 | class QtSizePropertyManager : public QtAbstractPropertyManager |
| 416 | { |
| 417 | Q_OBJECT |
| 418 | public: |
| 419 | QtSizePropertyManager(QObject *parent = 0); |
| 420 | ~QtSizePropertyManager(); |
| 421 | |
| 422 | QtIntPropertyManager *subIntPropertyManager() const; |
| 423 | |
| 424 | QSize value(const QtProperty *property) const; |
| 425 | QSize minimum(const QtProperty *property) const; |
| 426 | QSize maximum(const QtProperty *property) const; |
| 427 | |
| 428 | public Q_SLOTS: |
| 429 | void setValue(QtProperty *property, const QSize &val); |
| 430 | void setMinimum(QtProperty *property, const QSize &minVal); |
| 431 | void setMaximum(QtProperty *property, const QSize &maxVal); |
| 432 | void setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal); |
| 433 | Q_SIGNALS: |
| 434 | void valueChanged(QtProperty *property, const QSize &val); |
| 435 | void rangeChanged(QtProperty *property, const QSize &minVal, const QSize &maxVal); |
| 436 | protected: |
| 437 | QString valueText(const QtProperty *property) const; |
| 438 | virtual void initializeProperty(QtProperty *property); |
| 439 | virtual void uninitializeProperty(QtProperty *property); |
| 440 | private: |
| 441 | QScopedPointer<QtSizePropertyManagerPrivate> d_ptr; |
| 442 | Q_DECLARE_PRIVATE(QtSizePropertyManager) |
| 443 | Q_DISABLE_COPY_MOVE(QtSizePropertyManager) |
| 444 | Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) |
| 445 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 446 | }; |
| 447 | |
| 448 | class QtSizeFPropertyManagerPrivate; |
| 449 | |
| 450 | class QtSizeFPropertyManager : public QtAbstractPropertyManager |
| 451 | { |
| 452 | Q_OBJECT |
| 453 | public: |
| 454 | QtSizeFPropertyManager(QObject *parent = 0); |
| 455 | ~QtSizeFPropertyManager(); |
| 456 | |
| 457 | QtDoublePropertyManager *subDoublePropertyManager() const; |
| 458 | |
| 459 | QSizeF value(const QtProperty *property) const; |
| 460 | QSizeF minimum(const QtProperty *property) const; |
| 461 | QSizeF maximum(const QtProperty *property) const; |
| 462 | int decimals(const QtProperty *property) const; |
| 463 | |
| 464 | public Q_SLOTS: |
| 465 | void setValue(QtProperty *property, const QSizeF &val); |
| 466 | void setMinimum(QtProperty *property, const QSizeF &minVal); |
| 467 | void setMaximum(QtProperty *property, const QSizeF &maxVal); |
| 468 | void setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal); |
| 469 | void setDecimals(QtProperty *property, int prec); |
| 470 | Q_SIGNALS: |
| 471 | void valueChanged(QtProperty *property, const QSizeF &val); |
| 472 | void rangeChanged(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal); |
| 473 | void decimalsChanged(QtProperty *property, int prec); |
| 474 | protected: |
| 475 | QString valueText(const QtProperty *property) const; |
| 476 | virtual void initializeProperty(QtProperty *property); |
| 477 | virtual void uninitializeProperty(QtProperty *property); |
| 478 | private: |
| 479 | QScopedPointer<QtSizeFPropertyManagerPrivate> d_ptr; |
| 480 | Q_DECLARE_PRIVATE(QtSizeFPropertyManager) |
| 481 | Q_DISABLE_COPY_MOVE(QtSizeFPropertyManager) |
| 482 | Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) |
| 483 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 484 | }; |
| 485 | |
| 486 | class QtRectPropertyManagerPrivate; |
| 487 | |
| 488 | class QtRectPropertyManager : public QtAbstractPropertyManager |
| 489 | { |
| 490 | Q_OBJECT |
| 491 | public: |
| 492 | QtRectPropertyManager(QObject *parent = 0); |
| 493 | ~QtRectPropertyManager(); |
| 494 | |
| 495 | QtIntPropertyManager *subIntPropertyManager() const; |
| 496 | |
| 497 | QRect value(const QtProperty *property) const; |
| 498 | QRect constraint(const QtProperty *property) const; |
| 499 | |
| 500 | public Q_SLOTS: |
| 501 | void setValue(QtProperty *property, const QRect &val); |
| 502 | void setConstraint(QtProperty *property, const QRect &constraint); |
| 503 | Q_SIGNALS: |
| 504 | void valueChanged(QtProperty *property, const QRect &val); |
| 505 | void constraintChanged(QtProperty *property, const QRect &constraint); |
| 506 | protected: |
| 507 | QString valueText(const QtProperty *property) const; |
| 508 | virtual void initializeProperty(QtProperty *property); |
| 509 | virtual void uninitializeProperty(QtProperty *property); |
| 510 | private: |
| 511 | QScopedPointer<QtRectPropertyManagerPrivate> d_ptr; |
| 512 | Q_DECLARE_PRIVATE(QtRectPropertyManager) |
| 513 | Q_DISABLE_COPY_MOVE(QtRectPropertyManager) |
| 514 | Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) |
| 515 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 516 | }; |
| 517 | |
| 518 | class QtRectFPropertyManagerPrivate; |
| 519 | |
| 520 | class QtRectFPropertyManager : public QtAbstractPropertyManager |
| 521 | { |
| 522 | Q_OBJECT |
| 523 | public: |
| 524 | QtRectFPropertyManager(QObject *parent = 0); |
| 525 | ~QtRectFPropertyManager(); |
| 526 | |
| 527 | QtDoublePropertyManager *subDoublePropertyManager() const; |
| 528 | |
| 529 | QRectF value(const QtProperty *property) const; |
| 530 | QRectF constraint(const QtProperty *property) const; |
| 531 | int decimals(const QtProperty *property) const; |
| 532 | |
| 533 | public Q_SLOTS: |
| 534 | void setValue(QtProperty *property, const QRectF &val); |
| 535 | void setConstraint(QtProperty *property, const QRectF &constraint); |
| 536 | void setDecimals(QtProperty *property, int prec); |
| 537 | Q_SIGNALS: |
| 538 | void valueChanged(QtProperty *property, const QRectF &val); |
| 539 | void constraintChanged(QtProperty *property, const QRectF &constraint); |
| 540 | void decimalsChanged(QtProperty *property, int prec); |
| 541 | protected: |
| 542 | QString valueText(const QtProperty *property) const; |
| 543 | virtual void initializeProperty(QtProperty *property); |
| 544 | virtual void uninitializeProperty(QtProperty *property); |
| 545 | private: |
| 546 | QScopedPointer<QtRectFPropertyManagerPrivate> d_ptr; |
| 547 | Q_DECLARE_PRIVATE(QtRectFPropertyManager) |
| 548 | Q_DISABLE_COPY_MOVE(QtRectFPropertyManager) |
| 549 | Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) |
| 550 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 551 | }; |
| 552 | |
| 553 | class QtEnumPropertyManagerPrivate; |
| 554 | |
| 555 | class QtEnumPropertyManager : public QtAbstractPropertyManager |
| 556 | { |
| 557 | Q_OBJECT |
| 558 | public: |
| 559 | QtEnumPropertyManager(QObject *parent = 0); |
| 560 | ~QtEnumPropertyManager(); |
| 561 | |
| 562 | int value(const QtProperty *property) const; |
| 563 | QStringList enumNames(const QtProperty *property) const; |
| 564 | QMap<int, QIcon> enumIcons(const QtProperty *property) const; |
| 565 | |
| 566 | public Q_SLOTS: |
| 567 | void setValue(QtProperty *property, int val); |
| 568 | void setEnumNames(QtProperty *property, const QStringList &names); |
| 569 | void setEnumIcons(QtProperty *property, const QMap<int, QIcon> &icons); |
| 570 | Q_SIGNALS: |
| 571 | void valueChanged(QtProperty *property, int val); |
| 572 | void enumNamesChanged(QtProperty *property, const QStringList &names); |
| 573 | void enumIconsChanged(QtProperty *property, const QMap<int, QIcon> &icons); |
| 574 | protected: |
| 575 | QString valueText(const QtProperty *property) const; |
| 576 | QIcon valueIcon(const QtProperty *property) const; |
| 577 | virtual void initializeProperty(QtProperty *property); |
| 578 | virtual void uninitializeProperty(QtProperty *property); |
| 579 | private: |
| 580 | QScopedPointer<QtEnumPropertyManagerPrivate> d_ptr; |
| 581 | Q_DECLARE_PRIVATE(QtEnumPropertyManager) |
| 582 | Q_DISABLE_COPY_MOVE(QtEnumPropertyManager) |
| 583 | }; |
| 584 | |
| 585 | class QtFlagPropertyManagerPrivate; |
| 586 | |
| 587 | class QtFlagPropertyManager : public QtAbstractPropertyManager |
| 588 | { |
| 589 | Q_OBJECT |
| 590 | public: |
| 591 | QtFlagPropertyManager(QObject *parent = 0); |
| 592 | ~QtFlagPropertyManager(); |
| 593 | |
| 594 | QtBoolPropertyManager *subBoolPropertyManager() const; |
| 595 | |
| 596 | int value(const QtProperty *property) const; |
| 597 | QStringList flagNames(const QtProperty *property) const; |
| 598 | |
| 599 | public Q_SLOTS: |
| 600 | void setValue(QtProperty *property, int val); |
| 601 | void setFlagNames(QtProperty *property, const QStringList &names); |
| 602 | Q_SIGNALS: |
| 603 | void valueChanged(QtProperty *property, int val); |
| 604 | void flagNamesChanged(QtProperty *property, const QStringList &names); |
| 605 | protected: |
| 606 | QString valueText(const QtProperty *property) const; |
| 607 | virtual void initializeProperty(QtProperty *property); |
| 608 | virtual void uninitializeProperty(QtProperty *property); |
| 609 | private: |
| 610 | QScopedPointer<QtFlagPropertyManagerPrivate> d_ptr; |
| 611 | Q_DECLARE_PRIVATE(QtFlagPropertyManager) |
| 612 | Q_DISABLE_COPY_MOVE(QtFlagPropertyManager) |
| 613 | Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool)) |
| 614 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 615 | }; |
| 616 | |
| 617 | class QtSizePolicyPropertyManagerPrivate; |
| 618 | |
| 619 | class QtSizePolicyPropertyManager : public QtAbstractPropertyManager |
| 620 | { |
| 621 | Q_OBJECT |
| 622 | public: |
| 623 | QtSizePolicyPropertyManager(QObject *parent = 0); |
| 624 | ~QtSizePolicyPropertyManager(); |
| 625 | |
| 626 | QtIntPropertyManager *subIntPropertyManager() const; |
| 627 | QtEnumPropertyManager *subEnumPropertyManager() const; |
| 628 | |
| 629 | QSizePolicy value(const QtProperty *property) const; |
| 630 | |
| 631 | public Q_SLOTS: |
| 632 | void setValue(QtProperty *property, const QSizePolicy &val); |
| 633 | Q_SIGNALS: |
| 634 | void valueChanged(QtProperty *property, const QSizePolicy &val); |
| 635 | protected: |
| 636 | QString valueText(const QtProperty *property) const; |
| 637 | virtual void initializeProperty(QtProperty *property); |
| 638 | virtual void uninitializeProperty(QtProperty *property); |
| 639 | private: |
| 640 | QScopedPointer<QtSizePolicyPropertyManagerPrivate> d_ptr; |
| 641 | Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager) |
| 642 | Q_DISABLE_COPY_MOVE(QtSizePolicyPropertyManager) |
| 643 | Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) |
| 644 | Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int)) |
| 645 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 646 | }; |
| 647 | |
| 648 | class QtFontPropertyManagerPrivate; |
| 649 | |
| 650 | class QtFontPropertyManager : public QtAbstractPropertyManager |
| 651 | { |
| 652 | Q_OBJECT |
| 653 | public: |
| 654 | QtFontPropertyManager(QObject *parent = 0); |
| 655 | ~QtFontPropertyManager(); |
| 656 | |
| 657 | QtIntPropertyManager *subIntPropertyManager() const; |
| 658 | QtEnumPropertyManager *subEnumPropertyManager() const; |
| 659 | QtBoolPropertyManager *subBoolPropertyManager() const; |
| 660 | |
| 661 | QFont value(const QtProperty *property) const; |
| 662 | |
| 663 | public Q_SLOTS: |
| 664 | void setValue(QtProperty *property, const QFont &val); |
| 665 | Q_SIGNALS: |
| 666 | void valueChanged(QtProperty *property, const QFont &val); |
| 667 | protected: |
| 668 | QString valueText(const QtProperty *property) const; |
| 669 | QIcon valueIcon(const QtProperty *property) const; |
| 670 | virtual void initializeProperty(QtProperty *property); |
| 671 | virtual void uninitializeProperty(QtProperty *property); |
| 672 | private: |
| 673 | QScopedPointer<QtFontPropertyManagerPrivate> d_ptr; |
| 674 | Q_DECLARE_PRIVATE(QtFontPropertyManager) |
| 675 | Q_DISABLE_COPY_MOVE(QtFontPropertyManager) |
| 676 | Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) |
| 677 | Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int)) |
| 678 | Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool)) |
| 679 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 680 | Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseChanged()) |
| 681 | Q_PRIVATE_SLOT(d_func(), void slotFontDatabaseDelayedChange()) |
| 682 | }; |
| 683 | |
| 684 | class QtColorPropertyManagerPrivate; |
| 685 | |
| 686 | class QtColorPropertyManager : public QtAbstractPropertyManager |
| 687 | { |
| 688 | Q_OBJECT |
| 689 | public: |
| 690 | QtColorPropertyManager(QObject *parent = 0); |
| 691 | ~QtColorPropertyManager(); |
| 692 | |
| 693 | QtIntPropertyManager *subIntPropertyManager() const; |
| 694 | |
| 695 | QColor value(const QtProperty *property) const; |
| 696 | |
| 697 | public Q_SLOTS: |
| 698 | void setValue(QtProperty *property, const QColor &val); |
| 699 | Q_SIGNALS: |
| 700 | void valueChanged(QtProperty *property, const QColor &val); |
| 701 | protected: |
| 702 | QString valueText(const QtProperty *property) const; |
| 703 | QIcon valueIcon(const QtProperty *property) const; |
| 704 | virtual void initializeProperty(QtProperty *property); |
| 705 | virtual void uninitializeProperty(QtProperty *property); |
| 706 | private: |
| 707 | QScopedPointer<QtColorPropertyManagerPrivate> d_ptr; |
| 708 | Q_DECLARE_PRIVATE(QtColorPropertyManager) |
| 709 | Q_DISABLE_COPY_MOVE(QtColorPropertyManager) |
| 710 | Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) |
| 711 | Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) |
| 712 | }; |
| 713 | |
| 714 | class QtCursorPropertyManagerPrivate; |
| 715 | |
| 716 | class QtCursorPropertyManager : public QtAbstractPropertyManager |
| 717 | { |
| 718 | Q_OBJECT |
| 719 | public: |
| 720 | QtCursorPropertyManager(QObject *parent = 0); |
| 721 | ~QtCursorPropertyManager(); |
| 722 | |
| 723 | #ifndef QT_NO_CURSOR |
| 724 | QCursor value(const QtProperty *property) const; |
| 725 | #endif |
| 726 | |
| 727 | public Q_SLOTS: |
| 728 | void setValue(QtProperty *property, const QCursor &val); |
| 729 | Q_SIGNALS: |
| 730 | void valueChanged(QtProperty *property, const QCursor &val); |
| 731 | protected: |
| 732 | QString valueText(const QtProperty *property) const; |
| 733 | QIcon valueIcon(const QtProperty *property) const; |
| 734 | virtual void initializeProperty(QtProperty *property); |
| 735 | virtual void uninitializeProperty(QtProperty *property); |
| 736 | private: |
| 737 | QScopedPointer<QtCursorPropertyManagerPrivate> d_ptr; |
| 738 | Q_DECLARE_PRIVATE(QtCursorPropertyManager) |
| 739 | Q_DISABLE_COPY_MOVE(QtCursorPropertyManager) |
| 740 | }; |
| 741 | |
| 742 | QT_END_NAMESPACE |
| 743 | |
| 744 | #endif |
| 745 | |