pgLab/pglab/ConnectionConfigurationWidget.h

67 lines
1.3 KiB
C
Raw Normal View History

#ifndef CONNECTIONCONFIGURATIONWIDGET_H
#define CONNECTIONCONFIGURATIONWIDGET_H
#include <QWidget>
#include <QUuid>
#include <tuple>
class ConnectionController;
class ConnectionConfig;
class QFormLayout;
class QLabel;
class QLineEdit;
class QSpinBox;
class QComboBox;
class QDataWidgetMapper;
class ConnectionTreeModel;
class ConnectionConfigurationWidget : public QWidget
{
Q_OBJECT
public:
static void editExistingInWindow(ConnectionController *ctrl, const ConnectionConfig &cfg);
explicit ConnectionConfigurationWidget(ConnectionTreeModel *connection_model, QWidget *parent = nullptr);
void retranslateUi();
void setData(const ConnectionConfig &cfg);
std::tuple<QString, ConnectionConfig> data() const;
signals:
private:
ConnectionTreeModel *m_connectionModel;
QUuid m_uuid;
QLabel *lblGroup;
QComboBox *cmbbxGroup;
QLabel *lblName;
QLineEdit *edtName;
QLabel *lblHost;
QLineEdit *edtHost;
QLabel *lblPort;
QSpinBox *spinPort;
QLabel *lblUser;
QLineEdit *edtUser;
QLabel *lblDbName;
QLineEdit *edtDbname;
QLabel *lblSsl;
QComboBox *cmbbxSsl;
QLabel *lblCert;
QLineEdit *edtCert;
QLabel *lblKey;
QLineEdit *edtKey;
QLabel *lblRootCert;
QLineEdit *edtRootCert;
QLabel *lblCrl;
QLineEdit *edtCrl;
QFormLayout *formLayout;
public slots:
};
#endif // CONNECTIONCONFIGURATIONWIDGET_H