代码拉取完成,页面将自动刷新
#ifndef ABSTRACTINPUTMODE_H
#define ABSTRACTINPUTMODE_H
#include <QString>
#include <QSharedPointer>
#include "global.h"
class QKeyEvent;
class InputModeEditorInterface;
class InputModeStatusWidget;
class AbstractInputMode
{
public:
explicit AbstractInputMode(InputModeEditorInterface *p_interface);
virtual ~AbstractInputMode();
virtual QString name() const = 0;
virtual InputMode mode() const = 0;
virtual EditorMode editorMode() const = 0;
// Get status widget of input mode.
// Could be NULL.
// The caller should hold this pointer during the usage and explicitly
// remove the widget from QObject system at the end.
virtual QSharedPointer<InputModeStatusWidget> statusWidget() = 0;
virtual void activate() = 0;
virtual void deactivate() = 0;
virtual void focusIn() = 0;
virtual void focusOut() = 0;
// Return true if the key press is handled inside.
virtual bool handleKeyPress(QKeyEvent *p_event) = 0;
// Return true if the shortcut key event is handled inside.
// If stolen, Qt will replay this key event immediately as an ordinary KeyPress.
virtual bool stealShortcut(QKeyEvent *p_event) = 0;
// Hook that will be called before/after the default KeyPress event handle.
virtual void preKeyPressDefaultHandle(QKeyEvent *p_event) = 0;
virtual void postKeyPressDefaultHandle(QKeyEvent *p_event) = 0;
protected:
InputModeEditorInterface *m_interface = nullptr;
};
#endif // ABSTRACTINPUTMODE_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。