QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QgsDataItem Class Reference

base class for all items in the model More...

#include <qgsdataitem.h>

Inheritance diagram for QgsDataItem:
Inheritance graph
[legend]

Public Types

enum  Type {
  Collection, Directory, Layer, Error,
  Favourites
}
 
enum  Capability { NoCapabilities = 0, SetCrs = 1 }
 

Public Slots

void emitBeginInsertItems (QgsDataItem *parent, int first, int last)
 
void emitEndInsertItems ()
 
void emitBeginRemoveItems (QgsDataItem *parent, int first, int last)
 
void emitEndRemoveItems ()
 

Signals

void beginInsertItems (QgsDataItem *parent, int first, int last)
 
void endInsertItems ()
 
void beginRemoveItems (QgsDataItem *parent, int first, int last)
 
void endRemoveItems ()
 

Public Member Functions

 QgsDataItem (QgsDataItem::Type type, QgsDataItem *parent, QString name, QString path)
 
virtual ~QgsDataItem ()
 
bool hasChildren ()
 
int rowCount ()
 
virtual void refresh ()
 
virtual QVector< QgsDataItem * > createChildren ()
 
virtual void populate ()
 
bool isPopulated ()
 
virtual void addChildItem (QgsDataItem *child, bool refresh=false)
 
virtual void deleteChildItem (QgsDataItem *child)
 
virtual QgsDataItemremoveChildItem (QgsDataItem *child)
 
virtual bool equal (const QgsDataItem *other)
 
virtual QWidget * paramWidget ()
 
virtual QList< QAction * > actions ()
 
virtual bool acceptDrop ()
 
virtual bool handleDrop (const QMimeData *, Qt::DropAction)
 
virtual bool setCrs (QgsCoordinateReferenceSystem crs)
 
virtual Capability capabilities ()
 
Type type () const
 
QgsDataItemparent () const
 
void setParent (QgsDataItem *parent)
 
QVector< QgsDataItem * > children () const
 
QIcon icon () const
 
QString name () const
 
QString path () const
 
void setIcon (QIcon icon)
 
void setToolTip (QString msg)
 
QString toolTip () const
 

Static Public Member Functions

static int findItem (QVector< QgsDataItem * > items, QgsDataItem *item)
 

Protected Attributes

Type mType
 
QgsDataItemmParent
 
QVector< QgsDataItem * > mChildren
 
bool mPopulated
 
QString mName
 
QString mPath
 
QString mToolTip
 
QIcon mIcon
 

Detailed Description

base class for all items in the model

Member Enumeration Documentation

Enumerator
NoCapabilities 
SetCrs 
Enumerator
Collection 
Directory 
Layer 
Error 
Favourites 

Constructor & Destructor Documentation

QgsDataItem::QgsDataItem ( QgsDataItem::Type  type,
QgsDataItem parent,
QString  name,
QString  path 
)
QgsDataItem::~QgsDataItem ( )
virtual

Member Function Documentation

virtual bool QgsDataItem::acceptDrop ( )
inlinevirtual
virtual QList<QAction*> QgsDataItem::actions ( )
inlinevirtual
void QgsDataItem::addChildItem ( QgsDataItem child,
bool  refresh = false 
)
virtual
void QgsDataItem::beginInsertItems ( QgsDataItem parent,
int  first,
int  last 
)
signal
void QgsDataItem::beginRemoveItems ( QgsDataItem parent,
int  first,
int  last 
)
signal
virtual Capability QgsDataItem::capabilities ( )
inlinevirtual
QVector<QgsDataItem*> QgsDataItem::children ( ) const
inline
QVector< QgsDataItem * > QgsDataItem::createChildren ( )
virtual
void QgsDataItem::deleteChildItem ( QgsDataItem child)
virtual
void QgsDataItem::emitBeginInsertItems ( QgsDataItem parent,
int  first,
int  last 
)
slot
void QgsDataItem::emitBeginRemoveItems ( QgsDataItem parent,
int  first,
int  last 
)
slot
void QgsDataItem::emitEndInsertItems ( )
slot
void QgsDataItem::emitEndRemoveItems ( )
slot
void QgsDataItem::endInsertItems ( )
signal
void QgsDataItem::endRemoveItems ( )
signal
bool QgsDataItem::equal ( const QgsDataItem other)
virtual

Reimplemented in QgsDirectoryItem, and QgsLayerItem.

int QgsDataItem::findItem ( QVector< QgsDataItem * >  items,
QgsDataItem item 
)
static
virtual bool QgsDataItem::handleDrop ( const QMimeData *  ,
Qt::DropAction   
)
inlinevirtual
bool QgsDataItem::hasChildren ( )
QIcon QgsDataItem::icon ( ) const
inline
bool QgsDataItem::isPopulated ( )
inline
QString QgsDataItem::name ( ) const
inline
virtual QWidget* QgsDataItem::paramWidget ( )
inlinevirtual

Reimplemented in QgsDirectoryItem.

QgsDataItem* QgsDataItem::parent ( ) const
inline
QString QgsDataItem::path ( ) const
inline
void QgsDataItem::populate ( )
virtual
void QgsDataItem::refresh ( )
virtual
QgsDataItem * QgsDataItem::removeChildItem ( QgsDataItem child)
virtual
int QgsDataItem::rowCount ( )
virtual bool QgsDataItem::setCrs ( QgsCoordinateReferenceSystem  crs)
inlinevirtual
void QgsDataItem::setIcon ( QIcon  icon)
inline
void QgsDataItem::setParent ( QgsDataItem parent)
inline
void QgsDataItem::setToolTip ( QString  msg)
inline
QString QgsDataItem::toolTip ( ) const
inline
Type QgsDataItem::type ( ) const
inline

Member Data Documentation

QVector<QgsDataItem*> QgsDataItem::mChildren
protected
QIcon QgsDataItem::mIcon
protected
QString QgsDataItem::mName
protected
QgsDataItem* QgsDataItem::mParent
protected
QString QgsDataItem::mPath
protected
bool QgsDataItem::mPopulated
protected
QString QgsDataItem::mToolTip
protected
Type QgsDataItem::mType
protected

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