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

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