Added ability to test the connection in the dialog where the connection details are entered.
This commit is contained in:
parent
45795333f2
commit
c00a0452d1
7 changed files with 201 additions and 43 deletions
|
|
@ -3,19 +3,24 @@
|
|||
|
||||
#include <QWidget>
|
||||
#include <QUuid>
|
||||
#include <QFutureWatcher>
|
||||
#include <tuple>
|
||||
#include "TestConnection.h"
|
||||
|
||||
class ConnectionController;
|
||||
class ConnectionConfig;
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QDataWidgetMapper;
|
||||
class QFormLayout;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QSpinBox;
|
||||
class QComboBox;
|
||||
class QDataWidgetMapper;
|
||||
|
||||
class ConnectionTreeModel;
|
||||
|
||||
|
||||
class ConnectionConfigurationWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -26,11 +31,15 @@ public:
|
|||
|
||||
void retranslateUi();
|
||||
void setData(const ConnectionConfig &cfg);
|
||||
std::tuple<QString, ConnectionConfig> data() const;
|
||||
ConnectionConfig data() const;
|
||||
QString group() const;
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void testConnection();
|
||||
|
||||
private:
|
||||
ConnectionTreeModel *m_connectionModel;
|
||||
ConnectionTreeModel *m_connectionModel;
|
||||
|
||||
QUuid m_uuid;
|
||||
|
||||
|
|
@ -44,8 +53,11 @@ private:
|
|||
QSpinBox *spinPort;
|
||||
QLabel *lblUser;
|
||||
QLineEdit *edtUser;
|
||||
QLabel *lblDbName;
|
||||
QLineEdit *edtDbname;
|
||||
QLabel *lblPassword;
|
||||
QLineEdit *edtPassword;
|
||||
QCheckBox *cbSavePassword;
|
||||
QLabel *lblDbName;
|
||||
QComboBox *cmbDbname;
|
||||
QLabel *lblSsl;
|
||||
QComboBox *cmbbxSsl;
|
||||
QLabel *lblCert;
|
||||
|
|
@ -56,9 +68,14 @@ private:
|
|||
QLineEdit *edtRootCert;
|
||||
QLabel *lblCrl;
|
||||
QLineEdit *edtCrl;
|
||||
QFormLayout *formLayout;
|
||||
|
||||
public slots:
|
||||
QPushButton *btnTest;
|
||||
QLabel *lblResult;
|
||||
QFormLayout *formLayout;
|
||||
|
||||
QFutureWatcher<TestConnectionResult> TestWatcher;
|
||||
private slots:
|
||||
void handleTestResult();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue