You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.2 KiB
64 lines
1.2 KiB
// This file is generated by kconfig_compiler_kf5 from test_param_minmax.kcfg. |
|
// All changes you do to this file will be lost. |
|
#ifndef TESTPARAMMINMAX_H |
|
#define TESTPARAMMINMAX_H |
|
|
|
#include <qglobal.h> |
|
#include <kconfigskeleton.h> |
|
#include <QCoreApplication> |
|
#include <QDebug> |
|
|
|
class TestParamMinMax : public KConfigSkeleton |
|
{ |
|
public: |
|
|
|
TestParamMinMax( KSharedConfig::Ptr config = KSharedConfig::openConfig() ); |
|
~TestParamMinMax(); |
|
|
|
/** |
|
Set foo_#$(myparam) |
|
*/ |
|
void setFoo( int i, double v ) |
|
{ |
|
if (v < 0.01) |
|
{ |
|
qDebug() << "setFoo: value " << v << " is less than the minimum value of 0.01"; |
|
v = 0.01; |
|
} |
|
|
|
if (v > 89898.23) |
|
{ |
|
qDebug() << "setFoo: value " << v << " is greater than the maximum value of 89898.23"; |
|
v = 89898.23; |
|
} |
|
|
|
if (!isFooImmutable( i )) |
|
mFoo[i] = v; |
|
} |
|
|
|
/** |
|
Get foo_#$(myparam) |
|
*/ |
|
double foo( int i ) const |
|
{ |
|
return mFoo[i]; |
|
} |
|
|
|
/** |
|
Is foo_#$(myparam) Immutable |
|
*/ |
|
bool isFooImmutable( int i ) const |
|
{ |
|
return isImmutable( QStringLiteral( "Foo%1" ).arg( i ) ); |
|
} |
|
|
|
protected: |
|
|
|
// Something |
|
double mFoo[6]; |
|
|
|
private: |
|
}; |
|
|
|
#endif |
|
|
|
|