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


C++ LoadWindowFromXML函数代码示例

本文整理汇总了C++中LoadWindowFromXML函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadWindowFromXML函数的具体用法?C++ LoadWindowFromXML怎么用?C++ LoadWindowFromXML使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: LoadWindowFromXML

bool Weather::Create()
{
    bool foundtheme = false;

    // Load the theme for this screen
    foundtheme = LoadWindowFromXML("weather-ui.xml", "weatherbase", this);

    if (!foundtheme)
    {
        LOG(VB_GENERAL, LOG_ERR, "Missing required window - weatherbase.");
        return false;
    }

    bool err = false;

    UIUtilE::Assign(this, m_pauseText, "pause_text", &err);
    UIUtilE::Assign(this, m_headerText, "header", &err);
    UIUtilE::Assign(this, m_updatedText, "update_text", &err);

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR,
            "Window weatherbase is missing required elements.");
        return false;
    }

    if (m_pauseText)
    {
        m_pauseText->SetText(tr("Paused"));
        m_pauseText->Hide();
    }

    return true;
}
开发者ID:txase,项目名称:mythtv,代码行数:34,代码来源:weather.cpp

示例2: LoadWindowFromXML

bool GlobalSetup::Create()
{
    bool foundtheme = false;

    // Load the theme for this screen
    foundtheme = LoadWindowFromXML("weather-ui.xml", "global-setup", this);

    if (!foundtheme)
        return false;

    m_timeoutSpinbox = dynamic_cast<MythUISpinBox *> (GetChild("timeout_spinbox"));

    m_backgroundCheckbox = dynamic_cast<MythUICheckBox *> (GetChild("backgroundcheck"));
    m_finishButton = dynamic_cast<MythUIButton *> (GetChild("finishbutton"));

    if (!m_timeoutSpinbox || !m_finishButton || !m_backgroundCheckbox)
    {
        LOG(VB_GENERAL, LOG_ERR, "Theme is missing required elements.");
        return false;
    }

    BuildFocusList();

    m_finishButton->SetText(tr("Finish"));
    connect(m_finishButton, SIGNAL(Clicked()), this, SLOT(saveData()));

    loadData();

    return true;
}
开发者ID:DaveDaCoda,项目名称:mythtv,代码行数:30,代码来源:weatherSetup.cpp

示例3: LoadWindowFromXML

bool NetEditorBase::Create(void)
{
    // Load the theme for this screen
    bool foundtheme = LoadWindowFromXML("netvision-ui.xml", "treeeditor", this);

    if (!foundtheme)
        return false;

    bool err = false;
    UIUtilE::Assign(this, m_grabbers, "grabbers", &err);

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'treeeditor'");
        return false;
    }

    connect(m_grabbers, SIGNAL(itemClicked(MythUIButtonListItem*)),
            this, SLOT(ToggleItem(MythUIButtonListItem*)));

    BuildFocusList();

    LoadData();

    return true;
}
开发者ID:MythTV,项目名称:mythtv,代码行数:26,代码来源:neteditorbase.cpp

示例4: Create

bool ZMLivePlayer::Create(void)
{
    // Load the theme for this screen
    QString winName = m_isMiniPlayer ? "miniplayer" : "zmliveplayer";

    if (!LoadWindowFromXML("zoneminder-ui.xml", winName, this))
    {
        LOG(VB_GENERAL, LOG_ERR, QString("Cannot load screen '%1'").arg(winName));
        return false;
    }

    if (!hideAll())
        return false;

    if (m_isMiniPlayer)
    {
        // we only support the single camera layout in the mini player
        if (!initMonitorLayout(1))
            return false;
    }
    else
    {
        if (!initMonitorLayout(gCoreContext->GetNumSetting("ZoneMinderLiveLayout", 1)))
            return false;
    }

    return true;
}
开发者ID:faginbagin,项目名称:mythtv,代码行数:28,代码来源:zmliveplayer.cpp

示例5: LoadWindowFromXML

bool SearchEditor::Create(void)
{
    // Load the theme for this screen
    bool foundtheme = LoadWindowFromXML("netvision-ui.xml", "treeeditor", this);

    if (!foundtheme)
        return false;

    bool err = false;
    UIUtilE::Assign(this, m_grabbers, "grabbers", &err);

    if (err)
    {
        VERBOSE(VB_IMPORTANT, "Cannot load screen 'treeeditor'");
        return false;
    }

    connect(m_grabbers, SIGNAL(itemClicked(MythUIButtonListItem*)),
            this, SLOT(toggleItem(MythUIButtonListItem*)));

    BuildFocusList();

    loadData();

    return true;
}
开发者ID:Cougar,项目名称:mythtv,代码行数:26,代码来源:searcheditor.cpp

示例6: Create

