本文整理汇总了C++中TTimer::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ TTimer::getName方法的具体用法?C++ TTimer::getName怎么用?C++ TTimer::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTimer
的用法示例。
在下文中一共展示了TTimer::getName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: enableTimer
void TTimer::enableTimer( QString & name )
{
if( mName == name )
{
if( canBeUnlocked( 0 ) )
{
if( activate() )
{
mpTimer->start();
}
else
{
deactivate();
mpTimer->stop();
}
}
}
if( ! isOffsetTimer() )
{
typedef list<TTimer *>::const_iterator I;
for( I it = mpMyChildrenList->begin(); it != mpMyChildrenList->end(); it++)
{
TTimer * pChild = *it;
pChild->enableTimer( pChild->getName() );
}
}
}
示例2: disableTimer
void TTimer::disableTimer( QString & name )
{
if( mName == name )
{
deactivate();
mpTimer->stop();
}
typedef list<TTimer *>::const_iterator I;
for( I it = mpMyChildrenList->begin(); it != mpMyChildrenList->end(); it++)
{
TTimer * pChild = *it;
pChild->disableTimer( pChild->getName() );
}
}
示例3: killTimer
bool TimerUnit::killTimer(const QString & name )
{
for(auto it = mTimerRootNodeList.begin(); it != mTimerRootNodeList.end(); it++)
{
TTimer * pChild = *it;
if( pChild->getName() == name )
{
// only temporary timers can be killed
if( ! pChild->isTempTimer() ) return false;
pChild->killTimer();
markCleanup( pChild );
return true;
}
}
return false;
}
示例4: killTimer
bool TimerUnit::killTimer( QString & name )
{
//qDebug()<<"TimerUnit::killTimer() name="<<name;
typedef list<TTimer *>::const_iterator I;
for( I it = mTimerRootNodeList.begin(); it != mTimerRootNodeList.end(); it++)
{
TTimer * pChild = *it;
if( pChild->getName() == name )
{
// only temporary timers can be killed
if( ! pChild->isTempTimer() ) return false;
pChild->killTimer();
markCleanup( pChild );
return true;
}
}
return false;
}
示例5: recurseTimers
void dlgPackageExporter::recurseTimers(TTimer* item, QTreeWidgetItem* qItem){
list<TTimer *> * childList = item->getChildrenList();
if (!childList->size())
return;
list<TTimer *>::iterator it;
for(it=childList->begin(); it!=childList->end();it++){
TTimer * pChild = *it;
if (pChild->isTempTimer())
continue;
QStringList sl;
sl << pChild->getName();
QTreeWidgetItem * pItem = new QTreeWidgetItem(sl);
pItem->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsTristate|Qt::ItemIsEnabled|Qt::ItemIsSelectable);
pItem->setCheckState(0, Qt::Unchecked);
timerMap.insert(pItem, pChild);
qItem->addChild(pItem);
recurseTimers(pChild, pItem);
}
}
示例6: listTimers
void dlgPackageExporter::listTimers()
{
TimerUnit* tu = mpHost->getTimerUnit();
list<TTimer *>::const_iterator it;
std::list<TTimer *> tList = tu->getTimerRootNodeList();
QList<QTreeWidgetItem *> items = treeWidget->findItems(QString("Timers"), Qt::MatchExactly, 0);
QTreeWidgetItem * top = items.first();
for(it = tList.begin(); it != tList.end(); it++)
{
TTimer * pChild = *it;
QStringList sl;
sl << pChild->getName();
QTreeWidgetItem * pItem = new QTreeWidgetItem(sl);
pItem->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsTristate|Qt::ItemIsEnabled|Qt::ItemIsSelectable);
pItem->setCheckState(0, Qt::Unchecked);
timerMap.insert(pItem, pChild);
top->addChild(pItem);
recurseTimers(pChild, pItem);
}
}