Finalised the classes for panels
[situare] / src / ui / panelsliderbar.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
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 PANELSLIDERBAR_H
24 #define PANELSLIDERBAR_H
25
26 #include <QWidget>
27 #include "panelcommon.h"
28
29 /**
30 * @brief Generic class from drawing sliding bar attached to panels
31 *
32 * @class PanelSliderBar panelsliderbar.h "ui/panelsliderbar.h"
33 */
34 class PanelSliderBar : public QWidget
35 {
36     Q_OBJECT;
37
38 public:
39     /**
40     * @brief Constructor
41     *
42     * @param parent Parent
43     * @param side Qstring for the sliderbar location. Accepts "left" and "right"
44     */
45     PanelSliderBar(QWidget *parent, Side side);
46
47 /*******************************************************************************
48 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
49 ******************************************************************************/
50 protected:
51     /**
52     * @brief Draws stylesheet used in this class.
53     *
54     * @param * QPaintEvent unused
55     */
56     void paintEvent(QPaintEvent *);
57
58     /**
59     * @brief Mouse release event used to expand/collapse the panel
60     *
61     * @param * Event
62     *
63     * @sa clicked
64     */
65     void mouseReleaseEvent(QMouseEvent *);
66
67
68  /*******************************************************************************
69   * SIGNALS
70   ******************************************************************************/
71 signals:
72     /**
73     * @brief Signal that is emitted the slider bar is clicked
74     *
75     * @sa mouseReleaseEvent
76     */
77     void clicked();
78 };
79 #endif // PANELSLIDERBAR_H