1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
namespace Poppler {
class FormField {
%TypeHeaderCode
#include <qt4/poppler-qt4.h>
#include <qt4/poppler-form.h>
%End
public:
enum FormType {
FormButton,
FormText,
FormChoice,
FormSignature,
};
virtual ~FormField();
virtual FormType type() const = 0;
QRectF rect() const;
int id() const;
QString name() const;
QString uiName() const;
bool isReadOnly() const;
bool isVisible() const;
Poppler::Link* activationAction() const;
private:
FormField(const Poppler::FormField&);
}; // class FormField
class FormFieldButton : Poppler::FormField {
%TypeHeaderCode
#include <qt4/poppler-qt4.h>
#include <qt4/poppler-form.h>
%End
public:
enum ButtonType {
Push,
CheckBox,
Radio,
};
// FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w);
virtual ~FormFieldButton();
virtual FormType type() const;
ButtonType buttonType() const;
QString caption() const;
bool state() const;
void setState( bool state );
QList<int> siblings() const;
private:
FormFieldButton(const Poppler::FormFieldButton&);
}; // class FormFieldButton
class FormFieldText : Poppler::FormField {
%TypeHeaderCode
#include <qt4/poppler-qt4.h>
#include <qt4/poppler-form.h>
%End
public:
enum TextType {
Normal,
Multiline,
FileSelect,
};
// FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
virtual ~FormFieldText();
virtual FormType type() const;
TextType textType() const;
QString text() const;
void setText( const QString& text );
bool isPassword() const;
bool isRichText() const;
int maximumLength() const;
Qt::Alignment textAlignment() const;
bool canBeSpellChecked() const;
private:
FormFieldText(const Poppler::FormFieldText&);
}; // class FormFieldText
class FormFieldChoice : Poppler::FormField {
%TypeHeaderCode
#include <qt4/poppler-qt4.h>
#include <qt4/poppler-form.h>
%End
public:
enum ChoiceType {
ComboBox,
ListBox,
};
// FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w);
virtual ~FormFieldChoice();
virtual FormType type() const;
ChoiceType choiceType() const;
QStringList choices() const;
bool isEditable() const;
bool multiSelect() const;
QList<int> currentChoices() const;
void setCurrentChoices( const QList<int> &choice );
Qt::Alignment textAlignment() const;
bool canBeSpellChecked() const;
private:
FormFieldChoice(const Poppler::FormFieldChoice&);
};
}; // namespace Poppler
/* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
|