QgsIdentifyResults Class Reference

#include <qgsidentifyresults.h>

Collaboration diagram for QgsIdentifyResults:

Collaboration graph
[legend]
List of all members.

Detailed Description

Author:
Gary E.Sherman

Definition at line 37 of file qgsidentifyresults.h.

Public Slots

void show ()
void close ()
void contextMenuEvent (QContextMenuEvent *)
void popupItemSelected (QAction *menuAction)
void clicked (QTreeWidgetItem *lvi)
void on_buttonHelp_clicked ()
 Context help.
void itemExpanded (QTreeWidgetItem *)
void handleCurrentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *previous)
 sends signal if current feature id has changed

Signals

void selectedFeatureChanged (int featureId)
void editFeature (int featureId)

Public Member Functions

 QgsIdentifyResults (const QgsAttributeAction &actions, QWidget *parent=0, Qt::WFlags f=0)
 Constructor - takes it own copy of the QgsAttributeAction so.
 ~QgsIdentifyResults ()
void addAttribute (QTreeWidgetItem *parent, QString field, QString value)
 Add an attribute to the feature display node.
void addAttribute (QString field, QString value)
 Add an attribute.
void addDerivedAttribute (QTreeWidgetItem *parent, QString field, QString value)
 Add a derived attribute (e.g.
void addAction (QTreeWidgetItem *parent, int id, QString field, QString value)
 Add an action to the feature display node.
void addEdit (QTreeWidgetItem *parent, int id)
 Add an edit action to the feature display node.
QTreeWidgetItem * addNode (QString label)
 Add a feature node to the feature display.
void setTitle (QString title)
 Set the title for the identify results dialog.
void setColumnText (int column, const QString &label)
 Set header column.
void saveWindowLocation ()
void restorePosition ()
void closeEvent (QCloseEvent *e)
void showAllAttributes ()
 Expand all the identified features (show their attributes).
void expandColumnsToFit ()
 Resize all of the columns to fit the data in them.
void clear ()
 Remove results.
void setMessage (QString shortMsg, QString longMsg)
 Set "No features ... ".
void setActions (const QgsAttributeAction &actions)
 Set actions.

Private Member Functions

void extractAllItemData (QTreeWidgetItem *item)

Private Attributes

bool mEditable
QgsAttributeAction mActions
int mClickedOnValue
QMenu * mActionPopup
std::vector< std::pair< QString,
QString > > 
mValues
int mCurrentFeatureId
QString mDerivedLabel
std::map< QTreeWidgetItem *,
QTreeWidgetItem * > 
mDerivedAttributeRootNodes
 Keeps track of what derived-attribute (e.g.

Static Private Attributes

static const int context_id = 689216579


Constructor & Destructor Documentation

QgsIdentifyResults::QgsIdentifyResults ( const QgsAttributeAction actions,
QWidget *  parent = 0,
Qt::WFlags  f = 0 
)

Constructor - takes it own copy of the QgsAttributeAction so.

Definition at line 35 of file qgsidentifyresults.cpp.

References clicked(), close(), handleCurrentItemChanged(), itemExpanded(), mDerivedLabel, and setColumnText().

QgsIdentifyResults::~QgsIdentifyResults (  ) 

Definition at line 62 of file qgsidentifyresults.cpp.

References mActionPopup.


Member Function Documentation

void QgsIdentifyResults::addAttribute ( QTreeWidgetItem *  parent,
QString  field,
QString  value 
)

Add an attribute to the feature display node.

Definition at line 149 of file qgsidentifyresults.cpp.

Referenced by QgsMapToolIdentify::identifyRasterLayer(), and QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::addAttribute ( QString  field,
QString  value 
)

Add an attribute.

Definition at line 156 of file qgsidentifyresults.cpp.

void QgsIdentifyResults::addDerivedAttribute ( QTreeWidgetItem *  parent,
QString  field,
QString  value 
)

Add a derived attribute (e.g.

Length, Area) to the feature display node

Definition at line 163 of file qgsidentifyresults.cpp.

References mDerivedAttributeRootNodes, and mDerivedLabel.

Referenced by QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::addAction ( QTreeWidgetItem *  parent,
int  id,
QString  field,
QString  value 
)

Add an action to the feature display node.

Definition at line 197 of file qgsidentifyresults.cpp.

References QgisApp::getThemeIcon().

Referenced by QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::addEdit ( QTreeWidgetItem *  parent,
int  id 
)

Add an edit action to the feature display node.

Definition at line 188 of file qgsidentifyresults.cpp.

References QgisApp::getThemeIcon().

Referenced by QgsMapToolIdentify::identifyVectorLayer().

QTreeWidgetItem * QgsIdentifyResults::addNode ( QString  label  ) 

Add a feature node to the feature display.

Definition at line 207 of file qgsidentifyresults.cpp.

Referenced by QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::setTitle ( QString  title  ) 

Set the title for the identify results dialog.

Definition at line 212 of file qgsidentifyresults.cpp.

Referenced by QgsMapToolIdentify::identifyRasterLayer(), and QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::setColumnText ( int  column,
const QString &  label 
)

Set header column.

Definition at line 217 of file qgsidentifyresults.cpp.

Referenced by QgsMapToolIdentify::identifyRasterLayer(), and QgsIdentifyResults().

void QgsIdentifyResults::saveWindowLocation (  ) 

Definition at line 142 of file qgsidentifyresults.cpp.

Referenced by close().

void QgsIdentifyResults::restorePosition (  ) 

Definition at line 134 of file qgsidentifyresults.cpp.

References show().

Referenced by QgsMapToolIdentify::identifyRasterLayer(), and QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::closeEvent ( QCloseEvent *  e  ) 

Definition at line 85 of file qgsidentifyresults.cpp.

References close().

void QgsIdentifyResults::showAllAttributes (  ) 

Expand all the identified features (show their attributes).

Definition at line 231 of file qgsidentifyresults.cpp.

Referenced by QgsMapToolIdentify::identifyRasterLayer(), and QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::expandColumnsToFit (  ) 

Resize all of the columns to fit the data in them.

Definition at line 237 of file qgsidentifyresults.cpp.

Referenced by itemExpanded(), and show().

void QgsIdentifyResults::clear (  ) 

Remove results.

Definition at line 243 of file qgsidentifyresults.cpp.

References mDerivedAttributeRootNodes.

Referenced by QgsMapToolIdentify::identifyRasterLayer(), and QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::setMessage ( QString  shortMsg,
QString  longMsg 
)

Set "No features ... ".

Definition at line 249 of file qgsidentifyresults.cpp.

Referenced by QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::setActions ( const QgsAttributeAction actions  ) 

Set actions.

Definition at line 256 of file qgsidentifyresults.cpp.

References mActions.

Referenced by QgsMapToolIdentify::identifyVectorLayer().

void QgsIdentifyResults::selectedFeatureChanged ( int  featureId  )  [signal]

Referenced by handleCurrentItemChanged().

void QgsIdentifyResults::editFeature ( int  featureId  )  [signal]

Referenced by clicked().

void QgsIdentifyResults::show (  )  [slot]

Definition at line 68 of file qgsidentifyresults.cpp.

References expandColumnsToFit().

Referenced by QgsMapToolIdentify::identifyRasterLayer(), QgsMapToolIdentify::identifyVectorLayer(), and restorePosition().

void QgsIdentifyResults::close (  )  [slot]

Definition at line 78 of file qgsidentifyresults.cpp.

References saveWindowLocation().

Referenced by closeEvent(), and QgsIdentifyResults().

void QgsIdentifyResults::contextMenuEvent ( QContextMenuEvent *   )  [slot]

Definition at line 96 of file qgsidentifyresults.cpp.

References QgsAttributeAction::begin(), QgsAttributeAction::end(), extractAllItemData(), mActionPopup, mActions, popupItemSelected(), and QgsAttributeAction::size().

void QgsIdentifyResults::popupItemSelected ( QAction *  menuAction  )  [slot]

Definition at line 224 of file qgsidentifyresults.cpp.

References QgsAttributeAction::doAction(), mActions, mClickedOnValue, and mValues.

Referenced by contextMenuEvent().

void QgsIdentifyResults::clicked ( QTreeWidgetItem *  lvi  )  [slot]

Definition at line 261 of file qgsidentifyresults.cpp.

References QgsAttributeAction::doAction(), editFeature(), extractAllItemData(), mActions, mClickedOnValue, and mValues.

Referenced by QgsIdentifyResults().

void QgsIdentifyResults::on_buttonHelp_clicked (  )  [slot]

Context help.

Definition at line 279 of file qgsidentifyresults.cpp.

References context_id, and QgsContextHelp::run().

void QgsIdentifyResults::itemExpanded ( QTreeWidgetItem *   )  [slot]

Definition at line 284 of file qgsidentifyresults.cpp.

References expandColumnsToFit().

Referenced by QgsIdentifyResults().

void QgsIdentifyResults::handleCurrentItemChanged ( QTreeWidgetItem *  current,
QTreeWidgetItem *  previous 
) [slot]

sends signal if current feature id has changed

Definition at line 289 of file qgsidentifyresults.cpp.

References mCurrentFeatureId, and selectedFeatureChanged().

Referenced by QgsIdentifyResults().

void QgsIdentifyResults::extractAllItemData ( QTreeWidgetItem *  item  )  [private]

Definition at line 322 of file qgsidentifyresults.cpp.

References mClickedOnValue, mDerivedLabel, and mValues.

Referenced by clicked(), and contextMenuEvent().


Member Data Documentation

bool QgsIdentifyResults::mEditable [private]

Definition at line 117 of file qgsidentifyresults.h.

QgsAttributeAction QgsIdentifyResults::mActions [private]

Definition at line 118 of file qgsidentifyresults.h.

Referenced by clicked(), contextMenuEvent(), popupItemSelected(), and setActions().

int QgsIdentifyResults::mClickedOnValue [private]

Definition at line 119 of file qgsidentifyresults.h.

Referenced by clicked(), extractAllItemData(), and popupItemSelected().

QMenu* QgsIdentifyResults::mActionPopup [private]

Definition at line 120 of file qgsidentifyresults.h.

Referenced by contextMenuEvent(), and ~QgsIdentifyResults().

std::vector<std::pair<QString, QString> > QgsIdentifyResults::mValues [private]

Definition at line 121 of file qgsidentifyresults.h.

Referenced by clicked(), extractAllItemData(), and popupItemSelected().

const int QgsIdentifyResults::context_id = 689216579 [static, private]

Definition at line 122 of file qgsidentifyresults.h.

Referenced by on_buttonHelp_clicked().

int QgsIdentifyResults::mCurrentFeatureId [private]

Definition at line 123 of file qgsidentifyresults.h.

Referenced by handleCurrentItemChanged().

QString QgsIdentifyResults::mDerivedLabel [private]

Definition at line 124 of file qgsidentifyresults.h.

Referenced by addDerivedAttribute(), extractAllItemData(), and QgsIdentifyResults().

std::map<QTreeWidgetItem *, QTreeWidgetItem *> QgsIdentifyResults::mDerivedAttributeRootNodes [private]

Keeps track of what derived-attribute (e.g.

Length, Area) root nodes have been generated for each feature in this widget.

First item: Feature root node Second item: Derived-attribute root node for that feature

Definition at line 133 of file qgsidentifyresults.h.

Referenced by addDerivedAttribute(), and clear().


The documentation for this class was generated from the following files:
Generated on Tue Oct 28 16:51:59 2008 for Quantum GIS API Documentation by  doxygen 1.5.1