source: flair-dev/trunk/include/FlairCore/PushButton.h @ 2

Last change on this file since 2 was 2, checked in by Sanahuja Guillaume, 5 years ago

initial commit flaircore

File size: 1.8 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file PushButton.h
7 * \brief Class displaying a QPushButton on the ground station
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/10/07
10 * \version 4.0
11 */
12
13#ifndef PUSHBUTTON_H
14#define PUSHBUTTON_H
15
16#include <Widget.h>
17
18namespace flair
19{
20namespace gui
21{
22
23    class LayoutPosition;
24
25    /*! \class PushButton
26    *
27    * \brief Class displaying a QPushButton on the ground station
28    *
29    */
30    class PushButton:public Widget
31    {
32        public:
33            /*!
34            * \brief Constructor
35            *
36            * Construct a QPushButton at given position. \n
37            * The PushButton will automatically be child of position->getLayout() Layout. After calling this constructor,
38            * position will be deleted as it is no longer usefull.
39            *
40            * \param parent parent
41            * \param name name
42            */
43            PushButton(const LayoutPosition* position,std::string name);
44
45            /*!
46            * \brief Destructor
47            *
48            */
49            ~PushButton();
50
51            /*!
52            * \brief Has been clicled?
53            *
54            * After calling this method, the internal flag
55            * representing the state of the button is
56            * automatically set to false.
57            *
58            * \return true if button was clicked
59            */
60            bool Clicked(void);
61
62        private:
63            /*!
64            * \brief XmlEvent from ground station
65            *
66            * Reimplemented from Widget.
67            *
68            */
69            void XmlEvent(void);
70
71            bool clicked;
72    };
73
74} // end namespace gui
75} // end namespace flair
76
77#endif // PUSHBUTTON_H
Note: See TracBrowser for help on using the repository browser.