]> Shamusworld >> Repos - schematic/blob - src/sqlsettingsdialog.cpp
Fixed password obscuration on wrong field.
[schematic] / src / sqlsettingsdialog.cpp
1 //
2 // sqlsettingsdialog.cpp: The SQL Settings dialog
3 //
4 // Part of the SCheMatic Project
5 // (C) 2012 Underground Software
6 //
7 // JLH = James Hammons <jlhamm@acm.org>
8 //
9 // WHO  WHEN        WHAT
10 // ---  ----------  ------------------------------------------------------------
11 // JLH  09/19/2012  Created this file
12
13 #include "sqlsettingsdialog.h"
14
15
16 SQLSettingsDialog::SQLSettingsDialog(QWidget * parent/*= 0*/): QDialog(parent),
17         buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
18         edit1(new QLineEdit()),
19         edit2(new QLineEdit()),
20         edit3(new QLineEdit()),
21         edit4(new QLineEdit()),
22         edit5(new QLineEdit())
23 {
24         connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
25         connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
26
27         edit5->setEchoMode(QLineEdit::Password);
28
29         QFormLayout * formLayout = new QFormLayout;
30         formLayout->addRow(tr("&Database Driver:"), edit1);
31         formLayout->addRow(tr("&Database Server Hostname:"), edit2);
32         formLayout->addRow(tr("&Database Name:"), edit3);
33         formLayout->addRow(tr("&Database Username:"), edit4);
34         formLayout->addRow(tr("&Database Password:"), edit5);
35
36         QVBoxLayout * mainLayout = new QVBoxLayout;
37         mainLayout->addLayout(formLayout);
38         mainLayout->addWidget(buttonBox);
39         setLayout(mainLayout);
40
41         setWindowTitle(tr("SQL Server Connection"));
42 }
43
44
45 SQLSettingsDialog::~SQLSettingsDialog()
46 {
47 }
48