Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfDatabaseref.h
Context not available. | |||||
41 | class ACBF_EXPORT DatabaseRef : public QObject | 41 | class ACBF_EXPORT DatabaseRef : public QObject | ||
---|---|---|---|---|---|
42 | { | 42 | { | ||
43 | Q_OBJECT | 43 | Q_OBJECT | ||
44 | Q_PROPERTY(QString dbname READ dbname WRITE setDbname NOTIFY dbnameChanged) | ||||
45 | Q_PROPERTY(QString type READ type WRITE setType NOTIFY typeChanged) | ||||
46 | Q_PROPERTY(QString reference READ reference WRITE setReference NOTIFY referenceChanged) | ||||
44 | public: | 47 | public: | ||
45 | explicit DatabaseRef(BookInfo* parent = nullptr); | 48 | explicit DatabaseRef(BookInfo* parent = nullptr); | ||
46 | ~DatabaseRef() override; | 49 | ~DatabaseRef() override; | ||
Context not available. | |||||
58 | /** | 61 | /** | ||
59 | * @return the name of the database. | 62 | * @return the name of the database. | ||
60 | */ | 63 | */ | ||
61 | QString dbname() const; | 64 | Q_INVOKABLE QString dbname() const; | ||
62 | /** | 65 | /** | ||
63 | * \brief set the name of the database for this reference. | 66 | * \brief set the name of the database for this reference. | ||
64 | * @param dbname - the name of the database. | 67 | * @param dbname - the name of the database. | ||
65 | */ | 68 | */ | ||
66 | void setDbname(const QString& dbname); | 69 | Q_INVOKABLE void setDbname(const QString& dbname); | ||
67 | 70 | /** | |||
71 | * @brief fires when the dbname changes; | ||||
72 | */ | ||||
73 | Q_SIGNAL void dbnameChanged(); | ||||
68 | /** | 74 | /** | ||
69 | * @returns the type of reference the reference is. | 75 | * @returns the type of reference the reference is. | ||
70 | */ | 76 | */ | ||
71 | QString type() const; | 77 | Q_INVOKABLE QString type() const; | ||
72 | /** | 78 | /** | ||
73 | * \brief set which type of reference the reference is. | 79 | * \brief set which type of reference the reference is. | ||
74 | * @param type - the type of reference. | 80 | * @param type - the type of reference. | ||
75 | */ | 81 | */ | ||
76 | void setType(const QString& type); | 82 | Q_INVOKABLE void setType(const QString& type); | ||
77 | 83 | /** | |||
84 | * @brief fires when the type of the reference changes. | ||||
85 | */ | ||||
86 | Q_SIGNAL void typeChanged(); | ||||
78 | /** | 87 | /** | ||
79 | * @returns the reference. | 88 | * @returns the reference. | ||
80 | */ | 89 | */ | ||
81 | QString reference() const; | 90 | Q_INVOKABLE QString reference() const; | ||
82 | /** | 91 | /** | ||
83 | * \brief set the reference as a string. | 92 | * \brief set the reference as a string. | ||
84 | * @param reference - the reference a QString. | 93 | * @param reference - the reference a QString. | ||
85 | */ | 94 | */ | ||
86 | void setReference(const QString& reference); | 95 | Q_INVOKABLE void setReference(const QString& reference); | ||
96 | /** | ||||
97 | * @brief fires when the reference that this object has of the book | ||||
98 | * is changed. | ||||
99 | */ | ||||
100 | Q_SIGNAL void referenceChanged(); | ||||
87 | private: | 101 | private: | ||
88 | class Private; | 102 | class Private; | ||
89 | std::unique_ptr<Private> d; | 103 | std::unique_ptr<Private> d; | ||
Context not available. |