okular/generators/kimgio/generator_kimgio.h
Pino Toscano 6aa123656a Port the plugin system to the standard KDE factory and loader, getting rid of the custom system okular had so far.
This requires a generator to have a
  MyGenerator(QObject *parent, const QVariantList &args)
constructor in order to be successfully loaded.
The OKULAR_EXPORT_PLUGIN macro was adapted, and the generators to provide it the about data; the protected Generator::setAboutData() is no more needed.

Remove the 'lib' prefix from plugins, unneeded now.

CCMAIL: okular-devel@kde.org

svn path=/trunk/KDE/kdegraphics/okular/; revision=744169
2007-12-02 20:57:24 +00:00

45 lines
1.6 KiB
C++

/***************************************************************************
* Copyright (C) 2005 by Albert Astals Cid <tsdgeos@terra.es> *
* *
* 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 _OKULAR_GENERATOR_KIMGIO_H_
#define _OKULAR_GENERATOR_KIMGIO_H_
#include <core/generator.h>
#include <interfaces/guiinterface.h>
#include <QtGui/QImage>
class KIMGIOGenerator : public Okular::Generator, public Okular::GuiInterface
{
Q_OBJECT
Q_INTERFACES( Okular::GuiInterface )
public:
KIMGIOGenerator( QObject *parent, const QVariantList &args );
virtual ~KIMGIOGenerator();
// [INHERITED] load a document and fill up the pagesVector
bool loadDocument( const QString & fileName, QVector<Okular::Page*> & pagesVector );
bool loadDocumentFromData( const QByteArray & fileData, QVector<Okular::Page*> & pagesVector );
// [INHERITED] print document using already configured kprinter
bool print( QPrinter& printer );
protected:
bool doCloseDocument();
QImage image( Okular::PixmapRequest * request );
private slots:
void slotTest();
private:
QImage m_img;
};
#endif