|
Toshihiro Shimizu |
890ddd |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include <qframe></qframe>
|
|
Toshihiro Shimizu |
890ddd |
#include <qmodelindex></qmodelindex>
|
|
Toshihiro Shimizu |
890ddd |
#include <qlistview></qlistview>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tcommon.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tmsgcore.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TOONZQT_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class MySortFilterProxyModel;
|
|
Toshihiro Shimizu |
890ddd |
class QCheckBox;
|
|
Toshihiro Shimizu |
890ddd |
class QStandardItemModel;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TMessageRepository final : public QObject {
|
|
Shinya Kitaoka |
120a6e |
QStandardItemModel *m_sim;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
Q_OBJECT
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
static TMessageRepository *instance();
|
|
Shinya Kitaoka |
120a6e |
TMessageRepository();
|
|
Shinya Kitaoka |
120a6e |
QStandardItemModel *getModel() const { return m_sim; }
|
|
Shinya Kitaoka |
120a6e |
void clear();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public slots:
|
|
Shinya Kitaoka |
120a6e |
void messageReceived(int, const QString &);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
signals:
|
|
Shinya Kitaoka |
120a6e |
void openMessageCenter(); // TMessageRepository emits this signal to indicate
|
|
Shinya Kitaoka |
120a6e |
// that the TMessageViewer should be made visible
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//---------------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TMessageViewer final : public QFrame {
|
|
Shinya Kitaoka |
120a6e |
Q_OBJECT
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
protected:
|
|
Shinya Kitaoka |
120a6e |
static std::vector<tmessageviewer *=""> m_tmsgViewers;</tmessageviewer>
|
|
Shinya Kitaoka |
120a6e |
MySortFilterProxyModel *m_proxyModel;
|
|
Shinya Kitaoka |
120a6e |
void rowsInserted(const QModelIndex &parent, int start, int end);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
QCheckBox *m_redCheck, *m_greenCheck, *m_yellowCheck;
|
|
Shinya Kitaoka |
120a6e |
TMessageViewer(QWidget *);
|
|
Shinya Kitaoka |
120a6e |
static bool isTMsgVisible();
|
|
Toshihiro Shimizu |
890ddd |
public slots:
|
|
Shinya Kitaoka |
120a6e |
void onClicked(bool);
|
|
Shinya Kitaoka |
120a6e |
void refreshFilter(int);
|
|
Toshihiro Shimizu |
890ddd |
};
|