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