NeTrainSim
0.1.1 beta
The Open-Source Network Trains Simulator
Loading...
Searching...
No Matches
togglebutton.h
Go to the documentation of this file.
1
#ifndef TOGGLEBUTTON_H
2
#define TOGGLEBUTTON_H
3
4
#include <QObject>
5
#include <QWidget>
6
#include <QPushButton>
7
8
9
class
ToggleButton
:
public
QPushButton {
10
Q_OBJECT
11
12
public
:
13
explicit
ToggleButton
(QWidget *parent =
nullptr
);
14
~ToggleButton
();
15
16
void
setOnOffText
(
const
QString &onText,
const
QString &offText);
// method to set on and off text
17
bool
isToggled
()
const
;
// method to get if the button is on or off
18
19
20
private
:
21
QString onText;
22
QString offText;
23
};
24
25
#endif
// TOGGLEBUTTON_H
ToggleButton
Definition
togglebutton.h:9
ToggleButton::isToggled
bool isToggled() const
Definition
togglebutton.cpp:26
ToggleButton::~ToggleButton
~ToggleButton()
Definition
togglebutton.cpp:17
ToggleButton::setOnOffText
void setOnOffText(const QString &onText, const QString &offText)
Definition
togglebutton.cpp:20
src
NeTrainSimGUI
gui
togglebutton.h
Generated by
1.9.7