qt/ledset/expertsmartpointsetwin.h
2022-12-16 15:08:53 +08:00

39 lines
1.1 KiB
C++

#ifndef EXPERTSMARTPOINTSETWIN_H
#define EXPERTSMARTPOINTSETWIN_H
#include "basewin.h"
#include "expertwin.h"
#include <QSpinBox>
#include <QTableWidget>
#include <QComboBox>
class PointTable : public QTableWidget {
public:
explicit PointTable(QWidget *parent = nullptr) : QTableWidget{parent} {}
PointTable(int rows, int columns, QWidget *parent = nullptr) : QTableWidget{rows, columns, parent} {}
void setItem(int row, int column, QTableWidgetItem *item) {
if(item) item->setTextAlignment(Qt::AlignCenter);
QTableWidget::setItem(row, column, item);
}
};
class ExpertSmartPointSetWin : public BaseWin {
Q_OBJECT
public:
explicit ExpertSmartPointSetWin(ExpertWin *parent = nullptr);
void save();
ExpertWin *expertWin;
PointTable *table, *tableRow;
int virtualCnt = 0;
QList<QPoint> scans;
QSpinBox *fdModuleWidth, *fdModuleHeight, *fdGroupNum;
QComboBox *fdChipType, *fdDecodeMode, *fdGroupMode;
int ModuleWidth{16}, ModuleHeight{8}, GroupNum{2}, ScanNum{4};
QString ChipType, DecodeMode, GroupMode;
};
#endif // EXPERTSMARTPOINTSETWIN_H