digiKam Developer Documentation: Digikam::ModelMenu Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | List of all members
Digikam::ModelMenu Class Reference

A QMenu that is dynamically populated from a QAbstractItemModel.

Inheritance diagram for Digikam::ModelMenu:

## Signals
void | activated (const QModelIndex &index)
void | hoveredText (const QString &text)

## Public Member Functions
| ModelMenu (QWidget *const parent=nullptr)
int | firstSeparator () const
int | hoverRole () const
QAction * | makeAction (const QIcon &icon, const QString &text, QObject *const parent)
int | maxRows () const
QAbstractItemModel * | model () const
QModelIndex | rootIndex () const
int | separatorRole () const
void | setFirstSeparator (int offset)
void | setHoverRole (int role)
void | setMaxRows (int max)
void | setModel (QAbstractItemModel *model)
void | setRootIndex (const QModelIndex &index)
void | setSeparatorRole (int role)

## Protected Member Functions
void | createMenu (const QModelIndex &parent, int max, QMenu *parentMenu=nullptr, QMenu *menu=nullptr)
| put all of the children of parent into menu up to max
virtual void | postPopulated ()
| add any actions after the tree
virtual bool | prePopulated ()
| add any actions before the tree, return true if any actions are added.

## Member Function Documentation

## ◆ prePopulated()

bool Digikam::ModelMenu::prePopulated | ( |  | ) |
| protectedvirtual

Reimplemented in Digikam::BookmarksMenu.