1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #ifndef GREYCLUSTERINGSAMPLETABLE_H
- #define GREYCLUSTERINGSAMPLETABLE_H
- #include <QStandardItemModel>
- #include <QTableView>
- #include <QVector>
- #include <QSharedPointer>
- class CMind;
- struct GreyRange
- {
- QString name;
- bool leftClose;
- double leftValue;
- bool rightClose;
- double rightValue;
- };
- struct GreyClusteringValue
- {
- QString units;
- double weiget;
- QVector<GreyRange> greyRanges;
- double leftExtension;
- double rightExtension;
- double oldValue;
- double newValue;
- };
- struct GreyClusteringItem
- {
- QString indexName;
- int row;
- int col;
- int rowSpan;
- int colSpan;
- QSharedPointer<GreyClusteringValue> value;
- };
- class GreyClusteringSampleTable : public QTableView
- {
- Q_OBJECT
- public:
- GreyClusteringSampleTable(CMind *mind, int grayNumber, QWidget *parent = nullptr);
- void refreshTableView();
- void compute();
- private:
- void init();
- void initClusteringItems();
- private:
- QVector<GreyClusteringItem> m_greyClusterings;
- QStandardItemModel *m_model;
- CMind *m_mind;
- int m_nodeDepth;
- int m_rowCount;
- QStringList m_grayNames;
- const int nodeDepth = 2;
- int m_grayNumber;
- };
- #endif
|