cf12defd28
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
74 lines
3.5 KiB
Plaintext
74 lines
3.5 KiB
Plaintext
// This file is generated by kconfig_compiler_kf6 from test1.kcfg.
|
|
// All changes you do to this file will be lost.
|
|
|
|
#include "test1.h"
|
|
|
|
Test1::Test1( const QString & transport, const QString & folder, QObject *parent )
|
|
: KConfigSkeleton( QStringLiteral( "examplerc" ) )
|
|
, mParamtransport(transport)
|
|
, mParamfolder(folder)
|
|
{
|
|
setParent(parent);
|
|
setCurrentGroup( QStringLiteral( "General-%1" ).arg( mParamfolder ) );
|
|
|
|
KConfigSkeleton::ItemBool *itemOneOption;
|
|
itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "OneOption" ), mOneOption, true );
|
|
addItem( itemOneOption, QStringLiteral( "OneOption" ) );
|
|
KConfigSkeleton::ItemInt *itemAnotherOption;
|
|
itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Another Option" ), mAnotherOption, 5 );
|
|
addItem( itemAnotherOption, QStringLiteral( "AnotherOption" ) );
|
|
QList<KConfigSkeleton::ItemEnum::Choice> valuesListOption;
|
|
{
|
|
KConfigSkeleton::ItemEnum::Choice choice;
|
|
choice.name = QStringLiteral("One");
|
|
valuesListOption.append( choice );
|
|
}
|
|
{
|
|
KConfigSkeleton::ItemEnum::Choice choice;
|
|
choice.name = QStringLiteral("Two");
|
|
valuesListOption.append( choice );
|
|
}
|
|
{
|
|
KConfigSkeleton::ItemEnum::Choice choice;
|
|
choice.name = QStringLiteral("Three");
|
|
valuesListOption.append( choice );
|
|
}
|
|
KConfigSkeleton::ItemEnum *itemListOption;
|
|
itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "ListOption" ), mListOption, valuesListOption, EnumListOption::One );
|
|
addItem( itemListOption, QStringLiteral( "ListOption" ) );
|
|
|
|
setCurrentGroup( QStringLiteral( "MyOptions" ) );
|
|
|
|
KConfigSkeleton::ItemString *itemMyString;
|
|
itemMyString = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "MyString" ), mMyString, QStringLiteral( "Default String" ) );
|
|
addItem( itemMyString, QStringLiteral( "MyString" ) );
|
|
KConfigSkeleton::ItemPath *itemMyPath;
|
|
itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "MyPath" ), mMyPath, QDir::homePath()+QString::fromLatin1(".hidden_file") );
|
|
addItem( itemMyPath, QStringLiteral( "MyPath" ) );
|
|
KConfigSkeleton::ItemInt *itemAnotherOption2;
|
|
itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Another Option" ), mAnotherOption2, 10 );
|
|
addItem( itemAnotherOption2, QStringLiteral( "AnotherOption2" ) );
|
|
QStringList defaultMyStringList;
|
|
defaultMyStringList.append( QString::fromUtf8( "up" ) );
|
|
defaultMyStringList.append( QString::fromUtf8( "down" ) );
|
|
|
|
KConfigSkeleton::ItemStringList *itemMyStringList;
|
|
itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "MyStringList" ), mMyStringList, defaultMyStringList );
|
|
addItem( itemMyStringList, QStringLiteral( "MyStringList" ) );
|
|
QStringList defaultMyStringListHidden;
|
|
defaultMyStringListHidden.append( QString::fromUtf8( "up" ) );
|
|
defaultMyStringListHidden.append( QString::fromUtf8( "down" ) );
|
|
|
|
KConfigSkeleton::ItemStringList *itemMyStringListHidden;
|
|
itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden );
|
|
addItem( itemMyStringListHidden, QStringLiteral( "MyStringListHidden" ) );
|
|
KConfigSkeleton::ItemInt *itemMyNumber;
|
|
itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "List-%1-%2" ).arg( mParamtransport, mParamfolder ), mMyNumber, 1 );
|
|
addItem( itemMyNumber, QStringLiteral( "MyNumber" ) );
|
|
}
|
|
|
|
Test1::~Test1()
|
|
{
|
|
}
|
|
|