/******************************************************************************************************** * PROGRAM : FreeGo4 * DATE - TIME : jeudi 24 aot 2006 - 18h51 * AUTHOR : Azevedo Filipe aka Nox PasNox ( pasnox at gmail dot com ) * FILENAME : UIMonitor.h * LICENSE : GPL * COMMENTARY : ********************************************************************************************************/ #ifndef UIMONITOR_H #define UIMONITOR_H // #include "ui_UIMonitor.h" #include <QPointer> // #ifdef Q_OS_WIN32 #include <qt_windows.h> #include <iprtrmib.h> typedef DWORD (*GetIfTable)(PMIB_IFTABLE, ULONG *, BOOL); #endif // // class UIMonitor : public fgDialog, public Ui::UIMonitor { Q_OBJECT // protected: void showEvent( QShowEvent* ); void closeEvent( QCloseEvent* ); void timerEvent( QTimerEvent* ); // public: static UIMonitor* self( QWidget* = 0 ); // private: UIMonitor( QWidget* = 0 ); // #ifdef Q_OS_WIN32 typedef DWORD ( WINAPI *PFONCTION ) ( PMIB_IFTABLE , PULONG, BOOL ); PMIB_IFTABLE buffer ; MIB_IFROW donnees; DWORD getiftable; ULONG buf_size; GetIfTable table; #endif int mTimerId; bool mIsStarted; bool mFirst; int mJaugeMax; float mDLMax; float mUPMax; float mDownload; float mUpload; ulong down_h1, down_h2, up_h1, up_h2; static QPointer<UIMonitor> mSelf; // public slots: bool start(); bool stop(); void updateGraph(); }; // #endif // UIMONITOR_H