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;
69 std::string getError()
override;
70 void setError(
const std::string &error)
override;
73 void closeEvent(QCloseEvent *)
override;
76 void setCancelButtonVisible(
bool);
77 void setStopButtonVisible(
bool);
84 class TLP_QT_SCOPE SimplePluginProgressDialog :
public QDialog,
public tlp::PluginProgress {
87 explicit SimplePluginProgressDialog(QWidget *parent =
nullptr);
88 ~SimplePluginProgressDialog()
override;
90 void setComment(
const std::string &)
override;
91 void setComment(
const QString &);
92 void setComment(
const char *);
94 void setTitle(
const std::string &title)
override;
98 void cancel()
override;
101 bool isPreviewMode()
const override;
102 void setPreviewMode(
bool drawPreview)
override;
103 void showPreview(
bool showPreview)
override;
107 std::string getError()
override;
108 void setError(
const std::string &error)
override;
111 void closeEvent(QCloseEvent *)
override;
114 void setCancelButtonVisible(
bool v);
115 void setStopButtonVisible(
bool v);
118 tlp::SimplePluginProgressWidget *_progress;
122 #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...