bool PlotDialog::Create()
{
    if (!LoadWindowFromXML("video-ui.xml", "descriptionpopup", this))
        return false;

    MythUIText   *plotText = nullptr;
    MythUIButton *okButton = nullptr;

    bool err = false;
    UIUtilE::Assign(this, plotText, "description", &err);

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'descriptionpopup'");
        return false;
    }

    UIUtilW::Assign(this, okButton, "ok");

    plotText->SetText(m_metadata->GetPlot());

    if (okButton)
        connect(okButton, SIGNAL(Clicked()), SLOT(Close()));

    BuildFocusList();

    return true;
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:28,代码来源:videopopups.cpp

示例7: LoadWindowFromXML

bool IdleScreen::Create(void)
{
    // Load the theme for this screen
    bool foundtheme = LoadWindowFromXML("status-ui.xml", "standbymode", this);
    if (!foundtheme)
        return false;

    bool err = false;
    UIUtilE::Assign(this, m_statusState, "backendstatus", &err);

    /* currentrecording, nextrecording, conflicts and conflictwarning are optional */
    UIUtilW::Assign(this, m_currentRecordings, "currentrecording");
    UIUtilW::Assign(this, m_nextRecordings, "nextrecording");
    UIUtilW::Assign(this, m_conflictingRecordings, "conflicts");
    UIUtilW::Assign(this, m_conflictWarning, "conflictwarning");

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'standbymode'");
        return false;
    }

    UpdateScheduledList();

    return true;
}
开发者ID:garybuhrmaster,项目名称:mythtv,代码行数:26,代码来源:idlescreen.cpp

示例8: Create

bool ViewScheduleDiff::Create()
{
    if (!LoadWindowFromXML("schedule-ui.xml", "schedulediff", this))
        return false;

    bool err = false;
    UIUtilE::Assign(this, m_conflictList, "conflictlist", &err);

    UIUtilW::Assign(this, m_titleText, "titletext");
    UIUtilW::Assign(this, m_noChangesText, "nochanges");

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'schedulediff'");
        return false;
    }

    connect(m_conflictList, SIGNAL(itemSelected(MythUIButtonListItem*)),
            SLOT(updateInfo(MythUIButtonListItem*)));
    connect(m_conflictList, SIGNAL(itemClicked(MythUIButtonListItem*)),
            SLOT(showStatus(MythUIButtonListItem*)));

    if (m_titleText)
        m_titleText->SetText(m_title);

    BuildFocusList();
    LoadInBackground();

    return true;
}
开发者ID:Openivo,项目名称:mythtv,代码行数:30,代码来源:viewschedulediff.cpp

示例9: LoadWindowFromXML

bool MiniPlayer::Create(void)
{
    bool err = false;

    // Load the theme for this screen
    err = LoadWindowFromXML("music-ui.xml", "miniplayer", this);

    if (!err)
        return false;

    // find common widgets available on any view
    err = CreateCommon();

    if (err)
    {
        VERBOSE(VB_IMPORTANT, "Cannot load screen 'miniplayer'");
        return false;
    }

    m_displayTimer->start(10000);

    BuildFocusList();

    return true;
}
开发者ID:Cougar,项目名称:mythtv,代码行数:25,代码来源:miniplayer.cpp

示例10: LoadWindowFromXML

bool ZMConsole::Create(void)
{
    // Load the theme for this screen
    bool foundtheme = LoadWindowFromXML("zoneminder-ui.xml", "zmconsole", this);
    if (!foundtheme)
        return false;

    bool err = false;
    UIUtilE::Assign(this, m_monitor_list, "monitor_list", &err);
    UIUtilE::Assign(this, m_status_text,  "status_text", &err);
    UIUtilE::Assign(this, m_time_text,    "time_text", &err);
    UIUtilE::Assign(this, m_date_text,    "date_text", &err);
    UIUtilE::Assign(this, m_load_text,    "load_text", &err);
    UIUtilE::Assign(this, m_disk_text,    "disk_text", &err);

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'zmconsole'");
        return false;
    }

    BuildFocusList();

    SetFocusWidget(m_monitor_list);

    m_timeTimer->start(TIME_UPDATE_TIME);
    m_updateTimer->start(100);

    updateTime();

    return true;
}
开发者ID:MythTV,项目名称:mythtv,代码行数:32,代码来源:zmconsole.cpp

示例11: LoadWindowFromXML

bool VisualizerView::Create(void)
{
    bool err = false;

    // Load the theme for this screen
    err = LoadWindowFromXML("music-ui.xml", "visualizerview", this);

    if (!err)
        return false;

    // find common widgets available on any view
    err = CreateCommon();

    // find widgets specific to this view

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'lyricsview'");
        return false;
    }

    BuildFocusList();

    return true;
}
开发者ID:ChristopherNeufeld,项目名称:mythtv,代码行数:25,代码来源:visualizerview.cpp

示例12: LoadWindowFromXML

