Page Contents

Topics

Classes

QLAttributeMapView Class

#include <QLayers/qlattributemapview.h>

Inherits: QTreeView, QLThemeable

Public Functions

QLAttributeMapView(QWidget* parent = nullptr)
virtual QList<QLThemeable*> child_qlthemeables(Qt::FindChildOptions options = Qt::FindDirectChildrenOnly) override
virtual void set_attributes(LAttributeMap attributes, const QStringList& filter_paths)
virtual void update() override

Protected Functions

virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override

Detailed Description

QLAttributeMapView Example

A QLAttributeMapView is a QTreeView and a QLThemeable that provides an interface for selecting an attribute from an LAttributeMap.

To associate a set of attributes with the view, use the set_attributes() function.

When the selected map item is changed, the selected_map_item_changed() signal is emitted.

Member Function Documentation

QLAttributeMapView(QWidget* parent = nullptr)

Constructs an attribute map view.

QList<QLThemeable*> child_qlthemeables(Qt::FindChildOptions options = Qt::FindDirectChildrenOnly)

Virtual

Override

Returns a list of child themeables.

This function overrides QLThemeable::child_qlthemeables() to include the view's scroll bars.

void selected_map_item_changed(LAttribute* attr)

Signal

This signal is emitted when the selected map item changes.

The attr variable is a pointer to the newly selected attribute from the map.

void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected)

Protected

Virtual

Override

This function overrides QTreeView::selectionChanged() to emit selected_theme_item_changed() when the selection changes.

void set_attributes(LAttributeMap attributes, const QStringList& filter_paths)

Sets the attributes to be displayed and selectable within the view.

void update()

Virtual

Override

Updates the view.

This function overrides QLThemeable::update() to update the view's style sheet.