mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CSignalBar/CSignalNoiseRatioBar: reduce code, clean ups
Some var inits can be reduced, because of inheritance.
This commit is contained in:
@@ -31,8 +31,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
// #include <global.h>
|
||||
// #include <neutrino.h>
|
||||
|
||||
#include <gui/components/cc_frm.h>
|
||||
#include <gui/components/cc_item_progressbar.h>
|
||||
#include <gui/components/cc_item_text.h>
|
||||
@@ -116,7 +115,7 @@ class CSignalBar : public CComponentsForm
|
||||
public:
|
||||
CSignalBar();
|
||||
///basic component class constructor for signal.
|
||||
CSignalBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref);
|
||||
CSignalBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const std::string& sb_name = "SIG");
|
||||
|
||||
///assigns the current used frontend, simplified a tuner object, see frontend_c.h
|
||||
virtual void setFrontEnd(CFrontend *frontend_ref){sb_frontend = frontend_ref;};
|
||||
@@ -155,14 +154,11 @@ class CSignalNoiseRatioBar : public CSignalBar
|
||||
///refresh current item properties, use this before paintScale().
|
||||
void Refresh();
|
||||
|
||||
protected:
|
||||
///initialize all needed basic attributes and objects
|
||||
void initVarSnrBar();
|
||||
|
||||
public:
|
||||
CSignalNoiseRatioBar();
|
||||
CSignalNoiseRatioBar(){};
|
||||
///basic component class constructor for signal noise ratio.
|
||||
CSignalNoiseRatioBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref);
|
||||
CSignalNoiseRatioBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref)
|
||||
: CSignalBar(xpos, ypos, w, h, frontend_ref, "SNR"){};
|
||||
};
|
||||
|
||||
/// Class CSignalBox() provides CSignalBar(), CSignalNoiseRatioBar() scales at once.
|
||||
@@ -172,7 +168,7 @@ additional of CSignalBar()- and CSignalNoiseRatioBar()-objects.
|
||||
|
||||
|
||||
To add a signalbox object to your code add this to a header file:
|
||||
#include <gui/widget/signalbars.h>
|
||||
#include <gui/components/cc_frm_signalbars.h>
|
||||
|
||||
class CSampleClass
|
||||
{
|
||||
|
Reference in New Issue
Block a user