• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • workspace API Reference
  • KDE Home
  • Contact Us
 

liblancelot

  • Lancelot
  • MergedActionListModel
Public Member Functions | Protected Slots | Protected Member Functions | List of all members
Lancelot::MergedActionListModel Class Reference

#include <MergedActionListModel.h>

Inheritance diagram for Lancelot::MergedActionListModel:
Inheritance graph
[legend]

Public Member Functions

 MergedActionListModel ()
 
virtual ~MergedActionListModel ()
 
void addModel (QIcon icon, const QString &title, ActionListModel *model)
 
void addModel (ActionListModel *model)
 
L_Override void contextActivate (int index, QAction *context)
 
L_Override void dataDragFinished (int index, Qt::DropAction action)
 
L_Override bool dataDropAvailable (int where, const QMimeData *mimeData)
 
L_Override void dataDropped (int where, const QMimeData *mimeData)
 
L_Override QString description (int index) const
 
L_Override bool hasContextActions (int index) const
 
virtual bool hasModelContextActions (int index) const
 
bool hideEmptyModels () const
 
L_Override QIcon icon (int index) const
 
L_Override bool isCategory (int index) const
 
L_Override QMimeData * mimeData (int index) const
 
ActionListModel * modelAt (int index)
 
virtual void modelContextActivate (int index, QAction *context)
 
int modelCount () const
 
virtual void modelDataDropped (int index, Qt::DropAction action)
 
virtual QMimeData * modelMimeData (int index) const
 
void removeModel (int index)
 
L_Override void setContextActions (int index, Lancelot::PopupMenu *menu)
 
L_Override void setDropActions (int index, Qt::DropActions &actions, Qt::DropAction &defaultAction)
 
void setHideEmptyModels (bool hide)
 
virtual void setModelContextActions (int index, Lancelot::PopupMenu *menu)
 
virtual void setModelDropActions (int index, Qt::DropActions &actions, Qt::DropAction &defaultAction)
 
void setShowModelTitles (bool show)
 
bool showModelTitles () const
 
L_Override int size () const
 
L_Override QString title (int index) const
 
- Public Member Functions inherited from Lancelot::ActionListModel
 ActionListModel ()
 
virtual ~ActionListModel ()
 
virtual QIcon selfIcon () const
 
virtual QMimeData * selfMimeData () const
 
virtual QString selfShortTitle () const
 
virtual QString selfTitle () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Protected Slots

void modelItemAltered (int index)
 
void modelItemDeleted (int index)
 
void modelItemInserted (int index)
 
void modelUpdated ()
 

Protected Member Functions

L_Override void activate (int index)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Slots inherited from Lancelot::ActionListModel
void activated (int index)
 
- Signals inherited from Lancelot::ActionListModel
void itemActivated (int index)
 
void itemAltered (int index)
 
void itemDeleted (int index)
 
void itemInserted (int index)
 
void updated ()
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

This class implements a model that merges a list of other models.

Titles in the sub-models are represented as categories in the merged one.

Definition at line 36 of file MergedActionListModel.h.

Constructor & Destructor Documentation

Lancelot::MergedActionListModel::MergedActionListModel ( )

Creates a new instance of MergedActionListModel.

Definition at line 36 of file MergedActionListModel.cpp.

Lancelot::MergedActionListModel::~MergedActionListModel ( )
virtual

Destroys this MergedActionListModel.

Definition at line 43 of file MergedActionListModel.cpp.

Member Function Documentation

void Lancelot::MergedActionListModel::activate ( int  index)
protectedvirtual

Models should reimplement this function.

It is invoked when an item is activated, before the itemActivated signal is emitted

Parameters
indexof the item that is activated

Reimplemented from Lancelot::ActionListModel.

Definition at line 222 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::addModel ( QIcon  icon,
const QString &  title,
ActionListModel *  model 
)

Adds a model to the list.

Parameters
iconicon for the model
titletitle of the model
modelmodel to add

Definition at line 322 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::addModel ( ActionListModel *  model)

Adds a model to the list.

Title and icon is loaded from model

Parameters
modelmodel to add

Definition at line 317 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::contextActivate ( int  index,
QAction *  context 
)
virtual

Method for handling context menu actions.

Parameters
indexof the activated item
contextindex of the context action

Reimplemented from Lancelot::ActionListModel.

Definition at line 262 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::dataDragFinished ( int  index,
Qt::DropAction  action 
)
virtual

This function is invoked when a data is dropped.

Parameters
indexindex of the dragged item
actioninvoked drop action

Reimplemented from Lancelot::ActionListModel.

Definition at line 131 of file MergedActionListModel.cpp.

bool Lancelot::MergedActionListModel::dataDropAvailable ( int  where,
const QMimeData *  mimeData 
)
virtual
Returns
whether the data can be dropped at the specified position
Parameters
whereposition
mimeDatadragged data

Reimplemented from Lancelot::ActionListModel.

Definition at line 172 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::dataDropped ( int  where,
const QMimeData *  mimeData 
)
virtual

Invoked when the data is dropped into the model.

Parameters
whereposition
mimeDatadropped data

Reimplemented from Lancelot::ActionListModel.

Definition at line 182 of file MergedActionListModel.cpp.

QString Lancelot::MergedActionListModel::description ( int  index) const
virtual
Parameters
indexindex of the item
Returns
description of the specified item

Reimplemented from Lancelot::ActionListModel.

