File indexing completed on 2024-05-12 16:59:36
0001 /* 0002 * SPDX-FileCopyrightText: 2014 David Edmundson <david@davidedmundson.co.uk> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 * 0006 */ 0007 0008 #ifndef NOTE_H 0009 #define NOTE_H 0010 0011 #include <QObject> 0012 0013 class Note : public QObject 0014 { 0015 Q_OBJECT 0016 Q_PROPERTY(QString id READ id CONSTANT) 0017 Q_PROPERTY(QString noteText READ noteText NOTIFY noteTextChanged) 0018 0019 public: 0020 explicit Note(const QString &id); 0021 QString id() const; 0022 0023 // what's in the plasmoid 0024 // backends save this and write into storedText 0025 QString noteText() const; 0026 void setNoteText(const QString &text); 0027 0028 public Q_SLOTS: 0029 virtual void save(const QString &text) = 0; 0030 0031 // FUTURE 0032 // status None, Ready, Loading, Error 0033 0034 Q_SIGNALS: 0035 void noteTextChanged(); 0036 0037 private: 0038 const QString m_id; 0039 QString m_noteText; 0040 }; 0041 0042 #endif // NOTE_H