qbinputbox.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id: qbinputbox.h 809 2006-01-20 14:15:15Z cstim $
00005     begin       : Mon Mar 01 2004
00006     copyright   : (C) 2004 by Martin Preuss
00007     email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *          Please see toplevel file COPYING for license details           *
00011  ***************************************************************************/
00012 
00013 #ifndef QBANKING_INPUTBOX_H
00014 #define QBANKING_INPUTBOX_H
00015 
00016 
00017 #include <gwenhywfar/types.h>
00018 #include <aqbanking/banking.h>
00019 
00020 #include <qdialog.h>
00021 #include <qvalidator.h>
00022 
00023 
00024 class QLineEdit;
00025 class QPushButton;
00026 
00027 
00028 class QBInputBox: public QDialog {
00029   Q_OBJECT
00030 private:
00031 
00032   class Validator: public QValidator {
00033   private:
00034     GWEN_TYPE_UINT32 _flags;
00035     int _minLen;
00036     int _maxLen;
00037   public:
00038     Validator(QObject *parent, const char *name,
00039               GWEN_TYPE_UINT32 flags,
00040               int minLen, int maxLen);
00041     ~Validator();
00042     State validate(QString &input, int &pos) const;
00043   };
00044 
00045   GWEN_TYPE_UINT32 _flags;
00046   QLineEdit *_edit1;
00047   QLineEdit *_edit2;
00048   QPushButton *_okButton;
00049   QPushButton *_abortButton;
00050   Validator *_validator;
00051 
00052 public:
00053   QBInputBox(const QString& title,
00054              const QString& text,
00055              GWEN_TYPE_UINT32 flags,
00056              int minLen,
00057              int maxLen,
00058              QWidget* parent = 0,
00059              const char* name = 0,
00060              bool modal = false,
00061              WFlags fl = 0);
00062   ~QBInputBox();
00063 
00064   bool acceptableInput();
00065   QString getInput();
00066 
00067 public slots:
00068   void returnPressedOn1();
00069   void returnPressedOn2();
00070   void accept();
00071   void textChanged(const QString&);
00072 };
00073 
00074 
00075 #endif

Generated on Sun Apr 29 17:23:04 2007 for aqbanking by  doxygen 1.5.1