X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcontactwidget.cpp;fp=src%2Fcontactwidget.cpp;h=b9c43e433d92718ea53e37097f74de47676548c9;hb=6df1a447a1fa1b9e51fd177a806f910813657b09;hp=0000000000000000000000000000000000000000;hpb=f3116511d09acfd5b32d3412c82c4337d89f2ad9;p=schematic diff --git a/src/contactwidget.cpp b/src/contactwidget.cpp new file mode 100644 index 0000000..b9c43e4 --- /dev/null +++ b/src/contactwidget.cpp @@ -0,0 +1,51 @@ +// +// contactwidget.cpp - Vendor contact display +// +// by James Hammons +// (C) 2012 Underground Software +// +// JLH = James Hammons +// +// Who When What +// --- ---------- ------------------------------------------------------------- +// JLH 09/24/2012 Created this file +// + +#include "contactwidget.h" + + +ContactWidget::ContactWidget(QWidget * parent/*= 0*/): QWidget(parent), + field1(new QLabel), + field2(new QLabel), + field3(new QLabel), + field4(new QLabel), + field5(new QLabel), + field6(new QLabel), + field7(new QLabel) +{ + QFormLayout * form = new QFormLayout; + + form->addRow(tr("Type:"), field1); + form->addRow(tr("Name:"), field2); + form->addRow(tr("Email:"), field3); + form->addRow(tr("Address:"), field4); + form->addRow(tr("Phone 1:"), field5); + form->addRow(tr("Phone 2:"), field6); + form->addRow(tr("Fax:"), field7); + + setLayout(form); +} + + +void ContactWidget::SetFields(QString s1, QString s2, QString s3, QString s4, + QString s5, QString s6, QString s7) +{ + field1->setText(s1); + field2->setText(s2); + field3->setText(s3); + field4->setText(s4); + field5->setText(s5); + field6->setText(s6); + field7->setText(s7); +} +