forked from CCOMJHC/camp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbehaviordetails.cpp
More file actions
32 lines (27 loc) · 789 Bytes
/
Copy pathbehaviordetails.cpp
File metadata and controls
32 lines (27 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "behaviordetails.h"
#include "ui_behaviordetails.h"
#include "behavior.h"
BehaviorDetails::BehaviorDetails(QWidget* parent): QWidget(parent),ui(new Ui::BehaviorDetails),m_behavior(nullptr)
{
ui->setupUi(this);
}
BehaviorDetails::~BehaviorDetails()
{
delete ui;
}
void BehaviorDetails::setBehavior(Behavior* behavior)
{
m_behavior = behavior;
ui->activeCheckBox->setChecked(m_behavior->active());
ui->behaviorTypeComboBox->setEditText(m_behavior->behaviorType());
}
void BehaviorDetails::on_activeCheckBox_stateChanged(int state)
{
if(m_behavior)
m_behavior->setActive(state);
}
void BehaviorDetails::on_behaviorTypeComboBox_editTextChanged(const QString& behaviorType)
{
if(m_behavior)
m_behavior->setBehaviorType(behaviorType);
}