订单流程添加修改

This commit is contained in:
lidg
2026-08-20 11:22:55 +08:00
parent 0c4fd6844c
commit 4e99071ce1
31 changed files with 1359 additions and 241 deletions
+11 -2
View File
@@ -6,6 +6,7 @@
SquareTrayButton::SquareTrayButton(int trayIndex, int loadedCount, QWidget *parent)
: QAbstractButton(parent)
, m_trayId(0)
, m_planned(false)
{
setCheckable(true);
setCursor(Qt::PointingHandCursor);
@@ -26,6 +27,12 @@ void SquareTrayButton::setTrayInfo(int trayId, const QString &code, int loadedCo
update();
}
void SquareTrayButton::setPlanned(bool planned)
{
m_planned = planned;
update();
}
QSize SquareTrayButton::sizeHint() const
{
return QSize(120, 120);
@@ -44,8 +51,10 @@ void SquareTrayButton::paintEvent(QPaintEvent *event)
painter.setRenderHint(QPainter::Antialiasing, true);
const QRectF rect = QRectF(1, 1, width() - 2, height() - 2);
const QColor background = isChecked() ? QColor("#00897b") : QColor("#eceff1");
const QColor border = isChecked() ? QColor("#004d40") : QColor("#b0bec5");
const QColor background = isChecked() ? QColor("#00897b")
: m_planned ? QColor("#f9a825") : QColor("#eceff1");
const QColor border = isChecked() ? QColor("#004d40")
: m_planned ? QColor("#ef6c00") : QColor("#b0bec5");
const QColor textColor = isChecked() ? QColor("#ffffff") : QColor("#263238");
painter.setPen(QPen(border, 2));