mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
CCDraw: add overloaded version of paint Blink()
It's useful to have synchronized timer for more than one item.
Origin commit data
------------------
Commit: f7ad79c371
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-12-17 (Sat, 17 Dec 2016)
This commit is contained in:
@@ -738,18 +738,21 @@ void CCDraw::paintTrigger()
|
|||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CCDraw::paintBlink(CComponentsTimer* Timer)
|
||||||
|
{
|
||||||
|
if (Timer){
|
||||||
|
Timer->OnTimer.connect(cc_draw_trigger_slot);
|
||||||
|
return Timer->isRun();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool CCDraw::paintBlink(const int& interval, bool is_nano)
|
bool CCDraw::paintBlink(const int& interval, bool is_nano)
|
||||||
{
|
{
|
||||||
if (cc_draw_timer == NULL){
|
if (cc_draw_timer == NULL)
|
||||||
cc_draw_timer = new CComponentsTimer(interval, is_nano);
|
cc_draw_timer = new CComponentsTimer(interval, is_nano);
|
||||||
if (cc_draw_timer->OnTimer.empty()){
|
|
||||||
cc_draw_timer->OnTimer.connect(cc_draw_trigger_slot);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (cc_draw_timer)
|
|
||||||
return cc_draw_timer->isRun();
|
|
||||||
|
|
||||||
return false;
|
return paintBlink(cc_draw_timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCDraw::cancelBlink(bool keep_on_screen)
|
bool CCDraw::cancelBlink(bool keep_on_screen)
|
||||||
|
@@ -312,6 +312,17 @@ class CCDraw : public COSDFader, public CComponentsSignals
|
|||||||
///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument
|
///paint item, same like paint(CC_SAVE_SCREEN_YES) but without any argument
|
||||||
virtual void paint1(){paint(CC_SAVE_SCREEN_YES);}
|
virtual void paint1(){paint(CC_SAVE_SCREEN_YES);}
|
||||||
|
|
||||||
|
/**paint item with blink effect
|
||||||
|
* This should work with all cc item types.
|
||||||
|
*
|
||||||
|
* @return bool returns true if effect is successful started
|
||||||
|
*
|
||||||
|
* @param[in] CComponentsTimer* pointer to timer object, Note: This object must be created and distroy outside
|
||||||
|
* of this methode.
|
||||||
|
* @see overloaded version of paintBlink()
|
||||||
|
*/
|
||||||
|
virtual bool paintBlink(CComponentsTimer* Timer);
|
||||||
|
|
||||||
/**paint item with blink effect
|
/**paint item with blink effect
|
||||||
* This should work with all cc item types.
|
* This should work with all cc item types.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user