2025-03-12 10:03:16 +08:00
|
|
|
|
#ifndef KBDLOCKDEFINEWIDGET_H
|
|
|
|
|
|
#define KBDLOCKDEFINEWIDGET_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
2025-03-13 15:19:51 +08:00
|
|
|
|
#include "ScriptForm/ScriptForm.h"
|
2025-03-12 10:03:16 +08:00
|
|
|
|
|
|
|
|
|
|
class KbdPropertyDlg;
|
|
|
|
|
|
class QTextEdit;
|
|
|
|
|
|
class KbdTreeView;
|
2025-03-13 15:19:51 +08:00
|
|
|
|
|
|
|
|
|
|
using namespace ScriptForm_lua;
|
2025-03-12 10:03:16 +08:00
|
|
|
|
class ScriptFormWidget;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @brief The KbdLockDefineWidget class 闭锁函数定义
|
|
|
|
|
|
*/
|
|
|
|
|
|
class KbdLockDefineWidget : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit KbdLockDefineWidget(QWidget *parent = nullptr);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
|
|
void hideEvent(QHideEvent *event);
|
|
|
|
|
|
private:
|
|
|
|
|
|
void initLayout();
|
|
|
|
|
|
bool stringListEqual(const QStringList &left, const QStringList &right) const;
|
|
|
|
|
|
private:
|
|
|
|
|
|
KbdTreeView *m_tree;
|
|
|
|
|
|
KbdPropertyDlg *m_panel;
|
2025-03-13 15:19:51 +08:00
|
|
|
|
ScriptForm_lua::ScriptFormWidget* m_te;
|
2025-03-12 10:03:16 +08:00
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void onAdd();
|
|
|
|
|
|
void onRemove();
|
|
|
|
|
|
void onModify();
|
|
|
|
|
|
void onSave();
|
|
|
|
|
|
|
|
|
|
|
|
void onTreeClicked(const QModelIndex & index);
|
|
|
|
|
|
|
|
|
|
|
|
void onMsg(const QString & msg);
|
|
|
|
|
|
void onCommitError();
|
|
|
|
|
|
void onStartTransactionError(const QString&erroStr);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // KBDLOCKDEFINEWIDGET_H
|