partselect.h

00001 /*********************************************************************************
00002 **
00003 **   $Id: //depot/WorkInProgress/ah2/AcctSelect.h#1 $
00004 **   Copyright (c) 2004 Joe Croft <joe@croftj.net>
00005 **   
00006 **   This file is part of ah3.
00007 **
00008 **   ah3 is free software; you can redistribute it and/or modify
00009 **   it under the terms of the GNU General Public License as published by
00010 **   the Free Software Foundation; either version 2 of the License, or
00011 **   (at your option) any later version.
00012 **
00013 **   Foobar is distributed in the hope that it will be useful,
00014 **   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 **   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 **   GNU General Public License for more details.
00017 **
00018 **   You should have received a copy of the GNU General Public License
00019 **   along with Foobar; if not, write to the Free Software
00020 **   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 

Generated on Tue Sep 11 07:00:01 2007 for Ah3 Invoicing and Inventory System for Repair Shops by  doxygen 1.5.0