Changeset View
Changeset View
Standalone View
Standalone View
core/form.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2007 by Pino Toscano <pino@kde.org> * | 2 | * Copyright (C) 2007 by Pino Toscano <pino@kde.org> * | ||
3 | * * | 3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | 4 | * This program is free software; you can redistribute it and/or modify * | ||
5 | * it under the terms of the GNU General Public License as published by * | 5 | * it under the terms of the GNU General Public License as published by * | ||
6 | * the Free Software Foundation; either version 2 of the License, or * | 6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * (at your option) any later version. * | 7 | * (at your option) any later version. * | ||
8 | ***************************************************************************/ | 8 | ***************************************************************************/ | ||
9 | 9 | | |||
10 | #ifndef _OKULAR_FORM_H_ | 10 | #ifndef _OKULAR_FORM_H_ | ||
11 | #define _OKULAR_FORM_H_ | 11 | #define _OKULAR_FORM_H_ | ||
12 | 12 | | |||
13 | #include "okularcore_export.h" | 13 | #include "okularcore_export.h" | ||
14 | #include "area.h" | 14 | #include "area.h" | ||
15 | #include "annotations.h" | 15 | #include "annotations.h" | ||
16 | 16 | #include "signatureutils.h" | |||
17 | #include <QtCore/QStringList> | 17 | #include <QtCore/QStringList> | ||
18 | 18 | | |||
19 | namespace Okular { | 19 | namespace Okular { | ||
20 | 20 | | |||
21 | class Action; | 21 | class Action; | ||
22 | class Page; | 22 | class Page; | ||
23 | class PagePrivate; | 23 | class PagePrivate; | ||
24 | class FormFieldPrivate; | 24 | class FormFieldPrivate; | ||
25 | class FormFieldButtonPrivate; | 25 | class FormFieldButtonPrivate; | ||
26 | class FormFieldTextPrivate; | 26 | class FormFieldTextPrivate; | ||
27 | class FormFieldChoicePrivate; | 27 | class FormFieldChoicePrivate; | ||
28 | class FormFieldSignaturePrivate; | ||||
28 | 29 | | |||
29 | /** | 30 | /** | ||
30 | * @short The base interface of a form field. | 31 | * @short The base interface of a form field. | ||
31 | * | 32 | * | ||
32 | * This is the very basic interface to represent a field in a form. | 33 | * This is the very basic interface to represent a field in a form. | ||
33 | * | 34 | * | ||
34 | * This is not meant to be used as a direct base for the form fields in a | 35 | * This is not meant to be used as a direct base for the form fields in a | ||
35 | * document, but its abstract subclasses are. | 36 | * document, but its abstract subclasses are. | ||
▲ Show 20 Lines • Show All 346 Lines • ▼ Show 20 Line(s) | 305 | { | |||
382 | protected: | 383 | protected: | ||
383 | FormFieldChoice(); | 384 | FormFieldChoice(); | ||
384 | 385 | | |||
385 | private: | 386 | private: | ||
386 | Q_DECLARE_PRIVATE( FormFieldChoice ) | 387 | Q_DECLARE_PRIVATE( FormFieldChoice ) | ||
387 | Q_DISABLE_COPY( FormFieldChoice ) | 388 | Q_DISABLE_COPY( FormFieldChoice ) | ||
388 | }; | 389 | }; | ||
389 | 390 | | |||
391 | /** | ||||
392 | * @short Interface of a signature form field. | ||||
393 | * | ||||
394 | * This is the base interface to reimplement to represent a signature field. | ||||
395 | */ | ||||
396 | class OKULARCORE_EXPORT FormFieldSignature : public FormField | ||||
397 | { | ||||
398 | public: | ||||
399 | /** | ||||
400 | * The types of signature. | ||||
401 | */ | ||||
402 | enum SignatureType { | ||||
403 | AdbePkcs7sha1, | ||||
404 | AdbePkcs7detached, | ||||
405 | EtsiCAdESdetached, | ||||
406 | UnknownType | ||||
407 | }; | ||||
408 | | ||||
409 | ~FormFieldSignature(); | ||||
410 | | ||||
411 | /** | ||||
412 | * The signature type | ||||
413 | */ | ||||
414 | virtual SignatureType signatureType() const = 0; | ||||
415 | | ||||
416 | /** | ||||
417 | * Validate the signature with 'now' as validation time. | ||||
418 | * | ||||
419 | */ | ||||
420 | virtual SignatureInfo *validate() const = 0; | ||||
421 | | ||||
422 | | ||||
423 | protected: | ||||
424 | FormFieldSignature(); | ||||
425 | | ||||
426 | private: | ||||
427 | Q_DECLARE_PRIVATE( FormFieldSignature ) | ||||
428 | Q_DISABLE_COPY( FormFieldSignature ) | ||||
429 | }; | ||||
430 | | ||||
390 | } | 431 | } | ||
391 | 432 | | |||
392 | #endif | 433 | #endif |