BibleTime
BookmarkItem.h
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
13 #pragma once
14 
15 #include <QString>
16 #include <utility>
17 
18 
19 /**
20  Class which represents a bookmark. Includes key, module name and description,
21  all QStrings which have getter methods.
22 */
23 class BookmarkItem final {
24 
25 public: // methods:
26 
27  BookmarkItem(QString module, QString key, QString description)
28  : m_moduleName(std::move(module))
29  , m_key(std::move(key))
30  , m_description(std::move(description))
31  {}
32 
33  /** \returns the module name */
34  QString const & module() const noexcept { return m_moduleName; }
35 
36  /** \returns the key */
37  QString const & key() const noexcept { return m_key; }
38 
39  /** \returns the bookmark description */
40  QString const & description() const noexcept { return m_description; }
41 
42 private: // fields:
43 
44  QString m_moduleName; /**< The module which is used by this item. */
45  QString m_key; /**< The key of a bookmark. */
46  QString m_description; /**< The description of a bookmark. */
47 
48 };
QString const & key() const noexcept
Definition: BookmarkItem.h:37
BookmarkItem(QString module, QString key, QString description)
Definition: BookmarkItem.h:27
QString m_moduleName
Definition: BookmarkItem.h:44
QString m_key
Definition: BookmarkItem.h:45
QString const & description() const noexcept
Definition: BookmarkItem.h:40
QString m_description
Definition: BookmarkItem.h:46
QString const & module() const noexcept
Definition: BookmarkItem.h:34