diff options
author | Jenkins CI <null@kde.org> | 2013-12-18 00:45:18 +0000 |
---|---|---|
committer | Jenkins CI <null@kde.org> | 2013-12-18 00:45:18 +0000 |
commit | c38b88497a833e482e6892b72c8f52adec6de857 (patch) | |
tree | 8c2d4b788cf54ab2179ffe53515d276feaeba2d1 /tier1/kconfig/autotests/kconfig_compiler/test4.cpp.ref | |
download | kconfig-c38b88497a833e482e6892b72c8f52adec6de857.tar.gz kconfig-c38b88497a833e482e6892b72c8f52adec6de857.tar.bz2 |
Initial import from the monolithic kdelibs.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, kdelibs frameworks branch, at commit
162066dbbecde401a7347a1cff4fe72a9c919f58
Diffstat (limited to 'tier1/kconfig/autotests/kconfig_compiler/test4.cpp.ref')
-rw-r--r-- | tier1/kconfig/autotests/kconfig_compiler/test4.cpp.ref | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/tier1/kconfig/autotests/kconfig_compiler/test4.cpp.ref b/tier1/kconfig/autotests/kconfig_compiler/test4.cpp.ref new file mode 100644 index 00000000..171d655d --- /dev/null +++ b/tier1/kconfig/autotests/kconfig_compiler/test4.cpp.ref @@ -0,0 +1,178 @@ +// This file is generated by kconfig_compiler from test4.kcfg. +// All changes you do to this file will be lost. + +#include "test4.h" + +#include <qglobal.h> +#include <QtCore/QFile> + +class Test4Helper +{ + public: + Test4Helper() : q(0) {} + ~Test4Helper() { delete q; } + Test4 *q; +}; +Q_GLOBAL_STATIC(Test4Helper, s_globalTest4) +Test4 *Test4::self() +{ + if (!s_globalTest4()->q) { + new Test4; + s_globalTest4()->q->readConfig(); + } + + return s_globalTest4()->q; +} + +const char* const Test4::EnumButton::enumToString[] = { "right", "mid", "left" }; + +Test4::Test4( ) + : KConfigSkeleton( QLatin1String( "test4rc" ) ) +{ + Q_ASSERT(!s_globalTest4()->q); + s_globalTest4()->q = this; + setCurrentGroup( QLatin1String( "Foo" ) ); + +QColor defaultColor[4] = { Qt::red, Qt::blue, Qt::green, Qt::black }; + KConfigSkeleton::ItemColor *itemColor[4]; + itemColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "color #0" ), mColor[0], defaultColor[0] ); + addItem( itemColor[0], QLatin1String( "Color0" ) ); + itemColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "color #1" ), mColor[1], defaultColor[1] ); + addItem( itemColor[1], QLatin1String( "Color1" ) ); + itemColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "color #2" ), mColor[2], defaultColor[2] ); + addItem( itemColor[2], QLatin1String( "Color2" ) ); + itemColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "color #3" ), mColor[3], defaultColor[3] ); + addItem( itemColor[3], QLatin1String( "Color3" ) ); + QList<KConfigSkeleton::ItemEnum::Choice> valuesMouseAction; + { + KConfigSkeleton::ItemEnum::Choice choice; + choice.name = QLatin1String("Encrypt"); + valuesMouseAction.append( choice ); + } + { + KConfigSkeleton::ItemEnum::Choice choice; + choice.name = QLatin1String("Decrypt"); + valuesMouseAction.append( choice ); + } + { + KConfigSkeleton::ItemEnum::Choice choice; + choice.name = QLatin1String("CrashNBurn"); + valuesMouseAction.append( choice ); + } + { + KConfigSkeleton::ItemEnum::Choice choice; + choice.name = QLatin1String("PumpNDump"); + valuesMouseAction.append( choice ); + } + KConfigSkeleton::ItemEnum *itemMouseAction[3]; + itemMouseAction[0] = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "right_mouse_action" ), mMouseAction[0], valuesMouseAction, EnumMouseAction::Decrypt ); + addItem( itemMouseAction[0], QLatin1String( "MouseActionright" ) ); + itemMouseAction[1] = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "mid_mouse_action" ), mMouseAction[1], valuesMouseAction, EnumMouseAction::Encrypt ); + addItem( itemMouseAction[1], QLatin1String( "MouseActionmid" ) ); + itemMouseAction[2] = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "left_mouse_action" ), mMouseAction[2], valuesMouseAction, EnumMouseAction::PumpNDump ); + addItem( itemMouseAction[2], QLatin1String( "MouseActionleft" ) ); + KConfigSkeleton::ItemColor *itemGrayColor[11]; + itemGrayColor[0] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #0" ), mGrayColor[0], + QColor::fromRgbF(0 / 10.0, 0 / 10.0, 0 / 10.0) + ); + addItem( itemGrayColor[0], QLatin1String( "GrayColor0" ) ); + itemGrayColor[1] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #1" ), mGrayColor[1], + QColor::fromRgbF(1 / 10.0, 1 / 10.0, 1 / 10.0) + ); + addItem( itemGrayColor[1], QLatin1String( "GrayColor1" ) ); + itemGrayColor[2] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #2" ), mGrayColor[2], + QColor::fromRgbF(2 / 10.0, 2 / 10.0, 2 / 10.0) + ); + addItem( itemGrayColor[2], QLatin1String( "GrayColor2" ) ); + itemGrayColor[3] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #3" ), mGrayColor[3], + QColor::fromRgbF(3 / 10.0, 3 / 10.0, 3 / 10.0) + ); + addItem( itemGrayColor[3], QLatin1String( "GrayColor3" ) ); + itemGrayColor[4] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #4" ), mGrayColor[4], + QColor::fromRgbF(4 / 10.0, 4 / 10.0, 4 / 10.0) + ); + addItem( itemGrayColor[4], QLatin1String( "GrayColor4" ) ); + itemGrayColor[5] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #5" ), mGrayColor[5], + QColor::fromRgbF(5 / 10.0, 5 / 10.0, 5 / 10.0) + ); + addItem( itemGrayColor[5], QLatin1String( "GrayColor5" ) ); + itemGrayColor[6] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #6" ), mGrayColor[6], + QColor::fromRgbF(6 / 10.0, 6 / 10.0, 6 / 10.0) + ); + addItem( itemGrayColor[6], QLatin1String( "GrayColor6" ) ); + itemGrayColor[7] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #7" ), mGrayColor[7], + QColor::fromRgbF(7 / 10.0, 7 / 10.0, 7 / 10.0) + ); + addItem( itemGrayColor[7], QLatin1String( "GrayColor7" ) ); + itemGrayColor[8] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #8" ), mGrayColor[8], + QColor::fromRgbF(8 / 10.0, 8 / 10.0, 8 / 10.0) + ); + addItem( itemGrayColor[8], QLatin1String( "GrayColor8" ) ); + itemGrayColor[9] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #9" ), mGrayColor[9], + QColor::fromRgbF(9 / 10.0, 9 / 10.0, 9 / 10.0) + ); + addItem( itemGrayColor[9], QLatin1String( "GrayColor9" ) ); + itemGrayColor[10] = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "gray color #10" ), mGrayColor[10], + QColor::fromRgbF(10 / 10.0, 10 / 10.0, 10 / 10.0) + ); + addItem( itemGrayColor[10], QLatin1String( "GrayColor10" ) ); + KConfigSkeleton::ItemString *itemColorString[11]; + itemColorString[0] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #0" ), mColorString[0], + QString::number(0) + ); + addItem( itemColorString[0], QLatin1String( "ColorString0" ) ); + itemColorString[1] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #1" ), mColorString[1], + QString::number(1) + ); + addItem( itemColorString[1], QLatin1String( "ColorString1" ) ); + itemColorString[2] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #2" ), mColorString[2], + QString::number(2) + ); + addItem( itemColorString[2], QLatin1String( "ColorString2" ) ); + itemColorString[3] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #3" ), mColorString[3], + QString::number(3) + ); + addItem( itemColorString[3], QLatin1String( "ColorString3" ) ); + itemColorString[4] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #4" ), mColorString[4], + QString::number(4) + ); + addItem( itemColorString[4], QLatin1String( "ColorString4" ) ); + itemColorString[5] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #5" ), mColorString[5], + QString::number(5) + ); + addItem( itemColorString[5], QLatin1String( "ColorString5" ) ); + itemColorString[6] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #6" ), mColorString[6], + QString::number(6) + ); + addItem( itemColorString[6], QLatin1String( "ColorString6" ) ); + itemColorString[7] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #7" ), mColorString[7], + QString::number(7) + ); + addItem( itemColorString[7], QLatin1String( "ColorString7" ) ); + itemColorString[8] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #8" ), mColorString[8], + QString::number(8) + ); + addItem( itemColorString[8], QLatin1String( "ColorString8" ) ); + itemColorString[9] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #9" ), mColorString[9], + QString::number(9) + ); + addItem( itemColorString[9], QLatin1String( "ColorString9" ) ); + itemColorString[10] = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "color string #10" ), mColorString[10], + QString::number(10) + ); + addItem( itemColorString[10], QLatin1String( "ColorString10" ) ); + KConfigSkeleton::ItemString *itemFooBar; + itemFooBar = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "foo bar" ), mFooBar ); + addItem( itemFooBar, QLatin1String( "FooBar" ) ); + KConfigSkeleton::ItemInt *itemAge; + itemAge = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "Age" ), mAge, 35 ); + itemAge->setMinValue(8); + itemAge->setMaxValue(88); + addItem( itemAge, QLatin1String( "Age" ) ); +} + +Test4::~Test4() +{ + s_globalTest4()->q = 0; +} + |