Wireshark 4.5.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
30// Define the structure describing a progress dialog.
31struct progdlg {
32 ProgressFrame *progress_frame; // This progress frame
33 QWidget *top_level_window; // Progress frame's main window
34};
35
36class ProgressFrame : public QFrame
37{
38 Q_OBJECT
39
40public:
41 explicit ProgressFrame(QWidget *parent = 0);
43
44#ifdef QWINTASKBARPROGRESS_H
45 void enableTaskbarUpdates(bool enable = true) { update_taskbar_ = enable; }
46#endif
47 static void addToButtonBox(QDialogButtonBox *button_box, QObject *main_window);
48 void captureFileClosing();
49
50public slots:
51 struct progdlg *showProgress(const QString &title, bool animate, bool terminate_is_stop, bool *stop_flag, int value = 0);
52 struct progdlg *showBusy(bool animate, bool terminate_is_stop, bool *stop_flag);
53 void setValue(int value);
54 void hide();
55
56signals:
57 void showRequested(bool animate, bool terminate_is_stop, bool *stop_flag);
58 void valueChanged(int value);
59 void maximumValueChanged(int value);
60 void setHidden();
61 void stopLoading();
62
63protected:
64 void timerEvent(QTimerEvent *event);
65
66private:
67 Ui::ProgressFrame *ui;
68
69 struct progdlg progress_dialog_;
70 QString message_;
71 QString status_;
72 bool terminate_is_stop_;
73 bool *stop_flag_;
74 int show_timer_;
75 QGraphicsOpacityEffect *effect_;
76 QPropertyAnimation *animation_;
77#ifdef QWINTASKBARPROGRESS_H
78 bool update_taskbar_;
79 QWinTaskbarProgress *taskbar_progress_;
80#endif
81
82private slots:
83 void on_stopButton_clicked();
84
85 void show(bool animate, bool terminate_is_stop, bool *stop_flag);
86 void setMaximumValue(int value);
87};
88
89#endif // PROGRESS_FRAME_H
Definition progress_frame.h:37
Definition progress_frame.h:31