mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
CComponents: add new parameter 'parent'
Use strictly CComponentsForm as parent parameter in constructors. Some parts have been cleaned up (Constructors, init methodes removed) New parameter makes it possible already add current item in constructor. So in mostly situations is it not necessary to use explicit addCCItem(), but addCCItem()is still valid and necessary in certain situations. Affected are all cc-classes and their derivates. Some classes must or can be adapted later. The function is not currently restricted, because usage of parent parameter is not explicit defined in constructors, see CImageInfo, here yet are used addCCItem() methodes. Generally this parameter is located in the constructors before bool has_shadow, but it is not sure whether it would be better to use this parameter as the first. That remains to be clarified.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
||||
|
||||
Class for signalbar based up CComponent classes.
|
||||
Copyright (C) 2013, Thilo Graf 'dbt'
|
||||
Copyright (C) 2013-2014, Thilo Graf 'dbt'
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -110,9 +110,9 @@ class CSignalBar : public CComponentsForm
|
||||
std::string sb_name;
|
||||
|
||||
public:
|
||||
CSignalBar();
|
||||
CSignalBar(CComponentsForm *parent = NULL);
|
||||
///basic component class constructor for signal.
|
||||
CSignalBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, const std::string& sb_name = "SIG");
|
||||
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;};
|
||||
@@ -157,10 +157,11 @@ class CSignalNoiseRatioBar : public CSignalBar
|
||||
void Refresh();
|
||||
|
||||
public:
|
||||
CSignalNoiseRatioBar(){};
|
||||
CSignalNoiseRatioBar(CComponentsForm *parent = NULL)
|
||||
: CSignalBar(parent){};
|
||||
///basic component class constructor for signal noise ratio.
|
||||
CSignalNoiseRatioBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref)
|
||||
: CSignalBar(xpos, ypos, w, h, frontend_ref, "SNR"){};
|
||||
CSignalNoiseRatioBar(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref, CComponentsForm *parent = NULL)
|
||||
: CSignalBar(xpos, ypos, w, h, frontend_ref, "SNR", parent){};
|
||||
};
|
||||
|
||||
/// Class CSignalBox() provides CSignalBar(), CSignalNoiseRatioBar() scales at once.
|
||||
@@ -268,7 +269,7 @@ class CSignalBox : public CComponentsForm
|
||||
|
||||
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);
|
||||
CSignalBox(const int& xpos, const int& ypos, const int& w, const int& h, CFrontend *frontend_ref = NULL, const bool vertical = true, CComponentsForm *parent = NULL);
|
||||
|
||||
///returns the signal object, type = CSignalBar*
|
||||
CSignalBar* getScaleObject(){return sbar;};
|
||||
|
Reference in New Issue
Block a user