Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
progress_frame.h
Go to the documentation of this file.
1
9
10#ifndef PROGRESS_FRAME_H
11#define PROGRESS_FRAME_H
12
13#include <QFrame>
14
15namespace Ui {
16class ProgressFrame;
17}
18
19class ProgressFrame;
20class QDialogButtonBox;
21class QElapsedTimer;
22class QGraphicsOpacityEffect;
23class QPropertyAnimation;
24
35
39class ProgressFrame : public QFrame
40{
41 Q_OBJECT
42
43public:
48 explicit ProgressFrame(QWidget *parent = 0);
49
54
55#ifdef QWINTASKBARPROGRESS_H
60 void enableTaskbarUpdates(bool enable = true) { update_taskbar_ = enable; }
61#endif
62
68 static void addToButtonBox(QDialogButtonBox *button_box, QObject *main_window);
69
73 void captureFileClosing();
74
75public slots:
85 struct progdlg *showProgress(const QString &title, bool animate, bool terminate_is_stop, bool *stop_flag, int value = 0);
86
94 struct progdlg *showBusy(bool animate, bool terminate_is_stop, bool *stop_flag);
95
100 void setValue(int value);
101
103 void setTitle(const QString &title);
104
106 void setStatus(const QString &status);
107
111 void hide();
112
113signals:
120 void showRequested(bool animate, bool terminate_is_stop, bool *stop_flag);
121
126 void valueChanged(int value);
127
132 void maximumValueChanged(int value);
133
137 void setHidden();
138
143
144protected:
149 void timerEvent(QTimerEvent *event) override;
150
151private:
153 void updateLabel();
154
156 QString elideLabel(const QString &title) const;
157
159 Ui::ProgressFrame *ui;
160
162 struct progdlg progress_dialog_;
163
165 QString message_;
166
168 QString status_;
169
171 bool terminate_is_stop_;
172
174 bool *stop_flag_;
175
177 int show_timer_;
178
180 QGraphicsOpacityEffect *effect_;
181
183 QPropertyAnimation *animation_;
184
185#ifdef QWINTASKBARPROGRESS_H
187 bool update_taskbar_;
188
190 QWinTaskbarProgress *taskbar_progress_;
191#endif
192
193private slots:
197 void on_stopButton_clicked();
198
205 void show(bool animate, bool terminate_is_stop, bool *stop_flag);
206
211 void setMaximumValue(int value);
212};
213
214#endif // PROGRESS_FRAME_H
A frame for displaying progress indications and dialogs.
Definition progress_frame.h:40
static void addToButtonBox(QDialogButtonBox *button_box, QObject *main_window)
Adds the progress frame to a dialog button box.
Definition progress_frame.cpp:247
ProgressFrame(QWidget *parent=0)
Constructs a new ProgressFrame object.
Definition progress_frame.cpp:94
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:240
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:294
void setTitle(const QString &title)
Sets the current progress title.
Definition progress_frame.cpp:219
~ProgressFrame()
Destroys the ProgressFrame object.
Definition progress_frame.cpp:187
void captureFileClosing()
Handles the event when the capture file is closing.
Definition progress_frame.cpp:282
void valueChanged(int value)
Signal emitted when the progress value changes.
void timerEvent(QTimerEvent *event) override
Handles timer events.
Definition progress_frame.cpp:300
void hide()
Hides the progress frame.
Definition progress_frame.cpp:320
void showRequested(bool animate, bool terminate_is_stop, bool *stop_flag)
Signal emitted to request showing the progress frame.
void setStatus(const QString &status)
Sets the current progress status.
Definition progress_frame.cpp:225
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:231
Define the structure describing a progress dialog.
Definition progress_frame.h:28
ProgressFrame * progress_frame
This progress frame.
Definition progress_frame.h:30
QWidget * top_level_window
Progress frame's main window.
Definition progress_frame.h:33