ODIN
boolbutton.h
1 /***************************************************************************
2  boolbutton.h - description
3  -------------------
4  begin : Sun Jul 16 2000
5  copyright : (C) 2000-2021 by Thies Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef BOOLBUTTON_H
19 #define BOOLBUTTON_H
20 
21 #include <qgroupbox.h>
22 
23 #include "odinqt.h"
24 
28 class buttonBox : public QGroupBox {
29  Q_OBJECT
30 
31 public:
32  buttonBox(const char *text, QWidget *parent, const char *buttonlabel);
33  buttonBox(const char *ontext,const char *offtext, bool initstate, QWidget *parent, const char *buttonlabel);
34  ~buttonBox();
35 
36  bool is_on() const {return gb->is_on();}
37 
38 public slots:
39  void setToggleState(bool);
40 
41 private slots:
42  void reportclicked();
43  void setButtonState();
44 
45 
46 signals:
47  void buttonClicked();
48  void buttonToggled(bool);
49 
50 private:
51  GuiGridLayout* grid;
52  GuiButton* gb;
53 };
54 
55 #endif