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 06/04/2011 Created this file
13 #include "logindialog.h"
16 LoginDialog::LoginDialog(QWidget * parent/*= 0*/): QDialog(parent),
17 // label1(new QLabel(tr("Username:"))),
18 // label2(new QLabel(tr("Password:"))),
19 buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
20 edit1(new QLineEdit()),
21 edit2(new QLineEdit())
23 connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
24 connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
26 edit2->setEchoMode(QLineEdit::Password);
28 QFormLayout * formLayout = new QFormLayout;
29 formLayout->addRow(tr("&Username:"), edit1);
30 formLayout->addRow(tr("&Password:"), edit2);
32 QVBoxLayout * mainLayout = new QVBoxLayout;
33 // mainLayout->addWidget(tabWidget);
34 mainLayout->addLayout(formLayout);
35 mainLayout->addWidget(buttonBox);
36 setLayout(mainLayout);
38 setWindowTitle(tr("Please Log On to SCheMatic"));
41 LoginDialog::~LoginDialog()