-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcslidermp_interval.cpp
More file actions
54 lines (45 loc) · 1.29 KB
/
cslidermp_interval.cpp
File metadata and controls
54 lines (45 loc) · 1.29 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "cslidermp_interval.h"
CSliderMP_Interval::CSliderMP_Interval(QObject * parent) : QObject(parent){
spanColor = QColor(Qt::gray);
enabled = true;
handleBegin = 0;
handleEnd = 0;
}
CSliderMP_Interval::CSliderMP_Interval(const CSliderMP_Interval & src,QObject * parent) : QObject(parent){
this->spanColor = src.spanColor;
this->enabled = src.enabled;
this->handleBegin = src.handleBegin;
this->handleEnd = src.handleEnd;
}
QColor CSliderMP_Interval::getSpanColor(void) const{
return spanColor;
}
bool CSliderMP_Interval::isEnable(void) const{
return enabled;
}
void CSliderMP_Interval::setSpanColor(QColor value){
spanColor = value;
}
void CSliderMP_Interval::setIsEnable(bool value){
enabled = value;
}
void CSliderMP_Interval::assignHandles(CSliderMP_Handle * begin,CSliderMP_Handle * end){
handleBegin = begin;
handleEnd = end;
}
const int CSliderMP_Interval::beginValue(void){
return handleValue(handleBegin);
}
const int CSliderMP_Interval::stopValue(void){
return handleValue(handleEnd);
}
// PRIVATE FUNCTIONS
const int CSliderMP_Interval::handleValue(CSliderMP_Handle * handlePtr){
if( handlePtr!=0 ){
return handlePtr->getValue();
}
else{
// Handle pointer haven't be defined
return 0;
}
}