QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QgsCptCityDataItem Class Reference

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

#include <qgscptcityarchive.h>

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

Public Types

enum  Type {
  ColorRamp, Collection, Directory, Selection,
  AllRamps
}

Public Slots

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

Signals

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

Public Member Functions

 QgsCptCityDataItem (QgsCptCityDataItem::Type type, QgsCptCityDataItem *parent, QString name, QString path)
virtual ~QgsCptCityDataItem ()
bool hasChildren ()
int rowCount ()
virtual int leafCount () const
virtual void refresh ()
virtual QVector
< QgsCptCityDataItem * > 
createChildren ()
virtual void populate ()
bool isPopulated ()
virtual void addChildItem (QgsCptCityDataItem *child, bool refresh=false)
virtual void deleteChildItem (QgsCptCityDataItem *child)
virtual QgsCptCityDataItemremoveChildItem (QgsCptCityDataItem *child)
virtual bool equal (const QgsCptCityDataItem *other)
virtual QWidget * paramWidget ()
virtual QList< QAction * > actions ()
virtual bool acceptDrop ()
virtual bool handleDrop (const QMimeData *, Qt::DropAction)
Type type () const
QgsCptCityDataItemparent () const
void setParent (QgsCptCityDataItem *parent)
QVector< QgsCptCityDataItem * > children () const
virtual QIcon icon ()
virtual QIcon icon (const QSize &size)
QString name () const
QString path () const
QString info () const
QString shortInfo () const
void setIcon (QIcon icon)
void setToolTip (QString msg)
QString toolTip () const
bool isValid ()

Static Public Member Functions

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

Protected Attributes

Type mType
QgsCptCityDataItemmParent
QVector< QgsCptCityDataItem * > mChildren
bool mPopulated
QString mName
QString mPath
QString mInfo
QString mShortInfo
QString mToolTip
QIcon mIcon
bool mValid

Detailed Description

base class for all items in the model

Definition at line 84 of file qgscptcityarchive.h.

Member Enumeration Documentation

Enumerator:
ColorRamp 
Collection 
Directory 
Selection 
AllRamps 

Definition at line 88 of file qgscptcityarchive.h.

Constructor & Destructor Documentation

QgsCptCityDataItem::QgsCptCityDataItem ( QgsCptCityDataItem::Type  type,
QgsCptCityDataItem parent,
QString  name,
QString  path 
)

Definition at line 496 of file qgscptcityarchive.cpp.

QgsCptCityDataItem::~QgsCptCityDataItem ( )
virtual

Definition at line 504 of file qgscptcityarchive.cpp.

Member Function Documentation

virtual bool QgsCptCityDataItem::acceptDrop ( )
inlinevirtual

Definition at line 137 of file qgscptcityarchive.h.

virtual QList<QAction*> QgsCptCityDataItem::actions ( )
inlinevirtual

Definition at line 134 of file qgscptcityarchive.h.

void QgsCptCityDataItem::addChildItem ( QgsCptCityDataItem child,
bool  refresh = false 
)
virtual
void QgsCptCityDataItem::beginInsertItems ( QgsCptCityDataItem parent,
int  first,
int  last 
)
signal
void QgsCptCityDataItem::beginRemoveItems ( QgsCptCityDataItem parent,
int  first,
int  last 
)
signal
QVector<QgsCptCityDataItem*> QgsCptCityDataItem::children ( ) const
inline
QVector< QgsCptCityDataItem * > QgsCptCityDataItem::createChildren ( )
virtual

Reimplemented in QgsCptCityAllRampsItem, QgsCptCitySelectionItem, and QgsCptCityDirectoryItem.

Definition at line 526 of file qgscptcityarchive.cpp.

References children().

Referenced by populate(), and refresh().

void QgsCptCityDataItem::deleteChildItem ( QgsCptCityDataItem child)
virtual

Definition at line 620 of file qgscptcityarchive.cpp.

References beginRemoveItems(), endRemoveItems(), and mChildren.

Referenced by refresh().

void QgsCptCityDataItem::emitBeginInsertItems ( QgsCptCityDataItem parent,
int  first,
int  last 
)
slot

Definition at line 509 of file qgscptcityarchive.cpp.

References beginInsertItems().

Referenced by addChildItem(), and removeChildItem().

void QgsCptCityDataItem::emitBeginRemoveItems ( QgsCptCityDataItem parent,
int  first,
int  last 
)
slot

Definition at line 517 of file qgscptcityarchive.cpp.

References beginRemoveItems().

Referenced by addChildItem(), and removeChildItem().

void QgsCptCityDataItem::emitEndInsertItems ( )
slot

Definition at line 513 of file qgscptcityarchive.cpp.

References endInsertItems().

Referenced by addChildItem(), and removeChildItem().

void QgsCptCityDataItem::emitEndRemoveItems ( )
slot

Definition at line 521 of file qgscptcityarchive.cpp.

References endRemoveItems().

Referenced by addChildItem(), and removeChildItem().

