]> Shamusworld >> Repos - schematic/blob - src/addresswidget.cpp
Move DB access to NoteDialog class, new AlertDialog class.
[schematic] / src / addresswidget.cpp
1 //
2 // addresswidget.cpp - Vendor address display
3 //
4 // by James Hammons
5 // (C) 2012 Underground Software
6 //
7 // JLH = James Hammons <jlhamm@acm.org>
8 //
9 // Who  When        What
10 // ---  ----------  -------------------------------------------------------------
11 // JLH  09/24/2012  Created this file
12 //
13
14 #include "addresswidget.h"
15
16 AddressWidget::AddressWidget(QWidget * parent/*= 0*/): QWidget(parent),
17         field1(new QLabel),
18         field2(new QLabel),
19         field3(new QLabel),
20         field4(new QLabel),
21         field5(new QLabel)
22 {
23         QFormLayout * form = new QFormLayout;
24
25         form->addRow(tr("Address:"), field1);
26         form->addRow(tr("City:"), field2);
27         form->addRow(tr("State:"), field3);
28         form->addRow(tr("Country:"), field4);
29         form->addRow(tr("Postal Code:"), field5);
30
31         setLayout(form);
32 }
33
34
35 void AddressWidget::SetFields(QString s1, QString s2, QString s3, QString s4, QString s5)
36 {
37         field1->setText(s1);
38         field2->setText(s2);
39         field3->setText(s3);
40         field4->setText(s4);
41         field5->setText(s5);
42 }
43