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

qguiprogresswidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003                              -------------------
00004     cvs         : $Id: qbprogress.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_PROGRESSWIDGET_H
00014 #define QBANKING_PROGRESSWIDGET_H
00015 
00016 
00017 #include "qguiprogresswidget.ui.h"
00018 //Added by qt3to4:
00019 #include <QCloseEvent>
00020 #include <gwenhywfar/types.h>
00021 #include <gwenhywfar/gui.h>
00022 
00023 #include <time.h>
00024 
00025 
00026 #define QGUI_PROGRESS_SHOWTIMEOUT 5
00027 
00028 #define QGUI_PROGRESS_FLAGS_SHOW_TEXT 0x00000001
00029 
00030 
00031 class QGuiProgress;
00032 class QString;
00033 
00034 
00035 class QGuiProgressWidget: public QWidget, public Ui_QGuiProgressWidgetUI {
00036   Q_OBJECT
00037 private:
00038   bool _aborted;
00039   bool _shouldStay;
00040   bool _doShowText;
00041   QString _logtext;
00042   time_t _startTime;
00043   time_t _lastTime;
00044   QGuiProgress *_currentSubProgress;
00045 
00046   std::list<QGuiProgress*> _progressPtrList;
00047 
00048   static int _openCount;
00049 
00050   bool _handleTime();
00051   void _selectSublevel();
00052 
00053 protected:
00054   virtual void closeEvent(QCloseEvent *e);
00055 
00056 public:
00057   QGuiProgressWidget(QGuiProgress *firstProgress,
00058                      const QString &title,
00059                      const QString &text,
00060                      QWidget* parent=0, const char* name=0, Qt::WFlags fl=0);
00061   ~QGuiProgressWidget();
00062 
00063   void addProgress(QGuiProgress *pr);
00064   void delProgress(QGuiProgress *pr);
00065 
00066   void check();
00067 
00068   int log(GWEN_LOGGER_LEVEL level,
00069           const QString& text);
00070 
00071   int checkAbort();
00072 
00073   bool aborted() const { return _aborted;};
00074   bool shouldStay() const { return _shouldStay;};
00075   bool hasProgresses() const;
00076 
00077 protected slots:
00078   void abort();
00079 };
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 #endif /* QBANKING_PROGRESS_H */
00088 
00089 
00090 
00091 

Generated on Mon Sep 20 2010 18:13:21 for aqbanking by  doxygen 1.7.1