Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MyProgressDialog.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
24 #ifndef _MYPROGRESSDIALOG_H
25 #define _MYPROGRESSDIALOG_H
26 
27 #include <hugin_shared.h>
28 #include <wx/progdlg.h>
30 
31 class WXIMPEX ProgressReporterDialog : public wxProgressDialog, public AppBase::ProgressDisplay
32 {
33 public:
34  ProgressReporterDialog(int maxProgress, const wxString& title, const wxString& message,
35  wxWindow * parent = NULL,
36  int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_ELAPSED_TIME)
37  : wxProgressDialog(title, message + wxString((wxChar)' ', 10), 100, parent, style),
38  ProgressDisplay(maxProgress)
39  { };
40  // overwritten to work with wxString
41  void setMessage(const std::string& message, const std::string& filename = "");
42  // wxString versions for GUI
43  void setMessage(const wxString& message, const wxString& filename = wxEmptyString);
45  bool updateDisplay(const wxString& message);
47  bool updateDisplayValue(const wxString& message, const wxString& filename = wxEmptyString);
48 
49 protected:
50  virtual void updateProgressDisplay();
51  wxString m_wxmessage;
52  wxString m_wxfilename;
53 };
54 
55 #endif // _MYPROGRESSDIALOG_H
virtual void updateProgressDisplay()=0
Template method, updates the display.
bool updateDisplay()
updates the display, return true, if update was successful, false if cancel was pressed ...
#define WXIMPEX
Definition: hugin_shared.h:40
void setMessage(const std::string &message, const std::string &filename="")
sets the message to given string
ProgressReporterDialog(int maxProgress, const wxString &title, const wxString &message, wxWindow *parent=NULL, int style=wxPD_AUTO_HIDE|wxPD_APP_MODAL|wxPD_CAN_ABORT|wxPD_ELAPSED_TIME)