10#include "js_field_p.h"
19 return m_event->name();
25 return m_event->type();
29QString JSEvent::targetName()
const
31 return m_event->targetName();
35void JSEvent::setTargetName(
const QString &targetName)
37 m_event->setTargetName(targetName);
41bool JSEvent::shift()
const
43 return m_event->shiftModifier();
49 if (m_event->eventType() == Event::FieldCalculate) {
52 return JSField::wrapField(qjsEngine(
this), src, m_event->sourcePage());
61 switch (m_event->eventType()) {
62 case Event::FieldCalculate:
63 case Event::FieldFormat:
64 case Event::FieldKeystroke:
65 case Event::FieldFocus:
66 case Event::FieldValidate:
67 case Event::FieldMouseUp:
68 case Event::FieldMouseDown:
69 case Event::FieldMouseEnter:
70 case Event::FieldMouseExit: {
73 return JSField::wrapField(qjsEngine(
this), target, m_event->targetPage());
78 case Event::DocWillClose:
79 case Event::DocWillSave:
80 case Event::DocWillPrint:
81 case Event::DocDidSave:
82 case Event::DocDidPrint: {
83 return qjsEngine(
this)->globalObject().property(QStringLiteral(
"Doc"));
98void JSEvent::setValue(
const QJSValue &value)
104bool JSEvent::returnCode()
const
106 return m_event->returnCode();
110void JSEvent::setReturnCode(
bool rc)
112 m_event->setReturnCode(rc);
116bool JSEvent::willCommit()
const
118 return m_event->willCommit();
124 return m_event->change();
128int JSEvent::selStart()
const
130 return m_event->selStart();
134int JSEvent::selEnd()
const
136 return m_event->selEnd();
139JSEvent::JSEvent(Event *event,
QObject *parent)
145JSEvent::~JSEvent() =
default;
AKONADI_CALENDAR_EXPORT KCalendarCore::Event::Ptr event(const Akonadi::Item &item)
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:47:55 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.