Changeset View
Changeset View
Standalone View
Standalone View
src/acbf/AcbfDatabaseref.h
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU Lesser General Public | 17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | * | 19 | * | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef ACBFDATABASEREF_H | 22 | #ifndef ACBFDATABASEREF_H | ||
23 | #define ACBFDATABASEREF_H | 23 | #define ACBFDATABASEREF_H | ||
24 | 24 | | |||
25 | #include <memory> | ||||
25 | #include "AcbfBookinfo.h" | 26 | #include "AcbfBookinfo.h" | ||
26 | 27 | | |||
27 | namespace AdvancedComicBookFormat | 28 | namespace AdvancedComicBookFormat | ||
28 | { | 29 | { | ||
29 | class ACBF_EXPORT DatabaseRef : public QObject | 30 | class ACBF_EXPORT DatabaseRef : public QObject | ||
30 | { | 31 | { | ||
31 | Q_OBJECT | 32 | Q_OBJECT | ||
32 | public: | 33 | public: | ||
33 | explicit DatabaseRef(BookInfo* parent = nullptr); | 34 | explicit DatabaseRef(BookInfo* parent = nullptr); | ||
34 | ~DatabaseRef() override; | 35 | ~DatabaseRef() override; | ||
35 | 36 | | |||
36 | void toXml(QXmlStreamWriter* writer); | 37 | void toXml(QXmlStreamWriter* writer); | ||
37 | bool fromXml(QXmlStreamReader *xmlReader); | 38 | bool fromXml(QXmlStreamReader *xmlReader); | ||
38 | 39 | | |||
39 | QString dbname(); | 40 | QString dbname() const; | ||
40 | void setDbname(QString dbname); | 41 | void setDbname(const QString& dbname); | ||
41 | 42 | | |||
42 | QString type(); | 43 | QString type() const; | ||
43 | void setType(QString type); | 44 | void setType(const QString& type); | ||
44 | 45 | | |||
45 | QString reference(); | 46 | QString reference() const; | ||
46 | void setReference(QString reference); | 47 | void setReference(const QString& reference); | ||
47 | private: | 48 | private: | ||
48 | class Private; | 49 | class Private; | ||
49 | Private* d; | 50 | std::unique_ptr<Private> d; | ||
50 | }; | 51 | }; | ||
51 | } | 52 | } | ||
52 | 53 | | |||
53 | #endif//ACBFDATABASEREF_H | 54 | #endif//ACBFDATABASEREF_H |