mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponentsInfoBox, CComponentsPicture: add overloaded members setPicture()
This commit is contained in:
@@ -81,6 +81,19 @@ void CComponentsInfoBox::initVarInfobox()
|
|||||||
x_offset = 10;
|
x_offset = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CComponentsInfoBox::setPicture(const std::string& picture_name)
|
||||||
|
{
|
||||||
|
pic_name = picture_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CComponentsInfoBox::setPicture(const char* picture_name)
|
||||||
|
{
|
||||||
|
string s_tmp = "";
|
||||||
|
if (picture_name)
|
||||||
|
s_tmp = string(picture_name);
|
||||||
|
setPicture(s_tmp);
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsInfoBox::paintPicture()
|
void CComponentsInfoBox::paintPicture()
|
||||||
{
|
{
|
||||||
//ensure empty pic object
|
//ensure empty pic object
|
||||||
|
@@ -73,8 +73,10 @@ class CComponentsInfoBox : public CComponentsText
|
|||||||
|
|
||||||
///set property: space around fram and beetween picture and textbox
|
///set property: space around fram and beetween picture and textbox
|
||||||
inline void setSpaceOffset(const int offset){x_offset = offset;};
|
inline void setSpaceOffset(const int offset){x_offset = offset;};
|
||||||
///set property: path or name of displayed image
|
///set property: path or name of displayed image, parameter as string
|
||||||
inline void setPicture(const std::string& picture_name){pic_name = picture_name;};
|
void setPicture(const std::string& picture_name);
|
||||||
|
///set property: path or name of displayed image, parameter as const char*
|
||||||
|
void setPicture(const char* picture_name);
|
||||||
|
|
||||||
///paint item
|
///paint item
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
|
@@ -87,6 +87,13 @@ void CComponentsPicture::setPicture(const std::string& picture_name)
|
|||||||
initCCItem();
|
initCCItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CComponentsPicture::setPicture(const char* picture_name)
|
||||||
|
{
|
||||||
|
string s_tmp = "";
|
||||||
|
if (picture_name)
|
||||||
|
s_tmp = string(picture_name);
|
||||||
|
setPicture(s_tmp);
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsPicture::setPictureAlign(const int alignment)
|
void CComponentsPicture::setPictureAlign(const int alignment)
|
||||||
{
|
{
|
||||||
@@ -230,6 +237,14 @@ void CComponentsChannelLogo::setPicture(const std::string& picture_name)
|
|||||||
initVarPictureChannellLogo();
|
initVarPictureChannellLogo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CComponentsChannelLogo::setPicture(const char* picture_name)
|
||||||
|
{
|
||||||
|
string s_tmp = "";
|
||||||
|
if (picture_name)
|
||||||
|
s_tmp = string(picture_name);
|
||||||
|
this->setPicture(s_tmp);
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsChannelLogo::setChannel(const uint64_t& channelId, const std::string& channelName)
|
void CComponentsChannelLogo::setChannel(const uint64_t& channelId, const std::string& channelName)
|
||||||
{
|
{
|
||||||
channel_id = channelId;
|
channel_id = channelId;
|
||||||
|
@@ -87,6 +87,7 @@ class CComponentsPicture : public CComponentsItem
|
|||||||
virtual inline void setPicturePaint(bool paint_p){pic_paint = paint_p;};
|
virtual inline void setPicturePaint(bool paint_p){pic_paint = paint_p;};
|
||||||
virtual inline void setPicturePaintBackground(bool paintBg){pic_paintBg = paintBg;};
|
virtual inline void setPicturePaintBackground(bool paintBg){pic_paintBg = paintBg;};
|
||||||
virtual void setPicture(const std::string& picture_name);
|
virtual void setPicture(const std::string& picture_name);
|
||||||
|
virtual void setPicture(const char* picture_name);
|
||||||
virtual void setPictureAlign(const int alignment);
|
virtual void setPictureAlign(const int alignment);
|
||||||
|
|
||||||
virtual inline bool isPicPainted(){return pic_painted;};
|
virtual inline bool isPicPainted(){return pic_painted;};
|
||||||
@@ -120,6 +121,7 @@ class CComponentsChannelLogo : public CComponentsPicture, CPictureViewer
|
|||||||
|
|
||||||
void setChannel(const uint64_t& channelId, const std::string& channelName);
|
void setChannel(const uint64_t& channelId, const std::string& channelName);
|
||||||
void setPicture(const std::string& picture_name);
|
void setPicture(const std::string& picture_name);
|
||||||
|
void setPicture(const char* picture_name);
|
||||||
bool hasLogo(){return has_logo;};
|
bool hasLogo(){return has_logo;};
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user