00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef PACKETVIEW_H
00017 #define PACKETVIEW_H
00018
00019 #include <qlist.h>
00020 #include <qframe.h>
00021
00022 #include <opie2/opcap.h>
00023
00024 class QWidget;
00025 class QLabel;
00026 class QString;
00027 class QSpinBox;
00028 class QTextView;
00029 class QObjectList;
00030 namespace Opie {namespace Net {class OPacket;}}
00031 namespace Opie {namespace Ui {class OListView;}}
00032
00033 class PacketView: public QFrame
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 PacketView( QWidget * parent = 0, const char * name = "PacketView", WFlags f = 0 );
00039
00040 void add( const Opie::Net::OPacket* p, int size );
00041 const QString getLog() const;
00042 void clear();
00043
00044 public slots:
00045 void showPacket( int number );
00046 void activated( QWidget* );
00047
00048 protected:
00049 QSpinBox* _number;
00050 QLabel* _label;
00051 Opie::Ui::OListView* _list;
00052 QTextView* _hex;
00053 QList<const Opie::Net::OPacket> _packets;
00054
00055 protected:
00056 void _doSubPackets( QObjectList*, int );
00057 void _doHexPacket( const Opie::Net::OPacket* );
00058
00059 };
00060
00061 #endif
00062