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.
137 lines
3.0 KiB
137 lines
3.0 KiB
15 years ago
|
/*
|
||
|
* This file is part of the KDE libraries
|
||
13 years ago
|
* Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
|
||
15 years ago
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License version 2 as published by the Free Software Foundation.
|
||
|
*
|
||
|
* This library 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
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public License
|
||
|
* along with this library; see the file COPYING.LIB. If not, write to
|
||
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
**/
|
||
|
|
||
|
#ifndef DROPTIONVIEW_H
|
||
|
#define DROPTIONVIEW_H
|
||
|
|
||
14 years ago
|
#include <tqwidget.h>
|
||
|
#include <tqgroupbox.h>
|
||
|
#include <tqstringlist.h>
|
||
15 years ago
|
|
||
14 years ago
|
class TQLineEdit;
|
||
|
class TQSlider;
|
||
|
class TQLabel;
|
||
15 years ago
|
class KListBox;
|
||
14 years ago
|
class TQListBoxItem;
|
||
|
class TQVButtonGroup;
|
||
|
class TQWidgetStack;
|
||
|
class TQListViewItem;
|
||
15 years ago
|
class DrBase;
|
||
|
class DriverItem;
|
||
|
|
||
14 years ago
|
class OptionBaseView : public TQWidget
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
OptionBaseView(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
virtual void setOption(DrBase*);
|
||
14 years ago
|
virtual void setValue(const TQString&);
|
||
15 years ago
|
|
||
|
signals:
|
||
14 years ago
|
void valueChanged(const TQString&);
|
||
15 years ago
|
|
||
|
protected:
|
||
|
bool blockSS;
|
||
|
};
|
||
|
|
||
|
class OptionNumericView : public OptionBaseView
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
OptionNumericView(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
void setOption(DrBase *opt);
|
||
14 years ago
|
void setValue(const TQString& val);
|
||
15 years ago
|
|
||
|
protected slots:
|
||
|
void slotSliderChanged(int);
|
||
14 years ago
|
void slotEditChanged(const TQString&);
|
||
15 years ago
|
|
||
|
private:
|
||
14 years ago
|
TQLineEdit *m_edit;
|
||
|
TQSlider *m_slider;
|
||
|
TQLabel *m_minval, *m_maxval;
|
||
15 years ago
|
bool m_integer;
|
||
|
};
|
||
|
|
||
|
class OptionStringView : public OptionBaseView
|
||
|
{
|
||
|
public:
|
||
14 years ago
|
OptionStringView(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
void setOption(DrBase *opt);
|
||
14 years ago
|
void setValue(const TQString& val);
|
||
15 years ago
|
|
||
|
private:
|
||
14 years ago
|
TQLineEdit *m_edit;
|
||
15 years ago
|
};
|
||
|
|
||
|
class OptionListView : public OptionBaseView
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
OptionListView(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
void setOption(DrBase *opt);
|
||
14 years ago
|
void setValue(const TQString& val);
|
||
15 years ago
|
|
||
|
protected slots:
|
||
|
void slotSelectionChanged();
|
||
|
|
||
|
private:
|
||
|
KListBox *m_list;
|
||
14 years ago
|
TQStringList m_choices;
|
||
15 years ago
|
};
|
||
|
|
||
|
class OptionBooleanView : public OptionBaseView
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
OptionBooleanView(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
void setOption(DrBase *opt);
|
||
14 years ago
|
void setValue(const TQString& val);
|
||
15 years ago
|
|
||
|
protected slots:
|
||
|
void slotSelected(int);
|
||
|
|
||
|
private:
|
||
14 years ago
|
TQVButtonGroup *m_group;
|
||
|
TQStringList m_choices;
|
||
15 years ago
|
};
|
||
|
|
||
14 years ago
|
class DrOptionView : public TQGroupBox
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
14 years ago
|
DrOptionView(TQWidget *parent = 0, const char *name = 0);
|
||
15 years ago
|
void setAllowFixed(bool on) { m_allowfixed = on; }
|
||
|
|
||
|
signals:
|
||
|
void changed();
|
||
|
|
||
|
public slots:
|
||
14 years ago
|
void slotValueChanged(const TQString&);
|
||
|
void slotItemSelected(TQListViewItem*);
|
||
15 years ago
|
|
||
|
private:
|
||
14 years ago
|
TQWidgetStack *m_stack;
|
||
15 years ago
|
DriverItem *m_item;
|
||
|
bool m_block;
|
||
|
bool m_allowfixed;
|
||
|
};
|
||
|
|
||
|
#endif
|