Commit 0102ea58 authored by Pino Toscano's avatar Pino Toscano

extract the pdfembeddedfile class in an own header

svn path=/trunk/KDE/kdegraphics/okular/; revision=796458
parent c3f76672
......@@ -42,51 +42,10 @@
#include <config-okular-poppler.h>
#include "formfields.h"
#include "popplerembeddedfile.h"
static const int PDFDebug = 4710;
class PDFEmbeddedFile : public Okular::EmbeddedFile
{
public:
PDFEmbeddedFile(Poppler::EmbeddedFile *f) : ef(f)
{
}
QString name() const
{
return ef->name();
}
QString description() const
{
return ef->description();
}
QByteArray data() const
{
return ef->data();
}
int size() const
{
int s = ef->size();
return s <= 0 ? -1 : s;
}
QDateTime modificationDate() const
{
return ef->modDate();
}
QDateTime creationDate() const
{
return ef->createDate();
}
private:
Poppler::EmbeddedFile *ef;
};
class PDFOptionsPage : public QWidget
{
public:
......
/***************************************************************************
* Copyright (C) 2006-2008 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 POPPLEREMBEDDEDFILE_H
#define POPPLEREMBEDDEDFILE_H
#include <poppler-qt4.h>
#include <okular/core/document.h>
class PDFEmbeddedFile : public Okular::EmbeddedFile
{
public:
PDFEmbeddedFile(Poppler::EmbeddedFile *f) : ef(f)
{
}
QString name() const
{
return ef->name();
}
QString description() const
{
return ef->description();
}
QByteArray data() const
{
return ef->data();
}
int size() const
{
int s = ef->size();
return s <= 0 ? -1 : s;
}
QDateTime modificationDate() const
{
return ef->modDate();
}
QDateTime creationDate() const
{
return ef->createDate();
}
private:
Poppler::EmbeddedFile *ef;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment