EditDelegate Class Reference

#include <EditedDelegate.h>

Inheritance diagram for EditDelegate:
te::common::Decorator< QStyledItemDelegate >

Public Member Functions

void addEdited (const std::string &lName)
 
void addStashed (const std::string &lName)
 
 EditDelegate (QStyledItemDelegate *decorated, QObject *parent=0)
 
QStyledItemDelegate * findDecorator (QStyledItemDelegate *decorated)
 Returns the Decorator that decorates this item. More...
 
QStyledItemDelegate * getDecorated ()
 Returns the pointer of decorated object. More...
 
bool isStached (const std::string &lName)
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
QStyledItemDelegate * removeDecorator (QStyledItemDelegate *decorated)
 Removes The decorator of the decorated. More...
 
void removeEdited (const std::string &lName)
 
void removeStashed (const std::string &lName)
 
 ~EditDelegate ()
 

Protected Attributes

QStyledItemDelegate * m_decorated
 The object decorated. More...
 
bool m_delDecorated
 If true, also delete decorated pointer. More...
 
std::set< std::string > m_edited
 
QIcon m_memory
 
QIcon m_stash
 
std::set< std::string > m_stashed
 

Detailed Description

Definition at line 38 of file EditedDelegate.h.

Constructor & Destructor Documentation

EditDelegate::EditDelegate ( QStyledItemDelegate *  decorated,
QObject parent = 0 
)

Definition at line 78 of file EditedDelegate.cpp.

References GetIcon(), m_memory, m_stash, and ~EditDelegate().

EditDelegate::~EditDelegate ( )
default

Referenced by EditDelegate().

Member Function Documentation

void EditDelegate::addEdited ( const std::string &  lName)

Definition at line 138 of file EditedDelegate.cpp.

References m_edited, and removeStashed().

Referenced by te::qt::plugins::edit::Plugin::onGeometriesChanged().

void EditDelegate::addStashed ( const std::string &  lName)
QStyledItemDelegate * te::common::Decorator< QStyledItemDelegate >::findDecorator ( QStyledItemDelegate *  decorated)
inherited

Returns the Decorator that decorates this item.

Parameters
decoratedThe decorated item that we are looking for.
Returns
The Decorator we are looking for or this if there's no decorators or 0 if not found.
QStyledItemDelegate * te::common::Decorator< QStyledItemDelegate >::getDecorated ( )
inherited

Returns the pointer of decorated object.

bool EditDelegate::isStached ( const std::string &  lName)
void EditDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
QStyledItemDelegate * te::common::Decorator< QStyledItemDelegate >::removeDecorator ( QStyledItemDelegate *  decorated)
inherited

Removes The decorator of the decorated.

Parameters
decoratedThe item that we are searching for the decorator.
Returns
The new item to be used as new Delegate or NULL.
void EditDelegate::removeEdited ( const std::string &  lName)

Definition at line 144 of file EditedDelegate.cpp.

References m_edited.

Referenced by addStashed().

void EditDelegate::removeStashed ( const std::string &  lName)

Definition at line 133 of file EditedDelegate.cpp.

References m_stashed.

Referenced by addEdited(), and te::qt::plugins::edit::Plugin::onStashedLayer().

Member Data Documentation

bool te::common::Decorator< QStyledItemDelegate >::m_delDecorated
protectedinherited

If true, also delete decorated pointer.

Definition at line 99 of file Decorator.h.

std::set<std::string> EditDelegate::m_edited
protected

Definition at line 63 of file EditedDelegate.h.

Referenced by addEdited(), paint(), and removeEdited().

QIcon EditDelegate::m_memory
protected

Definition at line 66 of file EditedDelegate.h.

Referenced by EditDelegate(), and paint().

QIcon EditDelegate::m_stash
protected

Definition at line 65 of file EditedDelegate.h.

Referenced by EditDelegate(), and paint().

std::set<std::string> EditDelegate::m_stashed
protected

Definition at line 62 of file EditedDelegate.h.

Referenced by addStashed(), isStached(), paint(), and removeStashed().


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