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


C++ MythMainWindow::installEventFilter方法代码示例

本文整理汇总了C++中MythMainWindow::installEventFilter方法的典型用法代码示例。如果您正苦于以下问题:C++ MythMainWindow::installEventFilter方法的具体用法?C++ MythMainWindow::installEventFilter怎么用?C++ MythMainWindow::installEventFilter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MythMainWindow的用法示例。


在下文中一共展示了MythMainWindow::installEventFilter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main


//.........这里部分代码省略.........

    WriteDefaults();

    // Refresh Global/Main Menu keys after DB update in case there was no DB
    // when they were written originally
    mainWindow->ResetKeys();

    InitJumpPoints();

    internal_media_init();

    CleanupMyOldInUsePrograms();

    pmanager = new MythPluginManager();
    gContext->SetPluginManager(pmanager);

    if (pluginname.size())
    {
        if (pmanager->run_plugin(pluginname) ||
            pmanager->run_plugin("myth" + pluginname))
        {
            qApp->exec();

            return GENERIC_EXIT_OK;
        }
        else
            return GENERIC_EXIT_INVALID_CMDLINE;
    }

    MediaMonitor *mon = MediaMonitor::GetMediaMonitor();
    if (mon)
    {
        mon->StartMonitoring();
        mainWindow->installEventFilter(mon);
    }

    NetworkControl *networkControl = NULL;
    if (gCoreContext->GetNumSetting("NetworkControlEnabled", 0))
    {
        int networkPort = gCoreContext->GetNumSetting("NetworkControlPort", 6545);
        networkControl = new NetworkControl();
        if (!networkControl->listen(QHostAddress::Any,networkPort))
            VERBOSE(VB_IMPORTANT,
                    QString("NetworkControl failed to bind to port %1.")
                    .arg(networkPort));
    }

#ifdef __linux__
#ifdef CONFIG_BINDINGS_PYTHON
    HardwareProfile *profile = new HardwareProfile();
    if (profile && profile->NeedsUpdate())
        profile->SubmitProfile();
    delete profile;
#endif
#endif

    if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
    {
        return GENERIC_EXIT_NO_THEME;
    }

#ifndef _MSC_VER
    // Setup handler for USR1 signals to reload theme
    signal(SIGUSR1, &signal_USR1_handler);
    // Setup handler for USR2 signals to restart LIRC
    signal(SIGUSR2, &signal_USR2_handler);
开发者ID:DocOnDev,项目名称:mythtv,代码行数:67,代码来源:main.cpp


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