本文整理汇总了C++中MythUIImage::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ MythUIImage::Load方法的具体用法?C++ MythUIImage::Load怎么用?C++ MythUIImage::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythUIImage
的用法示例。
在下文中一共展示了MythUIImage::Load方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
void AirPlayPictureScreen::Init(void)
{
if (m_airplayImage)
{
if (!m_imageFilename.isEmpty())
{
m_airplayImage->SetFilename(m_imageFilename); // Absolute path, http or SG url
m_airplayImage->Load(); // By default the image is loaded in a background thread, use LoadNow() to load in foreground
}
else
{
// Will default to displaying whatever placeholder image is defined
// in the xml by the themer, means we can show _something_ rather than
// a big empty hole. Generally you always want to call Reset() in
// these circumstances
m_airplayImage->Reset();
}
}
if (m_airplayText)
{
if (!m_imageDescription.isEmpty())
{
m_airplayText->SetText(m_imageDescription);
}
else
{
// Same as above, calling Reset() allows for a sane, themer defined
//default to be displayed
m_airplayText->Reset();
}
}
}
示例2: prepareWidget
void WeatherScreen::prepareWidget(MythUIType *widget)
{
MythUIImage *img;
/*
* Basically so we don't do it twice since some screens (Static Map) mess
* with image dimensions
*/
if ((img = dynamic_cast<MythUIImage *>(widget)))
{
img->Load();
}
}
示例3: Create
bool TrackInfoPopup::Create(void)
{
bool err = false;
err = LoadWindowFromXML("music-ui.xml", "trackinfo_popup", this);
if (!err)
return false;
// get map for current track
MetadataMap metadataMap;
m_metadata->toMap(metadataMap);
// add the map from the next track
MusicMetadata *nextMetadata = gPlayer->getNextMetadata();
if (nextMetadata)
nextMetadata->toMap(metadataMap, "next");
SetTextFromMap(metadataMap);
MythUIStateType *ratingState = dynamic_cast<MythUIStateType *>(GetChild("ratingstate"));
if (ratingState)
ratingState->DisplayState(QString("%1").arg(m_metadata->Rating()));
MythUIImage *albumImage = dynamic_cast<MythUIImage *>(GetChild("coverart"));
if (albumImage)
{
if (!m_metadata->getAlbumArtFile().isEmpty())
{
albumImage->SetFilename(m_metadata->getAlbumArtFile());
albumImage->Load();
}
}
m_displayTimer = new QTimer(this);
connect(m_displayTimer, SIGNAL(timeout()), this, SLOT(Close()));
m_displayTimer->setSingleShot(true);
m_displayTimer->start(MUSICINFOPOPUPTIME);
return true;
}
示例4: SetText
void OSD::SetText(const QString &window, const InfoMap &map,
OSDTimeout timeout)
{
MythScreenType *win = GetWindow(window);
if (!win)
return;
if (map.contains("numstars"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("ratingstate"));
if (state)
state->DisplayState(map["numstars"]);
}
if (map.contains("tvstate"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("tvstate"));
if (state)
state->DisplayState(map["tvstate"]);
}
if (map.contains("videocodec"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("videocodec"));
if (state)
state->DisplayState(map["videocodec"]);
}
if (map.contains("videodescrip"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("videodescrip"));
if (state)
state->DisplayState(map["videodescrip"]);
}
if (map.contains("audiocodec"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("audiocodec"));
if (state)
state->DisplayState(map["audiocodec"]);
}
if (map.contains("audiochannels"))
{
MythUIStateType *state = dynamic_cast<MythUIStateType *> (win->GetChild("audiochannels"));
if (state)
state->DisplayState(map["audiochannels"]);
}
if (map.contains("chanid"))
{
MythUIImage *icon = dynamic_cast<MythUIImage *> (win->GetChild("iconpath"));
if (icon)
{
icon->Reset();
uint chanid = map["chanid"].toUInt();
QString iconpath;
if (map.contains("iconpath"))
iconpath = map["iconpath"];
else
iconpath = ChannelUtil::GetIcon(chanid);
if (!iconpath.isEmpty())
{
QString iconurl =
gCoreContext->GetMasterHostPrefix("ChannelIcons",
iconpath);
icon->SetFilename(iconurl);
icon->Load(false);
}
}
}
if (map.contains("inetref"))
{
MythUIImage *cover = dynamic_cast<MythUIImage *> (win->GetChild("coverart"));
if (cover && map.contains("coverartpath"))
{
QString coverpath = map["coverartpath"];
cover->SetFilename(coverpath);
cover->Load(false);
}
MythUIImage *fanart = dynamic_cast<MythUIImage *> (win->GetChild("fanart"));
if (fanart && map.contains("fanartpath"))
{
QString fanartpath = map["fanartpath"];
fanart->SetFilename(fanartpath);
fanart->Load(false);
}
MythUIImage *banner = dynamic_cast<MythUIImage *> (win->GetChild("banner"));
if (banner && map.contains("bannerpath"))
{
QString bannerpath = map["bannerpath"];
banner->SetFilename(bannerpath);
banner->Load(false);
}
MythUIImage *screenshot = dynamic_cast<MythUIImage *> (win->GetChild("screenshot"));
if (screenshot && map.contains("screenshotpath"))
{
QString screenshotpath = map["screenshotpath"];
screenshot->SetFilename(screenshotpath);
screenshot->Load(false);
}
}
if (map.contains("nightmode"))
//.........这里部分代码省略.........