radioapp/radiowidgets/inc/radiohistoryview.h
changeset 24 6df133bd92e1
child 28 075425b8d9a4
equal deleted inserted replaced
23:a2b50a479edf 24:6df133bd92e1
       
     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 RADIOHISTORYVIEW_H
       
    19 #define RADIOHISTORYVIEW_H
       
    20 
       
    21 // System includes
       
    22 #include <HbIcon>
       
    23 #include <QScopedPointer>
       
    24 
       
    25 // User includes
       
    26 #include "radioviewbase.h"
       
    27 #include "radiowidgetsexport.h"
       
    28 
       
    29 // Forward declarations
       
    30 class RadioXmlUiLoader;
       
    31 class HbListView;
       
    32 class HbAction;
       
    33 class HbAbstractViewItem;
       
    34 class RadioHistoryModel;
       
    35 class RadioHistoryItem;
       
    36 
       
    37 // Class declaration
       
    38 class WIDGETS_DLL_EXPORT RadioHistoryView : public RadioViewBase
       
    39 {
       
    40     Q_OBJECT
       
    41     Q_PROPERTY(HbIcon nonTaggedIcon READ nonTaggedIcon WRITE setNonTaggedIcon)
       
    42     Q_PROPERTY(HbIcon taggedIcon READ taggedIcon WRITE setTaggedIcon)
       
    43 
       
    44 public:
       
    45 
       
    46     RadioHistoryView();
       
    47     ~RadioHistoryView();
       
    48 
       
    49     void setNonTaggedIcon( const HbIcon& nonTaggedIcon );
       
    50     HbIcon nonTaggedIcon() const;
       
    51 
       
    52     void setTaggedIcon( const HbIcon& taggedIcon );
       
    53     HbIcon taggedIcon() const;
       
    54 
       
    55 private slots:
       
    56 
       
    57     void deckButtonPressed();
       
    58     void clearList();
       
    59     void updateVisibilities();
       
    60     void showContextMenu( const QModelIndex& index );
       
    61     void toggleTagging();
       
    62     void openOviStore();
       
    63     void openOtherStore();
       
    64     void addSongs();            // Temporary test code
       
    65     void addOneSong();          // Temporary test code
       
    66 
       
    67 private:
       
    68 
       
    69 // from base class RadioViewBase
       
    70 
       
    71     void init();
       
    72     void setOrientation();
       
    73     void userAccepted();
       
    74 
       
    75 // New functions
       
    76 
       
    77     RadioHistoryModel& historyModel() const;
       
    78 
       
    79 private: //data
       
    80 
       
    81     HbListView*                         mHistoryList;
       
    82     HbAction*                           mAllSongsButton;
       
    83     HbAction*                           mTaggedSongsButton;
       
    84     QScopedPointer<RadioHistoryItem>    mSelectedItem;
       
    85     int                                 mCurrentRow;
       
    86     HbIcon                              mNonTaggedIcon;
       
    87     HbIcon                              mTaggedIcon;
       
    88 
       
    89     int                                 mSongIndex; // Temporary test variable
       
    90 
       
    91 };
       
    92 
       
    93 #endif // RADIOHISTORYVIEW_H