Changeset View
Changeset View
Standalone View
Standalone View
src/quickaddons/configmodule.h
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 138 | { | |||
---|---|---|---|---|---|
143 | Q_PROPERTY(bool needsSave READ needsSave WRITE setNeedsSave NOTIFY needsSaveChanged) | 143 | Q_PROPERTY(bool needsSave READ needsSave WRITE setNeedsSave NOTIFY needsSaveChanged) | ||
144 | Q_PROPERTY(QString name READ name CONSTANT) | 144 | Q_PROPERTY(QString name READ name CONSTANT) | ||
145 | Q_PROPERTY(QString description READ description CONSTANT) | 145 | Q_PROPERTY(QString description READ description CONSTANT) | ||
146 | Q_PROPERTY(QString quickHelp READ quickHelp WRITE setQuickHelp NOTIFY quickHelpChanged) | 146 | Q_PROPERTY(QString quickHelp READ quickHelp WRITE setQuickHelp NOTIFY quickHelpChanged) | ||
147 | Q_PROPERTY(QString rootOnlyMessage READ rootOnlyMessage WRITE setRootOnlyMessage NOTIFY rootOnlyMessageChanged) | 147 | Q_PROPERTY(QString rootOnlyMessage READ rootOnlyMessage WRITE setRootOnlyMessage NOTIFY rootOnlyMessageChanged) | ||
148 | Q_PROPERTY(bool useRootOnlyMessage READ useRootOnlyMessage WRITE setUseRootOnlyMessage NOTIFY useRootOnlyMessageChanged) | 148 | Q_PROPERTY(bool useRootOnlyMessage READ useRootOnlyMessage WRITE setUseRootOnlyMessage NOTIFY useRootOnlyMessageChanged) | ||
149 | Q_PROPERTY(bool needsAuthorization READ needsAuthorization WRITE setNeedsAuthorization NOTIFY needsAuthorizationChanged) | 149 | Q_PROPERTY(bool needsAuthorization READ needsAuthorization WRITE setNeedsAuthorization NOTIFY needsAuthorizationChanged) | ||
150 | Q_PROPERTY(int columnWidth READ columnWidth WRITE setColumnWidth NOTIFY columnWidthChanged) | 150 | Q_PROPERTY(int columnWidth READ columnWidth WRITE setColumnWidth NOTIFY columnWidthChanged) | ||
151 | Q_PROPERTY(int depth READ depth NOTIFY depthChanged) | ||||
152 | Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) | ||||
151 | 153 | | |||
152 | public: | 154 | public: | ||
153 | 155 | | |||
154 | /** | 156 | /** | ||
155 | * An enumeration type for the buttons used by this module. | 157 | * An enumeration type for the buttons used by this module. | ||
156 | * You should only use Help, Default and Apply. The rest is obsolete. | 158 | * You should only use Help, Default and Apply. The rest is obsolete. | ||
157 | * NoAdditionalButton can be used when we do not want have other button that Ok Cancel | 159 | * NoAdditionalButton can be used when we do not want have other button that Ok Cancel | ||
158 | * | 160 | * | ||
▲ Show 20 Lines • Show All 238 Lines • ▼ Show 20 Line(s) | 243 | //QML property accessors | |||
397 | int columnWidth() const; | 399 | int columnWidth() const; | ||
398 | 400 | | |||
399 | /** | 401 | /** | ||
400 | * Sets the column width we want. | 402 | * Sets the column width we want. | ||
401 | * @since 5.50 | 403 | * @since 5.50 | ||
402 | */ | 404 | */ | ||
403 | void setColumnWidth(int width); | 405 | void setColumnWidth(int width); | ||
404 | 406 | | |||
407 | /** | ||||
408 | * @returns how many pages this kcm has. | ||||
409 | * It is guaranteed to be at least 1 9the main ui) plus how many times a new page has been pushed without pop | ||||
410 | */ | ||||
411 | int depth() const; | ||||
412 | | ||||
413 | /** | ||||
414 | * Sets the current page index this kcm should display | ||||
415 | * @since 5.53 | ||||
416 | */ | ||||
417 | void setCurrentIndex(int index); | ||||
418 | | ||||
419 | /** | ||||
420 | * @returns the index of the page this kcm should display | ||||
421 | * @since 5.53 | ||||
422 | */ | ||||
423 | int currentIndex() const; | ||||
424 | | ||||
405 | static ConfigModule *qmlAttachedProperties(QObject *object); | 425 | static ConfigModule *qmlAttachedProperties(QObject *object); | ||
406 | 426 | | |||
407 | public Q_SLOTS: | 427 | public Q_SLOTS: | ||
408 | /** | 428 | /** | ||
409 | * Load the configuration data into the module. | 429 | * Load the configuration data into the module. | ||
410 | * | 430 | * | ||
411 | * The load method sets the user interface elements of the | 431 | * The load method sets the user interface elements of the | ||
412 | * module to reflect the current settings stored in the | 432 | * module to reflect the current settings stored in the | ||
Show All 33 Lines | |||||
446 | 466 | | |||
447 | /** | 467 | /** | ||
448 | * Push a new sub page in the KCM hyerarchy: pages will be seen as a Kirigami PageRow | 468 | * Push a new sub page in the KCM hyerarchy: pages will be seen as a Kirigami PageRow | ||
449 | * @since 5.50 | 469 | * @since 5.50 | ||
450 | */ | 470 | */ | ||
451 | void push(const QString &fileName, const QVariantMap &propertyMap = QVariantMap()); | 471 | void push(const QString &fileName, const QVariantMap &propertyMap = QVariantMap()); | ||
452 | 472 | | |||
453 | /** | 473 | /** | ||
474 | * | ||||
475 | */ | ||||
476 | void push(QQuickItem *item); | ||||
477 | | ||||
478 | /** | ||||
454 | * pop the last page of the KCM hyerarchy | 479 | * pop the last page of the KCM hyerarchy | ||
455 | * @since 5.50 | 480 | * @since 5.50 | ||
456 | */ | 481 | */ | ||
457 | void pop(); | 482 | void pop(); | ||
458 | 483 | | |||
459 | Q_SIGNALS: | 484 | Q_SIGNALS: | ||
460 | 485 | | |||
461 | /** | 486 | /** | ||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
520 | void pageRemoved(); | 545 | void pageRemoved(); | ||
521 | 546 | | |||
522 | /** | 547 | /** | ||
523 | * Emitted when the wanted column width of the kcm changes | 548 | * Emitted when the wanted column width of the kcm changes | ||
524 | * @since 5.50 | 549 | * @since 5.50 | ||
525 | */ | 550 | */ | ||
526 | void columnWidthChanged(int width); | 551 | void columnWidthChanged(int width); | ||
527 | 552 | | |||
553 | /** | ||||
554 | * Emitted when the current page changed | ||||
555 | * @since 5.53 | ||||
556 | */ | ||||
557 | void currentIndexChanged(int index); | ||||
558 | | ||||
559 | /** | ||||
560 | * Emitted when the number of pages changed | ||||
561 | * @since 5.53 | ||||
562 | */ | ||||
563 | void depthChanged(int index); | ||||
564 | | ||||
528 | private: | 565 | private: | ||
529 | ConfigModulePrivate *const d; | 566 | ConfigModulePrivate *const d; | ||
530 | }; | 567 | }; | ||
531 | 568 | | |||
532 | } | 569 | } | ||
533 | 570 | | |||
534 | Q_DECLARE_OPERATORS_FOR_FLAGS(KQuickAddons::ConfigModule::Buttons) | 571 | Q_DECLARE_OPERATORS_FOR_FLAGS(KQuickAddons::ConfigModule::Buttons) | ||
535 | QML_DECLARE_TYPEINFO(KQuickAddons::ConfigModule, QML_HAS_ATTACHED_PROPERTIES) | 572 | QML_DECLARE_TYPEINFO(KQuickAddons::ConfigModule, QML_HAS_ATTACHED_PROPERTIES) | ||
536 | 573 | | |||
537 | #endif //ConfigModule_H | 574 | #endif //ConfigModule_H | ||
538 | 575 | |