]> Shamusworld >> Repos - schematic/blob - src/contactwidget.cpp
Move DB access to NoteDialog class, new AlertDialog class.
[schematic] / src / contactwidget.cpp
1 //
2 // contactwidget.cpp - Vendor contact 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 "contactwidget.h"
15
16
17 ContactWidget::ContactWidget(QWidget * parent/*= 0*/): QWidget(parent),
18         field1(new QLabel),
19         field2(new QLabel),
20         field3(new QLabel),
21         field4(new QLabel),
22         field5(new QLabel),
23         field6(new QLabel),
24         field7(new QLabel)
25 {
26         QFormLayout * form = new QFormLayout;
27
28         form->addRow(tr("Type:"), field1);
29         form->addRow(tr("Name:"), field2);
30         form->addRow(tr("Email:"), field3);
31         form->addRow(tr("Address:"), field4);
32         form->addRow(tr("Phone 1:"), field5);
33         form->addRow(tr("Phone 2:"), field6);
34         form->addRow(tr("Fax:"), field7);
35
36         setLayout(form);
37 }
38
39
40 void ContactWidget::SetFields(QString s1, QString s2, QString s3, QString s4,
41         QString s5, QString s6, QString s7)
42 {
43         field1->setText(s1);
44         field2->setText(s2);
45         field3->setText(s3);
46         field4->setText(s4);
47         field5->setText(s5);
48         field6->setText(s6);
49         field7->setText(s7);
50 }
51