Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
progress_frame.h
Go to the documentation of this file.
1
10#ifndef PROGRESS_FRAME_H
11#define PROGRESS_FRAME_H
12
13#include <QFrame>
14
15namespace Ui {
16class ProgressFrame;
17}
18
19#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && defined(Q_OS_WIN)
20#include <QWinTaskbarButton>
21#include <QWinTaskbarProgress>
22#endif
23
24class ProgressFrame;
25class QDialogButtonBox;
26class QElapsedTimer;
27class QGraphicsOpacityEffect;
28class QPropertyAnimation;
29
40
44class ProgressFrame : public QFrame
45{
46 Q_OBJECT
47
48public:
53 explicit ProgressFrame(QWidget *parent = 0);
54
59
60#ifdef QWINTASKBARPROGRESS_H
65 void enableTaskbarUpdates(bool enable = true) { update_taskbar_ = enable; }
66#endif
67
73 static void addToButtonBox(QDialogButtonBox *button_box, QObject *main_window);
74
78 void captureFileClosing();
79
80public slots:
90 struct progdlg *showProgress(const QString &title, bool animate, bool terminate_is_stop, bool *stop_flag, int value = 0);
91
99 struct progdlg *showBusy(bool animate, bool terminate_is_stop, bool *stop_flag);
100
105 void setValue(int value);
106
110 void hide();
111
112signals:
119 void showRequested(bool animate, bool terminate_is_stop, bool *stop_flag);
120
125 void valueChanged(int value);
126
131 void maximumValueChanged(int value);
132
136 void setHidden();
137
142
143protected:
148 void timerEvent(QTimerEvent *event);
149
150private:
152 Ui::ProgressFrame *ui;
153
155 struct progdlg progress_dialog_;
156
158 QString message_;
159
161 QString status_;
162
164 bool terminate_is_stop_;
165
167 bool *stop_flag_;
168
170 int show_timer_;
171
173 QGraphicsOpacityEffect *effect_;
174
176 QPropertyAnimation *animation_;
177
178#ifdef QWINTASKBARPROGRESS_H
180 bool update_taskbar_;
181
183 QWinTaskbarProgress *taskbar_progress_;
184#endif
185
186private slots:
190 void on_stopButton_clicked();
191
198 void show(bool animate, bool terminate_is_stop, bool *stop_flag);
199
204 void setMaximumValue(int value);
205};
206
207#endif // PROGRESS_FRAME_H
A frame for displaying progress indications and dialogs.
Definition progress_frame.h:45
static void addToButtonBox(QDialogButtonBox *button_box, QObject *main_window)
Adds the progress frame to a dialog button box.
Definition progress_frame.cpp:188
void stopLoading()
Signal emitted to request stopping the current loading operation.
struct progdlg * showBusy(bool animate, bool terminate_is_stop, bool *stop_flag)
Shows a busy/indeterminate progress indicator.
Definition progress_frame.cpp:181
void timerEvent(QTimerEvent *event)
Handles timer events.
Definition progress_frame.cpp:241
void setHidden()
Signal emitted to hide the progress frame.
void maximumValueChanged(int value)
Signal emitted when the maximum progress value changes.
void setValue(int value)
Sets the current progress value.
Definition progress_frame.cpp:235
~ProgressFrame()
Destroys the ProgressFrame object.
Definition progress_frame.cpp:160
void captureFileClosing()
Handles the event when the capture file is closing.
Definition progress_frame.cpp:223
void valueChanged(int value)
Signal emitted when the progress value changes.
void hide()
Hides the progress frame.
Definition progress_frame.cpp:261
void showRequested(bool animate, bool terminate_is_stop, bool *stop_flag)
Signal emitted to request showing the progress frame.
struct progdlg * showProgress(const QString &title, bool animate, bool terminate_is_stop, bool *stop_flag, int value=0)
Shows a progress indicator with a title.
Definition progress_frame.cpp:165
Define the structure describing a progress dialog.
Definition progress_frame.h:33
ProgressFrame * progress_frame
This progress frame.
Definition progress_frame.h:35
QWidget * top_level_window
Progress frame's main window.
Definition progress_frame.h:38