bool AirPlayPictureScreen::Create(void)
{
    bool foundtheme = false;

    // Load the theme for this screen
    // The xml file containing the screen definition is airplay-ui.xml in this
    // example, the name of the screen in the xml is airplaypicture. This
    // should make sense when you look at the xml below
    foundtheme = LoadWindowFromXML("airplay-ui.xml", "airplaypicture", this);

    if (!foundtheme) // If we cannot load the theme for any reason ...
        return false;

    // The xml should contain an <imagetype> named 'picture', if it doesn't
    // then we cannot display the image and may as well abort
    m_airplayImage = dynamic_cast<MythUIImage*>
                                            (GetChild("picture"));
    if (!m_airplayImage)
        return false;

    // As an illustration let's say the picture includes a description/title or some other metadata
    // Let's also say that display of this metadata is entirely optional, so we won't fail if the theme
    // doesn't include 'description'
    m_airplayText = dynamic_cast<MythUIText*>
                                            (GetChild("description"));

    return true;
}
开发者ID:adicarlo,项目名称:mythtv,代码行数:28,代码来源:example.cpp

示例13: Create

bool EditAlbumartDialog::Create(void)
{
    if (! LoadWindowFromXML("music-ui.xml", "editalbumart", this))
        return false;

    bool err = CreateCommon();

    UIUtilE::Assign(this, m_coverartList,      "coverartlist",      &err);
    UIUtilE::Assign(this, m_imagetypeText,     "imagetypetext",     &err);
    UIUtilE::Assign(this, m_imagefilenameText, "imagefilenametext", &err);
    UIUtilE::Assign(this, m_coverartImage,     "coverartimage",     &err);

    UIUtilE::Assign(this, m_metadataButton,    "metadatabutton",    &err);

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'editalbumart'");
        return false;
    }

    updateImageGrid();

    connect(m_coverartList, SIGNAL(itemSelected(MythUIButtonListItem*)),
            this, SLOT(gridItemChanged(MythUIButtonListItem*)));

    connect(m_metadataButton, SIGNAL(Clicked()), SLOT(switchToMetadata()));

    BuildFocusList();

    return true;
}
开发者ID:daveyboyc,项目名称:mythtv,代码行数:31,代码来源:editmetadata.cpp

示例14: locker

bool MythNewsConfig::Create(void)
{
    QMutexLocker locker(&m_lock);

    // Load the theme for this screen
    bool foundtheme = LoadWindowFromXML("news-ui.xml", "config", this);

    if (!foundtheme)
        return false;

    bool err = false;
    UIUtilE::Assign(this, m_categoriesList, "category", &err);
    UIUtilE::Assign(this, m_siteList, "sites", &err);
    UIUtilW::Assign(this, m_helpText, "help", &err);

    if (err)
    {
        LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'config'");
        return false;
    }

    connect(m_categoriesList, SIGNAL(itemSelected(MythUIButtonListItem*)),
            this, SLOT(slotCategoryChanged(MythUIButtonListItem*)));
    connect(m_siteList, SIGNAL(itemClicked(MythUIButtonListItem*)),
            this, SLOT(toggleItem(MythUIButtonListItem*)));

    BuildFocusList();

    SetFocusWidget(m_categoriesList);

    loadData();

    return true;
}
开发者ID:Beirdo,项目名称:mythtv-stabilize,代码行数:34,代码来源:mythnewsconfig.cpp

示例15: Create

bool LanguageSelection::Create(void)
{
    if (!LoadWindowFromXML("config-ui.xml", "languageselection", this))
        return false;

    bool err = false;
    UIUtilE::Assign(this, m_languageList, "languages", &err);
    UIUtilE::Assign(this, m_countryList, "countries", &err);
    UIUtilE::Assign(this, m_saveButton, "save", &err);
    UIUtilE::Assign(this, m_cancelButton, "cancel", &err);

    if (err)
    {
        LOG(VB_GENERAL, LOG_ALERT, 
                 "Cannot load screen 'languageselection'");
        return false;
    }

#if 0
    connect(m_countryList, SIGNAL(itemClicked(MythUIButtonListItem*)),
            SLOT(LocaleClicked(MythUIButtonListItem*)));
    connect(m_languageList, SIGNAL(itemClicked(MythUIButtonListItem*)),
            SLOT(LanguageClicked(MythUIButtonListItem*)));
#endif

    connect(m_saveButton, SIGNAL(Clicked()), SLOT(Save()));
    connect(m_cancelButton, SIGNAL(Clicked()), SLOT(Close()));

    m_languageList->SetLCDTitles(tr("Preferred language"), "");
    m_countryList->SetLCDTitles(tr("Your location"), "");

    BuildFocusList();

    return true;
}
开发者ID:JGunning,项目名称:OpenAOL-TV,代码行数:35,代码来源:langsettings.cpp


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