Fixed search history settings read and write and added search history
[situare] / src / ui / zoombutton.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 #ifndef ZOOMBUTTON_H
23 #define ZOOMBUTTON_H
24
25 #include "imagebutton.h"
26
27 /**
28  * @brief A class for Zoom Buttons
29  *
30  * @author Kaj Wallin - kaj.wallin (at) ixonos.com
31  */
32 class ZoomButton : public ImageButton
33 {
34     Q_OBJECT
35
36 public:
37     /**
38      * @brief Constructor
39      *
40      * @param iconPictureFileName Icon image file name
41      * @param parent Parent
42      */
43     ZoomButton(const QString &iconPictureFileName = QString(), QWidget *parent = 0);
44
45 /*******************************************************************************
46  * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
47  ******************************************************************************/
48 protected:
49     /**
50      * @brief Event handler for mouse move events
51      *
52      * @param event Mouse event
53      */
54     void mouseMoveEvent(QMouseEvent *event);
55
56     /**
57      * @brief Event handler for mouse press events
58      *
59      * @param event Mouse event
60      */
61     void mousePressEvent(QMouseEvent *event);
62
63 /*******************************************************************************
64  * MEMBER FUNCTIONS AND SLOTS
65  ******************************************************************************/
66 public:
67     /**
68      * @brief Relative position of the event inside the widget
69      */
70     const QPoint& eventPosition();
71
72 /*******************************************************************************
73  * DATA MEMBERS
74  ******************************************************************************/
75 private:
76     QTimer *m_dragStartTimer;   ///< Mouse press timer, initiates drag mode
77     QPoint m_eventPosition;     ///< Position of mousePressEvent
78 };
79
80 #endif // ZOOMBUTTON_H