qt/ledset/expertsmartpointsetwin.h
2022-09-08 23:22:59 +08:00

32 lines
942 B
C++

#ifndef EXPERTSMARTPOINTSETWIN_H
#define EXPERTSMARTPOINTSETWIN_H
#include "basewin.h"
#include <QSpinBox>
#include <QTableWidget>
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(QWidget *parent = nullptr);
void save();
QSpinBox *fdModuleWidth, *fdModuleHeight, *fdGrpCnt;
PointTable *table, *tableRow;
int virtualCnt = 0;
QList<QPoint> lines;
int moduleWidth{16}, moduleHeight{8}, grpCnt{2}, scanCnt{4};
};
#endif // EXPERTSMARTPOINTSETWIN_H