NeoPZ
TPZGuiInterface.h
Go to the documentation of this file.
1 
5 //$Id: TPZGuiInterface.h,v 1.2 2011-04-05 19:32:54 calle Exp $
6 
7 #ifndef TPZGuiInterfaceH
8 #define TPZGuiInterfaceH
9 
10 #include <iostream>
11 #include "pzerror.h"
12 #include "TPZSavable.h"
24 class TPZGuiInterface : public TPZSavable {
25 
26 protected:
27 
29  bool fCanceled;
30 
32  std::string fMessage;
33 
36 
37 public:
38 
41 
43  virtual ~TPZGuiInterface();
44 
45  TPZGuiInterface(const TPZGuiInterface &gui) : fCanceled(gui.fCanceled), fMessage(gui.fMessage), fProgressBarPos(gui.fProgressBarPos),
46  fProgressBarMaxPos(gui.fProgressBarMaxPos),fProgressBarMinPos(gui.fProgressBarMinPos)
47  {
48  DebugStop();
49  }
50 
52  {
53  fCanceled = gui.fCanceled;
54  fMessage = gui.fMessage;
55  fProgressBarPos = gui.fProgressBarPos;
56  fProgressBarMaxPos = gui.fProgressBarMaxPos;
57  fProgressBarMinPos = gui.fProgressBarMinPos;
58  DebugStop();
59  return *this;
60  }
61  int ClassId() const override;
62  void Read(TPZStream &buf, void *context) override;
63  void Write(TPZStream &buf, int withclassid) const override;
64 
68  virtual void Start();
69 
73  virtual void UpdateCaption();
74 
78  virtual void End();
79 
83  virtual void ShowErrorMessage(std::string message);
84 
86  void SetKilled();
87 
89  bool AmIKilled();
90 
92  std::string Message();
94  void SetMessage(const std::string &message);
95 
98  return fProgressBarPos;
99  }
100 
103  return fProgressBarMaxPos;
104  }
105 
108  return fProgressBarMinPos;
109  }
110 
111 };
112 
113 //---------------------------------------------------------------------------
114 #endif
Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
virtual void Start()
virtual ~TPZGuiInterface()
TPZGuiInterface & operator=(const TPZGuiInterface &gui)
Defines PZError.
virtual void ShowErrorMessage(std::string message)
int & ProgressBarPos()
int & ProgressBarMaxPos()
void SetMessage(const std::string &message)
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
std::string fMessage
TPZGuiInterface(const TPZGuiInterface &gui)
std::string Message()
virtual void End()
This class implements a very simple interface from PZ kernel to GUI. Module: Common.
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
void Read(TPZStream &buf, void *context) override
read objects from the stream
int & ProgressBarMinPos()
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
Definition: TPZSavable.h:67
virtual void UpdateCaption()
int ClassId() const override
Define the class id associated with the class.