Okular::Action

Search for usage in LXR

Okular::Action Class Referenceabstract

#include <action.h>

Inheritance diagram for Okular::Action:

Public Types

enum  ActionType {
  Goto , Execute , Browse , DocAction ,
  Sound , Movie , Script , Rendition ,
  BackendOpaque
}
 

Public Member Functions

virtual ~Action ()
 
virtual QString actionTip () const
 
virtual ActionType actionType () const =0
 
const void * nativeHandle () const
 
OKULARCORE_DEPRECATED QVariant nativeId () const
 
QVector< Action * > nextActions () const
 
void setNativeHandle (std::shared_ptr< const void > handle)
 
OKULARCORE_DEPRECATED void setNativeId (const QVariant &id)
 
void setNextActions (const QVector< Action * > &actions)
 

Detailed Description

Encapsulates data that describes an action.

This is the base class for actions. It makes mandatory for inherited widgets to reimplement the 'actionType' method and return the type of the action described by the reimplemented class.

Definition at line 40 of file action.h.

Member Enumeration Documentation

◆ ActionType

Describes the type of action.

Enumerator
Goto 

Goto a given page or external document.

Execute 

Execute a command or external application.

Browse 

Browse a given website.

DocAction 

Start a custom action.

Sound 

Play a sound.

Movie 

Play a movie.

Script 

Executes a Script code.

Rendition 

Play a movie and/or execute a Script code.

Since
0.16 (KDE 4.10)
BackendOpaque 

Calls back to the backend with the action.

Since
1.1

Definition at line 46 of file action.h.

Constructor & Destructor Documentation

◆ ~Action()

Action::~Action ( )
virtual

Destroys the action.

Definition at line 45 of file action.cpp.

Member Function Documentation

◆ actionTip()

QString Action::actionTip ( ) const
virtual

Returns a i18n'ed tip of the action that is presented to the user.

Reimplemented in Okular::BrowseAction, Okular::DocumentAction, Okular::ExecuteAction, Okular::GotoAction, Okular::MovieAction, Okular::RenditionAction, Okular::ScriptAction, and Okular::SoundAction.

Definition at line 50 of file action.cpp.

◆ actionType()

virtual ActionType Okular::Action::actionType ( ) const
pure virtual

Returns the type of the action.

Every inherited class must return an unique identifier.

See also
ActionType

Implemented in Okular::BrowseAction, Okular::DocumentAction, Okular::ExecuteAction, Okular::GotoAction, Okular::MovieAction, Okular::RenditionAction, Okular::ScriptAction, and Okular::SoundAction.

◆ nativeHandle()

const void * Action::nativeHandle ( ) const
Returns
the native handle pointer
Since
24.05.2

Definition at line 78 of file action.cpp.

◆ nativeId()

QVariant Action::nativeId ( ) const

Returns the "native" id of the action.

Since
0.15 (KDE 4.9)

Definition at line 61 of file action.cpp.

◆ nextActions()

QVector< Action * > Action::nextActions ( ) const

Returns the next actions to be executed after.

Since
1.5

Definition at line 67 of file action.cpp.

◆ setNativeHandle()

void Action::setNativeHandle ( std::shared_ptr< const void > handle)

Sets "native" handle for the action.

This is a opaque datapointer used for the action by the Generator. The generator is responsible for setting it to something sensible and also for interpreting it.

The handle is deleted according to rules of the shared pointer.

Note
Okular (core/part/shell/...) itself makes no use of this
Since
24.05.2

Definition at line 73 of file action.cpp.

◆ setNativeId()

void Action::setNativeId ( const QVariant & id)

Sets the "native" id of the action.

This is for use of the Generator, that can optionally store an handle (a pointer, an identifier, etc) of the "native" action object, if any.

Note
Okular makes no use of this
Deprecated
use setNativeHandle
Since
0.15 (KDE 4.9)

Definition at line 55 of file action.cpp.

◆ setNextActions()

void Action::setNextActions ( const QVector< Action * > & actions)

Sets the next actions.

Takes ownership of the objects in the actions vector.

Since
1.5

Definition at line 84 of file action.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.