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