• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

qguiinputbox.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 QGUI_INPUTBOX_H
00014 #define QGUI_INPUTBOX_H
00015 
00016 
00017 #include <gwenhywfar/types.h>
00018 
00019 #include <qdialog.h>
00020 #include <qvalidator.h>
00021 
00022 
00023 class QLineEdit;
00024 class QPushButton;
00025 
00026 
00027 class QGuiInputBox: public QDialog {
00028   Q_OBJECT
00029 private:
00030 
00031   class Validator: public QValidator {
00032   private:
00033     uint32_t _flags;
00034     int _minLen;
00035     int _maxLen;
00036   public:
00037     Validator(QObject *parent, const char *name,
00038               uint32_t flags,
00039               int minLen, int maxLen);
00040     ~Validator();
00041     State validate(QString &input, int &pos) const;
00042   };
00043 
00044   uint32_t _flags;
00045   QLineEdit *_edit1;
00046   QLineEdit *_edit2;
00047   QPushButton *_okButton;
00048   QPushButton *_abortButton;
00049   Validator *_validator;
00050 
00051 public:
00052   QGuiInputBox(const QString& title,
00053                const QString& text,
00054                uint32_t flags,
00055                int minLen,
00056                int maxLen,
00057                QWidget* parent = 0,
00058                const char* name = 0,
00059                bool modal = false,
00060                Qt::WFlags fl = 0);
00061   ~QGuiInputBox();
00062 
00063   bool acceptableInput();
00064   QString getInput();
00065 
00066 public slots:
00067   void returnPressedOn1();
00068   void returnPressedOn2();
00069   void accept();
00070   void textChanged(const QString&);
00071 };
00072 
00073 
00074 #endif

Generated on Tue Aug 3 2010 17:34:15 for aqbanking by  doxygen 1.7.1