-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimframeswitcher.hpp
More file actions
56 lines (40 loc) · 1.06 KB
/
vimframeswitcher.hpp
File metadata and controls
56 lines (40 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include "vimframeswitcher_global.hpp"
#include <extensionsystem/iplugin.h>
#include <QPoint>
namespace Core {
class IEditor;
}
namespace VimFrameSwitcher {
namespace Internal {
class VimFrameSwitcherPlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "VimFrameSwitcher.json")
enum LeftRightDir{
Left,
Right
};
enum UpDownDir {
Up,
Down
};
public:
VimFrameSwitcherPlugin();
~VimFrameSwitcherPlugin() override;
Utils::Result<> initialize(const QStringList &arguments) override;
void extensionsInitialized() override;
ShutdownFlag aboutToShutdown() override;
private:
void triggerLeft_h();
void triggerRight_l();
void triggerUp_k();
void triggerDown_j();
void leftRight(LeftRightDir direction);
void upDown(UpDownDir direction);
void getCurrentCursorPos();
QPoint currentTextCursorPosition;
QList<Core::IEditor*> editors;
};
} // namespace Internal
} // namespace VimFrameSwitcher