Commit 9632405e authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic '18672-too-many-useless-fontfile-items-in-python-traces'

956c320f Add missing font file related API vtkPVPlotMatrixView
3edadf80 doc: fix comment style to match new style.
804bd74c fix #18672

: assign defaults to font file properties.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Mathieu Westphal's avatarMathieu Westphal <mathieu.westphal@kitware.com>
Merge-request: !2945
parents ec254090 956c320f
Pipeline #126395 failed with stage
in 0 seconds
......@@ -93,6 +93,7 @@ GENERATE_PLOT_TYPE_DEFINITION3(AxisColor, double, double, double);
GENERATE_PLOT_TYPE_DEFINITION3(GridColor, double, double, double);
GENERATE_PLOT_TYPE_DEFINITION(AxisLabelVisibility, bool);
GENERATE_PLOT_TYPE_DEFINITION(AxisLabelFontFamily, const char*);
GENERATE_PLOT_TYPE_DEFINITION(AxisLabelFontFile, const char*);
GENERATE_PLOT_TYPE_DEFINITION(AxisLabelFontSize, int);
GENERATE_PLOT_TYPE_DEFINITION(AxisLabelBold, bool);
GENERATE_PLOT_TYPE_DEFINITION(AxisLabelItalic, bool);
......@@ -243,6 +244,16 @@ void vtkPVPlotMatrixView::SetTitleFontSize(int pointSize)
}
}
//----------------------------------------------------------------------------
void vtkPVPlotMatrixView::SetTitleFontFile(const char* file)
{
if (this->PlotMatrix)
{
vtkTextProperty* prop = this->PlotMatrix->GetTitleProperties();
prop->SetFontFile(file);
}
}
//----------------------------------------------------------------------------
void vtkPVPlotMatrixView::SetTitleBold(bool bold)
{
......@@ -444,6 +455,17 @@ void vtkPVPlotMatrixView::SetAxisLabelFontFamily(int plotType, const char* famil
}
}
//----------------------------------------------------------------------------
void vtkPVPlotMatrixView::SetAxisLabelFontFile(int plotType, const char* file)
{
if (this->PlotMatrix)
{
vtkTextProperty* prop = this->PlotMatrix->GetAxisLabelProperties(plotType);
prop->SetFontFile(file);
this->PlotMatrix->UpdateChartSettings(plotType);
}
}
//----------------------------------------------------------------------------
void vtkPVPlotMatrixView::SetAxisLabelFontSize(int plotType, int pointSize)
{
......
......@@ -50,159 +50,205 @@ public:
vtkAbstractContextItem* GetContextItem() override;
// Description:
// Representations can use this method to set the selection for a particular
// representation. Subclasses override this method to pass on the selection to
// the chart using annotation link. Note this is meant to pass selection for
// the local process alone. The view does not manage data movement for the
// selection.
/**
* Representations can use this method to set the selection for a particular
* representation. Subclasses override this method to pass on the selection to
* the chart using annotation link. Note this is meant to pass selection for
* the local process alone. The view does not manage data movement for the
* selection.
*/
void SetSelection(vtkChartRepresentation* repr, vtkSelection* selection) override;
// Description:
// Get/set the active plot in the scatter plot matrix.
//@{
/**
* Get/set the active plot in the scatter plot matrix.
*/
void SetActivePlot(int i, int j);
int GetActiveRow();
int GetActiveColumn();
//@}
// Description:
// Clear the animation path, ensuring it is empty.
/**
* Clear the animation path, ensuring it is empty.
*/
void ClearAnimationPath();
// Description:
// Append to the animation path of the scatter plot matrix.
/**
* Append to the animation path of the scatter plot matrix.
*/
void AddAnimationPath(int i, int j);
// Description:
// Append to the animation path of the scatter plot matrix.
/**
* Append to the animation path of the scatter plot matrix.
*/
void StartAnimationPath();
// Description:
// Push the animation forward a frame.
/**
* Push the animation forward a frame.
*/
void AdvanceAnimationPath();
// Description:
// Set the title of the active plot.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@{
/**
* Set the title of the active plot.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetTitle(const char* title);
const char* GetTitle();
// Description:
// Set the active plot title's font.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set the active plot title's font.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetTitleFont(const char* family, int pointSize, bool bold, bool italic);
void SetTitleFontFamily(const char* family);
void SetTitleFontSize(int pointSize);
void SetTitleBold(bool bold);
void SetTitleItalic(bool italic);
void SetTitleFontFile(const char* file);
const char* GetTitleFontFamily();
int GetTitleFontSize();
int GetTitleFontBold();
int GetTitleFontItalic();
// Description:
// Set the active plot title's color.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set the active plot title's color.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetTitleColor(double red, double green, double blue);
double* GetTitleColor();
// Description:
// Set the active plot title's alignment.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set the active plot title's alignment.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetTitleAlignment(int alignment);
int GetTitleAlignment();
//@}
// Description:
// Set the number of animation frames used when changing the active
// scatterplot.
/**
* Set the number of animation frames used when changing the active scatterplot.
*/
void SetNumberOfAnimationFrames(int value);
// Description:
// Set the gutter that should be left between the charts in the matrix.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@{
/**
* Set the gutter that should be left between the charts in the matrix.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
virtual void SetGutter(float x, float y);
void SetGutterX(float value);
void SetGutterY(float value);
// Description:
// Set/get the borders of the chart matrix (space in pixels around each chart).
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set/get the borders of the chart matrix (space in pixels around each chart).
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
virtual void SetBorders(int left, int bottom, int right, int top);
virtual void SetBorderLeft(int value);
virtual void SetBorderBottom(int value);
virtual void SetBorderRight(int value);
virtual void SetBorderTop(int value);
// Description:
// Sets whether or not the grid for the given axis is visible given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets whether or not the grid for the given axis is visible given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetGridVisibility(int plotType, bool visible);
GENERATE_PLOT_TYPE_DECLARATION(GridVisibility, bool);
int GetGridVisibility(int plotType);
// Description:
// Sets the background color for the chart given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets the background color for the chart given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetBackgroundColor(int plotType, double red, double green, double blue, double alpha);
double* GetBackgroundColor(int plotType);
GENERATE_PLOT_TYPE_DECLARATION4(BackgroundColor, double, double, double, double);
// Description:
// Sets the color for the axes given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets the color for the axes given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetAxisColor(int plotType, double red, double green, double blue);
double* GetAxisColor(int plotType);
GENERATE_PLOT_TYPE_DECLARATION3(AxisColor, double, double, double);
// Description:
// Sets the color for the axes given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets the color for the axes given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetGridColor(int plotType, double red, double green, double blue);
double* GetGridColor(int plotType);
GENERATE_PLOT_TYPE_DECLARATION3(GridColor, double, double, double);
// Description:
// Sets whether or not the labels for the axes are visible, given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets whether or not the labels for the axes are visible, given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetAxisLabelVisibility(int plotType, bool visible);
int GetAxisLabelVisibility(int plotType);
GENERATE_PLOT_TYPE_DECLARATION(AxisLabelVisibility, bool);
// Description:
// Set the axis label font for the axes given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set the axis label font for the axes given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetAxisLabelFont(int plotType, const char* family, int pointSize, bool bold, bool italic);
void SetAxisLabelFontFamily(int plotType, const char* family);
GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFamily, const char*);
void SetAxisLabelFontFile(int plotType, const char* file);
GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontFile, const char*);
void SetAxisLabelFontSize(int plotType, int pointSize);
GENERATE_PLOT_TYPE_DECLARATION(AxisLabelFontSize, int);
void SetAxisLabelBold(int plotType, bool bold);
......@@ -213,77 +259,98 @@ public:
int GetAxisLabelFontSize(int plotType);
int GetAxisLabelFontBold(int plotType);
int GetAxisLabelFontItalic(int plotType);
// Description:
// Sets the axis label color for the axes given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets the axis label color for the axes given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetAxisLabelColor(int plotType, double red, double green, double blue);
GENERATE_PLOT_TYPE_DECLARATION3(AxisLabelColor, double, double, double);
double* GetAxisLabelColor(int plotType);
// Description:
// Sets the axis label notation for the axes given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets the axis label notation for the axes given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetAxisLabelNotation(int plotType, int notation);
GENERATE_PLOT_TYPE_DECLARATION(AxisLabelNotation, int);
int GetAxisLabelNotation(int plotType);
// Description:
// Sets the axis label precision for the axes given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Sets the axis label precision for the axes given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetAxisLabelPrecision(int plotType, int precision);
GENERATE_PLOT_TYPE_DECLARATION(AxisLabelPrecision, int);
int GetAxisLabelPrecision(int plotType);
// Description:
// Set chart's tooltip notation and precision, given a plot type, which refers to
// vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set chart's tooltip notation and precision, given a plot type, which refers to
* vtkScatterPlotMatrix::{SCATTERPLOT, HISTOGRAM, ACTIVEPLOT}.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetTooltipNotation(int plotType, int notation);
GENERATE_PLOT_TYPE_DECLARATION(TooltipNotation, int);
void SetTooltipPrecision(int plotType, int precision);
GENERATE_PLOT_TYPE_DECLARATION(TooltipPrecision, int);
int GetTooltipNotation(int plotType);
int GetTooltipPrecision(int plotType);
// Description:
// Set the scatter plot title's color.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set the scatter plot title's color.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetScatterPlotSelectedRowColumnColor(double red, double green, double blue, double alpha);
double* GetScatterPlotSelectedRowColumnColor();
// Description:
// Set the scatter plot title's color.
// These methods should not be called directly. They are made public only so
// that the client-server-stream-interpreter can invoke them. Use the
// corresponding properties to change these values.
//@}
//@{
/**
* Set the scatter plot title's color.
* These methods should not be called directly. They are made public only so
* that the client-server-stream-interpreter can invoke them. Use the
* corresponding properties to change these values.
*/
void SetScatterPlotSelectedActiveColor(double red, double green, double blue, double alpha);
double* GetScatterPlotSelectedActiveColor();
//@}
// Description:
// Update all the settings
/**
* Update all the settings
*/
void UpdateSettings();
protected:
vtkPVPlotMatrixView();
~vtkPVPlotMatrixView() override;
// Description:
// The callback function when SelectionChangedEvent is invoked from
// the Big chart in vtkScatterPlotMatrix.
/**
* The callback function when SelectionChangedEvent is invoked from
* the Big chart in vtkScatterPlotMatrix.
*/
void PlotMatrixSelectionCallback(vtkObject*, unsigned long, void*);
private:
......
......@@ -353,7 +353,8 @@
<StringVectorProperty command="SetFontFile"
label="Name"
name="FontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Hints>
<PropertyWidgetDecorator type="GenericDecorator"
mode="visibility"
......
......@@ -130,7 +130,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetTitleFontFile"
name="ChartTitleFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the chart title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetTitleFontSize"
......@@ -382,7 +383,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetLeftAxisTitleFontFile"
name="LeftAxisTitleFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the axis title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetLeftAxisTitleFontSize"
......@@ -533,7 +535,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetLeftAxisLabelFontFile"
name="LeftAxisLabelFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the axis title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetLeftAxisLabelFontSize"
......@@ -663,7 +666,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetBottomAxisTitleFontFile"
name="BottomAxisTitleFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the axis title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetBottomAxisTitleFontSize"
......@@ -814,7 +818,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetBottomAxisLabelFontFile"
name="BottomAxisLabelFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the axis title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetBottomAxisLabelFontSize"
......@@ -955,7 +960,7 @@
<Documentation>Set the axis title font familyname.</Documentation>
</StringVectorProperty>
<StringVectorProperty command="SetRightAxisTitleFontFile"
default_values="Arial"
default_values=""
name="RightAxisTitleFontFile"
number_of_elements="1">
<Documentation>Set the axis title font file.</Documentation>
......@@ -1112,7 +1117,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetRightAxisLabelFontFile"
name="RightAxisLabelFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the axis title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetRightAxisLabelFontSize"
......@@ -1243,7 +1249,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetTopAxisTitleFontFile"
name="TopAxisTitleFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the axis title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetTopAxisTitleFontSize"
......@@ -1398,7 +1405,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetTopAxisLabelFontFile"
name="TopAxisLabelFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the axis title font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetTopAxisLabelFontSize"
......@@ -3157,7 +3165,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetActivePlotAxisLabelFontFile"
name="ActivePlotAxisLabelFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetActivePlotAxisLabelFontSize"
......@@ -3290,7 +3299,8 @@
</StringVectorProperty>
<StringVectorProperty command="SetScatterPlotAxisLabelFontFile"
name="ScatterPlotAxisLabelFontFile"
number_of_elements="1">
number_of_elements="1"
default_values="">
<Documentation>Set the font file.</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetScatterPlotAxisLabelFontSize"
......@@ -3423,7 +3433,8 @@