-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOpenConnectionDialog.h
More file actions
79 lines (56 loc) · 1.47 KB
/
OpenConnectionDialog.h
File metadata and controls
79 lines (56 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef OPENCONNECTIONDIALOG_H
#define OPENCONNECTIONDIALOG_H
#include <QDialog>
#include <QListWidgetItem>
namespace Ui {
class OpenConnectionDialog;
}
struct Connection
{
// Database settings
QString name;
QString driver;
QString hostname;
QString database;
QString username;
QString password;
int port;
// SSH Tunnel Settings
bool sshTunnel;
QString sshHostname;
int sshPort;
};
class OpenConnectionDialog : public QDialog
{
Q_OBJECT
public:
explicit OpenConnectionDialog(QWidget *parent = 0);
~OpenConnectionDialog();
Connection *getConnection();
QString getName();
QString getDriver();
QString getDatabase();
QString getHostname();
QString getUsername();
QString getPassword();
int getPort();
// SSH Tunnel Functions
bool getSshTunnelChecked();
QString getSshHostname();
int getSshPort();
private slots:
void on_driverCombo_currentIndexChanged(const QString &arg1);
void on_fileButton_clicked();
void on_addButton_clicked();
void on_connectionsListWidget_itemActivated(QListWidgetItem *item);
void on_removeButton_clicked();
void on_newConnectionButton_clicked();
void on_sshTunnelCheckBox_toggled(bool checked);
void on_filterEdit_textChanged(const QString &arg1);
private:
void reloadConnections();
private:
Ui::OpenConnectionDialog *ui;
QList<Connection*> savedConnections;
};
#endif // OPENCONNECTIONDIALOG_H