• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdegraphics
  • Sitemap
  • Contact Us
 

okular

form.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 by Pino Toscano <pino@kde.org>                     *
00003  *                                                                         *
00004  *   This program is free software; you can redistribute it and/or modify  *
00005  *   it under the terms of the GNU General Public License as published by  *
00006  *   the Free Software Foundation; either version 2 of the License, or     *
00007  *   (at your option) any later version.                                   *
00008  ***************************************************************************/
00009 
00010 #ifndef _OKULAR_FORM_H_
00011 #define _OKULAR_FORM_H_
00012 
00013 #include <okular/core/okular_export.h>
00014 #include <okular/core/area.h>
00015 
00016 #include <QtCore/QStringList>
00017 
00018 namespace Okular {
00019 
00020 class Page;
00021 class PagePrivate;
00022 class FormFieldPrivate;
00023 class FormFieldTextPrivate;
00024 class FormFieldChoicePrivate;
00025 
00034 class OKULAR_EXPORT FormField
00035 {
00037     friend class Page;
00038     friend class PagePrivate;
00040 
00041     public:
00045         enum FieldType
00046         {
00047             FormButton,      
00048             FormText,        
00049             FormChoice,      
00050             FormSignature    
00051         };
00052 
00053         virtual ~FormField();
00054 
00058         FieldType type() const;
00059 
00063         virtual NormalizedRect rect() const = 0;
00064 
00068         virtual int id() const = 0;
00069 
00074         virtual QString name() const = 0;
00075 
00080         virtual QString uiName() const = 0;
00081 
00085         virtual bool isReadOnly() const;
00086 
00090         virtual bool isVisible() const;
00091 
00092     protected:
00094         FormField( FormFieldPrivate &dd );
00095         Q_DECLARE_PRIVATE( FormField )
00096         FormFieldPrivate *d_ptr;
00098 
00099     private:
00100         Q_DISABLE_COPY( FormField )
00101 };
00102 
00103 
00110 class OKULAR_EXPORT FormFieldText : public FormField
00111 {
00112     public:
00116         enum TextType
00117         {
00118             Normal,        
00119             Multiline,     
00120             FileSelect     
00121         };
00122 
00123         virtual ~FormFieldText();
00124 
00128         virtual TextType textType() const = 0;
00129 
00133         virtual QString text() const = 0;
00134 
00142         virtual void setText( const QString& text );
00143 
00150         virtual bool isPassword() const;
00151 
00155         virtual bool isRichText() const;
00156 
00161         virtual int maximumLength() const;
00162 
00166         virtual Qt::Alignment textAlignment() const;
00167 
00174         virtual bool canBeSpellChecked() const;
00175 
00176     protected:
00177         FormFieldText();
00178 
00179     private:
00180         Q_DECLARE_PRIVATE( FormFieldText )
00181         Q_DISABLE_COPY( FormFieldText )
00182 };
00183 
00184 
00192 class OKULAR_EXPORT FormFieldChoice : public FormField
00193 {
00194     public:
00198         enum ChoiceType
00199         {
00200             ComboBox,     
00201             ListBox       
00202         };
00203 
00204         virtual ~FormFieldChoice();
00205 
00209         virtual ChoiceType choiceType() const = 0;
00210 
00214         virtual QStringList choices() const = 0;
00215 
00222         virtual bool isEditable() const;
00223 
00230         virtual bool multiSelect() const;
00231 
00237         virtual QList< int > currentChoices() const = 0;
00238 
00242         virtual void setCurrentChoices( const QList< int >& choices );
00243 
00247         virtual Qt::Alignment textAlignment() const;
00248 
00255         virtual bool canBeSpellChecked() const;
00256 
00257     protected:
00258         FormFieldChoice();
00259 
00260     private:
00261         Q_DECLARE_PRIVATE( FormFieldChoice )
00262         Q_DISABLE_COPY( FormFieldChoice )
00263 };
00264 
00265 }
00266 
00267 #endif

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdegraphics

Skip menu "kdegraphics"
  • okular
Generated for kdegraphics by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal