Emit error signal when login fails
[situare] / src / ui / fullscreenbutton.h
1 /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5         Kaj Wallin - kaj.wallin@ixonos.com
6         Pekka Nissinen - pekka.nissinen@ixonos.com
7
8     Situare is free software; you can redistribute it and/or
9     modify it under the terms of the GNU General Public License
10     version 2 as published by the Free Software Foundation.
11
12     Situare is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with Situare; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
20     USA.
21 */
22
23 #ifndef FULLSCREENBUTTON_H
24 #define FULLSCREENBUTTON_H
25
26 #include <QToolButton>
27
28 class QTimer;
29
30 /**
31  * @brief Fullscreen button class
32  *
33  * @author Kaj Wallin - kaj.wallin (at) ixonos.com
34  * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
35  *
36  * @class FullScreenButton fullscreenbutton.h "ui/fullscreenbutton.h"
37  */
38 class FullScreenButton : public QToolButton
39 {
40     Q_OBJECT
41
42 public:
43     /**
44      * @brief Constructor
45      *
46      * @param parent Parent widget
47      */
48     FullScreenButton(QWidget *parent = 0);
49
50     /**
51      * @brief Desctructor
52      */
53     ~FullScreenButton();
54
55 /*******************************************************************************
56  * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
57  ******************************************************************************/
58 protected:
59     /**
60      * @brief Event handler for paint events
61      *
62      * Paints the button and its icon
63      * @param event Paint event
64      */
65     void paintEvent(QPaintEvent *event);
66
67 /*******************************************************************************
68  * MEMBER FUNCTIONS AND SLOTS
69  ******************************************************************************/
70 public slots:
71     /**
72     * @brief Invoke the button (if not already visible) and set hiding timer
73     */
74     void invoke();
75
76 /*******************************************************************************
77  * DATA MEMBERS
78  ******************************************************************************/
79 private:
80     QColor *m_normalColor;                  ///< Normal background color
81     QLinearGradient *m_selectedGradient;    ///< Selected background
82     QPainterPath m_backgroundPath;          ///< Item shape path
83     QTimer *m_hidingTimer;                  ///< Timer for hiding the button after a delay
84 };
85
86 #endif // FULLSCREENBUTTON_H