| 1 |
// SPDX-License-Identifier: GPL-3.0-or-later |
| 2 |
|
| 3 |
#pragma once |
| 4 |
|
| 5 |
#include "item/itemwidget.h" |
| 6 |
|
| 7 |
#include <QObject> |
| 8 |
#include <QVariant> |
| 9 |
|
| 10 |
class KeyClicker; |
| 11 |
|
| 12 |
class ItemTestsScriptable final : public ItemScriptable |
| 13 |
{ |
| 14 |
Q_OBJECT |
| 15 |
public slots: |
| 16 |
void keys(); |
| 17 |
}; |
| 18 |
|
| 19 |
class ItemTestsLoader final : public QObject, public ItemLoaderInterface |
| 20 |
{ |
| 21 |
Q_OBJECT |
| 22 |
Q_PLUGIN_METADATA(IID COPYQ_PLUGIN_ITEM_LOADER_ID) |
| 23 |
Q_INTERFACES(ItemLoaderInterface) |
| 24 |
|
| 25 |
public: |
| 26 |
QString id() const override { return "itemtests"; } |
| 27 |
QString name() const override { return "Tests"; } |
| 28 |
QString author() const override { return {}; } |
| 29 |
QString description() const override { return {}; } |
| 30 |
QVariant icon() const override { return {}; } |
| 31 |
ItemScriptable *scriptableObject() override; |
| 32 |
QVariant scriptCallback(const QVariantList &arguments) override; |
| 33 |
|
| 34 |
private: |
| 35 |
KeyClicker *keyClicker(); |
| 36 |
KeyClicker *m_keyClicker = nullptr; |
| 37 |
}; |