QtHPConnect/hpdata.h

68 lines
1.2 KiB
C
Raw Normal View History

2019-02-10 14:32:15 +01:00
#ifndef HPDATA_H
#define HPDATA_H
#include <QObject>
2019-02-10 14:43:00 +01:00
#include <QString>
#include "hpusb.h"
2019-02-10 14:32:15 +01:00
2019-02-10 14:43:00 +01:00
enum DataType {
HP_MAIN=0,
HP_APP=1,
HP_CAS=2,
HP_COMPLEX=3,
HP_LIST=4,
HP_MATRIC=5,
HP_NOTE=6,
HP_PROG=7,
HP_REAL=8,
HP_VAR=9
};
struct hp_Information {
QString name="---";
QString serialnum="---";
QString appver="-";
QString osver="-";
};
struct hpDataStruct {
};
struct hp_Change {
DataType dataChange=HP_MAIN;
};
class hpCalcData: public QObject
2019-02-10 14:32:15 +01:00
{
2019-02-10 14:43:00 +01:00
Q_OBJECT
private:
const static QString func_list[][2];
const static DataType func_type[];
DataType type;
hpusb * hp_api;
hp_Handle hp_handle;
hp_Information hp_info;
2019-02-10 14:32:15 +01:00
public:
2019-02-10 14:43:00 +01:00
hpCalcData(hpusb * hpapi);
~hpCalcData();
hp_Handle * getHandle();
hpusb * getAPI();
void setInfo(hp_Information);
void readInfo();
hp_Information getInfo();
QString getName();
void vpkt_send_experiments(int );
//public slots:
signals:
void dataChanged(hp_Change datachange);
2019-02-10 14:32:15 +01:00
};
2019-02-10 14:43:00 +01:00
#endif // HPDATA_H