Changeset View
Changeset View
Standalone View
Standalone View
core/script/event_p.h
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 44 | enum EventType { | |||
---|---|---|---|---|---|
51 | DocDidSave, /// < Not implemented. | 51 | DocDidSave, /// < Not implemented. | ||
52 | DocOpen, /// < Not implemented. | 52 | DocOpen, /// < Not implemented. | ||
53 | DocWillClose, /// < Not implemented. | 53 | DocWillClose, /// < Not implemented. | ||
54 | DocWillPrint, /// < Not implemented. | 54 | DocWillPrint, /// < Not implemented. | ||
55 | DocWillSave, /// < Not implemented. | 55 | DocWillSave, /// < Not implemented. | ||
56 | ExternalExec, /// < Not implemented. | 56 | ExternalExec, /// < Not implemented. | ||
57 | FieldBlur, /// < Not implemented. | 57 | FieldBlur, /// < Not implemented. | ||
58 | FieldCalculate, /// < This event is defined in a field re-calculation. | 58 | FieldCalculate, /// < This event is defined in a field re-calculation. | ||
59 | FieldFocus, /// < Not implemented. | 59 | FieldFocus, /// < This event is defined when the field gains or loses focus. | ||
60 | FieldFormat, /// < Not implemented. | 60 | FieldFormat, /// < When a format action is executed | ||
61 | FieldKeystroke, /// < Not implemented. | 61 | FieldKeystroke, /// < Checks if the entered value is valid. | ||
62 | FieldMouseDown, /// < Not implemented. | 62 | FieldMouseDown, /// < Not implemented. | ||
63 | FieldMouseEnter, /// < Not implemented. | 63 | FieldMouseEnter, /// < Not implemented. | ||
64 | FieldMouseExit, /// < Not implemented. | 64 | FieldMouseExit, /// < Not implemented. | ||
65 | FieldMouseUp, /// < Not implemented. | 65 | FieldMouseUp, /// < Not implemented. | ||
66 | FieldValidate, /// < Not implemented. | 66 | /* Validates the field after every change is committed | ||
67 | * (clicked outside or tabbed to another field). | ||||
68 | * The enter event is not handled | ||||
69 | */ | ||||
70 | FieldValidate, | ||||
67 | LinkMouseUp, /// < Not implemented. | 71 | LinkMouseUp, /// < Not implemented. | ||
68 | MenuExec, /// < Not implemented. | 72 | MenuExec, /// < Not implemented. | ||
69 | PageOpen, /// < Not implemented. | 73 | PageOpen, /// < Not implemented. | ||
70 | PageClose, /// < Not implemented. | 74 | PageClose, /// < Not implemented. | ||
71 | }; | 75 | }; | ||
72 | 76 | | |||
73 | explicit Event(EventType type); | 77 | explicit Event(EventType type); | ||
74 | 78 | | |||
Show All 17 Lines | |||||
92 | void setSourcePage( Page *val ); | 96 | void setSourcePage( Page *val ); | ||
93 | 97 | | |||
94 | void *target() const; | 98 | void *target() const; | ||
95 | void setTarget( void *target ); | 99 | void setTarget( void *target ); | ||
96 | 100 | | |||
97 | QVariant value() const; | 101 | QVariant value() const; | ||
98 | void setValue(const QVariant &val); | 102 | void setValue(const QVariant &val); | ||
99 | 103 | | |||
104 | bool returnCode() const; | ||||
105 | void setReturnCode(bool returnCode); | ||||
106 | | ||||
107 | // Checks if the shift key was down when creating the event. | ||||
108 | bool shiftModifier() const; | ||||
109 | void setShiftModifier(bool shiftModifier); | ||||
110 | | ||||
100 | static std::shared_ptr<Event> createFormCalculateEvent( FormField *target, | 111 | static std::shared_ptr<Event> createFormCalculateEvent( FormField *target, | ||
101 | Page *targetPage, | 112 | Page *targetPage, | ||
102 | FormField *source = nullptr, | 113 | FormField *source = nullptr, | ||
103 | Page *sourcePage = nullptr, | 114 | Page *sourcePage = nullptr, | ||
104 | const QString &targetName = QString() ); | 115 | const QString &targetName = QString() ); | ||
116 | static std::shared_ptr<Event> createFormatEvent( FormField *target, Page *targetPage, | ||||
117 | const QString &targetName = QString() ); | ||||
118 | static std::shared_ptr<Event> createKeystrokeEvent( FormField *target, Page *targetPage ); | ||||
119 | static std::shared_ptr<Event> createFormFocusEvent( FormField *target, | ||||
120 | Page *targetPage, | ||||
121 | const QString &targetName = QString() ); | ||||
122 | static std::shared_ptr<Event> createFormValidateEvent( FormField *target, | ||||
123 | Page *targetPage, | ||||
124 | const QString &targetName = QString() ); | ||||
105 | private: | 125 | private: | ||
106 | class Private; | 126 | class Private; | ||
107 | std::shared_ptr<Private> d; | 127 | std::shared_ptr<Private> d; | ||
108 | Q_DISABLE_COPY( Event ) | 128 | Q_DISABLE_COPY( Event ) | ||
109 | }; | 129 | }; | ||
110 | 130 | | |||
111 | } // namespace Okular | 131 | } // namespace Okular | ||
112 | #endif //OKULAR_SCRIPT_EVENT_P_H | 132 | #endif //OKULAR_SCRIPT_EVENT_P_H |