Merge branch 'personalinfo' into friendlist
[situare] / src / ui / buttonitem.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Jukka Saastamoinen - jukka.saastamoinen@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 #ifndef BUTTONITEM_H
23 #define BUTTONITEM_H
24
25 #include <QPushButton>
26
27 /**
28 * @brief ButtonItem class.
29 * Custom button item for Situare buttons
30 * @author Jukka Saastamoinen
31 */
32
33 class ButtonItem : public QPushButton
34 {
35     Q_OBJECT
36 public:
37     /**
38     * @brief Constructor
39     *
40     * @param parent Parent
41     */
42     ButtonItem(QWidget *parent = 0);
43
44 /*******************************************************************************
45 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
46 *******************************************************************************/
47 protected:
48     /**
49     * @brief This function is called when the widget is drawn
50     *
51     * @param aPaintEvent Pointer to paint event
52     */
53     void paintEvent(QPaintEvent *aPaintEvent);
54     /**
55     * @brief This function returns the preferred size of the button
56     *        for the layout using it.
57     *
58     * @return QSize Size of the button
59     */
60     QSize sizeHint() const;
61
62 };
63
64 #endif // BUTTONITEM_H