本文整理汇总了C++中QSpinBox::property方法的典型用法代码示例。如果您正苦于以下问题:C++ QSpinBox::property方法的具体用法?C++ QSpinBox::property怎么用?C++ QSpinBox::property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSpinBox
的用法示例。
在下文中一共展示了QSpinBox::property方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onCellChanged
void CalibrationPanel::onCellChanged(int value)
{
QSpinBox * sb = qobject_cast<QSpinBox*>(sender());
int row = sb->property("row").toInt();
int column = sb->property("column").toInt();
if (value != getCalibrationValue(row, column)) {
setCalibrationValue(row,column, value);
qDebug() << "CalibrationPanel::onCellChanged" << row << column << "to" << value;
emit modified();
}
}
示例2: valeChanged
void FormXtcs::valeChanged(QWidget *obj){
QSpinBox *spinbox = qobject_cast<QSpinBox *>(obj);
if(spinbox){
int val = spinbox->value();
int index = spinbox->property("index").toInt();
param->setData(QParam::SpaItemHd_Xtcs,index,val,FALSE);
if((index == 11)||(index ==12))
param->updataPivotal();
if(14==index)
pcomm->yajiaoTest(Md::POSFRONT,3,val); //shengke buchang
if(15==index)
pcomm->yajiaoTest(Md::POSREAR,3,val); //shengke buchang
return;
}
QDoubleSpinBox *doublespinbox = qobject_cast<QDoubleSpinBox *>(obj);
if(doublespinbox){
int val =qRound(doublespinbox->value()*10);
int index = doublespinbox->property("index").toInt();
param->setData(QParam::SpaItemHd_Xtcs,index,val,FALSE);
if(index==5)
param->updataPivotal();
return;
}
QPushButton *pushbutton = qobject_cast<QPushButton *>(obj);
if(pushbutton){
int val =pushbutton->isChecked();
int index = pushbutton->property("index").toInt();
param->setData(QParam::SpaItemHd_Xtcs,index,val,FALSE);
return;
}
}
示例3: valeChanged
void FormJqgzcs::valeChanged(QWidget *obj){
QSpinBox *spinbox = qobject_cast<QSpinBox *>(obj);
if(spinbox){
int val = spinbox->value();
int index = spinbox->property("index").toInt();
param->setData(QParam::SpaItemHd_Jqgzcs,index,val);
if(14==index)
pcomm->yajiaoTest(Md::POSFRONT,4,val);
if(15==index)
pcomm->yajiaoTest(Md::POSREAR,4,val);
return;
}
QDoubleSpinBox *doublespinbox = qobject_cast<QDoubleSpinBox *>(obj);
if(doublespinbox){
int val =doublespinbox->value()*10;
int index = doublespinbox->property("index").toInt();
param->setData(QParam::SpaItemHd_Jqgzcs,index,val);
return;
}
QPushButton *pushbutton = qobject_cast<QPushButton *>(obj);
if(pushbutton){
int val =pushbutton->isChecked();
int index = pushbutton->property("index").toInt();
param->setData(QParam::SpaItemHd_Jqgzcs,index,val);
return;
}
}
示例4: slotPropertySpinChanged
void VCMatrixPresetSelection::slotPropertySpinChanged(int value)
{
qDebug() << "Property spin changed to" << value;
QSpinBox *spin = (QSpinBox *)sender();
QString pName = spin->property("pName").toString();
m_properties[pName] = QString::number(value);
}