void QgsCptCityDataItem::endInsertItems ( )
signal
void QgsCptCityDataItem::endRemoveItems ( )
signal
bool QgsCptCityDataItem::equal ( const QgsCptCityDataItem other)
virtual

Reimplemented in QgsCptCitySelectionItem, QgsCptCityDirectoryItem, and QgsCptCityColorRampItem.

Definition at line 698 of file qgscptcityarchive.cpp.

References mPath, and path().

Referenced by findItem().

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

Definition at line 651 of file qgscptcityarchive.cpp.

References equal().

Referenced by refresh().

virtual bool QgsCptCityDataItem::handleDrop ( const QMimeData *  ,
Qt::DropAction   
)
inlinevirtual

Definition at line 140 of file qgscptcityarchive.h.

bool QgsCptCityDataItem::hasChildren ( )

Definition at line 574 of file qgscptcityarchive.cpp.

References mChildren, and mPopulated.

Referenced by QgsCptCityBrowserModel::hasChildren().

virtual QIcon QgsCptCityDataItem::icon ( )
inlinevirtual

Reimplemented in QgsCptCityColorRampItem.

Definition at line 153 of file qgscptcityarchive.h.

Referenced by QgsCptCityBrowserModel::data().

virtual QIcon QgsCptCityDataItem::icon ( const QSize &  size)
inlinevirtual

Reimplemented in QgsCptCityColorRampItem.

Definition at line 154 of file qgscptcityarchive.h.

References icon().

Referenced by icon().

QString QgsCptCityDataItem::info ( ) const
inline

Definition at line 157 of file qgscptcityarchive.h.

Referenced by QgsCptCityBrowserModel::data().

bool QgsCptCityDataItem::isPopulated ( )
inline

Definition at line 116 of file qgscptcityarchive.h.

Referenced by QgsCptCityBrowserModel::canFetchMore().

bool QgsCptCityDataItem::isValid ( )
inline
int QgsCptCityDataItem::leafCount ( ) const
virtual

Reimplemented in QgsCptCityColorRampItem.

Definition at line 559 of file qgscptcityarchive.cpp.

References leafCount(), mChildren, and mPopulated.

Referenced by leafCount().

QString QgsCptCityDataItem::name ( ) const
inline

Definition at line 155 of file qgscptcityarchive.h.

Referenced by QgsCptCityBrowserModel::data().

virtual QWidget* QgsCptCityDataItem::paramWidget ( )
inlinevirtual

Definition at line 131 of file qgscptcityarchive.h.

QgsCptCityDataItem* QgsCptCityDataItem::parent ( ) const
inline

Definition at line 150 of file qgscptcityarchive.h.

Referenced by QgsCptCityBrowserModel::parent().

QString QgsCptCityDataItem::path ( ) const
inline
void QgsCptCityDataItem::populate ( )
virtual
void QgsCptCityDataItem::refresh ( )
virtual
QgsCptCityDataItem * QgsCptCityDataItem::removeChildItem ( QgsCptCityDataItem child)
virtual
int QgsCptCityDataItem::rowCount ( )

Definition at line 552 of file qgscptcityarchive.cpp.

References mChildren.

Referenced by QgsCptCityBrowserModel::rowCount().

void QgsCptCityDataItem::setIcon ( QIcon  icon)
inline

Definition at line 160 of file qgscptcityarchive.h.

References icon().

void QgsCptCityDataItem::setParent ( QgsCptCityDataItem parent)
inline

Definition at line 151 of file qgscptcityarchive.h.

Referenced by removeChildItem().

void QgsCptCityDataItem::setToolTip ( QString  msg)
inline

Definition at line 162 of file qgscptcityarchive.h.

QString QgsCptCityDataItem::shortInfo ( ) const
inline

Definition at line 158 of file qgscptcityarchive.h.

QString QgsCptCityDataItem::toolTip ( ) const
inline

Definition at line 163 of file qgscptcityarchive.h.

Referenced by QgsCptCityBrowserModel::data().

Type QgsCptCityDataItem::type ( ) const
inline

Member Data Documentation

QVector<QgsCptCityDataItem*> QgsCptCityDataItem::mChildren
protected
QIcon QgsCptCityDataItem::mIcon
protected

Definition at line 178 of file qgscptcityarchive.h.

QString QgsCptCityDataItem::mInfo
protected
QString QgsCptCityDataItem::mName
protected
QgsCptCityDataItem* QgsCptCityDataItem::mParent
protected

Definition at line 170 of file qgscptcityarchive.h.

QString QgsCptCityDataItem::mPath
protected
bool QgsCptCityDataItem::mPopulated
protected
QString QgsCptCityDataItem::mShortInfo
protected

Definition at line 176 of file qgscptcityarchive.h.

Referenced by QgsCptCityColorRampItem::init().

QString QgsCptCityDataItem::mToolTip
protected

Definition at line 177 of file qgscptcityarchive.h.

Type QgsCptCityDataItem::mType
protected
bool QgsCptCityDataItem::mValid
protected

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