Skip to content

ATreeModelIndex#

Valid index of ITreeModel.

Header:#include <AUI/Model/ATreeModelIndex.h>
CMake:aui_link(my_target PUBLIC aui::core)

Public Types#


Exception#

class ATreeModelIndex::Exception

Empty structure.

Public fields and Signals#


ROOT#

struct{} ROOT

Tag type to define root vertex.

Use ATreeModelIndex::ROOT to reference.

Public Methods#

constructor#


explicit ATreeModelIndex::ATreeModelIndex(std::size_t row, std::size_t column, std::any userdata)
Arguments
row
row of the vertex relative to it's parent.
column
column of the vertex relative to it's parent.
userdata
userdata stored in this vertex.

as#


T ATreeModelIndex::as()

any_cast the external user data stored in this vertex. See also: mUserdata.

column#


std::size_t ATreeModelIndex::column()

column of the vertex relative to it's parent.

row#


std::size_t ATreeModelIndex::row()

row of the vertex relative to it's parent.

Examples:

examples/ui/contacts/src/view/ContactDetailsView.cpp

AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.

                Centered::Expanding {
                  presentation(mContact->displayName) AUI_OVERRIDE_STYLE { FontSize { 12_pt } },
                },
              } AUI_OVERRIDE_STYLE { Margin { 8_dp, {} }, LayoutSpacing { 4_dp } },
              row("Phone", mContact->phone),
              row("Address", mContact->address),
              row("Email", mContact->email),
              row("Homepage", mContact->homepage),
              Horizontal::Expanding {
                Vertical {
examples/ui/contacts/src/view/ContactDetailsView.h

AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.

    template<typename T>
    _<AView> presentation(AProperty<T>& property);

    template<typename T>
    _<AView> row(AString title, AProperty<T>& property);

    void drop();
    void toggleEdit();
};