Fixed FacebookLoginBrowser::destroyed() signal handling
[situare] / src / ui / extendedlistitemstore.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Jussi Laitinen - jussi.laitinen@ixonos.com
6
7    Situare is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License
9    version 2 as published by the Free Software Foundation.
10
11    Situare is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with Situare; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
19    USA.
20 */
21
22
23 #ifndef EXTENDEDLISTITEMSTORE_H
24 #define EXTENDEDLISTITEMSTORE_H
25
26 #include <QPixmap>
27 #include <QRect>
28 #include <QString>
29
30 /**
31 * @brief Stores ExtendedListItem data.
32 *
33 * @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
34 */
35 class ExtendedListItemStore
36 {
37 public:
38     /**
39     * @brief Constructor.
40     *
41     * Sets text.
42     * @param text item text
43     */
44     ExtendedListItemStore(const QString &text);
45
46 /*******************************************************************************
47 * MEMBER FUNCTIONS AND SLOTS
48 ******************************************************************************/
49 public:
50     /**
51     * @brief Returns icon.
52     *
53     * @return QPixmap
54     */
55     QPixmap icon() const;
56
57     /**
58     * @brief Sets icon.
59     *
60     * @param icon item icon
61     */
62     void setIcon(const QPixmap &icon);
63
64     /**
65     * @brief Sets shortended text.
66     *
67     * @param shortenedText shortened text
68     */
69     void setShortenedText(const QString &shortenedText);
70
71     /**
72     * @brief Returns shortened text.
73     *
74     * @return QString
75     */
76     QString shortenedText() const;
77
78     /**
79     * @brief Sets text rect.
80     *
81     * @param textRect text rect
82     */
83     void setTextRect(const QRect &textRect);
84
85     /**
86     * @brief Returns text
87     *
88     * @return QString
89     */
90     QString text() const;
91
92     /**
93     * @brief Returns text rect.
94     *
95     * @return QRect
96     */
97     QRect textRect() const;
98
99 /******************************************************************************
100 * DATA MEMBERS
101 ******************************************************************************/
102 private:
103     QPixmap m_icon;             ///< Icon pixmap
104     QRect m_textRect;           ///< Text rect
105     QString m_text;             ///< Text string
106     QString m_shortenedText;    ///< Shortened text string
107 };
108
109 #endif // EXTENDEDLISTITEMSTORE_H