#include <qgsidentifyresults.h>
Collaboration diagram for QgsIdentifyResults:

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 |
| 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 | ( | ) |
| 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 | |||
| ) |
| 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 | ( | ) |
| 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 | ) |
| 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().
bool QgsIdentifyResults::mEditable [private] |
Definition at line 117 of file qgsidentifyresults.h.
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] |
int QgsIdentifyResults::mCurrentFeatureId [private] |
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().
1.5.1