ledindicator.hh
Go to the documentation of this file.
1 // Copyright (c) 2015-2018, LAAS-CNRS
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3 //
4 // This file is part of gepetto-viewer.
5 // gepetto-viewer is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // gepetto-viewer is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // gepetto-viewer. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef GEPETTO_GUI_LEDINDICATOR_HH
18 #define GEPETTO_GUI_LEDINDICATOR_HH
19 
20 #include <QWidget>
21 
22 namespace gepetto {
23  namespace gui {
24  class LedIndicator : public QWidget
25  {
26  Q_OBJECT
27 
28  public:
29  LedIndicator (QWidget *parent = 0);
30 
31 signals:
32  void switched (bool on);
33  void mouseClickEvent ();
34 
35  public slots:
36  void switchLed();
37  void switchLed(bool on);
38 
39  protected:
40  void paintEvent(QPaintEvent *);
41  void mouseReleaseEvent(QMouseEvent* event);
42 
43  private:
44  bool lit;
45  const int width, height;
46  };
47  } // namespace gui
48 } // namespace gepetto
49 
50 #endif // GEPETTO_GUI_LEDINDICATOR_HH
Definition: ledindicator.hh:24
Definition: action-search-bar.hh:27
LedIndicator(QWidget *parent=0)
void mouseReleaseEvent(QMouseEvent *event)
void paintEvent(QPaintEvent *)