digiKam
Digikam::BookmarksMenu Class Reference
+ Inheritance diagram for Digikam::BookmarksMenu:

Signals

void activated (const QModelIndex &index)
 
void hovered (const QString &text)
 
void openUrl (const QUrl &url)
 

Public Member Functions

 BookmarksMenu (BookmarksManager *const mngr, 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 setInitialActions (const QList< QAction * > &actions)
 
void setMaxRows (int max)
 
void setModel (QAbstractItemModel *model)
 
void setRootIndex (const QModelIndex &index)
 
void setSeparatorRole (int role)
 
 ~BookmarksMenu () override
 

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 More...
 
virtual void postPopulated ()
 add any actions after the tree More...
 
bool prePopulated () override
 add any actions before the tree, return true if any actions are added. More...
 

Detailed Description

Menu that is dynamically populated from the bookmarks

Constructor & Destructor Documentation

◆ BookmarksMenu()

◆ ~BookmarksMenu()

Digikam::BookmarksMenu::~BookmarksMenu ( )
override

Member Function Documentation

◆ activated

void Digikam::ModelMenu::activated ( const QModelIndex &  index)
signalinherited

Referenced by BookmarksMenu().

◆ createMenu()

void Digikam::ModelMenu::createMenu ( const QModelIndex &  parent,
int  max,
QMenu *  parentMenu = nullptr,
QMenu *  menu = nullptr 
)
protectedinherited

put all of the children of parent into menu up to max

References Digikam::ModelMenu::hovered(), and Digikam::ModelMenu::makeAction().

Referenced by prePopulated().

◆ firstSeparator()

int Digikam::ModelMenu::firstSeparator ( ) const
inherited

◆ hovered

void Digikam::ModelMenu::hovered ( const QString &  text)
signalinherited

◆ hoverRole()

int Digikam::ModelMenu::hoverRole ( ) const
inherited

◆ makeAction()

QAction * Digikam::ModelMenu::makeAction ( const QIcon &  icon,
const QString &  text,
QObject *const  parent 
)
inherited

◆ maxRows()

int Digikam::ModelMenu::maxRows ( ) const
inherited

◆ model()

QAbstractItemModel * Digikam::ModelMenu::model ( ) const
inherited

◆ openUrl

void Digikam::BookmarksMenu::openUrl ( const QUrl &  url)
signal

◆ postPopulated()

void Digikam::ModelMenu::postPopulated ( )
protectedvirtualinherited

add any actions after the tree

◆ prePopulated()

bool Digikam::BookmarksMenu::prePopulated ( )
overrideprotectedvirtual

add any actions before the tree, return true if any actions are added.

Reimplemented from Digikam::ModelMenu.

References Digikam::ModelMenu::createMenu(), Digikam::ModelMenu::rootIndex(), Digikam::ModelMenu::setModel(), and Digikam::ModelMenu::setRootIndex().

◆ rootIndex()

QModelIndex Digikam::ModelMenu::rootIndex ( ) const
inherited

Referenced by prePopulated().

◆ separatorRole()

int Digikam::ModelMenu::separatorRole ( ) const
inherited

◆ setFirstSeparator()

void Digikam::ModelMenu::setFirstSeparator ( int  offset)
inherited

◆ setHoverRole()

void Digikam::ModelMenu::setHoverRole ( int  role)
inherited

Referenced by BookmarksMenu().

◆ setInitialActions()

void Digikam::BookmarksMenu::setInitialActions ( const QList< QAction * > &  actions)

◆ setMaxRows()

void Digikam::ModelMenu::setMaxRows ( int  max)
inherited

Referenced by BookmarksMenu().

◆ setModel()

void Digikam::ModelMenu::setModel ( QAbstractItemModel *  model)
inherited

References Digikam::ModelMenu::model().

Referenced by prePopulated().

◆ setRootIndex()

void Digikam::ModelMenu::setRootIndex ( const QModelIndex &  index)
inherited

Referenced by prePopulated().

◆ setSeparatorRole()

void Digikam::ModelMenu::setSeparatorRole ( int  role)
inherited

Referenced by BookmarksMenu().


The documentation for this class was generated from the following files: