mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-13 00:13:37 +02:00
hourglass: minor formatations
Origin commit data
------------------
Commit: d05a48c270
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-10-19 (Tue, 19 Oct 2021)
Origin message was:
------------------
- hourglass: minor formatations
This commit is contained in:
@@ -39,33 +39,33 @@ CHourGlass::CHourGlass( const int x_pos,
|
||||
const int y_pos,
|
||||
const int w,
|
||||
const int h,
|
||||
const std::string& image_basename,
|
||||
const int64_t& interval,
|
||||
const std::string &image_basename,
|
||||
const int64_t &interval,
|
||||
CComponentsForm *parent,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame,
|
||||
fb_pixel_t color_body,
|
||||
fb_pixel_t color_shadow) : CComponentsShapeSquare(x_pos, y_pos, w, h, parent, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type.name ="wg_hourglass";
|
||||
cc_item_type.name = "wg_hourglass";
|
||||
|
||||
hg_image_basename = image_basename;
|
||||
cc_bg_image = cc_bg_image_old = cc_bg_sel_image = cc_bg_sec_image = "";
|
||||
hg_image_basename = image_basename;
|
||||
cc_bg_image = cc_bg_image_old = cc_bg_sel_image = cc_bg_sec_image = "";
|
||||
|
||||
initImageFiles();
|
||||
|
||||
hg_file_num = 0;
|
||||
hg_file_num = 0;
|
||||
if (!hg_img_files.empty())
|
||||
{
|
||||
hg_interval = interval == HG_AUTO_PAINT_INTERVAL ? (int64_t)(1000/hg_img_files.size()) : interval;
|
||||
hg_timer = new CComponentsTimer(hg_interval);
|
||||
hg_interval = interval == HG_AUTO_PAINT_INTERVAL ? (int64_t)(1000/hg_img_files.size()) : interval;
|
||||
hg_timer = new CComponentsTimer(hg_interval);
|
||||
hg_timer->OnTimer.connect(sigc::bind(sigc::mem_fun(*this, &CHourGlass::paint), true));
|
||||
}
|
||||
else
|
||||
{
|
||||
hg_timer = NULL;
|
||||
hg_interval = 0;
|
||||
dprintf(DEBUG_NORMAL, "[CHourGlass] [%s - %d] NOTE: No %s-images found..\n", __func__, __LINE__, hg_image_basename.c_str());
|
||||
hg_timer = NULL;
|
||||
dprintf(DEBUG_NORMAL, "[CHourGlass] [%s - %d] NOTE: No %s-images found..\n", __func__, __LINE__, hg_image_basename.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ void CHourGlass::initImageFiles()
|
||||
if (file_exists(path))
|
||||
hg_img_files.push_back(hg_image_basename);
|
||||
|
||||
for(int i = 0; i <= MAX_IMAGES; i++)
|
||||
for (int i = 0; i <= MAX_IMAGES; i++)
|
||||
{
|
||||
filename = hg_image_basename;
|
||||
filename += to_string(i);
|
||||
@@ -123,15 +123,15 @@ CHourGlassProc::CHourGlassProc( const int x_pos,
|
||||
const sigc::slot<void> &Slot,
|
||||
const int w,
|
||||
const int h,
|
||||
const std::string& image_basename,
|
||||
const int64_t& interval,
|
||||
const std::string &image_basename,
|
||||
const int64_t &interval,
|
||||
CComponentsForm *parent,
|
||||
int shadow_mode,
|
||||
fb_pixel_t color_frame,
|
||||
fb_pixel_t color_body,
|
||||
fb_pixel_t color_shadow) : CHourGlass(x_pos, y_pos, w, h, image_basename, interval, parent, shadow_mode, color_frame, color_body, color_shadow)
|
||||
{
|
||||
cc_item_type.name ="wg_hourglass_proc";
|
||||
cc_item_type.name = "wg_hourglass_proc";
|
||||
|
||||
OnRun.connect(Slot);
|
||||
}
|
||||
|
@@ -38,11 +38,11 @@
|
||||
class CHourGlass : public CComponentsShapeSquare
|
||||
{
|
||||
private:
|
||||
std::string hg_image_basename;
|
||||
std::string hg_image_basename;
|
||||
std::vector<std::string> hg_img_files;
|
||||
int64_t hg_interval;
|
||||
CComponentsTimer* hg_timer;
|
||||
size_t hg_file_num;
|
||||
int64_t hg_interval;
|
||||
CComponentsTimer *hg_timer;
|
||||
size_t hg_file_num;
|
||||
|
||||
void initImageFiles();
|
||||
public:
|
||||
@@ -82,8 +82,8 @@ class CHourGlass : public CComponentsShapeSquare
|
||||
const int y_pos,
|
||||
const int w = 48,
|
||||
const int h = 48,
|
||||
const std::string& image_basename = "hourglass",
|
||||
const int64_t& interval = HG_AUTO_PAINT_INTERVAL,
|
||||
const std::string &image_basename = "hourglass",
|
||||
const int64_t &interval = HG_AUTO_PAINT_INTERVAL,
|
||||
CComponentsForm *parent = NULL,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_FRAME_PLUS_0,
|
||||
@@ -123,8 +123,8 @@ class CHourGlassProc : public CHourGlass
|
||||
const sigc::slot<void> &Slot,
|
||||
const int w = 48,
|
||||
const int h = 48,
|
||||
const std::string& image_basename = "hourglass",
|
||||
const int64_t& interval = HG_AUTO_PAINT_INTERVAL,
|
||||
const std::string &image_basename = "hourglass",
|
||||
const int64_t &interval = HG_AUTO_PAINT_INTERVAL,
|
||||
CComponentsForm *parent = NULL,
|
||||
int shadow_mode = CC_SHADOW_OFF,
|
||||
fb_pixel_t color_frame = COL_FRAME_PLUS_0,
|
||||
|
Reference in New Issue
Block a user