12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef SMILESITEMMODEL_H
- #define SMILESITEMMODEL_H
- #include "listmodel.h"
- class SmilesItemModel : public ListItem
- {
- Q_OBJECT
- public:
- enum Roles {
- smPicture = Qt::UserRole+1,
- smText
- };
- explicit SmilesItemModel( QObject *parent = 0 ): ListItem(parent) {
- m_picture = "";
- m_text = "";
- }
- explicit SmilesItemModel( const QString &_smilePicture,
- const QString &_smileText,
- QObject *parent = 0 );
- virtual QVariant data(int role) const;
- virtual QHash<int, QByteArray> roleNames() const;
- virtual QString id() const { return m_text; }
- void setPicture( const QString &_smilePicture );
- void setText( const QString &_smileText );
- inline QString picture() const { return m_picture; }
- inline QString text() const { return m_text; }
- void copy( const SmilesItemModel* );
-
- signals:
-
- public slots:
-
- private:
- QString m_picture;
- QString m_text;
- };
- #endif // SMILESITEMMODEL_H
|