2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Kaj Wallin - kaj.wallin@ixonos.com
6 Pekka Nissinen - pekka.nissinen@ixonos.com
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.
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.
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,
23 #ifndef PANELSLIDERBAR_H
24 #define PANELSLIDERBAR_H
26 #include <QMouseEvent>
27 #include <QPaintEvent>
32 #include "panelcommon.h"
35 * @brief Generic class for panel slider bars
37 * @author Kaj Wallin - kaj.wallin (at) ixonos.com
38 * @author Pekka Nissinen - pekka.nissinen@ixonos.com
40 * @class PanelSliderBar panelsliderbar.h "ui/panelsliderbar.h"
42 class PanelSliderBar : public QWidget
50 * @param parent Parent
51 * @param side Qstring for the sliderbar location. Accepts "LEFT" and "RIGHT"
53 PanelSliderBar(QWidget *parent, Side side);
55 /*******************************************************************************
56 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
57 ******************************************************************************/
60 * @brief Draws the slider
62 * @param * QPaintEvent unused
64 void paintEvent(QPaintEvent *);
67 * @brief Mouse release event used to expand/collapse the panel
73 void mouseReleaseEvent(QMouseEvent *);
75 /*******************************************************************************
76 * MEMBER FUNCTIONS AND SLOTS
77 ******************************************************************************/
80 * @brief Slot to redraw the slider bar after window resize event
82 * @param size Size of the new window
84 void resizeSliderBar(const QSize &size);
86 /*******************************************************************************
88 ******************************************************************************/
91 * @brief Signal that is emitted the slider bar is clicked
93 * @sa mouseReleaseEvent
97 /*******************************************************************************
99 ******************************************************************************/
101 QPixmap m_menuDropShadowTile; ///< Pixmap for menu drop shadow
102 QPixmap m_sliderButton; ///< Pixmap for panel sliding bar button
103 QPixmap m_sliderButtonArrow; ///< Pixmap for panel sliding bar button arrow
104 QPixmap m_sliderTile; ///< Pixmap for panel sliding bar
105 QRect m_bottomRect; ///< Rect for slider bar bottom
106 QRect m_buttonRect; ///< Rect for slider bar button
107 QRect m_topRect; ///< Rect for slider bar top
108 QRegion m_sliderRegion; ///< Region of the slider bar
110 #endif // PANELSLIDERBAR_H