-
Notifications
You must be signed in to change notification settings - Fork 1
/
filter.cpp
44 lines (37 loc) · 1009 Bytes
/
filter.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
#include "filter.h"
/**
* @brief Filter::Filter a constructor.
* @param parent
*/
Filter::Filter(QWidget *parent) : QDialog(parent)
{
}
/**
* @brief Filter::createButtonBox
*
* Create button box with close and apply button. Subscribe signals.
*/
void Filter::createButtonBox()
{
buttonBox= new QDialogButtonBox();
closeButton = buttonBox->addButton(QDialogButtonBox::Close);
applyButton = buttonBox->addButton(QDialogButtonBox::Apply);
connect(applyButton, SIGNAL(released()), this, SLOT(applyFilter()));
connect(closeButton, &QPushButton::clicked, this, &Filter::close);
}
/**
* @brief Filter::createLayout
*
* Create layout with options box and buttons box. Set size. Set title.
*/
void Filter::createLayout()
{
createButtonBox();
createOptionBox();
layout = new QGridLayout;
layout->addWidget(optionsBox);
layout->addWidget(buttonBox);
setLayout(layout);
layout->setSizeConstraint(QLayout::SetMinimumSize);
setWindowTitle(tr("Filter"));
}