21 #ifndef SIMPLEPLUGINPROGRESSWIDGET_H 22 #define SIMPLEPLUGINPROGRESSWIDGET_H 24 #include <tulip/PluginProgress.h> 31 class SimplePluginProgressWidgetData;
38 class TLP_QT_SCOPE SimplePluginProgressWidget :
public QWidget,
public tlp::PluginProgress {
40 Ui::SimplePluginProgressWidgetData *_ui;
43 void checkLastUpdate();
49 explicit SimplePluginProgressWidget(QWidget *parent =
nullptr, Qt::WindowFlags f =
nullptr);
50 ~SimplePluginProgressWidget()
override;
52 void setComment(
const std::string &)
override;
53 void setComment(
const QString &);
54 void setComment(
const char *);
56 void setTitle(
const std::string &)
override {}
60 void cancel()
override;
63 bool isPreviewMode()
const override;
64 void setPreviewMode(
bool drawPreview)
override;
65 void showPreview(
bool showPreview)
override;
66 void showStops(
bool showButtons)
override;
70 std::string getError()
override;
71 void setError(
const std::string &error)
override;
74 void closeEvent(QCloseEvent *)
override;
77 void setCancelButtonVisible(
bool);
78 void setStopButtonVisible(
bool);
85 class TLP_QT_SCOPE SimplePluginProgressDialog :
public QDialog,
public tlp::PluginProgress {
88 explicit SimplePluginProgressDialog(QWidget *parent =
nullptr);
89 ~SimplePluginProgressDialog()
override;
91 void setComment(
const std::string &)
override;
92 void setComment(
const QString &);
93 void setComment(
const char *);
95 void setTitle(
const std::string &title)
override;
99 void cancel()
override;
100 void stop()
override;
102 bool isPreviewMode()
const override;
103 void setPreviewMode(
bool drawPreview)
override;
104 void showPreview(
bool showPreview)
override;
105 void showStops(
bool showButtons)
override;
109 std::string getError()
override;
110 void setError(
const std::string &error)
override;
113 void closeEvent(QCloseEvent *)
override;
114 void paintEvent(QPaintEvent *)
override;
118 void setCancelButtonVisible(
bool v);
119 void setStopButtonVisible(
bool v);
122 tlp::SimplePluginProgressWidget *_progress;
126 #endif // SIMPLEPLUGINPROGRESSWIDGET_H
ProgressState
This enum describes callback actions for the underlaying system when calling tlp::PluginProgress::pro...
PluginProcess subclasses are meant to notify about the progress state of some process (typically a pl...