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.
133 lines
3.2 KiB
133 lines
3.2 KiB
15 years ago
|
//-----------------------------------------------------------------------------
|
||
|
//
|
||
|
// KDE xscreensaver configuration dialog
|
||
|
//
|
||
|
// Copyright (c) Martin R. Jones <mjones@kde.org> 1999
|
||
|
//
|
||
|
// This program is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU General Public
|
||
|
// License as published by the Free Software Foundation;
|
||
|
// version 2 of the License.
|
||
|
//
|
||
|
// This program is distributed in the hope that it will be useful,
|
||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
// General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public License
|
||
|
// along with this program; see the file COPYING. If not, write to
|
||
|
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
// Boston, MA 02110-1301, USA.
|
||
|
|
||
|
#ifndef __KXSITEM_H__
|
||
|
#define __KXSITEM_H__
|
||
|
|
||
|
#include <kconfig.h>
|
||
|
|
||
15 years ago
|
class TQXmlAttributes;
|
||
15 years ago
|
|
||
|
class KXSConfigItem
|
||
|
{
|
||
|
public:
|
||
12 years ago
|
KXSConfigItem(const TQString &name, TDEConfig &config);
|
||
15 years ago
|
KXSConfigItem(const TQString &name, const TQXmlAttributes &attr);
|
||
15 years ago
|
virtual ~KXSConfigItem() {}
|
||
|
|
||
15 years ago
|
virtual TQString command() = 0;
|
||
12 years ago
|
virtual void save(TDEConfig &config) = 0;
|
||
|
virtual void read(TDEConfig &config) = 0;
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
TQString mName;
|
||
|
TQString mLabel;
|
||
15 years ago
|
};
|
||
|
|
||
|
class KXSRangeItem : public KXSConfigItem
|
||
|
{
|
||
|
public:
|
||
12 years ago
|
KXSRangeItem(const TQString &name, TDEConfig &config);
|
||
15 years ago
|
KXSRangeItem(const TQString &name, const TQXmlAttributes &attr);
|
||
15 years ago
|
|
||
15 years ago
|
virtual TQString command();
|
||
12 years ago
|
virtual void save(TDEConfig &config);
|
||
|
virtual void read(TDEConfig &config);
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
TQString mSwitch;
|
||
15 years ago
|
int mMinimum;
|
||
|
int mMaximum;
|
||
|
int mValue;
|
||
|
bool mInvert;
|
||
|
};
|
||
|
|
||
|
class KXSDoubleRangeItem : public KXSConfigItem
|
||
|
{
|
||
|
public:
|
||
12 years ago
|
KXSDoubleRangeItem(const TQString &name, TDEConfig &config);
|
||
15 years ago
|
KXSDoubleRangeItem(const TQString &name, const TQXmlAttributes &attr);
|
||
15 years ago
|
|
||
15 years ago
|
virtual TQString command();
|
||
12 years ago
|
virtual void read(TDEConfig &config);
|
||
|
virtual void save(TDEConfig &config);
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
TQString mSwitch;
|
||
15 years ago
|
double mMinimum;
|
||
|
double mMaximum;
|
||
|
double mValue;
|
||
|
bool mInvert;
|
||
|
};
|
||
|
|
||
|
class KXSBoolItem : public KXSConfigItem
|
||
|
{
|
||
|
public:
|
||
12 years ago
|
KXSBoolItem(const TQString &name, TDEConfig &config);
|
||
15 years ago
|
KXSBoolItem(const TQString &name, const TQXmlAttributes &attr);
|
||
15 years ago
|
|
||
15 years ago
|
virtual TQString command();
|
||
12 years ago
|
virtual void read(TDEConfig &config);
|
||
|
virtual void save(TDEConfig &config);
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
TQString mSwitchOn;
|
||
|
TQString mSwitchOff;
|
||
15 years ago
|
bool mValue;
|
||
|
};
|
||
|
|
||
|
class KXSSelectItem : public KXSConfigItem
|
||
|
{
|
||
|
public:
|
||
12 years ago
|
KXSSelectItem(const TQString &name, TDEConfig &config);
|
||
15 years ago
|
KXSSelectItem(const TQString &name, const TQXmlAttributes &attr);
|
||
15 years ago
|
|
||
15 years ago
|
virtual void addOption(const TQXmlAttributes &attr);
|
||
15 years ago
|
|
||
15 years ago
|
virtual TQString command();
|
||
15 years ago
|
|
||
12 years ago
|
virtual void read(TDEConfig &config);
|
||
|
virtual void save(TDEConfig &config);
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
TQStringList mOptions;
|
||
|
TQStringList mSwitches;
|
||
15 years ago
|
int mValue;
|
||
|
};
|
||
|
|
||
|
class KXSStringItem : public KXSConfigItem
|
||
|
{
|
||
|
public:
|
||
12 years ago
|
KXSStringItem(const TQString &name, TDEConfig &config);
|
||
15 years ago
|
KXSStringItem(const TQString &name, const TQXmlAttributes &attr);
|
||
15 years ago
|
|
||
15 years ago
|
virtual TQString command();
|
||
12 years ago
|
virtual void save(TDEConfig &config);
|
||
|
virtual void read(TDEConfig &config);
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
TQString mSwitch;
|
||
|
TQString mValue;
|
||
15 years ago
|
};
|
||
|
|
||
|
#endif
|
||
|
|