39
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef RADIOFREQUENCYSTRIPDEF_H
|
|
19 |
#define RADIOFREQUENCYSTRIPDEF_H
|
|
20 |
|
|
21 |
#include <QLatin1String>
|
|
22 |
#include <QFont>
|
|
23 |
|
|
24 |
namespace Scroll
|
|
25 |
{
|
|
26 |
enum Direction
|
|
27 |
{
|
|
28 |
Shortest,
|
|
29 |
Left,
|
|
30 |
Right
|
|
31 |
};
|
|
32 |
}
|
|
33 |
|
|
34 |
namespace FrequencyStrip
|
|
35 |
{
|
|
36 |
|
|
37 |
struct StationMarker
|
|
38 |
{
|
|
39 |
StationMarker() : mFrequency( 0 ), mIsFavorite( false ) {}
|
|
40 |
StationMarker( uint frequency, bool isFavorite ) : mFrequency( frequency ), mIsFavorite( isFavorite ) {}
|
|
41 |
uint mFrequency;
|
|
42 |
bool mIsFavorite;
|
|
43 |
};
|
|
44 |
|
|
45 |
enum FrequencyChangeReason
|
|
46 |
{
|
|
47 |
Unspecified = 0,
|
|
48 |
ManualSeekUpdate,
|
|
49 |
ManualSeekTune
|
|
50 |
};
|
|
51 |
|
|
52 |
// Frequency lines
|
|
53 |
const int TAB_HEIGHT_SMALL = 12;
|
|
54 |
const int TAB_HEIGHT_BIG = 18;
|
|
55 |
const int PEN_WIDTH_FAVORITE = 4;
|
|
56 |
const qreal INDICATOR_WIDTH = 2.0;
|
|
57 |
|
|
58 |
const qreal ROUNDER = 0.5;
|
|
59 |
const int SELECTOR_WIDTH = 2;
|
|
60 |
const int SELECTOR_Z_POS = 100;
|
54
|
61 |
const int SELECTOR_MARGIN = 3;
|
39
|
62 |
|
|
63 |
const int ONE_HERTZ = 1000000;
|
|
64 |
const int HALF_HERTZ = ONE_HERTZ / 2;
|
|
65 |
const int ONE_TAB_DISTANCE = 20;
|
|
66 |
const uint ONE_TAB_IN_HZ = uint( 0.2 * ONE_HERTZ );
|
|
67 |
const qreal PIXEL_IN_HZ = ONE_TAB_IN_HZ / ONE_TAB_DISTANCE;
|
|
68 |
const qreal PIXMAP_OVERLAP = qreal( ONE_TAB_DISTANCE ) / 2;
|
|
69 |
const int ITEM_WIDTH = ONE_TAB_DISTANCE * 5;
|
|
70 |
const int PIXMAP_WIDTH = ITEM_WIDTH + (int)PIXMAP_OVERLAP;
|
|
71 |
|
|
72 |
const uint ONE_HUNDRED_KHZ = 100000;
|
|
73 |
|
|
74 |
static const QLatin1String DECIMAL_TEXT( ".0" );
|
|
75 |
|
|
76 |
#ifdef BUILD_WIN32
|
|
77 |
const int FREQUENCY_FONT_SIZE = 12;
|
|
78 |
const int DECIMAL_FONT_SIZE = 8;
|
|
79 |
#else
|
|
80 |
const int FREQUENCY_FONT_SIZE = 6;
|
|
81 |
const int DECIMAL_FONT_SIZE = 4;
|
|
82 |
#endif // BUILD_WIN32
|
|
83 |
|
54
|
84 |
const QFont FREQUENCY_FONT( "", FREQUENCY_FONT_SIZE, QFont::Bold );
|
|
85 |
const QFont DECIMAL_FONT( "", DECIMAL_FONT_SIZE, QFont::Bold );
|
|
86 |
const int FREQUENCY_TEXT_Y_POS = 25;
|
39
|
87 |
const int STATION_MARKER_Y_POS = 10;
|
|
88 |
|
|
89 |
static const QLatin1String SLIDE_TO_LEFT ( "SlideToLeft" );
|
|
90 |
static const QLatin1String SLIDE_FROM_LEFT ( "SlideFromLeft" );
|
|
91 |
static const QLatin1String SLIDE_TO_RIGHT ( "SlideToRight" );
|
|
92 |
static const QLatin1String SLIDE_FROM_RIGHT ( "SlideFromRight" );
|
|
93 |
static const QLatin1String LEFT_BUTTON ( "tv:left_button" );
|
|
94 |
static const QLatin1String RIGHT_BUTTON ( "tv:right_button" );
|
|
95 |
|
|
96 |
static const QLatin1String TEXT_COLOR_ATTRIBUTE( "text" );
|
|
97 |
const int MANUALSEEK_START_TIMEOUT = 400;
|
|
98 |
const int MANUALSEEK_END_TIMEOUT = 2000;
|
|
99 |
const int MANUALSEEK_SIGNAL_DELAY = 300;
|
|
100 |
|
|
101 |
}
|
|
102 |
|
|
103 |
#endif // RADIOFREQUENCYSTRIPDEF_H
|