补上之前缺失的

This commit is contained in:
Lenn
2026-02-02 22:18:38 +08:00
parent 01b988fcd7
commit ca3545b8b0
7 changed files with 80 additions and 4 deletions

View File

@@ -76,8 +76,10 @@ public slots:
void setLightMode(bool on);
void setShowBg(bool on);
void setShowGrid(bool on);
void setUseHeatmap(bool on);
void setCol(int col);
void setRow(int row);
void setColorZero(const QColor& color);
void setColorLow(const QColor& color);
void setColorMid(const QColor& color);
void setColorHigh(const QColor& color);
@@ -213,6 +215,7 @@ private:
unsigned int m_bgVbo = 0;
bool m_lightMode = true;
bool m_showBg = true;
QVector3D m_colorZero{0.10f, 0.75f, 1.00f};
QVector3D m_colorLow{0.10f, 0.75f, 1.00f};
QVector3D m_colorMid{0.10f, 0.95f, 0.35f};
QVector3D m_colorHigh{1.00f, 0.22f, 0.10f};

View File

@@ -0,0 +1,16 @@
#ifndef TACTILEIPC3D_PROTOCOL_BUNDLE_H
#define TACTILEIPC3D_PROTOCOL_BUNDLE_H
#include <memory>
#include "serial_codec.h"
#include "serial_decoder.h"
#include "serial_format.h"
struct ProtocolBundle {
std::shared_ptr<ISerialCodec> codec;
std::shared_ptr<ISerialDecoder> decoder;
std::shared_ptr<ISerialFormat> format;
};
#endif // TACTILEIPC3D_PROTOCOL_BUNDLE_H

View File

@@ -0,0 +1,22 @@
#ifndef TACTILEIPC3D_PROTOCOL_PLUGIN_H
#define TACTILEIPC3D_PROTOCOL_PLUGIN_H
#include <QtPlugin>
#include <QString>
#include "protocol_bundle.h"
constexpr int kProtocolPluginApiVersion = 1;
#define PROTOCOL_PLUGIN_IID "com.tactileipc3d.ProtocolPlugin"
class IProtocolPlugin {
public:
virtual ~IProtocolPlugin() = default;
virtual QString protocolName() const = 0;
virtual int apiVersion() const = 0;
virtual ProtocolBundle createBundle() = 0;
};
Q_DECLARE_INTERFACE(IProtocolPlugin, PROTOCOL_PLUGIN_IID)
#endif // TACTILEIPC3D_PROTOCOL_PLUGIN_H