2012-07-19 21:49:52 +00:00
|
|
|
/* main_status_bar.h
|
2012-01-04 22:13:01 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2012-01-04 22:13:01 +00:00
|
|
|
*/
|
|
|
|
|
2012-07-19 21:49:52 +00:00
|
|
|
#ifndef MAIN_STATUS_BAR_H
|
|
|
|
#define MAIN_STATUS_BAR_H
|
2012-01-14 00:16:16 +00:00
|
|
|
|
2015-06-19 23:56:44 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "cfile.h"
|
|
|
|
|
2021-03-24 22:09:19 +00:00
|
|
|
#include "capture/capture_session.h"
|
2015-06-19 23:56:44 +00:00
|
|
|
|
2017-10-30 12:58:28 +00:00
|
|
|
#include <ui/qt/utils/field_information.h>
|
2017-07-05 14:56:45 +00:00
|
|
|
#include <ui/qt/widgets/label_stack.h>
|
2018-01-04 14:55:33 +00:00
|
|
|
#include <ui/qt/widgets/clickable_label.h>
|
2015-07-17 22:06:55 +00:00
|
|
|
#include "progress_frame.h"
|
2015-06-19 23:56:44 +00:00
|
|
|
#include "wireshark_application.h"
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2012-07-31 20:00:25 +00:00
|
|
|
#include <QLabel>
|
2012-12-30 19:33:05 +00:00
|
|
|
#include <QMenu>
|
2014-11-12 22:24:16 +00:00
|
|
|
#include <QStatusBar>
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2015-05-22 22:33:38 +00:00
|
|
|
class CaptureFile;
|
2015-10-14 22:29:04 +00:00
|
|
|
class QToolButton;
|
2015-05-22 22:33:38 +00:00
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
class MainStatusBar : public QStatusBar
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit MainStatusBar(QWidget *parent = 0);
|
2012-07-31 20:00:25 +00:00
|
|
|
void showExpert();
|
2015-08-28 19:57:57 +00:00
|
|
|
void captureFileClosing();
|
2012-12-17 23:03:21 +00:00
|
|
|
void expertUpdate();
|
2015-05-22 22:33:38 +00:00
|
|
|
void setFileName(CaptureFile &cf);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2015-07-08 23:48:58 +00:00
|
|
|
protected:
|
2019-11-12 13:27:38 +00:00
|
|
|
|
|
|
|
enum StatusContext {
|
|
|
|
STATUS_CTX_MAIN,
|
|
|
|
STATUS_CTX_FILE,
|
|
|
|
STATUS_CTX_FIELD,
|
|
|
|
STATUS_CTX_BYTE,
|
|
|
|
STATUS_CTX_FILTER,
|
|
|
|
STATUS_CTX_PROGRESS,
|
|
|
|
STATUS_CTX_TEMPORARY
|
|
|
|
};
|
|
|
|
|
2015-07-08 23:48:58 +00:00
|
|
|
virtual void changeEvent(QEvent* event);
|
|
|
|
|
2012-01-14 00:16:16 +00:00
|
|
|
private:
|
2015-10-14 22:29:04 +00:00
|
|
|
QToolButton *expert_button_;
|
|
|
|
QToolButton *comment_button_;
|
2012-11-05 20:13:06 +00:00
|
|
|
LabelStack info_status_;
|
2015-07-17 22:06:55 +00:00
|
|
|
ProgressFrame progress_frame_;
|
2012-11-05 20:13:06 +00:00
|
|
|
LabelStack packet_status_;
|
2018-01-04 14:55:33 +00:00
|
|
|
ClickableLabel profile_status_;
|
2015-02-13 04:13:09 +00:00
|
|
|
capture_file *cap_file_;
|
2015-07-08 23:48:58 +00:00
|
|
|
QString ready_msg_;
|
|
|
|
|
|
|
|
// Capture statistics
|
|
|
|
bool cs_fixed_;
|
|
|
|
guint32 cs_count_;
|
|
|
|
|
|
|
|
void showCaptureStatistics();
|
2012-01-14 00:16:16 +00:00
|
|
|
|
2019-11-12 13:27:38 +00:00
|
|
|
void pushGenericStatus(StatusContext status, const QString &message, const QString &messagetip = QString());
|
|
|
|
void popGenericStatus(StatusContext status);
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
signals:
|
2015-03-11 22:22:20 +00:00
|
|
|
void showExpertInfo();
|
2014-11-12 22:24:16 +00:00
|
|
|
void editCaptureComment();
|
2015-06-19 23:56:44 +00:00
|
|
|
void stopLoading();
|
2014-11-12 22:24:16 +00:00
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
public slots:
|
2015-02-13 04:13:09 +00:00
|
|
|
void setCaptureFile(capture_file *cf);
|
2017-10-30 12:58:28 +00:00
|
|
|
void selectedFieldChanged(FieldInformation *);
|
|
|
|
void highlightedFieldChanged(FieldInformation *);
|
2019-11-21 09:50:41 +00:00
|
|
|
void selectedFrameChanged(QList<int>);
|
2015-08-27 00:14:39 +00:00
|
|
|
|
2015-02-13 04:13:09 +00:00
|
|
|
void updateCaptureStatistics(capture_session * cap_session);
|
2015-04-06 21:56:17 +00:00
|
|
|
void updateCaptureFixedStatistics(capture_session * cap_session);
|
2012-12-30 19:33:05 +00:00
|
|
|
|
2018-03-28 08:04:50 +00:00
|
|
|
void captureEventHandler(CaptureEvent ev);
|
2017-12-22 12:58:02 +00:00
|
|
|
|
2012-12-30 19:33:05 +00:00
|
|
|
private slots:
|
2019-11-21 09:50:41 +00:00
|
|
|
void appInitialized();
|
2012-11-30 23:14:53 +00:00
|
|
|
void toggleBackground(bool enabled);
|
2018-01-04 14:55:33 +00:00
|
|
|
void setProfileName();
|
2012-12-30 19:33:05 +00:00
|
|
|
void switchToProfile();
|
|
|
|
void manageProfile();
|
|
|
|
void showProfileMenu(const QPoint &global_pos, Qt::MouseButton button);
|
2019-11-12 13:27:38 +00:00
|
|
|
|
|
|
|
friend WiresharkApplication;
|
2012-01-04 22:13:01 +00:00
|
|
|
};
|
|
|
|
|
2012-07-19 21:49:52 +00:00
|
|
|
#endif // MAIN_STATUS_BAR_H
|