mirror of
https://github.com/FAUSheppy/speech-server-client-qt
synced 2025-12-06 00:41:35 +01:00
implement adding new serverconfig
This commit is contained in:
24
multivalueinputdialog.cpp
Normal file
24
multivalueinputdialog.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user