当前位置: 首页>>代码示例>>C++>>正文


C++ ModelWatcher::setLoop方法代码示例

本文整理汇总了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());
}
开发者ID:adenexter,项目名称:libcommhistory,代码行数:8,代码来源:unreadeventsmodeltest.cpp

示例2: initTestCase

void ClassZeroSMSModelTest::initTestCase()
{
    m_pModel = new ClassZeroSMSModel;
    qsrand(QDateTime::currentDateTime().toTime_t());

    watcher.setLoop(&m_eventLoop);
    watcher.setModel(m_pModel);
}
开发者ID:adenexter,项目名称:libcommhistory,代码行数:8,代码来源:classzerosmsmodeltest.cpp

示例3: initTestCase

void SingleEventModelTest::initTestCase()
{
    deleteAll();

    qsrand(QDateTime::currentDateTime().toTime_t());

    watcher.setLoop(&loop);

    addTestGroups(group1, group2);
}
开发者ID:adenexter,项目名称:libcommhistory,代码行数:10,代码来源:singleeventmodeltest.cpp

示例4: initTestCase

void SyncModelTest::initTestCase()
{
    QVERIFY(QDBusConnection::sessionBus().isConnected());
    deleteAll();
    watcher.setLoop(&loop);
    numAddedEvents = 0;
    qsrand(QDateTime::currentDateTime().toTime_t());

    addTestGroup(group, "121", "122");
}
开发者ID:adenexter,项目名称:libcommhistory,代码行数:10,代码来源:syncmodeltest.cpp

示例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);
}
开发者ID:adenexter,项目名称:libcommhistory,代码行数:44,代码来源:conversationmodeltest.cpp


注:本文中的ModelWatcher::setLoop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。