本文整理汇总了C++中Led::number方法的典型用法代码示例。如果您正苦于以下问题:C++ Led::number方法的具体用法?C++ Led::number怎么用?C++ Led::number使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Led
的用法示例。
在下文中一共展示了Led::number方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copyConstructor
void LedTests::copyConstructor() {
QFETCH(Position, position);
QFETCH(int, number);
Led* led = new Led(iAnimation,
*iAnimation,
number,
position,
NULL);
Led* copyLed = new Led(*led);
QCOMPARE(copyLed->position(), led->position());
QCOMPARE(copyLed->number(), led->number());
// TODO add axis tests
}
示例2: addLed
void AxisDetailsWidget::addLed(int row, int column) {
Led* led = iAnimation.ledAt(Position(row, column));
if(led == NULL) {
throw IllegalArgumentException("AnimationDetailsWidget::addLed : NULL led");
}
if(!iLedDetails.contains(led->number())) {
int count = iLedDetails.count();
qDebug("add new led, %d, %d", row, column);
QLabel* ledNumberLabel = new QLabel(this);
ledNumberLabel->setMaximumWidth(LED_LABEL_WIDTH);
ledNumberLabel->setMinimumWidth(LED_LABEL_WIDTH);
FrameListWidget* framesListWidget = new FrameListWidget(this, axisData(*led), *this);//, count);
QToolButton* closeButton = new QToolButton(this);
closeButton->setObjectName(QString::fromUtf8("detailsClose"));
closeButton->setIcon(QIcon(":/images/delete.png"));
iGridLayout->addWidget(closeButton, count, 0);
iGridLayout->addWidget(ledNumberLabel, count, 1);
iGridLayout->addWidget(framesListWidget, count, 2);
// iGridLayout->setColumnStretch(1, 1);
// iGridLayout->addWidget(new QWidget(), count, 3);
// iGridLayout->setColumnStretch(3, 2);
iLedDetails.insert(led->number(), new LedDetails(*this,
*led,
*ledNumberLabel,
*framesListWidget,
*closeButton));
iCloseAll->setEnabled(true);
iScrollAreaWidgetContents->setShowCurrentFrameLine(true);
doResize();
layout()->invalidate();
}
}
示例3: constructor
void LedTests::constructor() {
QFETCH(Position, position);
QFETCH(int, number);
QFETCH(QString, error);
try {
Led* led = new Led(iAnimation,
*iAnimation,
number,
position,
NULL);
QCOMPARE(led->position(), position);
QCOMPARE(led->number(), number);
} catch(IllegalArgumentException& e){
QCOMPARE(e.errorMessage(), error);
return;
}
}