vdocument.h 471 B

123456789101112131415161718192021222324
  1. #ifndef VDOCUMENT_H
  2. #define VDOCUMENT_H
  3. #include <QObject>
  4. #include <QString>
  5. class VDocument : public QObject
  6. {
  7. Q_OBJECT
  8. Q_PROPERTY(QString text MEMBER m_text NOTIFY textChanged)
  9. public:
  10. explicit VDocument(QObject *parent = 0);
  11. VDocument(const QString &text, QObject *parent = 0);
  12. void setText(const QString &text);
  13. QString getText();
  14. signals:
  15. void textChanged(const QString &text);
  16. private:
  17. QString m_text;
  18. };
  19. #endif // VDOCUMENT_H