7 this->valueInt = value;
9 if(notClosed !=
nullptr) {
12 createInputBox(Title, Label, value, minValue, maxValue, step);
20 return dialog.valueInt;
23 void IntelliInputDialog::createInputBox(QString Title, QString Label,
int value,
int minValue,
int maxValue,
int step){
24 this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
25 if(Title ==
nullptr) {
26 this->setWindowTitle(
"Input Box");
29 this->setWindowTitle(Title);
31 this->Layout =
new QGridLayout();
32 this->ButtonBox =
new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
34 this->InputLabel =
new QLabel();
35 if(Label ==
nullptr) {
36 this->InputLabel->setText(
"Width:");
39 this->InputLabel->setText(Label);
41 this->InputLabel->setFixedSize(Linesize);
43 this->Input =
new QSpinBox();
44 this->Input->setFixedSize(Linesize);
45 this->Input->setRange(minValue,maxValue);
46 this->Input->setSingleStep(step);
47 this->Input->setValue(value);
49 this->okButton = ButtonBox->button(QDialogButtonBox::Ok);
50 this->okButton->setFixedSize(Buttonsize);
51 this->okButton->setAutoDefault(
false);
52 this->okButton->setDefault(
false);
54 this->cancelButton = ButtonBox->button(QDialogButtonBox::Cancel);
55 this->cancelButton->setFixedSize(Buttonsize);
56 this->cancelButton->setAutoDefault(
false);
57 this->cancelButton->setDefault(
false);
59 Layout->addWidget(InputLabel,1,1,1,1);
60 Layout->addWidget(Input,2,1,1,1);
61 Layout->addWidget(ButtonBox,3,1,1,1);
62 this->setLayout(Layout);
67 void IntelliInputDialog::createConnections(){
68 connect(okButton, SIGNAL(clicked()),
this, SLOT(
slotEingabe()));
69 connect(cancelButton, SIGNAL(clicked()),
this, SLOT(
slotCloseEvent()));
72 void IntelliInputDialog::setInputBoxStyle(){
73 this->setStyleSheet(
"color: white;" "background-color: rgb(64, 64, 64);" "selection-color: rgb(200, 10, 10);" "selection-background-color: rgb(64, 64, 64);");
81 valueInt = QString(
"%1").arg(Input->value()).toInt();
82 if(notClosed !=
nullptr) {