qt/ledset/expertsmartpointsetwin.h

35 lines
919 B
C
Raw Normal View History

2022-08-25 18:43:03 +08:00
#ifndef EXPERTSMARTPOINTSETWIN_H
#define EXPERTSMARTPOINTSETWIN_H
#include "basewin.h"
2022-08-25 22:52:52 +08:00
#include <QSpinBox>
#include <QTableWidget>
class PointTable : public QTableWidget {
public:
explicit PointTable(QWidget *parent = nullptr) : QTableWidget{parent} {}
2022-09-07 23:10:35 +08:00
PointTable(int rows, int columns, QWidget *parent = nullptr) : QTableWidget{rows, columns, parent} {}
2022-08-25 22:52:52 +08:00
void setItem(int row, int column, QTableWidgetItem *item) {
if(item) item->setTextAlignment(Qt::AlignCenter);
QTableWidget::setItem(row, column, item);
}
};
2022-09-07 23:10:35 +08:00
struct Point {
int x;
int y;
int c{0};
};
2022-08-25 18:43:03 +08:00
class ExpertSmartPointSetWin : public BaseWin {
Q_OBJECT
public:
explicit ExpertSmartPointSetWin(QWidget *parent = nullptr);
2022-08-25 22:52:52 +08:00
QSpinBox *fdModuleWidth, *fdModuleHeight;
2022-09-07 23:10:35 +08:00
PointTable *table, *tableRow;
int virtualCnt = 0;
2022-08-25 22:52:52 +08:00
int moduleWidth{0}, moduleHeight{0};
2022-08-25 18:43:03 +08:00
};
#endif // EXPERTSMARTPOINTSETWIN_H