// This file is generated by kconfig_compiler_kf6 from test_dpointer.kcfg. // All changes you do to this file will be lost. #include "test_dpointer.h" #include #include class TestDPointerPrivate { public: // General bool autoSave; int autoSaveInterval; bool confirm; QString archiveFile; int destination; // Views int hourSize; bool selectionStartsEditor; // KOrganizer Plugins QStringList selectedPlugins; // Colors QColor highlightColor; QColor agendaBgColor; // Fonts QFont timeBarFont; // items KConfigSkeleton::ItemBool *autoSaveItem; KConfigSkeleton::ItemInt *autoSaveIntervalItem; KConfigSkeleton::ItemBool *confirmItem; KConfigSkeleton::ItemString *archiveFileItem; KConfigSkeleton::ItemEnum *destinationItem; KConfigSkeleton::ItemInt *hourSizeItem; KConfigSkeleton::ItemBool *selectionStartsEditorItem; KConfigSkeleton::ItemStringList *selectedPluginsItem; KConfigSkeleton::ItemColor *highlightColorItem; KConfigSkeleton::ItemColor *agendaBgColorItem; KConfigSkeleton::ItemFont *timeBarFontItem; }; class TestDPointerHelper { public: TestDPointerHelper() : q(nullptr) {} ~TestDPointerHelper() { delete q; q = nullptr; } TestDPointerHelper(const TestDPointerHelper&) = delete; TestDPointerHelper& operator=(const TestDPointerHelper&) = delete; TestDPointer *q; }; Q_GLOBAL_STATIC(TestDPointerHelper, s_globalTestDPointer) TestDPointer *TestDPointer::self() { if (!s_globalTestDPointer()->q) { new TestDPointer; s_globalTestDPointer()->q->read(); } return s_globalTestDPointer()->q; } TestDPointer::TestDPointer( ) : KConfigSkeleton( QStringLiteral( "korganizerrc" ) ) { d = new TestDPointerPrivate; Q_ASSERT(!s_globalTestDPointer()->q); s_globalTestDPointer()->q = this; setCurrentGroup( QStringLiteral( "General" ) ); d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Auto Save" ), d->autoSave, false ); d->autoSaveItem->setLabel( QCoreApplication::translate("TestDPointer", "Enable automatic saving of calendar") ); d->autoSaveItem->setWhatsThis( QCoreApplication::translate("TestDPointer", "WhatsThis text for AutoSave option") ); addItem( d->autoSaveItem, QStringLiteral( "AutoSave" ) ); d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Auto Save Interval" ), d->autoSaveInterval, 10 ); d->autoSaveIntervalItem->setMinValue(0); d->autoSaveIntervalItem->setMaxValue(123); d->autoSaveIntervalItem->setLabel( QCoreApplication::translate("TestDPointer", "Auto Save Interval") ); addItem( d->autoSaveIntervalItem, QStringLiteral( "AutoSaveInterval" ) ); d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Confirm Deletes" ), d->confirm, true ); d->confirmItem->setLabel( QCoreApplication::translate("TestDPointer", "Confirm deletes") ); addItem( d->confirmItem, QStringLiteral( "Confirm" ) ); d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Archive File" ), d->archiveFile ); d->archiveFileItem->setLabel( QCoreApplication::translate("TestDPointer", "Archive File") ); addItem( d->archiveFileItem, QStringLiteral( "ArchiveFile" ) ); QList valuesDestination; { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("standardDestination"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("askDestination"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("argl1"); choice.label = QCoreApplication::translate("TestDPointer", "Argl1 Label"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("argl2"); choice.whatsThis = QCoreApplication::translate("TestDPointer", "Argl2 Whatsthis"); valuesDestination.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("argl3"); choice.label = QCoreApplication::translate("TestDPointer", "Argl3 Label"); choice.whatsThis = QCoreApplication::translate("TestDPointer", "Argl3 Whatsthis"); valuesDestination.append( choice ); } d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination ); d->destinationItem->setLabel( QCoreApplication::translate("TestDPointer", "New Events/Todos Should") ); addItem( d->destinationItem, QStringLiteral( "Destination" ) ); setCurrentGroup( QStringLiteral( "Views" ) ); d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Hour Size" ), d->hourSize, 10 ); d->hourSizeItem->setLabel( QCoreApplication::translate("TestDPointer", "Hour Size") ); addItem( d->hourSizeItem, QStringLiteral( "HourSize" ) ); d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SelectionStartsEditor" ), d->selectionStartsEditor, false ); d->selectionStartsEditorItem->setLabel( QCoreApplication::translate("TestDPointer", "Time range selection in agenda view starts event editor") ); addItem( d->selectionStartsEditorItem, QStringLiteral( "SelectionStartsEditor" ) ); setCurrentGroup( QStringLiteral( "KOrganizer Plugins" ) ); QStringList defaultSelectedPlugins; defaultSelectedPlugins.append( QString::fromUtf8( "holidays" ) ); defaultSelectedPlugins.append( QString::fromUtf8( "webexport" ) ); d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins ); d->selectedPluginsItem->setLabel( QCoreApplication::translate("TestDPointer", "SelectedPlugins") ); addItem( d->selectedPluginsItem, QStringLiteral( "SelectedPlugins" ) ); setCurrentGroup( QStringLiteral( "Colors" ) ); d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "Highlight Color" ), d->highlightColor, QColor( 100, 100, 255 ) ); d->highlightColorItem->setLabel( QCoreApplication::translate("TestDPointer", "Highlight color") ); addItem( d->highlightColorItem, QStringLiteral( "HighlightColor" ) ); d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "Agenda Background Color" ), d->agendaBgColor, QColor( 255, 255, 255 ) ); d->agendaBgColorItem->setLabel( QCoreApplication::translate("TestDPointer", "Agenda view background color") ); addItem( d->agendaBgColorItem, QStringLiteral( "AgendaBgColor" ) ); setCurrentGroup( QStringLiteral( "Fonts" ) ); d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "TimeBar Font" ), d->timeBarFont ); d->timeBarFontItem->setLabel( QCoreApplication::translate("TestDPointer", "Time bar") ); addItem( d->timeBarFontItem, QStringLiteral( "TimeBarFont" ) ); } void TestDPointer::setAutoSave( bool v ) { if (!self()->TestDPointer::isAutoSaveImmutable()) self()->d->autoSave = v; } bool TestDPointer::autoSave() { return self()->d->autoSave; } bool TestDPointer::isAutoSaveImmutable() { return self()->isImmutable( QStringLiteral( "AutoSave" ) ); } KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem() { return d->autoSaveItem; } void TestDPointer::setAutoSaveInterval( int v ) { if (v < 0) { qDebug() << "setAutoSaveInterval: value " << v << " is less than the minimum value of 0"; v = 0; } if (v > 123) { qDebug() << "setAutoSaveInterval: value " << v << " is greater than the maximum value of 123"; v = 123; } if (!self()->TestDPointer::isAutoSaveIntervalImmutable()) self()->d->autoSaveInterval = v; } int TestDPointer::autoSaveInterval() { return self()->d->autoSaveInterval; } bool TestDPointer::isAutoSaveIntervalImmutable() { return self()->isImmutable( QStringLiteral( "AutoSaveInterval" ) ); } KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem() { return d->autoSaveIntervalItem; } void TestDPointer::setConfirm( bool v ) { if (!self()->TestDPointer::isConfirmImmutable()) self()->d->confirm = v; } bool TestDPointer::confirm() { return self()->d->confirm; } bool TestDPointer::isConfirmImmutable() { return self()->isImmutable( QStringLiteral( "Confirm" ) ); } KConfigSkeleton::ItemBool *TestDPointer::confirmItem() { return d->confirmItem; } void TestDPointer::setArchiveFile( const QString & v ) { if (!self()->TestDPointer::isArchiveFileImmutable()) self()->d->archiveFile = v; } QString TestDPointer::archiveFile() { return self()->d->archiveFile; } bool TestDPointer::isArchiveFileImmutable() { return self()->isImmutable( QStringLiteral( "ArchiveFile" ) ); } KConfigSkeleton::ItemString *TestDPointer::archiveFileItem() { return d->archiveFileItem; } void TestDPointer::setDestination( int v ) { if (!self()->TestDPointer::isDestinationImmutable()) self()->d->destination = v; } int TestDPointer::destination() { return self()->d->destination; } bool TestDPointer::isDestinationImmutable() { return self()->isImmutable( QStringLiteral( "Destination" ) ); } KConfigSkeleton::ItemEnum *TestDPointer::destinationItem() { return d->destinationItem; } void TestDPointer::setHourSize( int v ) { if (!self()->TestDPointer::isHourSizeImmutable()) self()->d->hourSize = v; } int TestDPointer::hourSize() { return self()->d->hourSize; } bool TestDPointer::isHourSizeImmutable() { return self()->isImmutable( QStringLiteral( "HourSize" ) ); } KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem() { return d->hourSizeItem; } void TestDPointer::setSelectionStartsEditor( bool v ) { if (!self()->TestDPointer::isSelectionStartsEditorImmutable()) self()->d->selectionStartsEditor = v; } bool TestDPointer::selectionStartsEditor() { return self()->d->selectionStartsEditor; } bool TestDPointer::isSelectionStartsEditorImmutable() { return self()->isImmutable( QStringLiteral( "SelectionStartsEditor" ) ); } KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem() { return d->selectionStartsEditorItem; } void TestDPointer::setSelectedPlugins( const QStringList & v ) { if (!self()->TestDPointer::isSelectedPluginsImmutable()) self()->d->selectedPlugins = v; } QStringList TestDPointer::selectedPlugins() { return self()->d->selectedPlugins; } bool TestDPointer::isSelectedPluginsImmutable() { return self()->isImmutable( QStringLiteral( "SelectedPlugins" ) ); } KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem() { return d->selectedPluginsItem; } void TestDPointer::setHighlightColor( const QColor & v ) { if (!self()->TestDPointer::isHighlightColorImmutable()) self()->d->highlightColor = v; } QColor TestDPointer::highlightColor() { return self()->d->highlightColor; } bool TestDPointer::isHighlightColorImmutable() { return self()->isImmutable( QStringLiteral( "HighlightColor" ) ); } KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem() { return d->highlightColorItem; } void TestDPointer::setAgendaBgColor( const QColor & v ) { if (!self()->TestDPointer::isAgendaBgColorImmutable()) self()->d->agendaBgColor = v; } QColor TestDPointer::agendaBgColor() { return self()->d->agendaBgColor; } bool TestDPointer::isAgendaBgColorImmutable() { return self()->isImmutable( QStringLiteral( "AgendaBgColor" ) ); } KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem() { return d->agendaBgColorItem; } void TestDPointer::setTimeBarFont( const QFont & v ) { if (!self()->TestDPointer::isTimeBarFontImmutable()) self()->d->timeBarFont = v; } QFont TestDPointer::timeBarFont() { return self()->d->timeBarFont; } bool TestDPointer::isTimeBarFontImmutable() { return self()->isImmutable( QStringLiteral( "TimeBarFont" ) ); } KConfigSkeleton::ItemFont *TestDPointer::timeBarFontItem() { return d->timeBarFontItem; } TestDPointer::~TestDPointer() { delete d; if (s_globalTestDPointer.exists() && !s_globalTestDPointer.isDestroyed()) { s_globalTestDPointer()->q = nullptr; } }