Changeset View
Changeset View
Standalone View
Standalone View
scripting/scripting.h
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Line(s) | |||||
234 | 234 | | |||
235 | Q_SIGNALS: | 235 | Q_SIGNALS: | ||
236 | Q_SCRIPTABLE void printError(const QString &text); | 236 | Q_SCRIPTABLE void printError(const QString &text); | ||
237 | 237 | | |||
238 | private Q_SLOTS: | 238 | private Q_SLOTS: | ||
239 | /** | 239 | /** | ||
240 | * A nice clean way to handle exceptions in scripting. | 240 | * A nice clean way to handle exceptions in scripting. | ||
241 | * TODO: Log to file, show from notifier.. | 241 | * TODO: Log to file, show from notifier.. | ||
242 | */ | 242 | **/ | ||
243 | void sigException(const QScriptValue &exception); | 243 | void sigException(const QScriptValue &exception); | ||
244 | /** | 244 | /** | ||
245 | * Callback for when loadScriptFromFile has finished. | 245 | * Callback for when loadScriptFromFile has finished. | ||
246 | **/ | 246 | **/ | ||
247 | void slotScriptLoadedFromFile(); | 247 | void slotScriptLoadedFromFile(); | ||
248 | 248 | | |||
249 | private: | 249 | private: | ||
250 | void installScriptFunctions(QScriptEngine *engine); | 250 | void installScriptFunctions(QScriptEngine *engine); | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 320 | public Q_SLOTS: | |||
323 | bool registerShortcut(const QString &name, const QString &text, const QKeySequence& keys, QJSValue function); | 323 | bool registerShortcut(const QString &name, const QString &text, const QKeySequence& keys, QJSValue function); | ||
324 | 324 | | |||
325 | private: | 325 | private: | ||
326 | DeclarativeScript *m_script; | 326 | DeclarativeScript *m_script; | ||
327 | }; | 327 | }; | ||
328 | 328 | | |||
329 | /** | 329 | /** | ||
330 | * The heart of KWin::Scripting. Infinite power lies beyond | 330 | * The heart of KWin::Scripting. Infinite power lies beyond | ||
331 | */ | 331 | **/ | ||
332 | class KWIN_EXPORT Scripting : public QObject | 332 | class KWIN_EXPORT Scripting : public QObject | ||
333 | { | 333 | { | ||
334 | Q_OBJECT | 334 | Q_OBJECT | ||
335 | Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Scripting") | 335 | Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Scripting") | ||
336 | private: | 336 | private: | ||
337 | explicit Scripting(QObject *parent); | 337 | explicit Scripting(QObject *parent); | ||
338 | QStringList scriptList; | 338 | QStringList scriptList; | ||
339 | QList<KWin::AbstractScript*> scripts; | 339 | QList<KWin::AbstractScript*> scripts; | ||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |