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,
50 Qt::WindowFlags f = Qt::WindowFlags());
51 ~SimplePluginProgressWidget()
override;
53 void setComment(
const std::string &)
override;
54 void setComment(
const QString &);
55 void setComment(
const char *);
57 void setTitle(
const std::string &)
override {}
61 void cancel()
override;
64 bool isPreviewMode()
const override;
65 void setPreviewMode(
bool drawPreview)
override;
66 void showPreview(
bool showPreview)
override;
67 void showStops(
bool showButtons)
override;
68 void showText(
bool show)
override;
69 void showLogo(
bool show);
73 std::string getError()
override;
74 void setError(
const std::string &error)
override;
77 void closeEvent(QCloseEvent *)
override;
80 void setCancelButtonVisible(
bool);
81 void setStopButtonVisible(
bool);
88 class TLP_QT_SCOPE SimplePluginProgressDialog :
public QDialog,
public tlp::PluginProgress {
91 explicit SimplePluginProgressDialog(QWidget *parent =
nullptr);
92 ~SimplePluginProgressDialog()
override;
94 void setComment(
const std::string &)
override;
95 void setComment(
const QString &);
96 void setComment(
const char *);
98 void setTitle(
const std::string &title)
override;
102 void cancel()
override;
103 void stop()
override;
105 bool isPreviewMode()
const override;
106 void setPreviewMode(
bool drawPreview)
override;
107 void showPreview(
bool showPreview)
override;
108 void showStops(
bool showButtons)
override;
109 void showText(
bool show)
override;
110 void showLogo(
bool show) {
111 _progress->showLogo(show);
116 std::string getError()
override;
117 void setError(
const std::string &error)
override;
120 void closeEvent(QCloseEvent *)
override;
121 void paintEvent(QPaintEvent *)
override;
125 void setCancelButtonVisible(
bool v);
126 void setStopButtonVisible(
bool v);
129 tlp::SimplePluginProgressWidget *_progress;
PluginProcess subclasses are meant to notify about the progress state of some process (typically a pl...
ProgressState
This enum describes callback actions for the underlying system when calling tlp::PluginProgress::prog...