123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef MYSMILES_H
- #define MYSMILES_H
- #include <QObject>
- #include <QList>
- #include <QMap>
- #include "smilesitemmodel.h"
- #include "smileslistmodel.h"
- #include "smthemeitemmodel.h"
- #include "smthemelistmodel.h"
- class MySmiles : public QObject
- {
- Q_OBJECT
- Q_DISABLE_COPY( MySmiles )
- Q_PROPERTY( QString file READ getFile WRITE setFile NOTIFY fileChanged )
- Q_PROPERTY( SmilesListModel* smilesModel READ getSmilesModel/* WRITE setSmilesModel*/ NOTIFY smilesModelChanged )
- Q_PROPERTY( SmilesThemeListModel* themeSmiles READ getThemeSmiles NOTIFY themeSmilesChanged )
- QMap<QString, QString> bufOfSmiles;
- SmilesListModel* listOfSmiles;
- SmilesThemeListModel* m_themeSmiles;
- QString fileXML;
- QMap<QString, QString> getTheme(const QString &fileTheme) const;
- public:
- explicit MySmiles(QObject *parent = 0);
- void parseXMLSmiles( const QString &inFile );
- Q_INVOKABLE QString parseMsgString( const QString inString );
- Q_INVOKABLE QString htmlToPlainText( const QString inString ) const;
- void getBuffThemes();
- SmilesListModel* getSmilesModel() const { return listOfSmiles; }
- QString getFile() const { return fileXML; }
- void setFile( const QString &_fileXML );
-
- SmilesThemeListModel* getThemeSmiles() const { return m_themeSmiles; }
- signals:
- void smilesModelChanged();
- void fileChanged();
- void themeSmilesChanged();
- public slots:
-
- };
- #endif // MYSMILES_H
|