First test with QDataWidgetMapper to connect controls to the items in the connection list is working.
This commit is contained in:
parent
f5eab84c24
commit
c235169304
6 changed files with 256 additions and 84 deletions
|
|
@ -43,17 +43,27 @@ public:
|
|||
QWidget *layoutWidget;
|
||||
QFormLayout *formLayout_2;
|
||||
QLabel *label;
|
||||
QLineEdit *lineEdit;
|
||||
QLineEdit *edtName;
|
||||
QLabel *label_2;
|
||||
QLineEdit *lineEdit_2;
|
||||
QLineEdit *edtHost;
|
||||
QLabel *label_3;
|
||||
QSpinBox *spinBox;
|
||||
QLabel *label_4;
|
||||
QComboBox *comboBox;
|
||||
QSpinBox *spinPort;
|
||||
QLabel *label_5;
|
||||
QLineEdit *lineEdit_3;
|
||||
QLineEdit *edtUser;
|
||||
QLabel *label_6;
|
||||
QLineEdit *lineEdit_4;
|
||||
QLineEdit *edtPassword;
|
||||
QLabel *label_4;
|
||||
QLineEdit *edtDbname;
|
||||
QComboBox *cmbbxSsl;
|
||||
QLabel *label_7;
|
||||
QLabel *label_8;
|
||||
QLineEdit *edtCert;
|
||||
QLabel *label_9;
|
||||
QLineEdit *edtKey;
|
||||
QLabel *label_10;
|
||||
QLineEdit *edtRootCert;
|
||||
QLabel *label_11;
|
||||
QLineEdit *edtCrl;
|
||||
QMenuBar *menubar;
|
||||
QStatusBar *statusbar;
|
||||
QToolBar *toolBar;
|
||||
|
|
@ -102,63 +112,112 @@ public:
|
|||
|
||||
formLayout_2->setWidget(0, QFormLayout::LabelRole, label);
|
||||
|
||||
lineEdit = new QLineEdit(layoutWidget);
|
||||
lineEdit->setObjectName(QStringLiteral("lineEdit"));
|
||||
edtName = new QLineEdit(layoutWidget);
|
||||
edtName->setObjectName(QStringLiteral("edtName"));
|
||||
|
||||
formLayout_2->setWidget(0, QFormLayout::FieldRole, lineEdit);
|
||||
formLayout_2->setWidget(0, QFormLayout::FieldRole, edtName);
|
||||
|
||||
label_2 = new QLabel(layoutWidget);
|
||||
label_2->setObjectName(QStringLiteral("label_2"));
|
||||
|
||||
formLayout_2->setWidget(1, QFormLayout::LabelRole, label_2);
|
||||
|
||||
lineEdit_2 = new QLineEdit(layoutWidget);
|
||||
lineEdit_2->setObjectName(QStringLiteral("lineEdit_2"));
|
||||
edtHost = new QLineEdit(layoutWidget);
|
||||
edtHost->setObjectName(QStringLiteral("edtHost"));
|
||||
|
||||
formLayout_2->setWidget(1, QFormLayout::FieldRole, lineEdit_2);
|
||||
formLayout_2->setWidget(1, QFormLayout::FieldRole, edtHost);
|
||||
|
||||
label_3 = new QLabel(layoutWidget);
|
||||
label_3->setObjectName(QStringLiteral("label_3"));
|
||||
|
||||
formLayout_2->setWidget(2, QFormLayout::LabelRole, label_3);
|
||||
|
||||
spinBox = new QSpinBox(layoutWidget);
|
||||
spinBox->setObjectName(QStringLiteral("spinBox"));
|
||||
spinBox->setMaximum(65535);
|
||||
spinPort = new QSpinBox(layoutWidget);
|
||||
spinPort->setObjectName(QStringLiteral("spinPort"));
|
||||
spinPort->setMaximum(65535);
|
||||
|
||||
formLayout_2->setWidget(2, QFormLayout::FieldRole, spinBox);
|
||||
|
||||
label_4 = new QLabel(layoutWidget);
|
||||
label_4->setObjectName(QStringLiteral("label_4"));
|
||||
|
||||
formLayout_2->setWidget(3, QFormLayout::LabelRole, label_4);
|
||||
|
||||
comboBox = new QComboBox(layoutWidget);
|
||||
comboBox->setObjectName(QStringLiteral("comboBox"));
|
||||
comboBox->setEditable(true);
|
||||
|
||||
formLayout_2->setWidget(3, QFormLayout::FieldRole, comboBox);
|
||||
formLayout_2->setWidget(2, QFormLayout::FieldRole, spinPort);
|
||||
|
||||
label_5 = new QLabel(layoutWidget);
|
||||
label_5->setObjectName(QStringLiteral("label_5"));
|
||||
|
||||
formLayout_2->setWidget(4, QFormLayout::LabelRole, label_5);
|
||||
formLayout_2->setWidget(3, QFormLayout::LabelRole, label_5);
|
||||
|
||||
lineEdit_3 = new QLineEdit(layoutWidget);
|
||||
lineEdit_3->setObjectName(QStringLiteral("lineEdit_3"));
|
||||
edtUser = new QLineEdit(layoutWidget);
|
||||
edtUser->setObjectName(QStringLiteral("edtUser"));
|
||||
|
||||
formLayout_2->setWidget(4, QFormLayout::FieldRole, lineEdit_3);
|
||||
formLayout_2->setWidget(3, QFormLayout::FieldRole, edtUser);
|
||||
|
||||
label_6 = new QLabel(layoutWidget);
|
||||
label_6->setObjectName(QStringLiteral("label_6"));
|
||||
|
||||
formLayout_2->setWidget(5, QFormLayout::LabelRole, label_6);
|
||||
formLayout_2->setWidget(4, QFormLayout::LabelRole, label_6);
|
||||
|
||||
lineEdit_4 = new QLineEdit(layoutWidget);
|
||||
lineEdit_4->setObjectName(QStringLiteral("lineEdit_4"));
|
||||
lineEdit_4->setEchoMode(QLineEdit::Password);
|
||||
edtPassword = new QLineEdit(layoutWidget);
|
||||
edtPassword->setObjectName(QStringLiteral("edtPassword"));
|
||||
edtPassword->setEchoMode(QLineEdit::Password);
|
||||
|
||||
formLayout_2->setWidget(5, QFormLayout::FieldRole, lineEdit_4);
|
||||
formLayout_2->setWidget(4, QFormLayout::FieldRole, edtPassword);
|
||||
|
||||
label_4 = new QLabel(layoutWidget);
|
||||
label_4->setObjectName(QStringLiteral("label_4"));
|
||||
|
||||
formLayout_2->setWidget(5, QFormLayout::LabelRole, label_4);
|
||||
|
||||
edtDbname = new QLineEdit(layoutWidget);
|
||||
edtDbname->setObjectName(QStringLiteral("edtDbname"));
|
||||
|
||||
formLayout_2->setWidget(5, QFormLayout::FieldRole, edtDbname);
|
||||
|
||||
cmbbxSsl = new QComboBox(layoutWidget);
|
||||
cmbbxSsl->setObjectName(QStringLiteral("cmbbxSsl"));
|
||||
|
||||
formLayout_2->setWidget(6, QFormLayout::FieldRole, cmbbxSsl);
|
||||
|
||||
label_7 = new QLabel(layoutWidget);
|
||||
label_7->setObjectName(QStringLiteral("label_7"));
|
||||
|
||||
formLayout_2->setWidget(6, QFormLayout::LabelRole, label_7);
|
||||
|
||||
label_8 = new QLabel(layoutWidget);
|
||||
label_8->setObjectName(QStringLiteral("label_8"));
|
||||
|
||||
formLayout_2->setWidget(7, QFormLayout::LabelRole, label_8);
|
||||
|
||||
edtCert = new QLineEdit(layoutWidget);
|
||||
edtCert->setObjectName(QStringLiteral("edtCert"));
|
||||
|
||||
formLayout_2->setWidget(7, QFormLayout::FieldRole, edtCert);
|
||||
|
||||
label_9 = new QLabel(layoutWidget);
|
||||
label_9->setObjectName(QStringLiteral("label_9"));
|
||||
|
||||
formLayout_2->setWidget(8, QFormLayout::LabelRole, label_9);
|
||||
|
||||
edtKey = new QLineEdit(layoutWidget);
|
||||
edtKey->setObjectName(QStringLiteral("edtKey"));
|
||||
|
||||
formLayout_2->setWidget(8, QFormLayout::FieldRole, edtKey);
|
||||
|
||||
label_10 = new QLabel(layoutWidget);
|
||||
label_10->setObjectName(QStringLiteral("label_10"));
|
||||
|
||||
formLayout_2->setWidget(9, QFormLayout::LabelRole, label_10);
|
||||
|
||||
edtRootCert = new QLineEdit(layoutWidget);
|
||||
edtRootCert->setObjectName(QStringLiteral("edtRootCert"));
|
||||
|
||||
formLayout_2->setWidget(9, QFormLayout::FieldRole, edtRootCert);
|
||||
|
||||
label_11 = new QLabel(layoutWidget);
|
||||
label_11->setObjectName(QStringLiteral("label_11"));
|
||||
|
||||
formLayout_2->setWidget(10, QFormLayout::LabelRole, label_11);
|
||||
|
||||
edtCrl = new QLineEdit(layoutWidget);
|
||||
edtCrl->setObjectName(QStringLiteral("edtCrl"));
|
||||
|
||||
formLayout_2->setWidget(10, QFormLayout::FieldRole, edtCrl);
|
||||
|
||||
splitter->addWidget(layoutWidget);
|
||||
|
||||
|
|
@ -184,7 +243,7 @@ public:
|
|||
|
||||
retranslateUi(ConnectionManagerWindow);
|
||||
|
||||
comboBox->setCurrentIndex(0);
|
||||
cmbbxSsl->setCurrentIndex(2);
|
||||
|
||||
|
||||
QMetaObject::connectSlotsByName(ConnectionManagerWindow);
|
||||
|
|
@ -200,14 +259,23 @@ public:
|
|||
label->setText(QApplication::translate("ConnectionManagerWindow", "Name", Q_NULLPTR));
|
||||
label_2->setText(QApplication::translate("ConnectionManagerWindow", "Host", Q_NULLPTR));
|
||||
label_3->setText(QApplication::translate("ConnectionManagerWindow", "Port", Q_NULLPTR));
|
||||
label_4->setText(QApplication::translate("ConnectionManagerWindow", "Maintenance DB", Q_NULLPTR));
|
||||
comboBox->clear();
|
||||
comboBox->insertItems(0, QStringList()
|
||||
<< QApplication::translate("ConnectionManagerWindow", "postgres", Q_NULLPTR)
|
||||
<< QApplication::translate("ConnectionManagerWindow", "template1", Q_NULLPTR)
|
||||
);
|
||||
label_5->setText(QApplication::translate("ConnectionManagerWindow", "Username", Q_NULLPTR));
|
||||
label_6->setText(QApplication::translate("ConnectionManagerWindow", "Password", Q_NULLPTR));
|
||||
label_4->setText(QApplication::translate("ConnectionManagerWindow", "Database", Q_NULLPTR));
|
||||
cmbbxSsl->clear();
|
||||
cmbbxSsl->insertItems(0, QStringList()
|
||||
<< QApplication::translate("ConnectionManagerWindow", "reject", Q_NULLPTR)
|
||||
<< QApplication::translate("ConnectionManagerWindow", "allow", Q_NULLPTR)
|
||||
<< QApplication::translate("ConnectionManagerWindow", "prefer", Q_NULLPTR)
|
||||
<< QApplication::translate("ConnectionManagerWindow", "require", Q_NULLPTR)
|
||||
<< QApplication::translate("ConnectionManagerWindow", "verify-ca", Q_NULLPTR)
|
||||
<< QApplication::translate("ConnectionManagerWindow", "verify-full", Q_NULLPTR)
|
||||
);
|
||||
label_7->setText(QApplication::translate("ConnectionManagerWindow", "SSL", Q_NULLPTR));
|
||||
label_8->setText(QApplication::translate("ConnectionManagerWindow", "Certificate", Q_NULLPTR));
|
||||
label_9->setText(QApplication::translate("ConnectionManagerWindow", "Key", Q_NULLPTR));
|
||||
label_10->setText(QApplication::translate("ConnectionManagerWindow", "Root cert.", Q_NULLPTR));
|
||||
label_11->setText(QApplication::translate("ConnectionManagerWindow", "Revocation list", Q_NULLPTR));
|
||||
toolBar->setWindowTitle(QApplication::translate("ConnectionManagerWindow", "toolBar", Q_NULLPTR));
|
||||
} // retranslateUi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue