]> Shamusworld >> Repos - schematic/blob - src/logindialog.cpp
Initial commit.
[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  06/04/2011  Created this file
12
13 #include "logindialog.h"
14
15
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())
22 {
23         connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
24         connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
25
26         edit2->setEchoMode(QLineEdit::Password);
27
28         QFormLayout * formLayout = new QFormLayout;
29         formLayout->addRow(tr("&Username:"), edit1);
30         formLayout->addRow(tr("&Password:"), edit2);
31
32         QVBoxLayout * mainLayout = new QVBoxLayout;
33 //      mainLayout->addWidget(tabWidget);
34         mainLayout->addLayout(formLayout);
35         mainLayout->addWidget(buttonBox);
36         setLayout(mainLayout);
37
38         setWindowTitle(tr("Please Log On to SCheMatic"));
39 }
40
41 LoginDialog::~LoginDialog()
42 {
43 }