]> Shamusworld >> Repos - schematic/blobdiff - src/addresswidget.cpp
Added new classes, lots of new functionality.
[schematic] / src / addresswidget.cpp
diff --git a/src/addresswidget.cpp b/src/addresswidget.cpp
new file mode 100644 (file)
index 0000000..6f3c20e
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// addresswidget.cpp - Vendor address display
+//
+// by James Hammons
+// (C) 2012 Underground Software
+//
+// JLH = James Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -------------------------------------------------------------
+// JLH  09/24/2012  Created this file
+//
+
+#include "addresswidget.h"
+
+AddressWidget::AddressWidget(QWidget * parent/*= 0*/): QWidget(parent),
+       field1(new QLabel),
+       field2(new QLabel),
+       field3(new QLabel),
+       field4(new QLabel),
+       field5(new QLabel)
+{
+       QFormLayout * form = new QFormLayout;
+
+       form->addRow(tr("Address:"), field1);
+       form->addRow(tr("City:"), field2);
+       form->addRow(tr("State:"), field3);
+       form->addRow(tr("Country:"), field4);
+       form->addRow(tr("Postal Code:"), field5);
+
+       setLayout(form);
+}
+
+
+void AddressWidget::SetFields(QString s1, QString s2, QString s3, QString s4, QString s5)
+{
+       field1->setText(s1);
+       field2->setText(s2);
+       field3->setText(s3);
+       field4->setText(s4);
+       field5->setText(s5);
+}
+