示例#1
0
void loadScene(const char* _scenePath, bool _setPositionFromScene) {
    LOG("Loading scene file: %s", _scenePath);

    auto sceneString = stringFromFile(setResourceRoot(_scenePath).c_str(), PathType::resource);

    bool setPositionFromCurrentView = bool(m_scene);

    auto scene = std::make_shared<Scene>();
    if (m_view) {
        scene->view() = std::make_shared<View>(*m_view);
    }
    if (SceneLoader::loadScene(sceneString, *scene)) {
        m_scene = scene;
        m_scene->fontContext()->addFont("firasans", "medium", "");
        if (setPositionFromCurrentView && !_setPositionFromScene) {
            m_scene->view()->setPosition(m_view->getPosition());
            m_scene->view()->setZoom(m_view->getZoom());
        }
        m_view = m_scene->view();
        m_inputHandler->setView(m_view);
        m_tileManager->setDataSources(scene->dataSources());
        setPixelScale(m_view->pixelScale());

        m_tileWorker->setScene(scene);
    }
}
示例#2
0
void LH_QtMonitoringPlugin::enabledStateChanged()
{
    for(int i=0; i<enabled_.length(); i++)
    {
        rate_helpers_[i]->setVisible(enabled_[i]->value());
        rates_[i]->setVisible(enabled_[i]->value());
    }
    dataSources()->refreshMonitoringOptions();
}
示例#3
0
const char *LH_QtPlugin_Monitoring::userInit()
{
    // dataSources = new LH_MonitoringSources(this);
    dataSources()->add(new LH_MonitoringSource_Aida64(this));
    dataSources()->add(new LH_MonitoringSource_Afterburner(this));
    dataSources()->add(new LH_MonitoringSource_ATITrayTools(this));
    dataSources()->add(new LH_MonitoringSource_CoreTemp(this));
    dataSources()->add(new LH_MonitoringSource_Fraps(this));
    dataSources()->add(new LH_MonitoringSource_GPUZ(this));
    dataSources()->add(new LH_MonitoringSource_HWiNFO(this));
    dataSources()->add(new LH_MonitoringSource_HWMonitor(this));
    dataSources()->add(new LH_MonitoringSource_Logitech(this));
    dataSources()->add(new LH_MonitoringSource_RivaTuner(this));
    dataSources()->add(new LH_MonitoringSource_SpeedFan(this));
    // dataSources->userInit();

    return LH_QtMonitoringPlugin::userInit();
}
示例#4
0
QStringList KoReportData::dataSourceNames() const
{
    return dataSources();
}
示例#5
0
const char *LH_QtMonitoringPlugin::userInit()
{
    dataSources()->userInit();
    QTimer::singleShot(5000, this, SLOT(connectEnabledStateChangeEvents()));
    return 0;
}