Commit ab65ec35 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH: small improvements in some visu classes

parent f2e650f8
......@@ -22,7 +22,7 @@ namespace otb
Curves2DWidget::Curves2DWidget() : m_Curves(), m_XAxisLabel("X axis"), m_YAxisLabel("Y axis"), m_Margins(),
m_Extent(), m_AxisOrigin(), m_AxisLength(),
m_GridOrigin(), m_GridSpacing(), m_ZeroCrossingAxis(true),
m_AutoScale(true), m_AxisColor(), m_GridColor(), m_SpaceToScreenTransform()
m_AutoScale(true), m_AxisColor(), m_GridColor(), m_SpaceToScreenTransform(), m_ScaleAxeYDefault(true)
{
// Build the curves list
m_Curves = CurveListType::New();
......@@ -279,7 +279,15 @@ void Curves2DWidget::RenderGrid()
// Display the vertical grid index (Y axis)
pos = screenGridOrigin[1];
int scale = 0;
int scale;
if(m_ScaleAxeYDefault)
{
scale = 0;
}
else
scale = m_GridOrigin[1];
std::ostringstream oss;
gl_font(FL_COURIER_BOLD, 8);
glColor4d(0, 0, 0, 0.5);
......
......@@ -106,6 +106,10 @@ public:
itkGetMacro(AutoScale, bool);
itkBooleanMacro(AutoScale);
itkSetMacro(ScaleAxeYDefault, bool);
itkGetMacro(ScaleAxeYDefault, bool);
itkBooleanMacro(ScaleAxeYDefault);
/** Add a new curve to the widget
* \return curve position in the list
*/
......@@ -191,6 +195,8 @@ private:
ColorType m_AxisColor;
ColorType m_GridColor;
bool m_ScaleAxeYDefault;
// Space to screen transform
AffineTransformPointerType m_SpaceToScreenTransform;
......
......@@ -136,4 +136,25 @@ PackedWidgetManager
m_PackedWidget->m_Window->copy_label(label);
}
void
PackedWidgetManager
::SetLabelScrollWidget(const char * label)
{
m_PackedWidget->m_QuicklookGroup->label(label);
}
void
PackedWidgetManager
::SetLabelFullWidget(const char * label)
{
m_PackedWidget->m_FullGroup->label(label);
}
void
PackedWidgetManager
::SetLabelZoomWidget(const char * label)
{
m_PackedWidget->m_ZoomGroup->label(label);
}
}
......@@ -60,6 +60,9 @@ public:
virtual void Refresh();
virtual void SetLabel(const char * label);
virtual void UnRegisterAll();
virtual void SetLabelScrollWidget(const char * label);
virtual void SetLabelFullWidget(const char * label);
virtual void SetLabelZoomWidget(const char * label);
protected:
/** Constructor */
......
......@@ -164,4 +164,25 @@ SplittedWidgetManager
m_SplittedWidget->m_HistogramsGroup->remove(m_InternalCurveWidget);
}
void
SplittedWidgetManager
::SetLabelScrollWidget(const char * label)
{
m_SplittedWidget->m_QuicklookGroup->label(label);
}
void
SplittedWidgetManager
::SetLabelFullWidget(const char * label)
{
m_SplittedWidget->m_FullGroup->label(label);
}
void
SplittedWidgetManager
::SetLabelZoomWidget(const char * label)
{
m_SplittedWidget->m_ZoomGroup->label(label);
}
}
......@@ -58,6 +58,9 @@ public:
virtual void Refresh();
virtual void SetLabel(const char * label);
virtual void UnRegisterAll();
virtual void SetLabelScrollWidget(const char * label);
virtual void SetLabelFullWidget(const char * label);
virtual void SetLabelZoomWidget(const char * label);
protected:
/** Constructor */
......
......@@ -59,6 +59,9 @@ public:
virtual void Refresh() = 0;
virtual void SetLabel(const char * label) = 0;
virtual void UnRegisterAll() = 0;
virtual void SetLabelScrollWidget(const char * label) = 0;
virtual void SetLabelFullWidget(const char * label) = 0;
virtual void SetLabelZoomWidget(const char * label) = 0;
protected:
/** Constructor */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment