36
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Implementation of HbProgressSlider
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// Version : %version: 1 %
|
|
19 |
|
|
20 |
#include <qgraphicswidget>
|
|
21 |
|
|
22 |
#include "mpxvideo_debug.h"
|
|
23 |
#include "hbprogressslider.h"
|
|
24 |
|
|
25 |
// -------------------------------------------------------------------------------------------------
|
|
26 |
// HbProgressSlider::HbProgressSlider
|
|
27 |
// -------------------------------------------------------------------------------------------------
|
|
28 |
//
|
|
29 |
HbProgressSlider::HbProgressSlider()
|
|
30 |
{
|
|
31 |
MPX_ENTER_EXIT(_L("HbProgressSlider::HbProgressSlider()"));
|
|
32 |
}
|
|
33 |
|
|
34 |
// -------------------------------------------------------------------------------------------------
|
|
35 |
// HbProgressSlider::~HbProgressSlider
|
|
36 |
// -------------------------------------------------------------------------------------------------
|
|
37 |
//
|
|
38 |
HbProgressSlider::~HbProgressSlider()
|
|
39 |
{
|
|
40 |
MPX_DEBUG(_L("HbProgressSlider::HbProgressSlider") );
|
|
41 |
}
|
|
42 |
|
|
43 |
// -------------------------------------------------------------------------------------------------
|
|
44 |
// HbProgressSlider::setRange
|
|
45 |
// -------------------------------------------------------------------------------------------------
|
|
46 |
//
|
|
47 |
void HbProgressSlider::setRange( int minimum, int maximum )
|
|
48 |
{
|
|
49 |
MPX_DEBUG(_L("HbProgressSlider::setRange"));
|
|
50 |
|
|
51 |
mMax = maximum;
|
|
52 |
mMin = minimum;
|
|
53 |
}
|
|
54 |
|
|
55 |
// -------------------------------------------------------------------------------------------------
|
|
56 |
// HbProgressSlider::setMaxText
|
|
57 |
// -------------------------------------------------------------------------------------------------
|
|
58 |
//
|
|
59 |
void HbProgressSlider::setMaxText( const QString &text )
|
|
60 |
{
|
|
61 |
MPX_DEBUG(_L("HbProgressSlider::setMaxText") );
|
|
62 |
|
|
63 |
mMaxText = text;
|
|
64 |
}
|
|
65 |
|
|
66 |
// -------------------------------------------------------------------------------------------------
|
|
67 |
// HbProgressSlider::maxText
|
|
68 |
// -------------------------------------------------------------------------------------------------
|
|
69 |
//
|
|
70 |
QString HbProgressSlider::maxText()
|
|
71 |
{
|
|
72 |
MPX_DEBUG(_L("HbProgressSlider::maxText") );
|
|
73 |
|
|
74 |
return mMaxText;
|
|
75 |
}
|
|
76 |
|
|
77 |
// -------------------------------------------------------------------------------------------------
|
|
78 |
// HbProgressSlider::setMinText
|
|
79 |
// -------------------------------------------------------------------------------------------------
|
|
80 |
//
|
|
81 |
void HbProgressSlider::setMinText( const QString &text )
|
|
82 |
{
|
|
83 |
MPX_DEBUG(_L("HbProgressSlider::setMinText") );
|
|
84 |
|
|
85 |
mMinText = text;
|
|
86 |
}
|
|
87 |
|
|
88 |
// -------------------------------------------------------------------------------------------------
|
|
89 |
// HbProgressSlider::minText
|
|
90 |
// -------------------------------------------------------------------------------------------------
|
|
91 |
//
|
|
92 |
QString HbProgressSlider::minText()
|
|
93 |
{
|
|
94 |
MPX_DEBUG(_L("HbProgressSlider::minText") );
|
|
95 |
|
|
96 |
return mMinText;
|
|
97 |
}
|
|
98 |
|
|
99 |
// -------------------------------------------------------------------------------------------------
|
|
100 |
// HbProgressSlider::setProgressValue
|
|
101 |
// -------------------------------------------------------------------------------------------------
|
|
102 |
//
|
|
103 |
void HbProgressSlider::setProgressValue( int value )
|
|
104 |
{
|
|
105 |
MPX_DEBUG(_L("HbProgressSlider::setProgressValue") );
|
|
106 |
|
|
107 |
mProgressValue = value;
|
|
108 |
}
|
|
109 |
|
|
110 |
// -------------------------------------------------------------------------------------------------
|
|
111 |
// HbProgressSlider::setSliderValue
|
|
112 |
// -------------------------------------------------------------------------------------------------
|
|
113 |
//
|
|
114 |
void HbProgressSlider::setSliderValue( int value )
|
|
115 |
{
|
|
116 |
MPX_DEBUG(_L("HbProgressSlider::setSliderValue") );
|
|
117 |
|
|
118 |
mSliderValue = value;
|
|
119 |
}
|
|
120 |
|
|
121 |
// -------------------------------------------------------------------------------------------------
|
|
122 |
// HbProgressSlider::sliderValue
|
|
123 |
// -------------------------------------------------------------------------------------------------
|
|
124 |
//
|
|
125 |
int HbProgressSlider::sliderValue()
|
|
126 |
{
|
|
127 |
MPX_DEBUG(_L("HbProgressSlider::sliderValue") );
|
|
128 |
|
|
129 |
return mSliderValue;
|
|
130 |
}
|
|
131 |
|
|
132 |
// -------------------------------------------------------------------------------------------------
|
|
133 |
// HbProgressSlider::progressValue
|
|
134 |
// -------------------------------------------------------------------------------------------------
|
|
135 |
//
|
|
136 |
int HbProgressSlider::progressValue()
|
|
137 |
{
|
|
138 |
MPX_DEBUG(_L("HbProgressSlider::progressValue") );
|
|
139 |
|
|
140 |
return mProgressValue;
|
|
141 |
}
|
|
142 |
|
|
143 |
// -------------------------------------------------------------------------------------------------
|
|
144 |
// HbProgressSlider::maximum
|
|
145 |
// -------------------------------------------------------------------------------------------------
|
|
146 |
//
|
|
147 |
int HbProgressSlider::maximum()
|
|
148 |
{
|
|
149 |
MPX_DEBUG(_L("HbProgressSlider::maximum") );
|
|
150 |
|
|
151 |
return mMax;
|
|
152 |
}
|
|
153 |
|
|
154 |
// -------------------------------------------------------------------------------------------------
|
|
155 |
// HbProgressSlider::press
|
|
156 |
// -------------------------------------------------------------------------------------------------
|
|
157 |
//
|
|
158 |
void HbProgressSlider::press()
|
|
159 |
{
|
|
160 |
MPX_DEBUG(_L("HbProgressSlider::press") );
|
|
161 |
|
|
162 |
emit sliderPressed();
|
|
163 |
}
|
|
164 |
|
|
165 |
// -------------------------------------------------------------------------------------------------
|
|
166 |
// HbProgressSlider::release
|
|
167 |
// -------------------------------------------------------------------------------------------------
|
|
168 |
//
|
|
169 |
void HbProgressSlider::release()
|
|
170 |
{
|
|
171 |
MPX_DEBUG(_L("HbProgressSlider::release") );
|
|
172 |
|
|
173 |
emit sliderReleased();
|
|
174 |
}
|
|
175 |
|
|
176 |
// -------------------------------------------------------------------------------------------------
|
|
177 |
// HbProgressSlider::move
|
|
178 |
// -------------------------------------------------------------------------------------------------
|
|
179 |
//
|
|
180 |
void HbProgressSlider::move( int value )
|
|
181 |
{
|
|
182 |
MPX_DEBUG(_L("HbProgressSlider::move") );
|
|
183 |
|
|
184 |
emit sliderMoved( value );
|
|
185 |
}
|
|
186 |
|
|
187 |
// End of file
|