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

okular

  • sources
  • kde-4.12
  • kdegraphics
  • okular
  • core
action.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  ***************************************************************************/
9 
10 #ifndef _OKULAR_ACTION_H_
11 #define _OKULAR_ACTION_H_
12 
13 #include "global.h"
14 #include "okular_export.h"
15 
16 #include <QtCore/QString>
17 #include <QtCore/QVariant>
18 
19 namespace Okular {
20 
21 class ActionPrivate;
22 class GotoActionPrivate;
23 class ExecuteActionPrivate;
24 class BrowseActionPrivate;
25 class DocumentActionPrivate;
26 class SoundActionPrivate;
27 class ScriptActionPrivate;
28 class MovieActionPrivate;
29 class RenditionActionPrivate;
30 class MovieAnnotation;
31 class ScreenAnnotation;
32 class Movie;
33 class Sound;
34 class DocumentViewport;
35 
43 class OKULAR_EXPORT Action
44 {
45  public:
49  enum ActionType {
50  Goto,
51  Execute,
52  Browse,
53  DocAction,
54  Sound,
55  Movie,
56  Script,
57  Rendition,
58  };
59 
63  virtual ~Action();
64 
71  virtual ActionType actionType() const = 0;
72 
77  virtual QString actionTip() const;
78 
90  void setNativeId( const QVariant &id );
91 
97  QVariant nativeId() const;
98 
99  protected:
101  Action( ActionPrivate &dd );
102  Q_DECLARE_PRIVATE( Action )
103  ActionPrivate *d_ptr;
105 
106  private:
107  Q_DISABLE_COPY( Action )
108 };
109 
110 
115 class OKULAR_EXPORT GotoAction : public Action
116 {
117  public:
124  GotoAction( const QString& fileName, const DocumentViewport & viewport );
125 
134  GotoAction( const QString& fileName, const QString& namedDestination );
135 
139  virtual ~GotoAction();
140 
144  ActionType actionType() const;
145 
149  QString actionTip() const;
150 
154  bool isExternal() const;
155 
159  QString fileName() const;
160 
164  DocumentViewport destViewport() const;
165 
171  QString destinationName() const;
172 
173  private:
174  Q_DECLARE_PRIVATE( GotoAction )
175  Q_DISABLE_COPY( GotoAction )
176 };
177 
181 class OKULAR_EXPORT ExecuteAction : public Action
182 {
183  public:
190  ExecuteAction( const QString &fileName, const QString &parameters );
191 
195  virtual ~ExecuteAction();
196 
200  ActionType actionType() const;
201 
205  QString actionTip() const;
206 
210  QString fileName() const;
211 
215  QString parameters() const;
216 
217  private:
218  Q_DECLARE_PRIVATE( ExecuteAction )
219  Q_DISABLE_COPY( ExecuteAction )
220 };
221 
226 class OKULAR_EXPORT BrowseAction : public Action
227 {
228  public:
234  BrowseAction( const QString &url );
235 
239  virtual ~BrowseAction();
240 
244  ActionType actionType() const;
245 
249  QString actionTip() const;
250 
254  QString url() const;
255 
256  private:
257  Q_DECLARE_PRIVATE( BrowseAction )
258  Q_DISABLE_COPY( BrowseAction )
259 };
260 
265 class OKULAR_EXPORT DocumentAction : public Action
266 {
267  public:
273  enum DocumentActionType {
274  PageFirst = 1,
275  PagePrev = 2,
276  PageNext = 3,
277  PageLast = 4,
278  HistoryBack = 5,
279  HistoryForward = 6,
280  Quit = 7,
281  Presentation = 8,
282  EndPresentation = 9,
283  Find = 10,
284  GoToPage = 11,
285  Close = 12
286  };
287 
293  explicit DocumentAction( enum DocumentActionType documentActionType );
294 
298  virtual ~DocumentAction();
299 
303  ActionType actionType() const;
304 
308  QString actionTip() const;
309 
313  DocumentActionType documentActionType() const;
314 
315  private:
316  Q_DECLARE_PRIVATE( DocumentAction )
317  Q_DISABLE_COPY( DocumentAction )
318 };
319 
323 class OKULAR_EXPORT SoundAction : public Action
324 {
325  public:
335  SoundAction( double volume, bool synchronous, bool repeat, bool mix, Okular::Sound *sound );
336 
340  virtual ~SoundAction();
341 
345  ActionType actionType() const;
346 
350  QString actionTip() const;
351 
355  double volume() const;
356 
360  bool synchronous() const;
361 
365  bool repeat() const;
366 
370  bool mix() const;
371 
375  Okular::Sound *sound() const;
376 
377  private:
378  Q_DECLARE_PRIVATE( SoundAction )
379  Q_DISABLE_COPY( SoundAction )
380 };
381 
387 class OKULAR_EXPORT ScriptAction : public Action
388 {
389  public:
395  ScriptAction( enum ScriptType type, const QString &script );
396 
400  virtual ~ScriptAction();
401 
405  ActionType actionType() const;
406 
410  QString actionTip() const;
411 
415  ScriptType scriptType() const;
416 
420  QString script() const;
421 
422  private:
423  Q_DECLARE_PRIVATE( ScriptAction )
424  Q_DISABLE_COPY( ScriptAction )
425 };
426 
432 class OKULAR_EXPORT MovieAction : public Action
433 {
434  public:
438  enum OperationType {
439  Play,
440  Stop,
441  Pause,
442  Resume
443  };
444 
448  MovieAction( OperationType operation );
449 
453  virtual ~MovieAction();
454 
458  ActionType actionType() const;
459 
463  QString actionTip() const;
464 
468  OperationType operation() const;
469 
473  void setAnnotation( MovieAnnotation *annotation );
474 
478  MovieAnnotation* annotation() const;
479 
480  private:
481  Q_DECLARE_PRIVATE( MovieAction )
482  Q_DISABLE_COPY( MovieAction )
483 };
484 
491 class OKULAR_EXPORT RenditionAction : public Action
492 {
493  public:
497  enum OperationType {
498  None,
499  Play,
500  Stop,
501  Pause,
502  Resume
503  };
504 
513  RenditionAction( OperationType operation, Okular::Movie *movie, enum ScriptType scriptType, const QString &script );
514 
518  virtual ~RenditionAction();
519 
523  ActionType actionType() const;
524 
528  QString actionTip() const;
529 
533  OperationType operation() const;
534 
538  Okular::Movie* movie() const;
539 
543  ScriptType scriptType() const;
544 
548  QString script() const;
549 
553  void setAnnotation( ScreenAnnotation *annotation );
554 
558  ScreenAnnotation* annotation() const;
559 
560  private:
561  Q_DECLARE_PRIVATE( RenditionAction )
562  Q_DISABLE_COPY( RenditionAction )
563 };
564 
565 }
566 
567 #endif
Okular::Action::DocAction
Start a custom action.
Definition: action.h:53
Okular::RenditionAction::Pause
Pause the video.
Definition: action.h:501
Okular::RenditionAction::None
Execute only the JavaScript.
Definition: action.h:498
Okular::MovieAction::OperationType
OperationType
Describes the possible operation types.
Definition: action.h:438
Okular::ScriptAction
The Script action executes a Script code.
Definition: action.h:387
global.h
Okular::ExecuteAction
The Execute action executes an external application.
Definition: action.h:181
okular_export.h
Okular::MovieAction
The Movie action executes an operation on a video on activation.
Definition: action.h:432
Okular::MovieAction::Pause
Definition: action.h:441
Okular::ScriptType
ScriptType
Describes the possible script types.
Definition: global.h:76
Okular::GotoAction
The Goto action changes the viewport to another page or loads an external document.
Definition: action.h:115
Okular::Sound
Contains information about a sound object.
Definition: sound.h:26
Okular::Action::Goto
Goto a given page or external document.
Definition: action.h:50
Okular::MovieAction::Play
Definition: action.h:439
Okular::RenditionAction::OperationType
OperationType
Describes the possible operation types.
Definition: action.h:497
Okular::Action
Encapsulates data that describes an action.
Definition: action.h:43
Okular::DocumentAction::DocumentActionType
DocumentActionType
Describes the possible action types.
Definition: action.h:273
Okular::Action::Movie
Play a movie.
Definition: action.h:55
Okular::MovieAnnotation
Movie annotation.
Definition: annotations.h:1488
Okular::Action::Script
Executes a Script code.
Definition: action.h:56
Okular::Action::Rendition
Play a movie and/or execute a Script code.
Definition: action.h:57
Okular::BrowseAction
The Browse action browses an url by opening a web browser or email client, depedning on the url proto...
Definition: action.h:226
Okular::MovieAction::Stop
Definition: action.h:440
Okular::DocumentAction
The DocumentAction action contains an action that is performed on the current document.
Definition: action.h:265
OKULAR_EXPORT
#define OKULAR_EXPORT
Definition: okular_export.h:30
Okular::RenditionAction::Play
Start playing the video.
Definition: action.h:499
Okular::Action::ActionType
ActionType
Describes the type of action.
Definition: action.h:49
Okular::DocumentViewport
A view on the document.
Definition: document.h:1003
Okular::RenditionAction
The Rendition action executes an operation on a video or executes some JavaScript code on activation...
Definition: action.h:491
Okular::Action::Browse
Browse a given website.
Definition: action.h:52
Okular::RenditionAction::Stop
Stop playing the video.
Definition: action.h:500
Okular::ScreenAnnotation
Screen annotation.
Definition: annotations.h:1534
Okular::Action::Sound
Play a sound.
Definition: action.h:54
Okular::SoundAction
The Sound action plays a sound on activation.
Definition: action.h:323
Okular::Action::Execute
Execute a command or external application.
Definition: action.h:51
Okular::Movie
Contains information about a movie object.
Definition: movie.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

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

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

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