2012-01-04 22:13:01 +00:00
|
|
|
/* packet_list.h
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* 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
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2012-01-04 22:13:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PACKET_LIST_H
|
|
|
|
#define PACKET_LIST_H
|
|
|
|
|
|
|
|
#include "packet_list_model.h"
|
2012-01-14 00:16:16 +00:00
|
|
|
#include "proto_tree.h"
|
2012-01-04 22:13:01 +00:00
|
|
|
#include "byte_view_tab.h"
|
|
|
|
|
|
|
|
#include <QTreeView>
|
|
|
|
#include <QTreeWidget>
|
2012-12-07 01:46:20 +00:00
|
|
|
#include <QMenu>
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
// It might make more sense to subclass QTableView here.
|
|
|
|
class PacketList : public QTreeView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit PacketList(QWidget *parent = 0);
|
|
|
|
PacketListModel *packetListModel() const;
|
2012-08-23 02:59:31 +00:00
|
|
|
void setProtoTree(ProtoTree *proto_tree);
|
2012-01-04 22:13:01 +00:00
|
|
|
void setByteViewTab(ByteViewTab *byteViewTab);
|
2012-08-23 17:29:05 +00:00
|
|
|
void updateAll();
|
2012-01-04 22:13:01 +00:00
|
|
|
void clear();
|
|
|
|
void writeRecent(FILE *rf);
|
2012-12-07 01:46:20 +00:00
|
|
|
bool contextMenuActive();
|
2012-12-07 20:08:00 +00:00
|
|
|
QString &getFilterFromRowAndColumn();
|
2012-12-23 04:37:58 +00:00
|
|
|
QString packetComment();
|
|
|
|
void setPacketComment(QString new_comment);
|
|
|
|
QString allPacketComments();
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void showEvent (QShowEvent *event);
|
|
|
|
void selectionChanged (const QItemSelection & selected, const QItemSelection & deselected);
|
2012-12-07 01:46:20 +00:00
|
|
|
void contextMenuEvent(QContextMenuEvent *event);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
private:
|
2012-08-19 23:52:08 +00:00
|
|
|
PacketListModel *packet_list_model_;
|
|
|
|
ProtoTree *proto_tree_;
|
|
|
|
ByteViewTab *byte_view_tab_;
|
2012-10-30 19:21:24 +00:00
|
|
|
capture_file *cap_file_;
|
2012-12-07 01:46:20 +00:00
|
|
|
QMenu ctx_menu_;
|
|
|
|
QList<QMenu *> submenus_;
|
2012-12-07 20:08:00 +00:00
|
|
|
QList<QAction *> filter_actions_;
|
|
|
|
int ctx_column_;
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2012-12-17 23:03:21 +00:00
|
|
|
void markFramesReady();
|
|
|
|
void setFrameMark(gboolean set, frame_data *fdata);
|
|
|
|
void setFrameIgnore(gboolean set, frame_data *fdata);
|
|
|
|
void setFrameReftime(gboolean set, frame_data *fdata);
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
signals:
|
2013-01-18 00:50:14 +00:00
|
|
|
void packetDissectionChanged();
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
public slots:
|
2012-10-30 19:21:24 +00:00
|
|
|
void setCaptureFile(capture_file *cf);
|
2012-08-14 04:12:56 +00:00
|
|
|
void goNextPacket();
|
|
|
|
void goPreviousPacket();
|
|
|
|
void goFirstPacket();
|
|
|
|
void goLastPacket();
|
2012-08-19 23:52:08 +00:00
|
|
|
void goToPacket(int packet);
|
2012-12-17 23:03:21 +00:00
|
|
|
void markFrame();
|
|
|
|
void markAllDisplayedFrames(bool set);
|
|
|
|
void ignoreFrame();
|
|
|
|
void ignoreAllDisplayedFrames(bool set);
|
|
|
|
void setTimeReference();
|
|
|
|
void unsetAllTimeReferences();
|
2012-01-04 22:13:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PACKET_LIST_H
|
2012-09-04 08:18:31 +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:
|
|
|
|
*/
|