author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 11 Jun 2010 13:38:32 +0300 | |
changeset 28 | 075425b8d9a4 |
parent 24 | 6df133bd92e1 |
child 37 | 451b2e1545b2 |
child 39 | ac7857bd5fdb |
permissions | -rw-r--r-- |
24 | 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 |
// System includes |
|
19 |
||
20 |
// User includes |
|
21 |
#include "radiofrequencyitem.h" |
|
22 |
#include "radiofrequencystrip.h" |
|
23 |
#include "radio_global.h" |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
24 |
#include "radiologger.h" |
24 | 25 |
|
26 |
/*! |
|
27 |
* |
|
28 |
*/ |
|
29 |
RadioFrequencyItem::RadioFrequencyItem( QString frequency ) : |
|
28
075425b8d9a4
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
30 |
mFrequency( frequency.isEmpty() ? 0 : frequency.toInt() * ONE_HERTZ ), |
24 | 31 |
mGraphicsItem( 0 ) |
32 |
{ |
|
33 |
} |
|
34 |
||
35 |
/*! |
|
36 |
* |
|
37 |
*/ |
|
38 |
uint RadioFrequencyItem::frequency() const |
|
39 |
{ |
|
40 |
return mFrequency; |
|
41 |
} |
|
42 |
||
43 |
/*! |
|
44 |
* |
|
45 |
*/ |
|
46 |
QPixmap RadioFrequencyItem::updatePrimitive( QGraphicsPixmapItem* item ) |
|
47 |
{ |
|
48 |
mGraphicsItem = item; |
|
49 |
return mPixmap; |
|
50 |
} |
|
51 |
||
52 |
/*! |
|
53 |
* |
|
54 |
*/ |
|
55 |
void RadioFrequencyItem::setPixmap( QPixmap pixmap ) |
|
56 |
{ |
|
57 |
mPixmap = pixmap; |
|
58 |
if ( mGraphicsItem ) { |
|
59 |
mGraphicsItem->setPixmap( mPixmap ); |
|
60 |
} |
|
61 |
} |