2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Pekka Nissinen - pekka.nissinen@ixonos.com
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.
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.
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,
25 #include <QToolButton>
30 * @brief Class for tab button
32 * @author Pekka Nissinen - pekka.nissinen@ixonos.com
34 class PanelTab : public QToolButton
42 * @param parent Parent
44 PanelTab(QWidget *parent = 0);
46 /*******************************************************************************
47 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
48 ******************************************************************************/
51 * @brief Move event for the distance indicator button
53 * @param event Mouse event
55 void mouseMoveEvent(QMouseEvent *event);
58 * @brief Event handler for mouse press events
60 * @param event Mouse event
62 void mousePressEvent(QMouseEvent *event);
65 * @brief Event handler for mouse release events
67 * @param event Mouse event
69 void mouseReleaseEvent(QMouseEvent *event);
72 * @brief Draws the tab button
74 * @param event Paint event
76 void paintEvent(QPaintEvent *event);
78 /*******************************************************************************
80 ******************************************************************************/
82 bool m_tabActive; ///< Boolean used to track whether the tab button is active or not
83 bool m_tabSelected; ///< Boolean used to track whether the tab button is selected or not
85 QPixmap m_tabActiveImage; ///< Pixmap for active tab button
86 QPixmap m_tabInactiveImage; ///< Pixmap for inactive tab button
87 QPixmap m_tabInactiveImage2; ///< Pixmap for inactive tab button below active tab button
89 QRect m_tabRect; ///< Rect for the tab button