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

liblancelot

  • Lancelot
  • ActionListModel
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
Lancelot::ActionListModel Class Referenceabstract

#include <ActionListModel.h>

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

Public Slots

void activated (int index)
 

Signals

void itemActivated (int index)
 
void itemAltered (int index)
 
void itemDeleted (int index)
 
void itemInserted (int index)
 
void updated ()
 

Public Member Functions

 ActionListModel ()
 
virtual ~ActionListModel ()
 
virtual void contextActivate (int index, QAction *context)
 
virtual void dataDragFinished (int index, Qt::DropAction action)
 
virtual bool dataDropAvailable (int where, const QMimeData *mimeData)
 
virtual void dataDropped (int where, const QMimeData *mimeData)
 
virtual QString description (int index) const
 
virtual bool hasContextActions (int index) const
 
virtual QIcon icon (int index) const
 
virtual bool isCategory (int index) const
 
virtual QMimeData * mimeData (int index) const
 
virtual QIcon selfIcon () const
 
virtual QMimeData * selfMimeData () const
 
virtual QString selfShortTitle () const
 
virtual QString selfTitle () const
 
virtual void setContextActions (int index, Lancelot::PopupMenu *menu)
 
virtual void setDropActions (int index, Qt::DropActions &actions, Qt::DropAction &defaultAction)
 
virtual int size () const =0
 
virtual QString title (int index) const =0
 
- 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 Member Functions

virtual 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

- 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 represents a list data model.

Definition at line 37 of file ActionListModel.h.

Constructor & Destructor Documentation

Lancelot::ActionListModel::ActionListModel ( )

Creates a new instance of ActionListModel.

Definition at line 26 of file ActionListModel.cpp.

Lancelot::ActionListModel::~ActionListModel ( )
virtual

Destroys this ActionListModel.

Definition at line 30 of file ActionListModel.cpp.

Member Function Documentation

void Lancelot::ActionListModel::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 in Lancelot::MergedActionListModel, Lancelot::ActionTreeModelProxy, and Lancelot::PlasmaServiceListModel.

Definition at line 108 of file ActionListModel.cpp.

void Lancelot::ActionListModel::activated ( int  index)
slot

Activates the specified element.

Parameters
indexof the element that should be activated

Definition at line 84 of file ActionListModel.cpp.

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

Method for handling context menu actions.

Parameters
indexof the activated item
contextindex of the context action

Reimplemented in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 102 of file ActionListModel.cpp.

void Lancelot::ActionListModel::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 in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 65 of file ActionListModel.cpp.

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

Reimplemented in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 52 of file ActionListModel.cpp.

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

Invoked when the data is dropped into the model.

Parameters
whereposition
mimeDatadropped data

Reimplemented in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 59 of file ActionListModel.cpp.

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

Reimplemented in Lancelot::MergedActionListModel, Lancelot::StandardActionTreeModel, Lancelot::StandardActionListModel, Lancelot::PlasmaServiceListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 34 of file ActionListModel.cpp.

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

Reimplemented in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 90 of file ActionListModel.cpp.

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

Reimplemented in Lancelot::MergedActionListModel, Lancelot::StandardActionTreeModel, Lancelot::StandardActionListModel, Lancelot::PlasmaServiceListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 40 of file ActionListModel.cpp.

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

Reimplemented in Lancelot::MergedActionListModel, Lancelot::StandardActionTreeModel, Lancelot::StandardActionListModel, Lancelot::PlasmaServiceListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 78 of file ActionListModel.cpp.

void Lancelot::ActionListModel::itemActivated ( int  index)
signal

This signal is emitted when an item is activated.

Parameters
indexof the activated element
void Lancelot::ActionListModel::itemAltered ( int  index)
signal

This signal is emitted when an item is altered.

Parameters
indexindex of the altered item
void Lancelot::ActionListModel::itemDeleted ( int  index)
signal

This signal is emitted when an item is deleted from the model.

Parameters
indexindex of the deleted item
void Lancelot::ActionListModel::itemInserted ( int  index)
signal

This signal is emitted when an item is inserted into the model.

Parameters
indexplace where the new item is inserted
QMimeData * Lancelot::ActionListModel::mimeData ( int  index) const
virtual
Parameters
indexindex of the item
Returns
mime data for the specified item

Reimplemented in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 46 of file ActionListModel.cpp.

QIcon Lancelot::ActionListModel::selfIcon ( ) const
virtual

Reimplemented in Lancelot::StandardActionTreeModel, Lancelot::PlasmaServiceListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 123 of file ActionListModel.cpp.

QMimeData * Lancelot::ActionListModel::selfMimeData ( ) const
virtual

Definition at line 128 of file ActionListModel.cpp.

QString Lancelot::ActionListModel::selfShortTitle ( ) const
virtual

Definition at line 118 of file ActionListModel.cpp.

QString Lancelot::ActionListModel::selfTitle ( ) const
virtual

Reimplemented in Lancelot::StandardActionTreeModel, Lancelot::PlasmaServiceListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 113 of file ActionListModel.cpp.

void Lancelot::ActionListModel::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 in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 96 of file ActionListModel.cpp.

void Lancelot::ActionListModel::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 in Lancelot::MergedActionListModel, and Lancelot::ActionTreeModelProxy.

Definition at line 71 of file ActionListModel.cpp.

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

Implemented in Lancelot::MergedActionListModel, Lancelot::StandardActionTreeModel, Lancelot::StandardActionListModel, Lancelot::ActionTreeModelProxy, and Lancelot::PlasmaServiceListModel.

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

Implemented in Lancelot::MergedActionListModel, Lancelot::StandardActionTreeModel, Lancelot::StandardActionListModel, Lancelot::PlasmaServiceListModel, and Lancelot::ActionTreeModelProxy.

void Lancelot::ActionListModel::updated ( )
signal

This signal is emitted when the model is updated and the update is too complex to explain using itemInserted, itemDeleted and itemAltered methods.


The documentation for this class was generated from the following files:
  • ActionListModel.h
  • ActionListModel.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