Definition at line 101 of file MergedActionListModel.cpp.

bool Lancelot::MergedActionListModel::hasContextActions ( int  index) const
virtual
Returns
whether the specified item has context actions
Parameters
indexindex of the item

Reimplemented from Lancelot::ActionListModel.

Definition at line 242 of file MergedActionListModel.cpp.

bool Lancelot::MergedActionListModel::hasModelContextActions ( int  index) const
virtual
Returns
whether the model has context actions
Parameters
indexmodel for which context menu is tested Reimplement this function if you want to support context menus for models when user right clicks the captio item

Definition at line 192 of file MergedActionListModel.cpp.

bool Lancelot::MergedActionListModel::hideEmptyModels ( ) const
Returns
whether the empty models are hidden

Definition at line 371 of file MergedActionListModel.cpp.

QIcon Lancelot::MergedActionListModel::icon ( int  index) const
virtual
Parameters
indexindex of the item
Returns
icon for the specified item

Reimplemented from Lancelot::ActionListModel.

Definition at line 111 of file MergedActionListModel.cpp.

bool Lancelot::MergedActionListModel::isCategory ( int  index) const
virtual
Parameters
indexindex of the item
Returns
whether the item represents a category

Reimplemented from Lancelot::ActionListModel.

Definition at line 212 of file MergedActionListModel.cpp.

QMimeData * Lancelot::MergedActionListModel::mimeData ( int  index) const
virtual
Parameters
indexindex of the item
Returns
mime data for the specified item

Reimplemented from Lancelot::ActionListModel.

Definition at line 121 of file MergedActionListModel.cpp.

ActionListModel * Lancelot::MergedActionListModel::modelAt ( int  index)
Returns
model with the specified index
Parameters
indexindex of the model to return

Definition at line 338 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::modelContextActivate ( int  index,
QAction *  context 
)
virtual

Activates the context for the specified model.

Parameters
indexmodel index
activatedaction Reimplement this function if you want to support context menus for models when user right clicks the captio item

Definition at line 205 of file MergedActionListModel.cpp.

int Lancelot::MergedActionListModel::modelCount ( ) const
Returns
number of the models

Definition at line 355 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::modelDataDropped ( int  index,
Qt::DropAction  action 
)
virtual

This function is invoked when a model is dragged and dropped.

Reimplement this function if you want to support dragging the models inside the MergedActionListModel by dragging their caption items.

Definition at line 142 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::modelItemAltered ( int  index)
protectedslot

Definition at line 89 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::modelItemDeleted ( int  index)
protectedslot

Definition at line 71 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::modelItemInserted ( int  index)
protectedslot

Definition at line 53 of file MergedActionListModel.cpp.

QMimeData * Lancelot::MergedActionListModel::modelMimeData ( int  index) const
virtual
Returns
mime data for the specified model Reimplement this function if you want to support dragging the models inside the MergedActionListModel by dragging their caption items.

Definition at line 166 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::modelUpdated ( )
protectedslot

Definition at line 48 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::removeModel ( int  index)

Removes a model from the list.

Parameters
indexindex of the model to remove

Definition at line 343 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::setContextActions ( int  index,
Lancelot::PopupMenu *  menu 
)
virtual

Adds actions ofr the specifies item to menu.

Parameters
indexindex of the item
menumenu to add the actions to

Reimplemented from Lancelot::ActionListModel.

Definition at line 252 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::setDropActions ( int  index,
Qt::DropActions &  actions,
Qt::DropAction &  defaultAction 
)
virtual
Parameters
indexindex of the item to be dragged
actionssupported drop actions
defaultActiondefault drop action

Reimplemented from Lancelot::ActionListModel.

Definition at line 148 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::setHideEmptyModels ( bool  hide)

Sets whether the empty models should be hidden.

Definition at line 376 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::setModelContextActions ( int  index,
Lancelot::PopupMenu *  menu 
)
virtual

Sets the actions for the context menu.

Parameters
indexmodel for which context menu should be set Reimplement this function if you want to support context menus for models when user right clicks the captio item

Definition at line 198 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::setModelDropActions ( int  index,
Qt::DropActions &  actions,
Qt::DropAction &  defaultAction 
)
virtual
Parameters
indexindex of the model to be dragged
actionssupported drop actions
defaultActiondefault drop action Reimplement this function if you want to support dragging the models inside the MergedActionListModel by dragging their caption items.

Definition at line 158 of file MergedActionListModel.cpp.

void Lancelot::MergedActionListModel::setShowModelTitles ( bool  show)

Sets whether model titles are shown.

Definition at line 388 of file MergedActionListModel.cpp.

bool Lancelot::MergedActionListModel::showModelTitles ( ) const
Returns
whether the model titles are shown

Definition at line 383 of file MergedActionListModel.cpp.

int Lancelot::MergedActionListModel::size ( ) const
virtual
Returns
the number of items in model

Implements Lancelot::ActionListModel.

Definition at line 361 of file MergedActionListModel.cpp.

QString Lancelot::MergedActionListModel::title ( int  index) const
virtual
Parameters
indexindex of the item
Returns
title for the specified item

Implements Lancelot::ActionListModel.

Definition at line 232 of file MergedActionListModel.cpp.


The documentation for this class was generated from the following files:
  • MergedActionListModel.h
  • MergedActionListModel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

Skip menu "liblancelot"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal