5 this->valueInt = value;
7 if(notClosed !=
nullptr) {
10 createInputBox(Title, Label, value, minValue, maxValue, step);
18 return dialog.valueInt;
21 void IntelliInputDialog::createInputBox(QString Title, QString Label,
int value,
int minValue,
int maxValue,
int step){
22 this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
23 if(Title ==
nullptr) {
24 this->setWindowTitle(
"Input Box");
27 this->setWindowTitle(Title);
29 this->Layout =
new QGridLayout();
30 this->ButtonBox =
new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
32 this->InputLabel =
new QLabel();
33 if(Label ==
nullptr) {
34 this->InputLabel->setText(
"Width:");
37 this->InputLabel->setText(Label);
39 this->InputLabel->setFixedSize(Linesize);
41 this->Input =
new QSpinBox();
42 this->Input->setFixedSize(Linesize);
43 this->Input->setRange(minValue,maxValue);
44 this->Input->setSingleStep(step);
45 this->Input->setValue(value);
47 this->okButton = ButtonBox->button(QDialogButtonBox::Ok);
48 this->okButton->setFixedSize(Buttonsize);
49 this->okButton->setAutoDefault(
false);
50 this->okButton->setDefault(
false);
52 this->cancelButton = ButtonBox->button(QDialogButtonBox::Cancel);
53 this->cancelButton->setFixedSize(Buttonsize);
54 this->cancelButton->setAutoDefault(
false);
55 this->cancelButton->setDefault(
false);
57 Layout->addWidget(InputLabel,1,1,1,1);
58 Layout->addWidget(Input,2,1,1,1);
59 Layout->addWidget(ButtonBox,3,1,1,1);
60 this->setLayout(Layout);
65 void IntelliInputDialog::createConnections(){
66 connect(okButton, SIGNAL(clicked()),
this, SLOT(
slotEingabe()));
67 connect(cancelButton, SIGNAL(clicked()),
this, SLOT(
slotCloseEvent()));
70 void IntelliInputDialog::setInputBoxStyle(){
71 this->setStyleSheet(
"color: white;" "background-color: rgb(64, 64, 64);" "selection-color: rgb(200, 10, 10);" "selection-background-color: rgb(64, 64, 64);");
79 valueInt = QString(
"%1").arg(Input->value()).toInt();
80 if(notClosed !=
nullptr) {