MyProgressDialog.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00024 #ifndef _MYPROGRESSDIALOG_H
00025 #define _MYPROGRESSDIALOG_H
00026 
00027 #include <hugin_shared.h>
00028 #include <wx/progdlg.h>
00029 #include <appbase/ProgressDisplay.h>
00030 
00031 class WXIMPEX ProgressReporterDialog : public wxProgressDialog, public AppBase::ProgressDisplay
00032 {
00033 public:
00034     ProgressReporterDialog(int maxProgress, const wxString& title, const wxString& message,
00035                          wxWindow * parent = NULL, 
00036                          int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_ELAPSED_TIME)
00037                          : wxProgressDialog(title, message + wxString((wxChar)' ', 10), 100, parent, style), 
00038                          ProgressDisplay(maxProgress)
00039       {  };
00040     // overwritten to work with wxString
00041     void setMessage(const std::string& message, const std::string& filename = "");
00042     // wxString versions for GUI
00043     void setMessage(const wxString& message, const wxString& filename = wxEmptyString);
00044     using ProgressDisplay::updateDisplay;
00045     bool updateDisplay(const wxString& message);
00046     using ProgressDisplay::updateDisplayValue;
00047     bool updateDisplayValue(const wxString& message, const wxString& filename = wxEmptyString);
00048 
00049 protected:
00050     virtual void updateProgressDisplay();
00051     wxString m_wxmessage;
00052     wxString m_wxfilename;
00053 };
00054 
00055 #endif // _MYPROGRESSDIALOG_H

Generated on 4 Aug 2015 for Hugintrunk by  doxygen 1.4.7