-
Notifications
You must be signed in to change notification settings - Fork 0
/
booleanalgebradialog.cpp
36 lines (27 loc) · 1016 Bytes
/
booleanalgebradialog.cpp
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
33
34
#include <QListWidgetItem>
#include "booleanalgebradialog.h"
#include "ui_booleanalgebradialog.h"
BooleanAlgebraDialog::BooleanAlgebraDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::BooleanAlgebraDialog)
{
ui->setupUi(this);
eventsList = new EventList(this);
connect(eventsList,SIGNAL(countChanged(int)),this,SLOT(countChanged(int)));
ui->eventsLayout->addWidget(eventsList);
connect(ui->buttonBox->button(QDialogButtonBox::Ok),SIGNAL(clicked(bool)),this,SLOT(accept()));
connect(ui->buttonBox->button(QDialogButtonBox::Cancel),SIGNAL(clicked(bool)),this,SLOT(reject()));
ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
}
BooleanAlgebraDialog::~BooleanAlgebraDialog()
{
delete ui;
}
QStringList BooleanAlgebraDialog::getEvents()
{
return eventsList->getEvents();
}
void BooleanAlgebraDialog::countChanged(int value)
{
ui->label_2->setText(tr("Si vous cliquez sur OK, un nouveau chapitre sera créé comptant %1 pages.").arg(1<<value));
}