PeriDyno
1.0.0
Loading...
Searching...
No Matches
D:
Peridyno
peridyno
src
Rendering
GUI
QtGUI
PropertyItem
QToggleButton.cpp
Go to the documentation of this file.
1
#include "
QToggleButton.h
"
2
3
#include "
Module.h
"
4
#include "
Node.h
"
5
#include "
Field.h
"
6
#include "
SceneGraphFactory.h
"
7
8
#include <QVBoxLayout>
9
10
namespace
dyno
11
{
12
QToggleButton::QToggleButton
(QWidget* pParent):
13
QPushButton(pParent)
14
{
15
connect(
this
, &QPushButton::clicked,
this
, &
QToggleButton::ModifyText
);
16
}
17
18
QToggleButton::QToggleButton
(
bool
isChecked, QWidget* pParent) :
19
QPushButton(pParent)
20
{
21
connect(
this
, &QPushButton::clicked,
this
, &
QToggleButton::ModifyText
);
22
}
23
24
void
QToggleButton::ModifyText
()
25
{
26
//std::cout << textChecked << " : " << textUnChecked << std::endl;
27
QString t;
28
std::string s;
29
isPress
= !
isPress
;
30
if
(
isPress
)
31
{
32
t = QString::fromStdString(
textChecked
);
33
}
34
else
35
{
36
t = QString::fromStdString(
textUnChecked
);
37
}
38
this->QPushButton::setText(t);
39
40
emit
clicked
();
41
}
42
43
void
QToggleButton::setText
(std::string textUnCheck, std::string textCheck)
44
{
45
textUnChecked
= textUnCheck;
46
textChecked
= textCheck;
47
updateText
();
48
}
49
50
51
52
}
53
Field.h
Module.h
Node.h
QToggleButton.h
SceneGraphFactory.h
dyno::QToggleButton::textUnChecked
std::string textUnChecked
Definition
QToggleButton.h:97
dyno::QToggleButton::ModifyText
void ModifyText()
Definition
QToggleButton.cpp:24
dyno::QToggleButton::textChecked
std::string textChecked
Definition
QToggleButton.h:98
dyno::QToggleButton::isPress
bool isPress
Definition
QToggleButton.h:92
dyno::QToggleButton::updateText
void updateText()
Definition
QToggleButton.h:70
dyno::QToggleButton::setText
void setText(std::string textUnCheck, std::string textCheck)
Definition
QToggleButton.cpp:43
dyno::QToggleButton::QToggleButton
QToggleButton(QWidget *pParent=NULL)
Definition
QToggleButton.cpp:12
dyno::QToggleButton::clicked
void clicked()
dyno
This is an implementation of AdditiveCCD based on peridyno.
Definition
Array.h:25
Generated by
1.13.2