示例#1
0
void loadConfiguration(QApplication& application, QMainWindow& window, CommandLineArgs* args)
{
    QString stylesheet = QString("QWidget { font-size: %1px; }").arg(DatabaseManager::getInstance().getConfigurationByName("FontSize").getValue().toInt());
    application.setStyleSheet(application.styleSheet() + stylesheet);

    // Check command line arguments followed by the configuration.
    if (args->fullscreen || DatabaseManager::getInstance().getConfigurationByName("StartFullscreen").getValue() == "true")
         window.showFullScreen();

    if (!args->rundown.isEmpty())
        EventManager::getInstance().fireOpenRundownEvent(OpenRundownEvent(args->rundown));
}
示例#2
0
文件: Main.cpp 项目: seccpur/Client
void loadConfiguration(QApplication& application, QMainWindow& window)
{
    QString stylesheet = QString("QWidget { font-size: %1px; }").arg(DatabaseManager::getInstance().getConfigurationByName("FontSize").getValue().toInt());
    application.setStyleSheet(application.styleSheet() + stylesheet);

    // Check command line arguments followed by the configuration.
    if (application.arguments().contains("-fullscreen") || DatabaseManager::getInstance().getConfigurationByName("StartFullscreen").getValue() == "true")
         window.showFullScreen();

    if (application.arguments().contains("-rundown"))
    {
        int i = application.arguments().indexOf("-rundown");
        if (application.arguments().count() > i + 1)
        {
            QString path = application.arguments().at(i + 1);

            EventManager::getInstance().fireOpenRundownEvent(OpenRundownEvent(path));
        }
    }
}
示例#3
0
void RundownWidget::openRundownFromDisk()
{
    EventManager::getInstance().fireOpenRundownEvent(OpenRundownEvent());
}