libyui-qt
 
Loading...
Searching...
No Matches
YQSlider.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YQSlider.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25
26#ifndef YQSlider_h
27#define YQSlider_h
28
29#include <QFrame>
30#include <yui/YSlider.h>
31
32class YQWidgetCaption;
33class QSlider;
34class QSpinBox;
35
36class YQSlider : public QFrame, public YSlider
37{
38 Q_OBJECT
39
40public:
41
47 YQSlider( YWidget * parent,
48 const std::string & label,
49 int minValue,
50 int maxValue,
51 int initialValue,
52 bool reverseLayout = false );
53
57 virtual ~YQSlider();
58
65 virtual int value();
66
67protected:
68
76 virtual void setValueInternal( int val );
77
78public:
79
85 virtual void setLabel( const std::string & label );
86
92 virtual void setEnabled( bool enabled );
93
99 virtual int preferredWidth();
100
106 virtual int preferredHeight();
107
113 virtual void setSize( int newWidth, int newHeight );
114
118 virtual bool setKeyboardFocus();
119
120
121public slots:
126 void valueChangedSlot( int newValue );
127
128signals:
129
133 void valueChanged( int newValue );
134
135
136protected:
137
138 YQWidgetCaption * _caption;
139 QSlider * _qt_slider;
140 QSpinBox * _qt_spinBox;
141 QFrame * _hbox;
142};
143
144
145#endif // YQSlider_h
virtual void setValueInternal(int val)
Definition YQSlider.cc:136
virtual void setLabel(const std::string &label)
Definition YQSlider.cc:190
virtual void setEnabled(bool enabled)
Definition YQSlider.cc:156
virtual int preferredWidth()
Definition YQSlider.cc:166
YQSlider(YWidget *parent, const std::string &label, int minValue, int maxValue, int initialValue, bool reverseLayout=false)
Definition YQSlider.cc:43
virtual int preferredHeight()
Definition YQSlider.cc:176
virtual void setSize(int newWidth, int newHeight)
Definition YQSlider.cc:183
virtual ~YQSlider()
Definition YQSlider.cc:122
void valueChanged(int newValue)
virtual bool setKeyboardFocus()
Definition YQSlider.cc:198
virtual int value()
Definition YQSlider.cc:129
void valueChangedSlot(int newValue)
Definition YQSlider.cc:146
Definition YQWidgetCaption.h:39