-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcslidermp_handle.cpp
40 lines (32 loc) · 952 Bytes
/
cslidermp_handle.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "cslidermp_handle.h"
CSliderMP_Handle::CSliderMP_Handle(int initialPosValue,QObject * parent) : QObject(parent){
position = initialPosValue;
value = initialPosValue;
pressed = QStyle::SC_None;
}
CSliderMP_Handle::CSliderMP_Handle(const CSliderMP_Handle & src,QObject * parent) : QObject(parent){
this->position = src.position;
this->value = src.value;
this->pressed = src.pressed;
}
int CSliderMP_Handle::getPosition(void) const{
return position;
}
int CSliderMP_Handle::getValue(void) const{
return value;
}
QStyle::SubControl CSliderMP_Handle::getPressed(void) const{
return pressed;
}
bool CSliderMP_Handle::isPosDifferOfValue(void) const{
return value!=position;
}
void CSliderMP_Handle::setPosition(int value){
position = value;
}
void CSliderMP_Handle::setValue(int value){
this->value = value;
}
void CSliderMP_Handle::setPressed(QStyle::SubControl value){
pressed = value;
}