3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef PROGRESS_FRAME_H
11 #define PROGRESS_FRAME_H
19 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && defined(Q_OS_WIN)
20 #include <QWinTaskbarButton>
21 #include <QWinTaskbarProgress>
25 class QDialogButtonBox
;
27 class QGraphicsOpacityEffect
;
28 class QPropertyAnimation
;
30 // Define the structure describing a progress dialog.
32 ProgressFrame
*progress_frame
; // This progress frame
33 QWidget
*top_level_window
; // Progress frame's main window
36 class ProgressFrame
: public QFrame
41 explicit ProgressFrame(QWidget
*parent
= 0);
44 #ifdef QWINTASKBARPROGRESS_H
45 void enableTaskbarUpdates(bool enable
= true) { update_taskbar_
= enable
; }
47 static void addToButtonBox(QDialogButtonBox
*button_box
, QObject
*main_window
);
48 void captureFileClosing();
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
);
57 void showRequested(bool animate
, bool terminate_is_stop
, bool *stop_flag
);
58 void valueChanged(int value
);
59 void maximumValueChanged(int value
);
64 void timerEvent(QTimerEvent
*event
);
67 Ui::ProgressFrame
*ui
;
69 struct progdlg progress_dialog_
;
72 bool terminate_is_stop_
;
75 QGraphicsOpacityEffect
*effect_
;
76 QPropertyAnimation
*animation_
;
77 #ifdef QWINTASKBARPROGRESS_H
79 QWinTaskbarProgress
*taskbar_progress_
;
83 void on_stopButton_clicked();
85 void show(bool animate
, bool terminate_is_stop
, bool *stop_flag
);
86 void setMaximumValue(int value
);
89 #endif // PROGRESS_FRAME_H