2 // logindialog.cpp: The login dialog
4 // Part of the SCheMatic Project
5 // (C) 2012 Underground Software
7 // JLH = James Hammons <jlhamm@acm.org>
10 // --- ---------- ------------------------------------------------------------
11 // JLH 09/18/2011 Created this file
13 #include "logindialog.h"
16 LoginDialog::LoginDialog(QWidget * parent/*= 0*/): QDialog(parent),
17 buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
18 edit1(new QLineEdit()),
19 edit2(new QLineEdit())
21 connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
22 connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
24 edit2->setEchoMode(QLineEdit::Password);
26 QFormLayout * formLayout = new QFormLayout;
27 formLayout->addRow(tr("&Username:"), edit1);
28 formLayout->addRow(tr("&Password:"), edit2);
30 QVBoxLayout * mainLayout = new QVBoxLayout;
31 mainLayout->addLayout(formLayout);
32 mainLayout->addWidget(buttonBox);
33 setLayout(mainLayout);
35 setWindowTitle(tr("Please Log On to SCheMatic"));
38 LoginDialog::~LoginDialog()