mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
db8a10dc2c
This includes: - the interfaces for the generators - the basic widgets for editing their value - a top bar for show/hide the forms of a document - the implementation of the forms for the PDF backend still nothing that can be done with them, nor the value of the forms can be saved... ... but it's a start! :-) svn path=/trunk/playground/graphics/okular/; revision=637001
76 lines
2.7 KiB
C++
76 lines
2.7 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2007 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 _OKULAR_GENERATOR_PDF_FORMFIELDS_H_
|
|
#define _OKULAR_GENERATOR_PDF_FORMFIELDS_H_
|
|
|
|
#include <poppler-form.h>
|
|
#include "core/form.h"
|
|
|
|
class PopplerFormFieldText : public Okular::FormFieldText
|
|
{
|
|
public:
|
|
PopplerFormFieldText( Poppler::FormFieldText * field );
|
|
virtual ~PopplerFormFieldText();
|
|
|
|
// inherited from Okular::FormField
|
|
virtual Okular::NormalizedRect rect() const;
|
|
virtual int id() const;
|
|
virtual QString name() const;
|
|
virtual QString uiName() const;
|
|
virtual bool isReadOnly() const;
|
|
virtual bool isVisible() const;
|
|
|
|
// inherited from Okular::FormFieldText
|
|
virtual Okular::FormFieldText::TextType textType() const;
|
|
virtual QString text() const;
|
|
virtual void setText( const QString& text );
|
|
virtual bool isPassword() const;
|
|
virtual bool isRichText() const;
|
|
virtual int maximumLength() const;
|
|
virtual Qt::Alignment textAlignment() const;
|
|
virtual bool canBeSpellChecked() const;
|
|
|
|
private:
|
|
Poppler::FormFieldText * m_field;
|
|
Okular::NormalizedRect m_rect;
|
|
|
|
};
|
|
|
|
class PopplerFormFieldChoice : public Okular::FormFieldChoice
|
|
{
|
|
public:
|
|
PopplerFormFieldChoice( Poppler::FormFieldChoice * field );
|
|
virtual ~PopplerFormFieldChoice();
|
|
|
|
// inherited from Okular::FormField
|
|
virtual Okular::NormalizedRect rect() const;
|
|
virtual int id() const;
|
|
virtual QString name() const;
|
|
virtual QString uiName() const;
|
|
virtual bool isReadOnly() const;
|
|
virtual bool isVisible() const;
|
|
|
|
// inherited from Okular::FormFieldChoice
|
|
virtual ChoiceType choiceType() const;
|
|
virtual QStringList choices() const;
|
|
virtual bool isEditable() const;
|
|
virtual bool multiSelect() const;
|
|
virtual QList<int> currentChoices() const;
|
|
virtual void setCurrentChoices( const QList<int>& choices );
|
|
virtual Qt::Alignment textAlignment() const;
|
|
virtual bool canBeSpellChecked() const;
|
|
|
|
private:
|
|
Poppler::FormFieldChoice * m_field;
|
|
Okular::NormalizedRect m_rect;
|
|
|
|
};
|
|
|
|
#endif
|