本文整理汇总了C++中QLCDNumber::move方法的典型用法代码示例。如果您正苦于以下问题:C++ QLCDNumber::move方法的具体用法?C++ QLCDNumber::move怎么用?C++ QLCDNumber::move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLCDNumber
的用法示例。
在下文中一共展示了QLCDNumber::move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addWidget
void CSensorView::addWidget(QString var_name, QPoint var_pos)
{
bool isExist=false;
int indExistant=0;
for(int ind=0;ind<listeAddedSignals.size();ind++)
if(listeAddedSignals.at(ind)->addedSignalName.compare(var_name)==0)
{
isExist=true;
indExistant=ind;
}
QVariant property_value=m_application->m_data_center->getDataProperty(var_name,"Type");
QString mime_property=property_value.toString();
int type;
if(mime_property.isEmpty())
type=mime_default;
else if(mime_property.compare("sensor_tor")==0)
type=mime_sensor_tor;
else if(mime_property.compare("computed_signal")==0)
type=mime_computed_signal;
else
type=mime_default;
QLed * newLed;
QLCDNumber * newLCDNumber;
switch(type)
{
case mime_default:
case mime_computed_signal:
newLCDNumber =new QLCDNumber(m_ihm.ui.viewWidget);
newLCDNumber->setObjectName(var_name);
newLCDNumber->move(var_pos);
newLCDNumber->setVisible(true);
if (isExist)
{
listeAddedSignals.at(indExistant)->addedLCDNumber=newLCDNumber;
listeAddedSignals.at(indExistant)->addedSignalPosition.setX(var_pos.x());
listeAddedSignals.at(indExistant)->addedSignalPosition.setY(var_pos.y());
}
else
listeAddedSignals << new viewWidget(var_name,var_pos,type,newLCDNumber);
//qDebug() << "LCDNumber" << var_name << "ajouté";
break;
case mime_sensor_tor:
newLed = new QLed(m_ihm.ui.viewWidget);
newLed->setObjectName(var_name);
newLed->setMinimumSize(20,20);
newLed->setMaximumSize(20,20);
newLed->setValue(true);
newLed->move(var_pos);
newLed->setVisible(true);
if (isExist)
{
listeAddedSignals.at(indExistant)->addedLed=newLed;
listeAddedSignals.at(indExistant)->addedSignalPosition.setX(var_pos.x());
listeAddedSignals.at(indExistant)->addedSignalPosition.setY(var_pos.y());
}
else
listeAddedSignals << new viewWidget(var_name,var_pos,type,newLed);
//qDebug() << "Led" << var_name << "ajouté";
break;
default:
break;
}
}