mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 10:22:52 +00:00
further code remove on JS action of okular
This commit is contained in:
parent
ea443720d0
commit
21ecea343c
4 changed files with 0 additions and 108 deletions
|
@ -361,58 +361,6 @@ Okular::Sound *SoundAction::sound() const
|
|||
return d->m_sound;
|
||||
}
|
||||
|
||||
// ScriptAction
|
||||
|
||||
class Okular::ScriptActionPrivate : public Okular::ActionPrivate
|
||||
{
|
||||
public:
|
||||
ScriptActionPrivate( enum ScriptType type, const QString &script )
|
||||
: ActionPrivate(), m_scriptType( type ), m_script( script )
|
||||
{
|
||||
}
|
||||
|
||||
ScriptType m_scriptType;
|
||||
QString m_script;
|
||||
};
|
||||
|
||||
ScriptAction::ScriptAction( enum ScriptType type, const QString &script )
|
||||
: Action( *new ScriptActionPrivate( type, script ) )
|
||||
{
|
||||
}
|
||||
|
||||
ScriptAction::~ScriptAction()
|
||||
{
|
||||
}
|
||||
|
||||
Action::ActionType ScriptAction::actionType() const
|
||||
{
|
||||
return Script;
|
||||
}
|
||||
|
||||
QString ScriptAction::actionTip() const
|
||||
{
|
||||
Q_D( const Okular::ScriptAction );
|
||||
switch ( d->m_scriptType )
|
||||
{
|
||||
case JavaScript:
|
||||
return i18n( "JavaScript Script" );
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
ScriptType ScriptAction::scriptType() const
|
||||
{
|
||||
Q_D( const Okular::ScriptAction );
|
||||
return d->m_scriptType;
|
||||
}
|
||||
|
||||
QString ScriptAction::script() const
|
||||
{
|
||||
Q_D( const Okular::ScriptAction );
|
||||
return d->m_script;
|
||||
}
|
||||
|
||||
// MovieAction
|
||||
|
||||
class Okular::MovieActionPrivate : public Okular::ActionPrivate
|
||||
|
|
|
@ -24,7 +24,6 @@ class ExecuteActionPrivate;
|
|||
class BrowseActionPrivate;
|
||||
class DocumentActionPrivate;
|
||||
class SoundActionPrivate;
|
||||
class ScriptActionPrivate;
|
||||
class MovieActionPrivate;
|
||||
class RenditionActionPrivate;
|
||||
class MovieAnnotation;
|
||||
|
@ -53,7 +52,6 @@ class OKULAR_EXPORT Action
|
|||
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)
|
||||
};
|
||||
|
||||
|
@ -379,51 +377,6 @@ class OKULAR_EXPORT SoundAction : public Action
|
|||
Q_DISABLE_COPY( SoundAction )
|
||||
};
|
||||
|
||||
/**
|
||||
* The Script action executes a Script code.
|
||||
*
|
||||
* @since 0.7 (KDE 4.1)
|
||||
*/
|
||||
class OKULAR_EXPORT ScriptAction : public Action
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Creates a new Script action.
|
||||
*
|
||||
* @param script The code to execute.
|
||||
*/
|
||||
ScriptAction( enum ScriptType type, const QString &script );
|
||||
|
||||
/**
|
||||
* Destroys the browse action.
|
||||
*/
|
||||
virtual ~ScriptAction();
|
||||
|
||||
/**
|
||||
* Returns the action type.
|
||||
*/
|
||||
ActionType actionType() const;
|
||||
|
||||
/**
|
||||
* Returns the action tip.
|
||||
*/
|
||||
QString actionTip() const;
|
||||
|
||||
/**
|
||||
* Returns the type of action.
|
||||
*/
|
||||
ScriptType scriptType() const;
|
||||
|
||||
/**
|
||||
* Returns the code.
|
||||
*/
|
||||
QString script() const;
|
||||
|
||||
private:
|
||||
Q_DECLARE_PRIVATE( ScriptAction )
|
||||
Q_DISABLE_COPY( ScriptAction )
|
||||
};
|
||||
|
||||
/**
|
||||
* The Movie action executes an operation on a video on activation.
|
||||
*
|
||||
|
|
|
@ -3740,7 +3740,6 @@ void Document::processAction( const Action * action )
|
|||
emit processMovieAction( static_cast< const MovieAction * >( action ) );
|
||||
break;
|
||||
case Action::Rendition: {
|
||||
const RenditionAction * linkrendition = static_cast< const RenditionAction * >( action );
|
||||
emit processRenditionAction( static_cast< const RenditionAction * >( action ) );
|
||||
} break;
|
||||
}
|
||||
|
|
|
@ -218,7 +218,6 @@ Okular::Action* createLinkFromPopplerLink(const Poppler::Link *popplerLink)
|
|||
const Poppler::LinkBrowse *popplerLinkBrowse;
|
||||
const Poppler::LinkAction *popplerLinkAction;
|
||||
const Poppler::LinkSound *popplerLinkSound;
|
||||
const Poppler::LinkJavaScript *popplerLinkJS;
|
||||
#ifdef HAVE_POPPLER_0_20
|
||||
const Poppler::LinkMovie *popplerLinkMovie;
|
||||
#endif
|
||||
|
@ -275,13 +274,6 @@ Okular::Action* createLinkFromPopplerLink(const Poppler::Link *popplerLink)
|
|||
}
|
||||
break;
|
||||
|
||||
case Poppler::Link::JavaScript:
|
||||
{
|
||||
popplerLinkJS = static_cast<const Poppler::LinkJavaScript *>(popplerLink);
|
||||
link = new Okular::ScriptAction( Okular::JavaScript, popplerLinkJS->script() );
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef HAVE_POPPLER_0_22
|
||||
case Poppler::Link::Rendition:
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue