00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef PARTSELECT_H
00025 #define PARTSELECT_H
00026
00027 # include <QDialog>
00028 # include "QcjData/QcjDataStatics.h"
00029 # include "QcjData/QcjDataConfigure.h"
00030 # include "ui_partselect.h"
00031
00032 class PartSelect : public QDialog
00033 {
00034 Q_OBJECT
00035
00036 public:
00037 PartSelect(QWidget *parent = 0) : QDialog(parent)
00038 {
00039 printf("PartSelect::PartSelect(): Enter\n");
00040 fflush(stdout);
00041 ui.setupUi(this);
00042 printf("PartSelect::PartSelect(): Exit\n");
00043 fflush(stdout);
00044 };
00045
00046 void setDatabase()
00047 {
00048 ui.partLookupForm->setDatabase();
00049 ui.partLookupTable->setDatabase();
00050 connect(ui.selectPartBtn, SIGNAL(clicked()), this, SLOT(haveSelectPartBtn()));
00051 };
00052
00053 protected slots:
00054 void haveSelectPartBtn()
00055 {
00056 QString xmldef = ui.partLookupForm->readXmlDef();
00057 printf("PartSelect::haveSelectPartBtn(): workorderForm xmldef |%s|\n", qPrintable(xmldef));
00058 fflush(stdout);
00059 QString index = pFormDef->getIndexField(xmldef);
00060 printf("PartSelect::haveSelectPartBtn(): workorderForm index = |%s|\n", qPrintable(index));
00061 fflush(stdout);
00062 done(ui.partLookupForm->getFieldValue(index).toInt());
00063 }
00064
00065 private:
00066 int workorder;
00067 Ui::PartSelect ui;
00068 };
00069
00070 #endif
00071
00072
00073