Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
main_status_bar.h
1 /* main_status_bar.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef MAIN_STATUS_BAR_H
11 #define MAIN_STATUS_BAR_H
12 
13 #include "config.h"
14 
15 #include "cfile.h"
16 
17 #include "capchild/capture_session.h"
18 
19 #include <ui/qt/utils/field_information.h>
20 #include <ui/qt/widgets/label_stack.h>
21 #include <ui/qt/widgets/clickable_label.h>
22 #include "progress_frame.h"
23 #include "wireshark_application.h"
24 
25 #include <QLabel>
26 #include <QMenu>
27 #include <QStatusBar>
28 
29 class CaptureFile;
30 class QToolButton;
31 
32 class MainStatusBar : public QStatusBar
33 {
34  Q_OBJECT
35 public:
36  explicit MainStatusBar(QWidget *parent = 0);
37  void showExpert();
38  void captureFileClosing();
39  void expertUpdate();
40  void setFileName(CaptureFile &cf);
41 
42 protected:
43  virtual void changeEvent(QEvent* event);
44 
45 private:
46  QToolButton *expert_button_;
47  QToolButton *comment_button_;
48  LabelStack info_status_;
49  ProgressFrame progress_frame_;
50  LabelStack packet_status_;
51  ClickableLabel profile_status_;
52  capture_file *cap_file_;
53  QString ready_msg_;
54 
55  // Capture statistics
56  bool cs_fixed_;
57  guint32 cs_count_;
58 
59  void showCaptureStatistics();
60 
61 signals:
62  void showExpertInfo();
63  void editCaptureComment();
64  void stopLoading();
65 
66 public slots:
67  void setCaptureFile(capture_file *cf);
68  void selectedFieldChanged(FieldInformation *);
69  void highlightedFieldChanged(FieldInformation *);
70  void pushTemporaryStatus(const QString &message);
71  void popTemporaryStatus();
72  void pushFileStatus(const QString &message, const QString &messagetip = QString());
73  void popFileStatus();
74  void pushFieldStatus(const QString &message);
75  void popFieldStatus();
76  void pushByteStatus(const QString &message);
77  void popByteStatus();
78  void pushFilterStatus(const QString &message);
79  void popFilterStatus();
80  void pushBusyStatus(const QString &message, const QString &messagetip = QString());
81  void popBusyStatus();
82  void pushProgressStatus(const QString &message, bool animate, bool terminate_is_stop = false, gboolean *stop_flag = NULL);
83  void updateProgressStatus(int value);
84  void popProgressStatus();
85  void selectedFrameChanged(int);
86 
87  void updateCaptureStatistics(capture_session * cap_session);
88  void updateCaptureFixedStatistics(capture_session * cap_session);
89 
90  void captureEventHandler(CaptureEvent ev);
91 
92 private slots:
93  void pushPacketStatus(const QString &message);
94  void popPacketStatus();
95 
96  void toggleBackground(bool enabled);
97  void setProfileName();
98  void switchToProfile();
99  void manageProfile();
100  void showProfileMenu(const QPoint &global_pos, Qt::MouseButton button);
101 };
102 
103 #endif // MAIN_STATUS_BAR_H
104 
105 /*
106  * Editor modelines
107  *
108  * Local Variables:
109  * c-basic-offset: 4
110  * tab-width: 8
111  * indent-tabs-mode: nil
112  * End:
113  *
114  * ex: set shiftwidth=4 tabstop=8 expandtab:
115  * :indentSize=4:tabSize=8:noTabs=true:
116  */
Definition: field_information.h:21
Definition: clickable_label.h:17
Definition: main_status_bar.h:32
Definition: capture_event.h:19
Definition: progress_frame.h:38
Definition: label_stack.h:18
Definition: cfile.h:58
Definition: capture_file.h:22
Definition: capture_session.h:63