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
111 lines
1.9 KiB
C++
111 lines
1.9 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. *
|
|
***************************************************************************/
|
|
|
|
// local includes
|
|
#include "form.h"
|
|
|
|
using namespace Okular;
|
|
|
|
FormField::FormField( FormField::FieldType t )
|
|
: m_type( t )
|
|
{
|
|
}
|
|
|
|
FormField::~FormField()
|
|
{
|
|
}
|
|
|
|
FormField::FieldType FormField::type() const
|
|
{
|
|
return m_type;
|
|
}
|
|
|
|
bool FormField::isReadOnly() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool FormField::isVisible() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
FormFieldText::FormFieldText()
|
|
: FormField( FormField::FormText )
|
|
{
|
|
}
|
|
|
|
FormFieldText::~FormFieldText()
|
|
{
|
|
}
|
|
|
|
void FormFieldText::setText( const QString& )
|
|
{
|
|
}
|
|
|
|
bool FormFieldText::isPassword() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool FormFieldText::isRichText() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
int FormFieldText::maximumLength() const
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
Qt::Alignment FormFieldText::textAlignment() const
|
|
{
|
|
return Qt::AlignVCenter | Qt::AlignLeft;
|
|
}
|
|
|
|
bool FormFieldText::canBeSpellChecked() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
FormFieldChoice::FormFieldChoice()
|
|
: FormField( FormField::FormChoice )
|
|
{
|
|
}
|
|
|
|
FormFieldChoice::~FormFieldChoice()
|
|
{
|
|
}
|
|
|
|
bool FormFieldChoice::isEditable() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool FormFieldChoice::multiSelect() const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void FormFieldChoice::setCurrentChoices( const QList< int >& )
|
|
{
|
|
}
|
|
|
|
Qt::Alignment FormFieldChoice::textAlignment() const
|
|
{
|
|
return Qt::AlignVCenter | Qt::AlignLeft;
|
|
}
|
|
|
|
bool FormFieldChoice::canBeSpellChecked() const
|
|
{
|
|
return false;
|
|
}
|
|
|