vnote/src/vnavigationmode.h
Le Tan 6a5fecf8ef Add Navigation Mode to Captain Mode
In Captain Mode, W will trigger the Navigation Mode. In this mode,
registered widgets will display some characters for hints and after user
pressing the the keys, corresponding widget will take action as response.

For now, only VNotebookSelector registers in the Navigation Mode.
2017-04-04 18:02:47 +08:00

25 lines
620 B
C++

#ifndef VNAVIGATIONMODE_H
#define VNAVIGATIONMODE_H
#include <QChar>
// Interface class for Navigation Mode in Captain Mode.
class VNavigationMode
{
public:
VNavigationMode() {};
virtual ~VNavigationMode() {};
virtual void registerNavigation(QChar p_majorKey) = 0;
virtual void showNavigation() = 0;
virtual void hideNavigation() = 0;
// Return true if this object could consume p_key.
// p_succeed indicates whether the keys hit a target successfully.
virtual bool handleKeyNavigation(int p_key, bool &p_succeed) = 0;
protected:
QChar m_majorKey;
};
#endif // VNAVIGATIONMODE_H