Commit 696af6a6 authored by Florent D'Halluin's avatar Florent D'Halluin
Browse files

[yavgui] Update state property dialog.

* yavgui/src/dialog_properties_state.cc,
* yavgui/src/dialog_properties_state.hh: Add fields for
intial/final entries.
parent 835c251b
2009-08-04 d-halluin <d-halluin@lrde.epita.fr>
[yavgui] Update state property dialog.
* yavgui/src/dialog_properties_state.cc,
* yavgui/src/dialog_properties_state.hh: Add fields for
intial/final entries.
2009-08-04 d-halluin <d-halluin@lrde.epita.fr>
 
[yavgui] Handle state addition/deletion.
......
......@@ -32,7 +32,9 @@ namespace gui
: state_ (state),
input_ (new QTextEdit (state->label ()))
initial_ (new QCheckBox ("Initial")),
final_ (new QCheckBox ("Final"))
final_ (new QCheckBox ("Final")),
initial_entry_ (new QTextEdit (state->initial_entry_)),
final_entry_ (new QTextEdit (state->final_entry_))
{
QPushButton *closeButton = new QPushButton(tr("Ok"));
connect(closeButton, SIGNAL(clicked()), this, SLOT(done()));
......@@ -40,13 +42,15 @@ namespace gui
buttonsLayout->addStretch(1);
buttonsLayout->addWidget(closeButton);
QLabel* input_label = new QLabel ("Label:");
QLabel* input_label = new QLabel("Label:");
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(input_label);
mainLayout->addWidget(input_);
mainLayout->addWidget(initial_);
mainLayout->addWidget(initial_entry_);
mainLayout->addWidget(final_);
mainLayout->addWidget(final_entry_);
mainLayout->addSpacing(12);
mainLayout->addLayout(buttonsLayout);
......@@ -62,14 +66,24 @@ namespace gui
QColor color ("white");
if (initial_->isChecked ())
{
state->set_initial_entry(initial_entry_->toPlainText ());
color.setGreen (color.green () - 30);
color.setRed (color.red () - 30);
}
else
{
state->set_initial_entry(0);
}
if (final_->isChecked ())
{
state->set_final_entry(final_entry_->toPlainText ());
color.setGreen (color.green () - 30);
color.setRed (color.red () - 30);
}
else
{
state->set_final_entry(0);
}
state->set_default_color (color);
state->refresh ();
......
......@@ -50,6 +50,8 @@ namespace gui
QTextEdit* input_;
QCheckBox* initial_;
QCheckBox* final_;
QTextEdit* initial_entry_;
QTextEdit* initial_entry_;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment