gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
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
22namespace gepetto {
23namespace gui {
24class LedIndicator : public QWidget {
25 Q_OBJECT
26
27 public:
28 LedIndicator(QWidget *parent = 0);
29
30 signals:
31 void switched(bool on);
33
34 public slots:
35 void switchLed();
36 void switchLed(bool on);
37
38 protected:
39 void paintEvent(QPaintEvent *);
40 void mouseReleaseEvent(QMouseEvent *event);
41
42 private:
43 bool lit;
44 const int width, height;
45};
46} // namespace gui
47} // namespace gepetto
48
49#endif // GEPETTO_GUI_LEDINDICATOR_HH
Definition ledindicator.hh:24
LedIndicator(QWidget *parent=0)
void paintEvent(QPaintEvent *)
void mouseReleaseEvent(QMouseEvent *event)
Definition action-search-bar.hh:27