DataModel for tap user data.
More...
#include <atap_data_model.h>
|
enum | {
DISPLAY_FILTER = Qt::UserRole
, UNFORMATTED_DISPLAYDATA
, TIMELINE_DATA
, ENDPOINT_DATATYPE
,
PROTO_ID
, CONVERSATION_ID
, ROW_IS_FILTERED
, DATA_ADDRESS_TYPE
,
DATA_IPV4_INTEGER
, DATA_IPV6_LIST
} |
|
enum | dataModelType { DATAMODEL_ENDPOINT
, DATAMODEL_CONVERSATION
, DATAMODEL_UNKNOWN
} |
|
|
void | tapListenerChanged (bool enable) |
|
|
| ATapDataModel (dataModelType type, int protoId, QString filter, QObject *parent=nullptr) |
| Construct a new ATapDataModel object.
|
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| Number of rows under the given parent in this model, which is the total number of rows for the empty QModelIndex, and 0 for any valid parent index (as no row has children; this is a flat table.)
|
|
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const =0 |
|
virtual QVariant | headerData (int section, Qt::Orientation orientation=Qt::Horizontal, int role=Qt::DisplayRole) const =0 |
|
virtual QVariant | data (const QModelIndex &idx, int role=Qt::DisplayRole) const =0 |
|
QString | tap () const |
| Returns the name for the tap being used.
|
|
int | protoId () const |
| The protocol id for the tap.
|
|
void | setFilter (QString filter) |
| Set the filter string.
|
|
QString | filter () const |
| Return a filter set for the model.
|
|
bool | resolveNames () const |
| Is the model set to resolve names in address and ports columns.
|
|
void | setResolveNames (bool resolve) |
| Enable or disable if names should be resolved.
|
|
bool | allowsNameResolution () const |
| Does the model allow names to be resolved.
|
|
void | useAbsoluteTime (bool absolute) |
| Use absolute time for any column supporting it.
|
|
void | useNanosecondTimestamps (bool nanoseconds) |
| Use nanosecond timestamps if requested.
|
|
bool | portsAreHidden () const |
| Are ports hidden for this model.
|
|
bool | showTotalColumn () const |
| A total column is filled.
|
|
bool | enableTap () |
| Enable tapping in this model.
|
|
void | disableTap () |
| Disable the tapping for this model.
|
|
dataModelType | modelType () const |
| Return the model type.
|
|
conv_hash_t * | hash () |
|
void | updateFlags (unsigned flag) |
| Update the flags.
|
|
|
virtual tap_packet_cb | conversationPacketHandler () |
|
void | resetData () |
|
void | updateData (GArray *data) |
|
register_ct_t * | registerTable () const |
|
|
static void | tapReset (void *tapdata) |
|
static void | tapDraw (void *tap_data) |
|
|
dataModelType | _type |
|
GArray * | storage_ |
|
QString | _filter |
|
bool | _absoluteTime |
|
bool | _nanoseconds |
|
bool | _resolveNames |
|
bool | _disableTap |
|
double | _minRelStartTime |
|
double | _maxRelStopTime |
|
unsigned | _tapFlags |
|
DataModel for tap user data.
This datamodel provides the management for all tap data for the conversation and endpoint dialogs. It predominantly is implemented to work with conversation tap data. The management of displaying and correctly presenting the information is done in the corresponding type classes
- See also
- EndpointDataModel
-
ConversationDataModel
◆ ATapDataModel()
ATapDataModel::ATapDataModel |
( |
dataModelType |
type, |
|
|
int |
protoId, |
|
|
QString |
filter, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
Construct a new ATapDataModel object.
The tap will not be created automatically, but must be enabled by calling enableTap
- Parameters
-
type | an element of dataModelType. Either DATAMODEL_ENDPOINT or DATAMODEL_CONVERSATION are supported at this time |
protoId | the protocol id for which the tap is created |
filter | a potential filter to be used for the tap |
parent | the parent for the class |
- See also
- enableTap
◆ allowsNameResolution()
bool ATapDataModel::allowsNameResolution |
( |
| ) |
const |
Does the model allow names to be resolved.
- Returns
- true yes, names may be resolved (set via setResolveNames)
-
false no, they won't be resolved
- See also
- setResolveNames
-
resolveNames
◆ enableTap()
bool ATapDataModel::enableTap |
( |
| ) |
|
Enable tapping in this model.
This will register the tap listener with the corresponding packet function.
- Note
- if the tap has not been disabled, this method will do nothing
- Returns
- true the tap has been enabled
-
false the tap has not been enabled
◆ filter()
QString ATapDataModel::filter |
( |
| ) |
const |
Return a filter set for the model.
- Returns
- QString the filter string for the model
◆ modelType()
ATapDataModel::dataModelType ATapDataModel::modelType |
( |
| ) |
const |
Return the model type.
- Returns
- dataModelType
◆ portsAreHidden()
bool ATapDataModel::portsAreHidden |
( |
| ) |
const |
Are ports hidden for this model.
- Returns
- true the ports are hidden
-
false the ports are not hidden
◆ protoId()
int ATapDataModel::protoId |
( |
| ) |
const |
The protocol id for the tap.
- Returns
- int the id given in the constructor
◆ resolveNames()
bool ATapDataModel::resolveNames |
( |
| ) |
const |
Is the model set to resolve names in address and ports columns.
- Returns
- true yes, names will be resolved
-
false no they won't
◆ rowCount()
int ATapDataModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
Number of rows under the given parent in this model, which is the total number of rows for the empty QModelIndex, and 0 for any valid parent index (as no row has children; this is a flat table.)
- Parameters
-
parent | index of parent, QModelIndex() for the root |
- Returns
- int the number of rows under the parent
◆ setFilter()
void ATapDataModel::setFilter |
( |
QString |
filter | ) |
|
Set the filter string.
A set filter can be reset by providing an empty string
- Parameters
-
filter | the filter for the tap |
◆ setResolveNames()
void ATapDataModel::setResolveNames |
( |
bool |
resolve | ) |
|
Enable or disable if names should be resolved.
- Parameters
-
resolve | true if names should be resolved |
◆ showTotalColumn()
bool ATapDataModel::showTotalColumn |
( |
| ) |
const |
A total column is filled.
- Returns
- true if the column is filled
-
false the column is empty
◆ tap()
QString ATapDataModel::tap |
( |
| ) |
const |
Returns the name for the tap being used.
- Returns
- QString the tap name, normally identical with the protocol name
◆ useAbsoluteTime()
void ATapDataModel::useAbsoluteTime |
( |
bool |
absolute | ) |
|
Use absolute time for any column supporting it.
- Parameters
-
absolute | true to use absolute time values |
◆ useNanosecondTimestamps()
void ATapDataModel::useNanosecondTimestamps |
( |
bool |
nanoseconds | ) |
|
Use nanosecond timestamps if requested.
- Parameters
-
nanoseconds | use nanosecond timestamps if required and requested |
The documentation for this class was generated from the following files: