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
TariffListViewDelegate Class Reference

#include <TariffListViewDelegate.h>

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

Classes

class  DataClass
 

Public Types

enum  DataRole {
  TariffName = Qt::UserRole + 100, TariffHasAssignedHotKey, TariffHasAssignedHotKeyChipCard, TariffNumber,
  TariffNumberFilter, TariffFromSubstituteTariffGroup, FontSize
}
 

Signals

void OnLongPress (int tariffIndex)
 OnLongPress - this signal is emitted when mouse is pressed on some item for long enough time (see LONG_PRESS_TIME_MS in .cpp) More...
 
void PressedReleasedStateChanged (bool isPressed)
 

Public Member Functions

 TariffListViewDelegate ()
 
virtual ~TariffListViewDelegate ()
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 

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
TariffName 
TariffHasAssignedHotKey 
TariffHasAssignedHotKeyChipCard 
TariffNumber 
TariffNumberFilter 
TariffFromSubstituteTariffGroup 
FontSize 

Constructor & Destructor Documentation

TariffListViewDelegate::TariffListViewDelegate ( )
TariffListViewDelegate::~TariffListViewDelegate ( )
virtual

Member Function Documentation

bool TariffListViewDelegate::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 TariffListViewDelegate::eventFilter ( QObject *  object,
QEvent *  event 
)
protected
void TariffListViewDelegate::OnLongPress ( int  tariffIndex)
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
tariffIndex- tariffIndex of clicked tariff

Here is the caller graph for this function:

void TariffListViewDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Here is the call graph for this function:

void TariffListViewDelegate::PressedReleasedStateChanged ( bool  isPressed)
signal

Here is the caller graph for this function:


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