Changeset View
Changeset View
Standalone View
Standalone View
ui/formwidgets.h
Show All 32 Lines | |||||
33 | class QEvent; | 33 | class QEvent; | ||
34 | 34 | | |||
35 | namespace Okular { | 35 | namespace Okular { | ||
36 | class Action; | 36 | class Action; | ||
37 | class FormField; | 37 | class FormField; | ||
38 | class FormFieldButton; | 38 | class FormFieldButton; | ||
39 | class FormFieldChoice; | 39 | class FormFieldChoice; | ||
40 | class FormFieldText; | 40 | class FormFieldText; | ||
41 | class FormFieldSignature; | ||||
41 | class Document; | 42 | class Document; | ||
42 | } | 43 | } | ||
43 | 44 | | |||
44 | struct RadioData | 45 | struct RadioData | ||
45 | { | 46 | { | ||
46 | RadioData() {} | 47 | RadioData() {} | ||
47 | 48 | | |||
48 | QList< int > ids; | 49 | QList< int > ids; | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 121 | void slotFormButtonsChangedByUndoRedo( int pageNumber, | |||
121 | const QList< Okular::FormFieldButton* > & formButtons ); | 122 | const QList< Okular::FormFieldButton* > & formButtons ); | ||
122 | 123 | | |||
123 | private: | 124 | private: | ||
124 | friend class TextAreaEdit; | 125 | friend class TextAreaEdit; | ||
125 | friend class FormLineEdit; | 126 | friend class FormLineEdit; | ||
126 | friend class FileEdit; | 127 | friend class FileEdit; | ||
127 | friend class ListEdit; | 128 | friend class ListEdit; | ||
128 | friend class ComboEdit; | 129 | friend class ComboEdit; | ||
130 | friend class SignatureEdit; | ||||
129 | 131 | | |||
130 | QList< RadioData > m_radios; | 132 | QList< RadioData > m_radios; | ||
131 | QHash< int, QAbstractButton* > m_buttons; | 133 | QHash< int, QAbstractButton* > m_buttons; | ||
132 | Okular::Document* m_doc; | 134 | Okular::Document* m_doc; | ||
133 | }; | 135 | }; | ||
134 | 136 | | |||
135 | 137 | | |||
136 | class FormWidgetFactory | 138 | class FormWidgetFactory | ||
▲ Show 20 Lines • Show All 205 Lines • ▼ Show 20 Line(s) | 339 | void slotHandleFormComboChangedByUndoRedo( int pageNumber, | |||
342 | ); | 344 | ); | ||
343 | 345 | | |||
344 | private: | 346 | private: | ||
345 | int m_prevCursorPos; | 347 | int m_prevCursorPos; | ||
346 | int m_prevAnchorPos; | 348 | int m_prevAnchorPos; | ||
347 | DECLARE_ADDITIONAL_ACTIONS | 349 | DECLARE_ADDITIONAL_ACTIONS | ||
348 | }; | 350 | }; | ||
349 | 351 | | |||
352 | class SignatureEdit : public QAbstractButton, public FormWidgetIface | ||||
353 | { | ||||
354 | Q_OBJECT | ||||
355 | | ||||
356 | public: | ||||
357 | explicit SignatureEdit( Okular::FormFieldSignature * signature, QWidget * parent = nullptr ); | ||||
358 | | ||||
359 | protected: | ||||
360 | bool event( QEvent * e ) override; | ||||
361 | void contextMenuEvent( QContextMenuEvent * event ) override; | ||||
362 | void paintEvent( QPaintEvent * event ) override; | ||||
363 | | ||||
364 | private Q_SLOTS: | ||||
365 | void slotViewRevision(); | ||||
366 | void slotViewProperties(); | ||||
367 | | ||||
368 | private: | ||||
369 | bool m_lefMouseButtonPressed; | ||||
370 | | ||||
371 | DECLARE_ADDITIONAL_ACTIONS | ||||
372 | }; | ||||
373 | | ||||
350 | #undef DECLARE_ADDITIONAL_ACTIONS | 374 | #undef DECLARE_ADDITIONAL_ACTIONS | ||
351 | 375 | | |||
352 | #endif | 376 | #endif |