1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef SMILETHEMESITEMMODEL_H
- #define SMILETHEMESITEMMODEL_H
- #include "listmodel.h"
- class SmilesThemeItemModel : public ListItem
- {
- Q_OBJECT
- public:
- enum Roles {
- smName = Qt::UserRole+1,
- smFile,
- smAuthor,
- smPicture
- };
- explicit SmilesThemeItemModel( QObject *parent = 0 ): ListItem(parent) {
- m_file = "";
- m_name = "";
- m_author = "";
- m_picture = "";
- }
- explicit SmilesThemeItemModel( const QString &_themeSmName,
- const QString &_themeSmFile,
- const QString &_themeSmAuthor,
- const QString &_themeSmPicture,
- QObject *parent = 0 );
- virtual QVariant data( int role ) const;
- virtual QHash<int, QByteArray> roleNames() const;
- virtual QString id() const { return m_file; }
- void setName( const QString &_smileThemeName );
- void setFile( const QString &_smileThemeFile );
- void setAuthor( const QString &_smileThemeAuthor );
- void setPicture( const QString &_smileThemePicture );
- inline QString file() const { return m_file; }
- inline QString name() const { return m_name; }
- inline QString author() const { return m_author; }
- inline QString picture() const { return m_picture; }
-
- signals:
-
- public slots:
-
- private:
- QString m_name;
- QString m_file;
- QString m_author;
- QString m_picture;
- };
- #endif // SMILETHEMESITEMMODEL_H
|