ROOT_Application
2.0
C++ Core modules and GUIStock
|
Used for free drawing of support/tendance Add a general line description with coeef_d and origin : y = coeff_d * x + origin. More...
#include <ObjectLine.h>
Public Member Functions | |
ObjectLineTendance () | |
default constructor More... | |
ObjectLineTendance (TypeLine &tline, double valueX, double valueY) | |
Constructor from TPadStock, use the Factory now. More... | |
virtual | ~ObjectLineTendance () |
void | FinaliseDrawableLine (CommonXAxis *fcommon_xaxis_th) |
set up all data member after drawing. More... | |
double | GetCoeffD () const |
member functions specific More... | |
void | SetCoeffD (double &new_coeff) |
double | GetOrigin () const |
void | SetOrigin (double &x, double &y) |
time_t | GetTimeBegin () const |
time_t | GetTimeEnd () const |
Int_t | GetBinBegin () const |
Int_t | GetBinEnd () const |
void | SetTimeT0 (time_t begin) |
void | SetTimeT1 (time_t end) |
virtual void | SetTimes (time_t begin, time_t end) |
void | SetBinBegin (Int_t bin_x0) |
void | SetBinEnd (Int_t bin_x1) |
void | SetBins (Int_t bin_x0, Int_t bin_x1) |
void | SetInitValuesY () |
void | InitCoeff_origin (double x0, double x1, double y0, double y1) |
virtual std::vector< std::string > | MakeStringForStatusBar (int px, int py) const |
create the string for the StatusBar More... | |
virtual void | ClearObjectStock () |
general function called when drawing More... | |
virtual void | SetObjectStock (ListDataStockBase *, CommonXAxis *, Hparam_stock_t &) |
used for from the listdata More... | |
virtual void | Paint (const Option_t *="") |
Paint the objet, to overide. More... | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Make all drawable modification, move by mouse and arrow. More... | |
virtual void | MoveObjectLine (bool kdir) |
pass the direction ( positive, negative ) to extend More... | |
ClassDef (ObjectLineTendance, 1) | |
Public Member Functions inherited from ObjectLine | |
ObjectLine () | |
ObjectLine (TypeLine tline, double valuey0) | |
constructor used by Factory More... | |
ObjectLine (double x0, double y0, double x1, double y1) | |
general constructor More... | |
virtual | ~ObjectLine () |
destructor, should delete TLine explicitely More... | |
virtual std::string | GetNameObject () const |
pure-virtual access More... | |
virtual void | SetNameObject (std::string &name) |
double | GetX0 () const |
wrapper functions to fline, need public for all ?? More... | |
double | GetX1 () const |
double | GetY0 () const |
double | GetY1 () const |
void | SetX0 (double x0) |
void | SetX1 (double x1) |
void | SetY0 (double y0) |
void | SetY1 (double y1) |
virtual void | SetValues (unsigned int, std::vector< double >, double, double, time_t, UInt_t=0) |
virtual Width_t | GetLineWidth () const |
virtual Color_t | GetLineColor () const |
virtual Style_t | GetLineStyle () const |
virtual void | SetLineWidth (Width_t lwidth) |
virtual void | SetLineColor (Color_t color) |
virtual void | SetLineStyle (Style_t lstyle) |
virtual Int_t | GetModeLine () const |
virtual bool | IsLine () |
virtual bool | IsHalfLine1 () |
virtual bool | IsHalfLine2 () |
virtual bool | IsSegment () |
virtual void | SetModekLine () |
virtual void | SetModekHalfLine1 () |
virtual void | SetModekHalfLine2 () |
virtual void | SetModekSegment () |
virtual TypeLine | GetTypeLine () const |
virtual bool | IsSupport () const |
virtual bool | IsTendance () const |
virtual void | GetExtrema (double &, double &) const |
virtual void | Resize (unsigned int) |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py, AbstractObjectStock **obj) |
virtual int | DistancetoPoint (int, int, double &, int=-1) const |
called by THStock for anchoring. More... | |
ClassDef (ObjectLine, 1) | |
Public Member Functions inherited from AbstractObjectStock | |
AbstractObjectStock () | |
default constructor More... | |
virtual | ~AbstractObjectStock () |
virtual default destructor, needed More... | |
virtual THStock * | GetParent () const |
public access to parent THStock More... | |
virtual void | SetParent (THStock *thstock) |
virtual void | SetToPaint (bool k) |
Public access to kPaint. More... | |
virtual bool | ToPaint () const |
virtual unsigned int | GetSize () const |
virtual void | SetValues (unsigned int bin, std::vector< double > values, double xmin, double ymax, time_t date, unsigned int opt_value=0)=0 |
more general call for setting the values, even ObjectLine ?? no use/need but maybe if protected probelm compilation (private inherintence??) More... | |
virtual Int_t | DistancetoPrimitive (int, int, AbstractObjectStock **)=0 |
used for selection of object, for const need attention to the pointer More... | |
virtual void | SetLineColorObject (Color_t) |
ClassDef (AbstractObjectStock, 1) | |
Protected Member Functions | |
void | RecalcCoeff_origin (double x0, double x1) |
mathematical functions More... | |
virtual double | GetXBorder (double y) const |
specific for extrapolation return X value where border is crossed More... | |
virtual double | ExtrapolateYPad (double) const |
extrapolate y fom line equation More... | |
Protected Member Functions inherited from ObjectLine | |
void | InitLine (double x0, double y0, double x1, double y1) |
virtual std::vector< float > | GetValues (int px, int py, time_t &date) const |
used by MakeStringForStatusBar only base in ObjectLine should be very simple More... | |
Protected Attributes | |
double | coeff_d |
most general for drawing a line, y = ax + b and moving as well, rotate a, translate b ! a and b not fixed need to be recalculated everytime repaint ( if axis moves ) to check ! More... | |
double | origin |
double | valueY0 |
save initial values, y's overridden if Lines Y initial values , no overloaded by line->SetY, here stay constant associated to fbin_begin/fend More... | |
double | valueY1 |
time_t | ftbegin |
set up once fbegin/fend, for update/save may be used More... | |
time_t | ftend |
int | fbin_begin |
memorize bin_x0, bin_x1, easier with slide More... | |
int | fbin_end |
Protected Attributes inherited from ObjectLine | |
std::string | name_line |
add a name, absent in AbstractObjectStock More... | |
ModeLine | fModeLine |
kLine, kSegment, kHalfSegment0, kHalfSegment1 More... | |
TypeLine | fTypeLine |
TypeLine, enum : kNone, kSupport, kTendance, kFibo. More... | |
TLine * | fline |
use composition TLine*, valable for all derived class More... | |
Protected Attributes inherited from AbstractObjectStock | |
THStock * | fParentTHStock |
bool | kPaint |
set to true if the object need be draw or not depend on common_xaxis and user input ( slider ) used by SetObject as well, good, efficient More... | |
Additional Inherited Members | |
Protected Types inherited from ObjectLine | |
enum | ModeLine { kLine = 0, kHalfLine1 = 1, kHalfLine2 = 2, kSegment = 3 } |
Used for free drawing of support/tendance Add a general line description with coeef_d and origin : y = coeff_d * x + origin.
Should be interactive and provide : -Anchor -Selection and movable
Definition at line 230 of file ObjectLine.h.
|
inline |
default constructor
Definition at line 258 of file ObjectLine.h.
ObjectLineTendance::ObjectLineTendance | ( | TypeLine & | tline, |
double | valueX, | ||
double | valueY | ||
) |
Constructor from TPadStock, use the Factory now.
Definition at line 222 of file ObjectLine.cxx.
References ObjectLine::fModeLine, ObjectLine::fTypeLine, ObjectLine::InitLine(), and ObjectLine::kSegment.
|
inlinevirtual |
Definition at line 262 of file ObjectLine.h.
ObjectLineTendance::ClassDef | ( | ObjectLineTendance | , |
1 | |||
) |
|
inlinevirtual |
general function called when drawing
Implements AbstractObjectStock.
Definition at line 296 of file ObjectLine.h.
|
virtual |
Make all drawable modification, move by mouse and arrow.
Reimplemented from ObjectLine.
Definition at line 575 of file ObjectLine.cxx.
References EditorObjStock::GetRotate(), EditorObjStock::GetTranslate(), ObjectLine::GetX0(), ObjectLine::GetX1(), ObjectLine::GetY0(), ObjectLine::GetY1(), ObjectLine::IsSupport(), MoveObjectLine(), SetInitValuesY(), EditorObjStock::SetRotate(), EditorObjStock::SetTranslate(), ObjectLine::SetX0(), ObjectLine::SetX1(), ObjectLine::SetY0(), and ObjectLine::SetY1().
|
protectedvirtual |
extrapolate y fom line equation
Definition at line 303 of file ObjectLine.cxx.
References coeff_d, and origin.
Referenced by FinaliseDrawableLine(), MakeStringForStatusBar(), and SetObjectStock().
void ObjectLineTendance::FinaliseDrawableLine | ( | CommonXAxis * | fcommon_xaxis_th | ) |
set up all data member after drawing.
only X/Y values needed for calling this function
fcommon_xaxis_th |
Definition at line 315 of file ObjectLine.cxx.
References ExtrapolateYPad(), AbstractObjectStock::fParentTHStock, THStock::GetDateFromBin(), ObjectLine::GetX0(), ObjectLine::GetX1(), CommonXAxis::GetXAxis(), ObjectLine::GetY0(), ObjectLine::GetY1(), InitCoeff_origin(), SetBins(), SetInitValuesY(), SetTimes(), ObjectLine::SetX0(), ObjectLine::SetX1(), ObjectLine::SetY0(), ObjectLine::SetY1(), valueY0, and valueY1.
|
inline |
Definition at line 278 of file ObjectLine.h.
References fbin_begin.
Referenced by SetObjectStock().
|
inline |
Definition at line 279 of file ObjectLine.h.
References fbin_end.
Referenced by SetObjectStock().
|
inline |
member functions specific
Definition at line 270 of file ObjectLine.h.
References coeff_d.
Referenced by MoveObjectLine().
|
inline |
Definition at line 272 of file ObjectLine.h.
References origin.
|
inline |
Definition at line 276 of file ObjectLine.h.
References ftbegin.
|
inline |
Definition at line 277 of file ObjectLine.h.
References ftend.
|
protectedvirtual |
specific for extrapolation
return X value where border is crossed
Definition at line 291 of file ObjectLine.cxx.
References coeff_d, and origin.
Referenced by SetObjectStock().
void ObjectLineTendance::InitCoeff_origin | ( | double | x0, |
double | x1, | ||
double | y0, | ||
double | y1 | ||
) |
Definition at line 272 of file ObjectLine.cxx.
References coeff_d, and origin.
Referenced by FinaliseDrawableLine().
|
virtual |
create the string for the StatusBar
Implements AbstractObjectStock.
Definition at line 377 of file ObjectLine.cxx.
References ExtrapolateYPad(), ObjectLine::GetValues(), ObjectLine::GetY0(), ObjectLine::IsSupport(), Utils::Time_tToString(), Utils::toString(), and values.
|
virtual |
pass the direction ( positive, negative ) to extend
Definition at line 836 of file ObjectLine.cxx.
References GetCoeffD(), EditorObjStock::GetRotate(), EditorObjStock::GetTranslate(), ObjectLine::GetY0(), ObjectLine::GetY1(), SetCoeffD(), SetInitValuesY(), ObjectLine::SetY0(), ObjectLine::SetY1(), valueY0, and valueY1.
Referenced by ExecuteEvent().
|
virtual |
Paint the objet, to overide.
Reimplemented from ObjectLine.
Definition at line 563 of file ObjectLine.cxx.
References ObjectLine::fline.
|
protected |
mathematical functions
Definition at line 245 of file ObjectLine.cxx.
References coeff_d, origin, valueY0, and valueY1.
Referenced by SetObjectStock().
|
inline |
Definition at line 284 of file ObjectLine.h.
References fbin_begin.
|
inline |
Definition at line 285 of file ObjectLine.h.
References fbin_end.
|
inline |
Definition at line 286 of file ObjectLine.h.
References fbin_begin, and fbin_end.
Referenced by FinaliseDrawableLine().
|
inline |
Definition at line 271 of file ObjectLine.h.
References coeff_d.
Referenced by MoveObjectLine().
|
inline |
Definition at line 287 of file ObjectLine.h.
References ObjectLine::fline, valueY0, and valueY1.
Referenced by ExecuteEvent(), FinaliseDrawableLine(), and MoveObjectLine().
|
virtual |
used for from the listdata
Reimplemented from ObjectLine.
Definition at line 413 of file ObjectLine.cxx.
References ExtrapolateYPad(), GetBinBegin(), GetBinEnd(), CommonXAxis::GetXAxis(), GetXBorder(), ObjectLine::GetY0(), ObjectLine::GetY1(), ObjectLine::IsHalfLine1(), ObjectLine::IsHalfLine2(), ObjectLine::IsLine(), ObjectLine::IsSegment(), RecalcCoeff_origin(), ObjectLine::SetX0(), ObjectLine::SetX1(), ObjectLine::SetY0(), ObjectLine::SetY1(), Hparam_stock_t::xfirst, Hparam_stock_t::xlast, Hparam_stock_t::xmax, Hparam_stock_t::xmin, Hparam_stock_t::ymax, and Hparam_stock_t::ymin.
void ObjectLineTendance::SetOrigin | ( | double & | x, |
double & | y | ||
) |
Definition at line 366 of file ObjectLine.cxx.
|
inlinevirtual |
Definition at line 283 of file ObjectLine.h.
References ftbegin, and ftend.
Referenced by FinaliseDrawableLine().
|
inline |
Definition at line 281 of file ObjectLine.h.
References ftbegin.
|
inline |
Definition at line 282 of file ObjectLine.h.
References ftend.
|
protected |
most general for drawing a line, y = ax + b and moving as well, rotate a, translate b ! a and b not fixed need to be recalculated everytime repaint ( if axis moves ) to check !
Definition at line 236 of file ObjectLine.h.
Referenced by ExtrapolateYPad(), GetCoeffD(), GetXBorder(), InitCoeff_origin(), RecalcCoeff_origin(), SetCoeffD(), and SetOrigin().
|
protected |
memorize bin_x0, bin_x1, easier with slide
Definition at line 246 of file ObjectLine.h.
Referenced by GetBinBegin(), SetBinBegin(), and SetBins().
|
protected |
Definition at line 246 of file ObjectLine.h.
Referenced by GetBinEnd(), SetBinEnd(), and SetBins().
|
protected |
set up once fbegin/fend, for update/save may be used
Definition at line 244 of file ObjectLine.h.
Referenced by GetTimeBegin(), SetTimes(), and SetTimeT0().
|
protected |
Definition at line 244 of file ObjectLine.h.
Referenced by GetTimeEnd(), SetTimes(), and SetTimeT1().
|
protected |
Definition at line 236 of file ObjectLine.h.
Referenced by ExtrapolateYPad(), GetOrigin(), GetXBorder(), InitCoeff_origin(), RecalcCoeff_origin(), and SetOrigin().
|
protected |
save initial values, y's overridden if Lines Y initial values , no overloaded by line->SetY, here stay constant associated to fbin_begin/fend
Definition at line 241 of file ObjectLine.h.
Referenced by FinaliseDrawableLine(), MoveObjectLine(), RecalcCoeff_origin(), and SetInitValuesY().
|
protected |
Definition at line 241 of file ObjectLine.h.
Referenced by FinaliseDrawableLine(), MoveObjectLine(), RecalcCoeff_origin(), and SetInitValuesY().