mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 02:12:50 +00:00
plasma: use Plasma::Slider::nativeWidget() instead of static_cast<T>()-ing everywhere
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1cb8619539
commit
e0c4945a94
1 changed files with 10 additions and 11 deletions
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
|
||||
#include "slider.h"
|
||||
#include "framesvg.h"
|
||||
#include "private/style_p.h"
|
||||
#include "private/themedwidgetinterface_p.h"
|
||||
|
||||
|
@ -42,7 +41,7 @@ public:
|
|||
|
||||
Slider::Slider(QGraphicsWidget *parent)
|
||||
: QGraphicsProxyWidget(parent),
|
||||
d(new SliderPrivate(this))
|
||||
d(new SliderPrivate(this))
|
||||
{
|
||||
QSlider *native = new QSlider();
|
||||
|
||||
|
@ -74,47 +73,47 @@ void Slider::wheelEvent(QGraphicsSceneWheelEvent *event)
|
|||
|
||||
void Slider::setMaximum(int max)
|
||||
{
|
||||
static_cast<QSlider*>(widget())->setMaximum(max);
|
||||
nativeWidget()->setMaximum(max);
|
||||
}
|
||||
|
||||
int Slider::maximum() const
|
||||
{
|
||||
return static_cast<QSlider*>(widget())->maximum();
|
||||
return nativeWidget()->maximum();
|
||||
}
|
||||
|
||||
void Slider::setMinimum(int min)
|
||||
{
|
||||
static_cast<QSlider*>(widget())->setMinimum(min);
|
||||
nativeWidget()->setMinimum(min);
|
||||
}
|
||||
|
||||
int Slider::minimum() const
|
||||
{
|
||||
return static_cast<QSlider*>(widget())->minimum();
|
||||
return nativeWidget()->minimum();
|
||||
}
|
||||
|
||||
void Slider::setRange(int min, int max)
|
||||
{
|
||||
static_cast<QSlider*>(widget())->setRange(min, max);
|
||||
nativeWidget()->setRange(min, max);
|
||||
}
|
||||
|
||||
void Slider::setValue(int value)
|
||||
{
|
||||
static_cast<QSlider*>(widget())->setValue(value);
|
||||
nativeWidget()->setValue(value);
|
||||
}
|
||||
|
||||
int Slider::value() const
|
||||
{
|
||||
return static_cast<QSlider*>(widget())->value();
|
||||
return nativeWidget()->value();
|
||||
}
|
||||
|
||||
void Slider::setOrientation(Qt::Orientation orientation)
|
||||
{
|
||||
static_cast<QSlider*>(widget())->setOrientation(orientation);
|
||||
nativeWidget()->setOrientation(orientation);
|
||||
}
|
||||
|
||||
Qt::Orientation Slider::orientation() const
|
||||
{
|
||||
return static_cast<QSlider*>(widget())->orientation();
|
||||
return nativeWidget()->orientation();
|
||||
}
|
||||
|
||||
QSlider *Slider::nativeWidget() const
|
||||
|
|
Loading…
Add table
Reference in a new issue