You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
51 lines
1.7 KiB
#ifndef ITRACKBALLITEM_H
|
|
#define ITRACKBALLITEM_H
|
|
|
|
#include <QObject>
|
|
|
|
#include "model/csm/type/EConsole.h"
|
|
#include "model/csm/dto/ItemValue.h"
|
|
#include "model/csm/dto/CommandControl.h"
|
|
|
|
/*****************************************************************************/
|
|
/**
|
|
* @brief trackball item class. this class is the father of mice button, hid button and center ball.
|
|
* @author Mohammad Mohsen Talaie
|
|
* @details
|
|
* @date 12 jan 2021
|
|
*/
|
|
/*****************************************************************************/
|
|
class TrackballItem
|
|
{
|
|
protected:
|
|
EConsole::eTrackballItemType _type;
|
|
QMap<EConsole::eTrackballState, QList<CommandControl_t> > _commandContainer;
|
|
QMap<EConsole::eTrackballState, QList<ItemValue_t> > _configContainer;
|
|
QString _name;
|
|
|
|
public:
|
|
TrackballItem(const EConsole::eTrackballItemType& type, const QString& name);
|
|
|
|
~TrackballItem()
|
|
{
|
|
}
|
|
|
|
EConsole::eTrackballItemType getType();
|
|
|
|
void appendCommandContainer(const EConsole::eTrackballState& trackballState,
|
|
const QList<CommandControl_t>& commandList);
|
|
void appendConfigContainer(const EConsole::eTrackballState& trackballState,
|
|
const QList<ItemValue_t>& configList);
|
|
void appendConfigContainer(const EConsole::eTrackballState& trackballState,
|
|
const ItemValue_t& config);
|
|
void appendCommandContainer(const QString& trackballStateName,
|
|
const CommandControl_t& command);
|
|
|
|
QString getName()const;
|
|
|
|
QList<CommandControl_t> getCommand(const EConsole::eTrackballState& state)const;
|
|
|
|
QList<ItemValue_t> getConfig(const EConsole::eTrackballState& state)const;
|
|
};
|
|
|
|
#endif //ITRACKBALLITEM_H
|
|
|