implement adding new serverconfig

This commit is contained in:
Yannik Schmidt
2020-09-05 21:34:23 +02:00
parent 5a4620191c
commit 4bee34fbd6
7 changed files with 169 additions and 27 deletions

24
multivalueinputdialog.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include "multivalueinputdialog.h"
#include <QDialogButtonBox>
#include <QFormLayout>
#include <QLabel>
MultiValueInputDialog::MultiValueInputDialog(QStringList *inputValueLabels, QWidgetList *inputWidgets){
QFormLayout *form = new QFormLayout();
for(int i = 0; i<inputValueLabels->size(); i++){
form->addRow(new QLabel(inputValueLabels->at(i)));
form->addRow(inputWidgets->at(i));
}
// Add some text above the fields
// Add some standard buttons (Cancel/Ok) at the bottom of the dialog
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
form->addRow(buttonBox);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
this->setLayout(form);
}