55 lines
914 B
C
55 lines
914 B
C
|
#pragma once
|
||
|
#include <iostream>
|
||
|
#include <string>
|
||
|
#include <memory>
|
||
|
#include <vector>
|
||
|
#include <functional>
|
||
|
#include "Displaydef.h"
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
class Selectable
|
||
|
{
|
||
|
public:
|
||
|
enum class SettingType
|
||
|
{
|
||
|
Set_ClearPass = 1,
|
||
|
Set_Sleep,
|
||
|
Set_FeedStrength,
|
||
|
Set_Poweroff,
|
||
|
Set_ClearCount,
|
||
|
Set_CountMode,
|
||
|
Set_DoubleEn
|
||
|
};
|
||
|
|
||
|
enum class SleepTime
|
||
|
{
|
||
|
Sleep_15min = 1,
|
||
|
Sleep_30min,
|
||
|
Sleep_60min,
|
||
|
Sleep_120min,
|
||
|
Sleep_never
|
||
|
};
|
||
|
|
||
|
enum class MtStrength
|
||
|
{
|
||
|
Strength_Low = 1,
|
||
|
Strength_Mid,
|
||
|
Strength_High
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
Selectable() {}
|
||
|
virtual ~Selectable() {}
|
||
|
virtual string get_name() = 0;
|
||
|
virtual int select() = 0;
|
||
|
void setconfirmcall(std::function<void()> confirmcall)
|
||
|
{
|
||
|
g_call = confirmcall;
|
||
|
}
|
||
|
|
||
|
protected:
|
||
|
std::function<void()> g_call;
|
||
|
};
|