-
Notifications
You must be signed in to change notification settings - Fork 7
/
tracedrawingrangedialog.cpp
47 lines (39 loc) · 1.08 KB
/
tracedrawingrangedialog.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
37
38
39
40
41
42
43
44
45
46
47
#include "tracedrawingrangedialog.h"
#include "ui_tracedrawingrangedialog.h"
#include <QSlider>
#include <QSpinBox>
#include <QCheckBox>
#include <QColorDialog>
TraceDrawingRangeDialog::TraceDrawingRangeDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::TraceDrawingRangeDialog),
m_traceColorDialog(new QColorDialog(this))
{
ui->setupUi(this);
setWindowTitle(tr("Trace Drawing Settings"));
m_traceColorDialog->setVisible(false);
}
TraceDrawingRangeDialog::~TraceDrawingRangeDialog()
{
delete ui;
}
QSlider *TraceDrawingRangeDialog::drawingRangeSlider()
{
return ui->drawingRangeSlider;
}
QCheckBox *TraceDrawingRangeDialog::animateCheckBox()
{
return ui->drawingAnimateCheckBox;
}
QColorDialog *TraceDrawingRangeDialog::traceColorDialog()
{
return m_traceColorDialog;
}
void TraceDrawingRangeDialog::on_traceColorToolButton_clicked()
{
auto currentColor = m_traceColorDialog->currentColor();
auto returnState = m_traceColorDialog->exec();
if (returnState == QDialog::Rejected) {
m_traceColorDialog->setCurrentColor(currentColor);
}
}