Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Signals | Public Member Functions | Protected Member Functions | List of all members
TripVisualisationBusStopListViewDelegate Class Reference

#include <TripVisualisationBusStopListViewDelegate.h>

Inheritance diagram for TripVisualisationBusStopListViewDelegate:
Inheritance graph
[legend]
Collaboration diagram for TripVisualisationBusStopListViewDelegate:
Collaboration graph
[legend]

Classes

class  DataClass
 

Public Types

enum  DataRole {
  TariffNumber = Qt::UserRole + 100, Name, TripBusStopIndex, ArrivalTime,
  PassengersGettingOut, Enabled
}
 

Signals

void OnLongPress (unsigned long tripBusStopIndex)
 OnLongPress - this signal is emitted when mouse is pressed on some item for long enough time (see LONG_PRESS_TIME_MS in .cpp) More...
 

Public Member Functions

 TripVisualisationBusStopListViewDelegate ()
 
virtual ~TripVisualisationBusStopListViewDelegate ()
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 paint - draws one item to painter More...
 

Protected Member Functions

bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
 editorEvent - handles events on listView items More...
 
bool eventFilter (QObject *object, QEvent *event)
 

Member Enumeration Documentation

Enumerator
TariffNumber 
Name 
TripBusStopIndex 
ArrivalTime 
PassengersGettingOut 
Enabled 

Constructor & Destructor Documentation

TripVisualisationBusStopListViewDelegate::TripVisualisationBusStopListViewDelegate ( )
TripVisualisationBusStopListViewDelegate::~TripVisualisationBusStopListViewDelegate ( )
virtual

Member Function Documentation

bool TripVisualisationBusStopListViewDelegate::editorEvent ( QEvent *  event,
QAbstractItemModel *  model,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
)
protected

editorEvent - handles events on listView items

Note
Only two events (mouse click, mouse release) are handled (both are required for detecting long mouse click - aka. TapAndHoldGesture).
Returns
true if event was handled, false otherwise
bool TripVisualisationBusStopListViewDelegate::eventFilter ( QObject *  object,
QEvent *  event 
)
protected
void TripVisualisationBusStopListViewDelegate::OnLongPress ( unsigned long  tripBusStopIndex)
signal

OnLongPress - this signal is emitted when mouse is pressed on some item for long enough time (see LONG_PRESS_TIME_MS in .cpp)

Parameters
tripBusStopIndex- tripBusStopIndex of clicked bus stop
void TripVisualisationBusStopListViewDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

paint - draws one item to painter

Here is the call graph for this function:


The documentation for this class was generated from the following files: