1 /***************************************************************************
2 * Copyright (C) 2008 by Pino Toscano <pino@kde.org> *
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 ***************************************************************************/
15 #include "script/executor_kjs_p.h"
17 using namespace Okular
;
19 class Okular::ScripterPrivate
22 ScripterPrivate( DocumentPrivate
*doc
)
23 : m_doc( doc
), m_kjs( 0 )
32 DocumentPrivate
*m_doc
;
36 Scripter::Scripter( DocumentPrivate
*doc
)
37 : d( new ScripterPrivate( doc
) )
46 QString
Scripter::execute( ScriptType type
, const QString
&script
)
48 kDebug(OkularDebug
) << "executing the script:";
50 if ( script
.length() < 1000 )
53 qDebug() << script
.left( 1000 ) << "[...]";
60 d
->m_kjs
= new ExecutorKJS( d
->m_doc
);
62 d
->m_kjs
->execute( script
);