vendorselect.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 VENDORSELECT_H
00025 #define VENDORSELECT_H
00026 
00027 # include <QDialog>
00028 # include "QcjData/QcjDataStatics.h"
00029 # include "QcjData/QcjDataConfigure.h"
00030 # include "ui_vendorselect.h"
00031 
00032 
00033 class VendorSelect : public QDialog 
00034 {
00035    Q_OBJECT
00036 
00037 public:
00038    VendorSelect(QWidget *parent = 0) : QDialog(parent)
00039    {
00040       printf("VendorSelect::VendorSelect(): Enter\n");
00041       fflush(stdout);
00042       ui.setupUi(this);
00043       connect(ui.applyBtn, SIGNAL(clicked()), this, SLOT(haveApply()));
00044       connect(ui.cancelBtn, SIGNAL(clicked()), this, SLOT(reject()));
00045       printf("VendorSelect::VendorSelect(): Enter\n");
00046       fflush(stdout);
00047    };
00048 
00049    void setDatabase()
00050    {
00051       printf("VendorSelect::setdatabase(): Enter\n");
00052       fflush(stdout);
00053       ui.vendorTable->setDatabase();
00054       printf("VendorSelect::setdatabase(): Exit\n");
00055       fflush(stdout);
00056    };
00057 
00058 public slots:
00059    void haveApply()
00060    {
00061       done(ui.vendorTable->currentRecord()->field(
00062             pFormDef->getIndexField(ui.vendorTable->readXmlDef())).value().toInt()
00063           );
00064    }
00065 
00066 
00067 protected:
00068 private:
00069    Ui::VendorSelect  ui;
00070 };
00071 
00072 #endif

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