]> Shamusworld >> Repos - schematic/blob - src/logindialog.cpp
Move DB access to NoteDialog class, new AlertDialog class.
[schematic] / src / logindialog.cpp
1 //
2 // logindialog.cpp: The login 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/18/2011  Created this file
12
13 #include "logindialog.h"
14
15
16 LoginDialog::LoginDialog(QWidget * parent/*= 0*/): QDialog(parent),
17         buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
18         edit1(new QLineEdit()),
19         edit2(new QLineEdit())
20 {
21         connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
22         connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
23
24         edit2->setEchoMode(QLineEdit::Password);
25
26         QFormLayout * formLayout = new QFormLayout;
27         formLayout->addRow(tr("&Username:"), edit1);
28         formLayout->addRow(tr("&Password:"), edit2);
29
30         QVBoxLayout * mainLayout = new QVBoxLayout;
31         mainLayout->addLayout(formLayout);
32         mainLayout->addWidget(buttonBox);
33         setLayout(mainLayout);
34
35         setWindowTitle(tr("Please Log On to SCheMatic"));
36 }
37
38 LoginDialog::~LoginDialog()
39 {
40 }