documentation and qproperties
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=851721
This commit is contained in:
parent
a4704a44fc
commit
3f3b9eddcc
@ -49,11 +49,21 @@ void ScrollBar::setSingleStep(int val)
|
|||||||
static_cast<QScrollBar*>(widget())->setSingleStep(val);
|
static_cast<QScrollBar*>(widget())->setSingleStep(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ScrollBar::singleStep()
|
||||||
|
{
|
||||||
|
return static_cast<QScrollBar*>(widget())->singleStep();
|
||||||
|
}
|
||||||
|
|
||||||
void ScrollBar::setPageStep(int val)
|
void ScrollBar::setPageStep(int val)
|
||||||
{
|
{
|
||||||
static_cast<QScrollBar*>(widget())->setPageStep(val);
|
static_cast<QScrollBar*>(widget())->setPageStep(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ScrollBar::pageStep()
|
||||||
|
{
|
||||||
|
return static_cast<QScrollBar*>(widget())->pageStep();
|
||||||
|
}
|
||||||
|
|
||||||
void ScrollBar::setValue(int val)
|
void ScrollBar::setValue(int val)
|
||||||
{
|
{
|
||||||
static_cast<QScrollBar*>(widget())->setValue(val);
|
static_cast<QScrollBar*>(widget())->setValue(val);
|
||||||
|
@ -29,22 +29,91 @@
|
|||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
|
||||||
// Wraps a QScrollBar in a QGraphicsProxyWidget
|
/**
|
||||||
|
* @short Wraps a QScrollBar in a QGraphicsProxyWidget
|
||||||
|
*/
|
||||||
class PLASMA_EXPORT ScrollBar : public QGraphicsProxyWidget
|
class PLASMA_EXPORT ScrollBar : public QGraphicsProxyWidget
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
Q_PROPERTY(int singleStep READ singleStep WRITE setSingleStep)
|
||||||
|
Q_PROPERTY(int pageStep READ pageStep WRITE setPageStep)
|
||||||
|
Q_PROPERTY(int value READ value WRITE setValue)
|
||||||
|
Q_PROPERTY(int minimum READ minimum)
|
||||||
|
Q_PROPERTY(int maximum READ maximum)
|
||||||
|
Q_PROPERTY(QString stylesheet READ styleSheet WRITE setStyleSheet)
|
||||||
|
Q_PROPERTY(QScrollBar* nativeWidget READ nativeWidget)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ScrollBar(Qt::Orientation orientation, QGraphicsWidget *parent);
|
explicit ScrollBar(Qt::Orientation orientation, QGraphicsWidget *parent);
|
||||||
~ScrollBar();
|
~ScrollBar();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the scrollbar minimum and maximum values
|
||||||
|
* @arg min minimum value
|
||||||
|
* @arg max maximum value
|
||||||
|
*/
|
||||||
void setRange(int min, int max);
|
void setRange(int min, int max);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the amount of the single step
|
||||||
|
* i.e how much the slider will move when the user press an arrow button
|
||||||
|
* @arg val
|
||||||
|
*/
|
||||||
void setSingleStep(int val);
|
void setSingleStep(int val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the amount of the single step
|
||||||
|
*/
|
||||||
|
int singleStep();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the amount the slider will scroll when the user press page up or page down
|
||||||
|
* @arg val
|
||||||
|
*/
|
||||||
void setPageStep(int val);
|
void setPageStep(int val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the amount of the page step
|
||||||
|
*/
|
||||||
|
int pageStep();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the current value for the ScrollBar
|
||||||
|
* @arg value must be minimum() <= value <= maximum()
|
||||||
|
*/
|
||||||
void setValue(int val);
|
void setValue(int val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the current scrollbar value
|
||||||
|
*/
|
||||||
int value() const;
|
int value() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the minimum value bound of this ScrollBar
|
||||||
|
*/
|
||||||
int minimum() const;
|
int minimum() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the maximum value bound of this ScrollBar
|
||||||
|
*/
|
||||||
int maximum() const;
|
int maximum() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the stylesheet used to control the visual display of this ScrollBar
|
||||||
|
*
|
||||||
|
* @arg stylesheet a CSS string
|
||||||
|
*/
|
||||||
void setStyleSheet(const QString &stylesheet);
|
void setStyleSheet(const QString &stylesheet);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the stylesheet currently used with this widget
|
||||||
|
*/
|
||||||
QString styleSheet();
|
QString styleSheet();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the native widget wrapped by this ScrollBar
|
||||||
|
*/
|
||||||
QScrollBar *nativeWidget() const;
|
QScrollBar *nativeWidget() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user