// This file is generated by kconfig_compiler_kf6 from test4.kcfg. // All changes you do to this file will be lost. #include "test4.h" #include #include class Test4Helper { public: Test4Helper() : q(nullptr) {} ~Test4Helper() { delete q; q = nullptr; } Test4Helper(const Test4Helper&) = delete; Test4Helper& operator=(const Test4Helper&) = delete; Test4 *q; }; Q_GLOBAL_STATIC(Test4Helper, s_globalTest4) Test4 *Test4::self() { if (!s_globalTest4()->q) { new Test4; s_globalTest4()->q->read(); } return s_globalTest4()->q; } const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" }; Test4::Test4( ) : KConfigSkeleton( QStringLiteral( "test4rc" ) ) { Q_ASSERT(!s_globalTest4()->q); s_globalTest4()->q = this; setCurrentGroup( QStringLiteral( "Foo" ) ); QColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black }; KConfigSkeleton::ItemColor *itemColor[4]; itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color #0" ), mColor[0], defaultColor[0] ); addItem( itemColor[0], QStringLiteral( "Color0" ) ); itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color #1" ), mColor[1], defaultColor[1] ); addItem( itemColor[1], QStringLiteral( "Color1" ) ); itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color #2" ), mColor[2], defaultColor[2] ); addItem( itemColor[2], QStringLiteral( "Color2" ) ); itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "color #3" ), mColor[3], defaultColor[3] ); addItem( itemColor[3], QStringLiteral( "Color3" ) ); QList valuesMouseAction; { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("Encrypt"); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("Decrypt"); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("CrashNBurn"); valuesMouseAction.append( choice ); } { KConfigSkeleton::ItemEnum::Choice choice; choice.name = QStringLiteral("PumpNDump"); valuesMouseAction.append( choice ); } KConfigSkeleton::ItemEnum *itemMouseAction[3]; itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt ); itemMouseAction[0]->setValueForChoice(QStringLiteral( "CrashNBurn" ), QStringLiteral( "Crash and Burn" )); addItem( itemMouseAction[0], QStringLiteral( "MouseActionright" ) ); itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt ); itemMouseAction[1]->setValueForChoice(QStringLiteral( "CrashNBurn" ), QStringLiteral( "Crash and Burn" )); addItem( itemMouseAction[1], QStringLiteral( "MouseActionmid" ) ); itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump ); itemMouseAction[2]->setValueForChoice(QStringLiteral( "CrashNBurn" ), QStringLiteral( "Crash and Burn" )); addItem( itemMouseAction[2], QStringLiteral( "MouseActionleft" ) ); KConfigSkeleton::ItemColor *itemGrayColor[11]; itemGrayColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #0" ), mGrayColor[0], QColor::fromRgbF(0 / 10.0, 0 / 10.0, 0 / 10.0) ); addItem( itemGrayColor[0], QStringLiteral( "GrayColor0" ) ); itemGrayColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #1" ), mGrayColor[1], QColor::fromRgbF(1 / 10.0, 1 / 10.0, 1 / 10.0) ); addItem( itemGrayColor[1], QStringLiteral( "GrayColor1" ) ); itemGrayColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #2" ), mGrayColor[2], QColor::fromRgbF(2 / 10.0, 2 / 10.0, 2 / 10.0) ); addItem( itemGrayColor[2], QStringLiteral( "GrayColor2" ) ); itemGrayColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #3" ), mGrayColor[3], QColor::fromRgbF(3 / 10.0, 3 / 10.0, 3 / 10.0) ); addItem( itemGrayColor[3], QStringLiteral( "GrayColor3" ) ); itemGrayColor[4] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #4" ), mGrayColor[4], QColor::fromRgbF(4 / 10.0, 4 / 10.0, 4 / 10.0) ); addItem( itemGrayColor[4], QStringLiteral( "GrayColor4" ) ); itemGrayColor[5] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #5" ), mGrayColor[5], QColor::fromRgbF(5 / 10.0, 5 / 10.0, 5 / 10.0) ); addItem( itemGrayColor[5], QStringLiteral( "GrayColor5" ) ); itemGrayColor[6] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #6" ), mGrayColor[6], QColor::fromRgbF(6 / 10.0, 6 / 10.0, 6 / 10.0) ); addItem( itemGrayColor[6], QStringLiteral( "GrayColor6" ) ); itemGrayColor[7] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #7" ), mGrayColor[7], QColor::fromRgbF(7 / 10.0, 7 / 10.0, 7 / 10.0) ); addItem( itemGrayColor[7], QStringLiteral( "GrayColor7" ) ); itemGrayColor[8] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #8" ), mGrayColor[8], QColor::fromRgbF(8 / 10.0, 8 / 10.0, 8 / 10.0) ); addItem( itemGrayColor[8], QStringLiteral( "GrayColor8" ) ); itemGrayColor[9] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #9" ), mGrayColor[9], QColor::fromRgbF(9 / 10.0, 9 / 10.0, 9 / 10.0) ); addItem( itemGrayColor[9], QStringLiteral( "GrayColor9" ) ); itemGrayColor[10] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "gray color #10" ), mGrayColor[10], QColor::fromRgbF(10 / 10.0, 10 / 10.0, 10 / 10.0) ); addItem( itemGrayColor[10], QStringLiteral( "GrayColor10" ) ); KConfigSkeleton::ItemString *itemColorString[11]; itemColorString[0] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #0" ), mColorString[0], QString::number(0) ); addItem( itemColorString[0], QStringLiteral( "ColorString0" ) ); itemColorString[1] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #1" ), mColorString[1], QString::number(1) ); addItem( itemColorString[1], QStringLiteral( "ColorString1" ) ); itemColorString[2] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #2" ), mColorString[2], QString::number(2) ); addItem( itemColorString[2], QStringLiteral( "ColorString2" ) ); itemColorString[3] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #3" ), mColorString[3], QString::number(3) ); addItem( itemColorString[3], QStringLiteral( "ColorString3" ) ); itemColorString[4] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #4" ), mColorString[4], QString::number(4) ); addItem( itemColorString[4], QStringLiteral( "ColorString4" ) ); itemColorString[5] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #5" ), mColorString[5], QString::number(5) ); addItem( itemColorString[5], QStringLiteral( "ColorString5" ) ); itemColorString[6] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #6" ), mColorString[6], QString::number(6) ); addItem( itemColorString[6], QStringLiteral( "ColorString6" ) ); itemColorString[7] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #7" ), mColorString[7], QString::number(7) ); addItem( itemColorString[7], QStringLiteral( "ColorString7" ) ); itemColorString[8] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #8" ), mColorString[8], QString::number(8) ); addItem( itemColorString[8], QStringLiteral( "ColorString8" ) ); itemColorString[9] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #9" ), mColorString[9], QString::number(9) ); addItem( itemColorString[9], QStringLiteral( "ColorString9" ) ); itemColorString[10] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "color string #10" ), mColorString[10], QString::number(10) ); addItem( itemColorString[10], QStringLiteral( "ColorString10" ) ); KConfigSkeleton::ItemString *itemFooBar; itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "foo bar" ), mFooBar ); addItem( itemFooBar, QStringLiteral( "FooBar" ) ); KConfigSkeleton::ItemInt *itemAge; itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Age" ), mAge, 35 ); itemAge->setMinValue(8); itemAge->setMaxValue(88); addItem( itemAge, QStringLiteral( "Age" ) ); } Test4::~Test4() { if (s_globalTest4.exists() && !s_globalTest4.isDestroyed()) { s_globalTest4()->q = nullptr; } }