mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
19d5dd8ec7
Source files are no longer separated by UI and non-UI and similar, but only by their build target. * ui/ -> part/ * Move all source files from conf/ to part/ * Keep config skeleton definitions in conf/, needed for the mobile target too * Move editdrawingtooldialogtest.h from conf/autotests/ to autotests/ * ui/data/icons/ -> icons/ * Move /part.cpp, /part.rc and similar files to part/ * Adapt include paths in source files * Adapt CMakeLists.txt files (in / and in subdirectories) * Adapt /Messages.sh
60 lines
1.8 KiB
C++
60 lines
1.8 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2002 by Wilco Greven <greven@kde.org> *
|
|
* Copyright (C) 2008 by Pino Toscano <pino@kde.org> *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
***************************************************************************/
|
|
|
|
#ifndef _EXTENSIONS_H_
|
|
#define _EXTENSIONS_H_
|
|
|
|
#include <kparts/browserextension.h>
|
|
#include <kparts/liveconnectextension.h>
|
|
|
|
namespace Okular
|
|
{
|
|
class Part;
|
|
|
|
class BrowserExtension : public KParts::BrowserExtension
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit BrowserExtension(Part *);
|
|
|
|
public Q_SLOTS:
|
|
// Automatically detected by the host.
|
|
void print();
|
|
|
|
private:
|
|
Part *m_part;
|
|
};
|
|
|
|
class OkularLiveConnectExtension : public KParts::LiveConnectExtension
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit OkularLiveConnectExtension(Part *parent);
|
|
|
|
// from LiveConnectExtension
|
|
bool get(const unsigned long objid, const QString &field, Type &type, unsigned long &retobjid, QString &value) override;
|
|
bool put(const unsigned long objid, const QString &field, const QString &value) override;
|
|
bool call(const unsigned long objid, const QString &func, const QStringList &args, Type &type, unsigned long &retobjid, QString &value) override;
|
|
|
|
private:
|
|
QString eval(const QString &script);
|
|
void postMessage(const QStringList &args);
|
|
|
|
bool m_inEval;
|
|
QString m_evalRes;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
/* kate: replace-tabs on; indent-width 4; */
|