]> Shamusworld >> Repos - schematic/blobdiff - src/sqlsettingsdialog.cpp
Added a bunch of new functionality
[schematic] / src / sqlsettingsdialog.cpp
diff --git a/src/sqlsettingsdialog.cpp b/src/sqlsettingsdialog.cpp
new file mode 100644 (file)
index 0000000..30b1a53
--- /dev/null
@@ -0,0 +1,44 @@
+//
+// sqlsettingsdialog.cpp: The SQL Settings dialog
+//
+// Part of the SCheMatic Project
+// (C) 2012 Underground Software
+//
+// JLH = James Hammons <jlhamm@acm.org>
+//
+// WHO  WHEN        WHAT
+// ---  ----------  ------------------------------------------------------------
+// JLH  09/19/2012  Created this file
+
+#include "sqlsettingsdialog.h"
+
+
+SQLSettingsDialog::SQLSettingsDialog(QWidget * parent/*= 0*/): QDialog(parent),
+       buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
+       edit1(new QLineEdit()),
+       edit2(new QLineEdit()),
+       edit3(new QLineEdit()),
+       edit4(new QLineEdit())
+{
+       connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+       connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+       edit4->setEchoMode(QLineEdit::Password);
+
+       QFormLayout * formLayout = new QFormLayout;
+       formLayout->addRow(tr("&MySQL Server Hostname:"), edit1);
+       formLayout->addRow(tr("&Database Name:"), edit2);
+       formLayout->addRow(tr("&Database Username:"), edit3);
+       formLayout->addRow(tr("&Database Password:"), edit4);
+
+       QVBoxLayout * mainLayout = new QVBoxLayout;
+       mainLayout->addLayout(formLayout);
+       mainLayout->addWidget(buttonBox);
+       setLayout(mainLayout);
+
+       setWindowTitle(tr("MySQL Server Connection"));
+}
+
+SQLSettingsDialog::~SQLSettingsDialog()
+{
+}