QgsFormAnnotationItem Class Reference

An annotation item that embedds a designer form showing the feature attribute. More...

#include <qgsformannotationitem.h>

Inheritance diagram for QgsFormAnnotationItem:

Inheritance graph
[legend]
Collaboration diagram for QgsFormAnnotationItem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 QgsFormAnnotationItem (QgsMapCanvas *canvas, QgsVectorLayer *vlayer=0, bool hasFeature=false, int feature=0)
 ~QgsFormAnnotationItem ()
void paint (QPainter *painter)
 function to be implemented by derived classes
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 paint function called by map canvas
QSizeF minimumFrameSize () const
QSizeF preferredFrameSize () const
 Returns the optimal frame size.
void setMapPosition (const QgsPoint &pos)
 Reimplemented from QgsAnnotationItem.
void setDesignerForm (const QString &uiFile)
QString designerForm () const
void writeXML (QDomDocument &doc) const
void readXML (const QDomDocument &doc, const QDomElement &itemElem)
QgsVectorLayervectorLayer () const

Private Slots

void setFeatureForMapPosition ()
 Sets a feature for the current map position and updates the dialog.
void updateVisibility ()
 Sets visibility status based on mVectorLayer visibility.

Private Member Functions

QWidget * createDesignerWidget (const QString &filePath)

Private Attributes

QGraphicsProxyWidget * mWidgetContainer
QWidget * mDesignerWidget
QgsVectorLayermVectorLayer
 Associated vectorlayer (or 0 if attributes are not supposed to be replaced).
bool mHasAssociatedFeature
 True if the item is related to a vector feature.
int mFeature
 Associated feature.
QString mDesignerForm
 Path to (and including) the .ui file.


Detailed Description

An annotation item that embedds a designer form showing the feature attribute.

Definition at line 27 of file qgsformannotationitem.h.


Constructor & Destructor Documentation

QgsFormAnnotationItem::QgsFormAnnotationItem ( QgsMapCanvas canvas,
QgsVectorLayer vlayer = 0,
bool  hasFeature = false,
int  feature = 0 
)

QgsFormAnnotationItem::~QgsFormAnnotationItem (  ) 

Definition at line 51 of file qgsformannotationitem.cpp.

References mDesignerWidget.


Member Function Documentation

void QgsFormAnnotationItem::paint ( QPainter *  painter  )  [virtual]

function to be implemented by derived classes

Implements QgsMapCanvasItem.

Definition at line 116 of file qgsformannotationitem.cpp.

void QgsFormAnnotationItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
) [virtual]

QSizeF QgsFormAnnotationItem::minimumFrameSize (  )  const [virtual]

Reimplemented from QgsAnnotationItem.

Definition at line 144 of file qgsformannotationitem.cpp.

References mDesignerWidget, and QgsAnnotationItem::mFrameBorderWidth.

QSizeF QgsFormAnnotationItem::preferredFrameSize (  )  const

Returns the optimal frame size.

Definition at line 157 of file qgsformannotationitem.cpp.

References mDesignerWidget.

Referenced by setDesignerForm().

void QgsFormAnnotationItem::setMapPosition ( const QgsPoint pos  )  [virtual]

Reimplemented from QgsAnnotationItem.

Reimplemented from QgsAnnotationItem.

Definition at line 110 of file qgsformannotationitem.cpp.

References setFeatureForMapPosition(), and QgsAnnotationItem::setMapPosition().

void QgsFormAnnotationItem::setDesignerForm ( const QString &  uiFile  ) 

QString QgsFormAnnotationItem::designerForm (  )  const [inline]

Definition at line 47 of file qgsformannotationitem.h.

void QgsFormAnnotationItem::writeXML ( QDomDocument &  doc  )  const [virtual]

void QgsFormAnnotationItem::readXML ( const QDomDocument &  doc,
const QDomElement &  itemElem 
) [virtual]

QgsVectorLayer* QgsFormAnnotationItem::vectorLayer (  )  const [inline]

Definition at line 52 of file qgsformannotationitem.h.

void QgsFormAnnotationItem::setFeatureForMapPosition (  )  [private, slot]

void QgsFormAnnotationItem::updateVisibility (  )  [private, slot]

Sets visibility status based on mVectorLayer visibility.

Definition at line 260 of file qgsformannotationitem.cpp.

References QgsMapCanvas::layers(), QgsMapCanvasItem::mMapCanvas, and mVectorLayer.

Referenced by QgsFormAnnotationItem(), and readXML().

QWidget * QgsFormAnnotationItem::createDesignerWidget ( const QString &  filePath  )  [private]


Member Data Documentation

QGraphicsProxyWidget* QgsFormAnnotationItem::mWidgetContainer [private]

Associated vectorlayer (or 0 if attributes are not supposed to be replaced).

Definition at line 64 of file qgsformannotationitem.h.

Referenced by createDesignerWidget(), QgsFormAnnotationItem(), readXML(), setFeatureForMapPosition(), updateVisibility(), and writeXML().

True if the item is related to a vector feature.

Definition at line 66 of file qgsformannotationitem.h.

Referenced by createDesignerWidget(), readXML(), setFeatureForMapPosition(), and writeXML().

Associated feature.

Definition at line 68 of file qgsformannotationitem.h.

Referenced by createDesignerWidget(), readXML(), setFeatureForMapPosition(), and writeXML().

Path to (and including) the .ui file.

Definition at line 70 of file qgsformannotationitem.h.

Referenced by QgsFormAnnotationItem(), readXML(), setDesignerForm(), setFeatureForMapPosition(), and writeXML().


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

Generated on Sat Feb 4 19:17:34 2012 for Quantum GIS API Documentation by  doxygen 1.5.6