mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
Merge branch 'ni/cst-next' into ni/mp/cst-next
Origin commit data
------------------
Commit: ad25cf2933
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-09-29 (Thu, 29 Sep 2016)
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <zapit/femanager.h>
|
||||
#include "cc_frm_signalbars.h"
|
||||
#include <sstream>
|
||||
|
||||
@@ -193,7 +192,9 @@ void CSignalBar::initSBarName()
|
||||
void CSignalBar::Refresh()
|
||||
{
|
||||
//get current value from frontend
|
||||
sb_signal = sb_frontend->getSignalStrength();
|
||||
sb_signal = 0;
|
||||
if (sb_frontend)
|
||||
sb_signal = sb_frontend->getSignalStrength();
|
||||
|
||||
//reinit items with current values
|
||||
initSBItems();
|
||||
@@ -243,7 +244,9 @@ void CSignalBar::paint(bool do_save_bg)
|
||||
void CSignalNoiseRatioBar::Refresh()
|
||||
{
|
||||
//get current value from frontend
|
||||
sb_signal = sb_frontend->getSignalNoiseRatio();
|
||||
sb_signal = 0;
|
||||
if (sb_frontend)
|
||||
sb_signal = sb_frontend->getSignalNoiseRatio();
|
||||
|
||||
//reinit items with current values
|
||||
initSBItems();
|
||||
@@ -256,7 +259,7 @@ CSignalBox::CSignalBox(const int& xpos, const int& ypos, const int& w, const int
|
||||
initVarSigBox();
|
||||
vertical = vert;
|
||||
|
||||
sbx_frontend = (frontend_ref == NULL) ? CFEManager::getInstance()->getLiveFE() : frontend_ref;
|
||||
sbx_frontend = frontend_ref;
|
||||
x = xpos;
|
||||
y = ypos;
|
||||
width = w;
|
||||
@@ -339,7 +342,6 @@ void CSignalBox::paintScale()
|
||||
void CSignalBox::paint(bool do_save_bg)
|
||||
{
|
||||
//paint frame and body
|
||||
initSignalItems();
|
||||
if (!is_painted)
|
||||
paintForm(do_save_bg);
|
||||
|
||||
|
@@ -116,7 +116,7 @@ class CSignalBar : public CComponentsForm, public CCTextScreen
|
||||
CSignalBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const std::string& sb_name = "SIG", CComponentsForm *parent = NULL);
|
||||
|
||||
///assigns the current used frontend, simplified a tuner object, see frontend_c.h
|
||||
virtual void setFrontEnd(CFrontend *frontend_ref){sb_frontend = frontend_ref;};
|
||||
virtual void setFrontEnd(CFrontend *frontend_ref){if (sb_frontend != frontend_ref) {sb_lastsig = 0; sb_frontend = frontend_ref;}}
|
||||
///assigns font for caption
|
||||
virtual void setTextFont(Font* font_text){sb_font = font_text;};
|
||||
///sets the caption color, see also property 'sb_caption_color'
|
||||
@@ -291,12 +291,12 @@ class CSignalBox : public CComponentsForm, public CCTextScreen
|
||||
|
||||
public:
|
||||
///class constructor for signal noise ratio.
|
||||
CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref = NULL, const bool vertical = true, CComponentsForm *parent = NULL, const std::string& sig_name = "SIG", const std::string& snr_name = "SNR" );
|
||||
CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const bool vertical = true, CComponentsForm *parent = NULL, const std::string& sig_name = "SIG", const std::string& snr_name = "SNR" );
|
||||
|
||||
///returns the signal object, type = CSignalBar*
|
||||
CSignalBar* getScaleObject(){return sbar;};
|
||||
///returns the signal noise ratio object, type = CSignalNoiseRatioBar*
|
||||
CSignalNoiseRatioBar* getLabelObject(){return snrbar;}
|
||||
CSignalNoiseRatioBar* getLabelObject(){return snrbar;};
|
||||
|
||||
///assigns the current used frontend, simplified a tuner object, see frontend_c.h
|
||||
void setFrontEnd(CFrontend *frontend_ref){sbx_frontend = frontend_ref;}
|
||||
|
Reference in New Issue
Block a user