本文整理汇总了C++中ModelWatcher::setLoop方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelWatcher::setLoop方法的具体用法?C++ ModelWatcher::setLoop怎么用?C++ ModelWatcher::setLoop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelWatcher
的用法示例。
在下文中一共展示了ModelWatcher::setLoop方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initTestCase
void UnreadEventModelTest::initTestCase()
{
EventModel model;
watcher.setLoop(&m_eventLoop);
qsrand(QDateTime::currentDateTime().toTime_t());
}
示例2: initTestCase
void ClassZeroSMSModelTest::initTestCase()
{
m_pModel = new ClassZeroSMSModel;
qsrand(QDateTime::currentDateTime().toTime_t());
watcher.setLoop(&m_eventLoop);
watcher.setModel(m_pModel);
}
示例3: initTestCase
void SingleEventModelTest::initTestCase()
{
deleteAll();
qsrand(QDateTime::currentDateTime().toTime_t());
watcher.setLoop(&loop);
addTestGroups(group1, group2);
}
示例4: initTestCase
void SyncModelTest::initTestCase()
{
QVERIFY(QDBusConnection::sessionBus().isConnected());
deleteAll();
watcher.setLoop(&loop);
numAddedEvents = 0;
qsrand(QDateTime::currentDateTime().toTime_t());
addTestGroup(group, "121", "122");
}
示例5: initTestCase
void ConversationModelTest::initTestCase()
{
QVERIFY(QDBusConnection::sessionBus().isConnected());
deleteAll();
loop = new QEventLoop(this);
watcher.setLoop(loop);
qsrand(QDateTime::currentDateTime().toTime_t());
addTestGroups(group1, group2);
EventModel model;
watcher.setModel(&model);
addTestEvent(model, Event::IMEvent, Event::Inbound, ACCOUNT1, group1.id());
addTestEvent(model, Event::IMEvent, Event::Inbound, ACCOUNT1, group1.id());
addTestEvent(model, Event::IMEvent, Event::Outbound, ACCOUNT1, group1.id());
addTestEvent(model, Event::IMEvent, Event::Outbound, ACCOUNT1, group1.id());
addTestEvent(model, Event::IMEvent, Event::Inbound, ACCOUNT2, group1.id());
addTestEvent(model, Event::IMEvent, Event::Outbound, ACCOUNT2, group1.id());
addTestEvent(model, Event::SMSEvent, Event::Inbound, ACCOUNT1, group1.id());
addTestEvent(model, Event::SMSEvent, Event::Outbound, ACCOUNT1, group1.id());
addTestEvent(model, Event::SMSEvent, Event::Inbound, ACCOUNT2, group1.id());
addTestEvent(model, Event::SMSEvent, Event::Outbound, ACCOUNT2, group1.id());
addTestEvent(model, Event::CallEvent, Event::Inbound, ACCOUNT1, -1);
addTestEvent(model, Event::CallEvent, Event::Outbound, ACCOUNT1, -1);
addTestEvent(model, Event::IMEvent, Event::Outbound, ACCOUNT1, group1.id(),
"draft", true);
// status message:
// NOTE: this event is not visible in any of the further tests
addTestEvent(model, Event::StatusMessageEvent, Event::Outbound, ACCOUNT1,
group1.id(), "statue message", false, false,
QDateTime::currentDateTime(), QString(), true);
watcher.waitForSignals(13, 14);
}