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 
32 #ifdef __WXMSW__
33  public wxGenericProgressDialog, public AppBase::ProgressDisplay
34 #else
35  public wxProgressDialog, public AppBase::ProgressDisplay
36 #endif
37 {
38 public:
39  ProgressReporterDialog(int maxProgress, const wxString& title, const wxString& message,
40  wxWindow * parent = NULL,
41  int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_ELAPSED_TIME)
42 #ifdef __WXMSW__
43  : wxGenericProgressDialog(title, message + wxString((wxChar)' ', 10), 100, parent, style),
44 #else
45  : wxProgressDialog(title, message + wxString((wxChar)' ', 10), 100, parent, style),
46 #endif
47  ProgressDisplay(maxProgress)
48  { };
49  // overwritten to work with wxString
50  void setMessage(const std::string& message, const std::string& filename = "");
51  // wxString versions for GUI
52  void setMessage(const wxString& message, const wxString& filename = wxEmptyString);
54  bool updateDisplay(const wxString& message);
56  bool updateDisplayValue(const wxString& message, const wxString& filename = wxEmptyString);
57 
58 protected:
59  virtual void updateProgressDisplay();
60  wxString m_wxmessage;
61  wxString m_wxfilename;
62 };
63 
64 #endif // _MYPROGRESSDIALOG_H
ProgressDisplay(int maximum=0)
constructor
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)