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 56 57 58 59 60 61 62 63 64 65
|
#ifndef _rafkill_config_h
#define _rafkill_config_h
#include <string>
class Configuration{
public:
static std::string getForwardKeyName();
static std::string getBackwardKeyName();
static std::string getLeftKeyName();
static std::string getRightKeyName();
static std::string getShootKeyName();
static int getForwardKey();
static int getBackwardKey();
static int getLeftKey();
static int getRightKey();
static int getShootKey();
static bool getWindowMode();
static bool getBackground();
static void setForwardKey( int k );
static void setBackwardKey( int k );
static void setLeftKey( int k );
static void setRightKey( int k );
static void setShootKey( int k );
static void setWindowMode( bool b );
static void setBackground( bool b );
static void saveConfiguration();
static Configuration * getInstance();
private:
Configuration();
static Configuration * instance;
void loadConfiguration();
int internalGetForwardKey() const;
int internalGetBackwardKey() const;
int internalGetLeftKey() const;
int internalGetRightKey() const;
int internalGetShootKey() const;
bool internalGetWindowMode() const;
bool internalGetBackground() const;
void internalSetForwardKey( const int k );
void internalSetBackwardKey( const int k );
void internalSetLeftKey( const int k );
void internalSetRightKey( const int k );
void internalSetShootKey( const int k );
void internalSetWindowMode( const bool k );
void internalSetBackground( const bool k );
int keyForward;
int keyBackward;
int keyLeft;
int keyRight;
int keyShoot;
bool windowMode;
bool background;
};
#endif
|