okular
action.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _OKULAR_ACTION_H_
00011 #define _OKULAR_ACTION_H_
00012
00013 #include <okular/core/okular_export.h>
00014
00015 #include <QtCore/QString>
00016
00017 namespace Okular {
00018
00019 class ActionPrivate;
00020 class GotoActionPrivate;
00021 class ExecuteActionPrivate;
00022 class BrowseActionPrivate;
00023 class DocumentActionPrivate;
00024 class SoundActionPrivate;
00025 class MovieActionPrivate;
00026 class Sound;
00027 class DocumentViewport;
00028
00036 class OKULAR_EXPORT Action
00037 {
00038 public:
00042 enum ActionType {
00043 Goto,
00044 Execute,
00045 Browse,
00046 DocAction,
00047 Sound,
00048 Movie
00049 };
00050
00054 virtual ~Action();
00055
00062 virtual ActionType actionType() const = 0;
00063
00068 virtual QString actionTip() const;
00069
00070 protected:
00072 Action( ActionPrivate &dd );
00073 Q_DECLARE_PRIVATE( Action )
00074 ActionPrivate *d_ptr;
00076
00077 private:
00078 Q_DISABLE_COPY( Action )
00079 };
00080
00081
00086 class OKULAR_EXPORT GotoAction : public Action
00087 {
00088 public:
00095 GotoAction( const QString& fileName, const DocumentViewport & viewport );
00096
00100 virtual ~GotoAction();
00101
00105 ActionType actionType() const;
00106
00110 QString actionTip() const;
00111
00115 bool isExternal() const;
00116
00120 QString fileName() const;
00121
00125 DocumentViewport destViewport() const;
00126
00127 private:
00128 Q_DECLARE_PRIVATE( GotoAction )
00129 Q_DISABLE_COPY( GotoAction )
00130 };
00131
00135 class OKULAR_EXPORT ExecuteAction : public Action
00136 {
00137 public:
00144 ExecuteAction( const QString &fileName, const QString ¶meters );
00145
00149 virtual ~ExecuteAction();
00150
00154 ActionType actionType() const;
00155
00159 QString actionTip() const;
00160
00164 QString fileName() const;
00165
00169 QString parameters() const;
00170
00171 private:
00172 Q_DECLARE_PRIVATE( ExecuteAction )
00173 Q_DISABLE_COPY( ExecuteAction )
00174 };
00175
00180 class OKULAR_EXPORT BrowseAction : public Action
00181 {
00182 public:
00188 BrowseAction( const QString &url );
00189
00193 virtual ~BrowseAction();
00194
00198 ActionType actionType() const;
00199
00203 QString actionTip() const;
00204
00208 QString url() const;
00209
00210 private:
00211 Q_DECLARE_PRIVATE( BrowseAction )
00212 Q_DISABLE_COPY( BrowseAction )
00213 };
00214
00219 class OKULAR_EXPORT DocumentAction : public Action
00220 {
00221 public:
00227 enum DocumentActionType {
00228 PageFirst = 1,
00229 PagePrev = 2,
00230 PageNext = 3,
00231 PageLast = 4,
00232 HistoryBack = 5,
00233 HistoryForward = 6,
00234 Quit = 7,
00235 Presentation = 8,
00236 EndPresentation = 9,
00237 Find = 10,
00238 GoToPage = 11,
00239 Close = 12
00240 };
00241
00247 explicit DocumentAction( enum DocumentActionType documentActionType );
00248
00252 virtual ~DocumentAction();
00253
00257 ActionType actionType() const;
00258
00262 QString actionTip() const;
00263
00267 DocumentActionType documentActionType() const;
00268
00269 private:
00270 Q_DECLARE_PRIVATE( DocumentAction )
00271 Q_DISABLE_COPY( DocumentAction )
00272 };
00273
00277 class OKULAR_EXPORT SoundAction : public Action
00278 {
00279 public:
00289 SoundAction( double volume, bool synchronous, bool repeat, bool mix, Okular::Sound *sound );
00290
00294 virtual ~SoundAction();
00295
00299 ActionType actionType() const;
00300
00304 QString actionTip() const;
00305
00309 double volume() const;
00310
00314 bool synchronous() const;
00315
00319 bool repeat() const;
00320
00324 bool mix() const;
00325
00329 Okular::Sound *sound() const;
00330
00331 private:
00332 Q_DECLARE_PRIVATE( SoundAction )
00333 Q_DISABLE_COPY( SoundAction )
00334 };
00335
00336 #if 0
00337
00340 class MovieAction : public Action
00341 {
00342 public:
00346 MovieAction();
00347
00351 virtual ~MovieAction();
00352
00356 ActionType actionType() const;
00357
00361 QString actionTip() const;
00362
00363 private:
00364 Q_DECLARE_PRIVATE( MovieAction )
00365 Q_DISABLE_COPY( MovieAction )
00366 };
00367 #endif
00368
00369 }
00370
00371 #endif