QtHPConnect/hptreeitem.h

49 lines
1,000 B
C
Raw Normal View History

2019-02-10 14:32:15 +01:00
#ifndef HPTREEITEM_H
#define HPTREEITEM_H
2019-02-10 14:43:00 +01:00
#include <QStandardItem>
#include <QString>
#include "hpdata.h"
#include "mainwindow.h"
2019-02-10 14:32:15 +01:00
2019-02-10 14:43:00 +01:00
class hp_mdiVariableEdit;
class hp_mdiTextEdit;
enum DataType;
class hpTreeItem: public QObject, public QStandardItem
2019-02-10 14:32:15 +01:00
{
2019-02-10 14:43:00 +01:00
Q_OBJECT
2019-02-10 14:32:15 +01:00
public:
2019-02-10 14:43:00 +01:00
hpTreeItem();
hpTreeItem(const QString &,hpCalcData *, int);
virtual QStandardItem *clone() const;
void setGraphicTree();
void setType(DataType);
DataType getType();
void clickAction(QMdiArea * mwin);
void setDataStore(hpCalcData *);
hpCalcData * getDataStore();
QString getName();
public slots:
void dataChange(hp_Change hpchange);
private:
const static QString func_list[][2];
const static DataType func_type[];
DataType type;
hpCalcData * hp_data=nullptr;
QMdiArea * mdiarea=nullptr;
hp_mdiVariableEdit * hpvaredit = nullptr;
hp_mdiTextEdit * hptextedit = nullptr;
int dt2int();
2019-02-10 14:32:15 +01:00
};
2019-02-10 14:43:00 +01:00
Q_DECLARE_METATYPE(hpTreeItem *)
#endif // HPTREEITEM_H