radioapp/radiouiengine/inc/radiohistorymodel.h
branchGCC_SURGE
changeset 37 451b2e1545b2
parent 19 afea38384506
parent 32 189d20c34778
equal deleted inserted replaced
26:6bcf277166c1 37:451b2e1545b2
    18 #ifndef RADIOHISTORYMODEL_H
    18 #ifndef RADIOHISTORYMODEL_H
    19 #define RADIOHISTORYMODEL_H
    19 #define RADIOHISTORYMODEL_H
    20 
    20 
    21 // System includes
    21 // System includes
    22 #include <QAbstractListModel>
    22 #include <QAbstractListModel>
       
    23 #include <QScopedPointer>
    23 
    24 
    24 // User includes
    25 // User includes
    25 #include "radiouiengineexport.h"
    26 #include "radiouiengineexport.h"
    26 #include "radiohistoryitem.h"
    27 #include "radiohistoryitem.h"
    27 
    28 
    33 class RadioHistoryItem;
    34 class RadioHistoryItem;
    34 
    35 
    35 class UI_ENGINE_DLL_EXPORT RadioHistoryModel : public QAbstractListModel
    36 class UI_ENGINE_DLL_EXPORT RadioHistoryModel : public QAbstractListModel
    36 {
    37 {
    37     Q_OBJECT
    38     Q_OBJECT
    38     Q_DECLARE_PRIVATE_D( d_ptr, RadioHistoryModel )
    39     Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioHistoryModel )
    39     Q_DISABLE_COPY( RadioHistoryModel )
    40     Q_DISABLE_COPY( RadioHistoryModel )
    40 
    41 
    41     friend class RadioUiEngine;
    42     friend class RadioUiEngine;
    42     friend class RadioUiEnginePrivate;
    43     friend class RadioUiEnginePrivate;
    43     friend class RadioStationModelPrivate;
    44     friend class RadioStationModelPrivate;
    71     void setShowTagged( bool showTagged );
    72     void setShowTagged( bool showTagged );
    72     void toggleTagging( const RadioHistoryItem& item, const int row );
    73     void toggleTagging( const RadioHistoryItem& item, const int row );
    73 
    74 
    74     RadioHistoryItem itemAtIndex( const QModelIndex& index ) const;
    75     RadioHistoryItem itemAtIndex( const QModelIndex& index ) const;
    75 
    76 
       
    77     void removeAll( bool removeTagged );
       
    78 
    76 signals:
    79 signals:
    77 
    80 
    78     void itemAdded();
    81     void itemAdded();
    79     void currentSongReset();
    82     void currentSongReset();
    80 
    83 
    81 public slots:
    84 public slots:
    82 
    85 
    83     void resetCurrentSong();
    86     void resetCurrentSong();
    84     void removeAll();
       
    85 
    87 
    86 private:
    88 private:
    87 
    89 
    88     explicit RadioHistoryModel( RadioUiEngine& uiEngine );
    90     explicit RadioHistoryModel( RadioUiEngine& uiEngine );
    89 
    91 
    99 private: // data
   101 private: // data
   100 
   102 
   101     /**
   103     /**
   102      * Unmodifiable pointer to the private implementation
   104      * Unmodifiable pointer to the private implementation
   103      */
   105      */
   104     RadioHistoryModelPrivate* const d_ptr;
   106     const QScopedPointer<RadioHistoryModelPrivate> d_ptr;
   105 
   107 
   106 };
   108 };
   107 
   109 
   108 #endif // RADIOHISTORYMODEL_H
   110 #endif // RADIOHISTORYMODEL_H