2013-10-24 22:52:30 +00:00
|
|
|
/* sequence_dialog.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SEQUENCE_DIALOG_H
|
|
|
|
#define SEQUENCE_DIALOG_H
|
|
|
|
|
2015-04-26 17:21:09 +00:00
|
|
|
#include <config.h>
|
2013-10-24 22:52:30 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include "cfile.h"
|
|
|
|
|
|
|
|
#include "epan/packet.h"
|
|
|
|
|
2014-11-19 00:21:42 +00:00
|
|
|
#include "ui/tap-sequence-analysis.h"
|
|
|
|
|
|
|
|
#include "qcustomplot.h"
|
2014-12-29 19:42:01 +00:00
|
|
|
#include "wireshark_dialog.h"
|
2013-10-24 22:52:30 +00:00
|
|
|
|
2013-11-12 01:08:08 +00:00
|
|
|
#include <QMenu>
|
2013-10-24 22:52:30 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SequenceDialog;
|
|
|
|
}
|
|
|
|
|
2014-11-19 00:21:42 +00:00
|
|
|
class SequenceDiagram;
|
|
|
|
|
2015-11-15 21:57:43 +00:00
|
|
|
class SequenceInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SequenceInfo(seq_analysis_info_t *sainfo = NULL);
|
|
|
|
seq_analysis_info_t * sainfo() { return sainfo_;}
|
|
|
|
void ref() { count_++; }
|
|
|
|
void unref() { if (--count_ == 0) delete this; }
|
|
|
|
private:
|
|
|
|
~SequenceInfo();
|
|
|
|
seq_analysis_info_t *sainfo_;
|
|
|
|
unsigned int count_;
|
|
|
|
};
|
|
|
|
|
2014-12-29 19:42:01 +00:00
|
|
|
class SequenceDialog : public WiresharkDialog
|
2013-10-24 22:52:30 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2013-10-24 22:52:30 +00:00
|
|
|
public:
|
2015-11-15 21:57:43 +00:00
|
|
|
explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL);
|
2013-10-24 22:52:30 +00:00
|
|
|
~SequenceDialog();
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2013-10-24 22:52:30 +00:00
|
|
|
signals:
|
|
|
|
void goToPacket(int packet_num);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
2013-11-12 01:08:08 +00:00
|
|
|
void keyPressEvent(QKeyEvent *event);
|
2013-10-24 22:52:30 +00:00
|
|
|
|
|
|
|
private slots:
|
2014-12-29 19:42:01 +00:00
|
|
|
void updateWidgets();
|
2013-10-25 23:16:56 +00:00
|
|
|
void hScrollBarChanged(int value);
|
|
|
|
void vScrollBarChanged(int value);
|
|
|
|
void xAxisChanged(QCPRange range);
|
|
|
|
void yAxisChanged(QCPRange range);
|
|
|
|
void diagramClicked(QMouseEvent *event);
|
|
|
|
void mouseMoved(QMouseEvent *event);
|
2016-05-25 19:02:40 +00:00
|
|
|
void mouseWheeled(QWheelEvent *event);
|
2013-10-25 23:16:56 +00:00
|
|
|
|
2015-11-17 01:13:23 +00:00
|
|
|
void fillDiagram();
|
|
|
|
|
2013-11-12 01:08:08 +00:00
|
|
|
void on_buttonBox_accepted();
|
2013-10-24 22:52:30 +00:00
|
|
|
void on_resetButton_clicked();
|
2013-10-25 23:16:56 +00:00
|
|
|
void on_actionGoToPacket_triggered();
|
2016-05-25 19:02:40 +00:00
|
|
|
void on_actionGoToNextPacket_triggered() { goToAdjacentPacket(true); }
|
|
|
|
void on_actionGoToPreviousPacket_triggered() { goToAdjacentPacket(false); }
|
2015-11-17 01:13:23 +00:00
|
|
|
void on_showComboBox_activated(int index);
|
|
|
|
void on_flowComboBox_activated(int index);
|
|
|
|
void on_addressComboBox_activated(int index);
|
2013-11-12 01:08:08 +00:00
|
|
|
void on_actionReset_triggered();
|
|
|
|
void on_actionMoveRight10_triggered();
|
|
|
|
void on_actionMoveLeft10_triggered();
|
|
|
|
void on_actionMoveUp10_triggered();
|
|
|
|
void on_actionMoveDown10_triggered();
|
|
|
|
void on_actionMoveRight1_triggered();
|
|
|
|
void on_actionMoveLeft1_triggered();
|
|
|
|
void on_actionMoveUp1_triggered();
|
|
|
|
void on_actionMoveDown1_triggered();
|
2016-06-05 21:33:06 +00:00
|
|
|
void on_actionZoomIn_triggered();
|
|
|
|
void on_actionZoomOut_triggered();
|
2013-11-11 22:00:48 +00:00
|
|
|
|
2013-10-24 22:52:30 +00:00
|
|
|
private:
|
|
|
|
Ui::SequenceDialog *ui;
|
|
|
|
SequenceDiagram *seq_diagram_;
|
2015-11-15 21:57:43 +00:00
|
|
|
SequenceInfo *info_;
|
2013-10-25 23:16:56 +00:00
|
|
|
int num_items_;
|
|
|
|
guint32 packet_num_;
|
2013-10-24 22:52:30 +00:00
|
|
|
double one_em_;
|
2016-05-19 02:21:02 +00:00
|
|
|
int sequence_w_;
|
2013-11-12 01:08:08 +00:00
|
|
|
QMenu ctx_menu_;
|
2016-05-19 02:21:02 +00:00
|
|
|
QCPItemText *key_text_;
|
|
|
|
QCPItemText *comment_text_;
|
2013-10-24 22:52:30 +00:00
|
|
|
|
2016-06-05 21:33:06 +00:00
|
|
|
void zoomXAxis(bool in);
|
2013-11-12 01:08:08 +00:00
|
|
|
void panAxes(int x_pixels, int y_pixels);
|
2013-10-24 22:52:30 +00:00
|
|
|
void resetAxes(bool keep_lower = false);
|
2016-05-25 19:02:40 +00:00
|
|
|
void goToAdjacentPacket(bool next);
|
2013-10-24 22:52:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SEQUENCE_DIALOG_H
|
2013-11-14 17:37:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|