-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerator.cpp
executable file
·37 lines (28 loc) · 1.11 KB
/
generator.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
35
36
#include "generator.h"
#include "ui_generator.h"
Generator::Generator(QWidget *parent) :
QDialog(parent),
ui(new Ui::Generator)
{
ui->setupUi(this);
ui->numberScroll->setRange (2, 50);
ui->numberScroll->setSingleStep (1);
ui->numberScroll->setSliderPosition (10);
ui->numberLabel->setText(QString("10"));
connect(ui->numberScroll, SIGNAL(valueChanged( int ) ), SLOT(generatePointsGeneratorSlot( int )));
connect(ui->ok, SIGNAL(clicked()), this, SLOT(generateGeneratorSlot()));
connect(ui->ok, SIGNAL(clicked()), this, SLOT(close()));
connect(ui->cancel, SIGNAL(clicked()), this, SLOT(close()));
connect(this, SIGNAL(generatePointsGeneratorSignal(int, bool, bool, bool)), parent, SLOT(generetePointsMainWindowSlot( int, bool, bool, bool )));
}
Generator::~Generator()
{
delete ui;
}
void Generator::generatePointsGeneratorSlot(int num)
{
ui->numberLabel->setText(QString::number(num));
}
void Generator::generateGeneratorSlot() {
emit generatePointsGeneratorSignal(ui->numberScroll->value(), ui->vert->isChecked(), ui->multi->isChecked(), ui->full->isChecked());
}