添加状态生成
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "StateWidget.h"
|
||||
|
||||
StateWidget::StateWidget(int flag,QWidget *parent) : QWidget(parent)
|
||||
StateWidget::StateWidget(int flag,int index,QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
int w = 150;
|
||||
int h = 20;
|
||||
@@ -21,7 +21,7 @@ StateWidget::StateWidget(int flag,QWidget *parent) : QWidget(parent)
|
||||
label = new QLabel("0");
|
||||
label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
label->setFixedSize(w,h);
|
||||
setColor(label,state::inital);
|
||||
setColor(label,state::gray);
|
||||
gridlayout->addWidget(label,0,1);
|
||||
}
|
||||
else
|
||||
@@ -35,8 +35,11 @@ StateWidget::StateWidget(int flag,QWidget *parent) : QWidget(parent)
|
||||
}
|
||||
}
|
||||
|
||||
StateWidget::StateWidget(int flag, QString t,QVariant v,state s, QWidget *parent) : QWidget(parent)
|
||||
StateWidget::StateWidget(int flag, QString t,QVariant v,state s,int index, QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
|
||||
id = index;
|
||||
|
||||
int w = 150;
|
||||
int h = 20;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user