File indexing completed on 2024-04-28 04:32:45

0001 /*
0002     SPDX-FileCopyrightText: 2008 Pino Toscano <pino@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef OKULAR_SCRIPTER_H
0008 #define OKULAR_SCRIPTER_H
0009 
0010 #include "global.h"
0011 
0012 class QString;
0013 
0014 namespace Okular
0015 {
0016 class Document;
0017 class DocumentPrivate;
0018 class Event;
0019 class ScripterPrivate;
0020 
0021 class Scripter
0022 {
0023     friend class Document;
0024     friend class DocumentPrivate;
0025 
0026 public:
0027     ~Scripter();
0028 
0029     Scripter(const Scripter &) = delete;
0030     Scripter &operator=(const Scripter &) = delete;
0031 
0032     void execute(ScriptType type, const QString &script);
0033 
0034     void setEvent(Event *event);
0035     Event *event() const;
0036 
0037 private:
0038     friend class ScripterPrivate;
0039     ScripterPrivate *d;
0040 
0041     explicit Scripter(DocumentPrivate *doc);
0042 };
0043 
0044 }
0045 
0046 #endif