MCPcopy Create free account
hub / github.com/KDE/labplot / setAxesColumnLabels

Method setAxesColumnLabels

src/frontend/spreadsheet/PlotDataDialog.cpp:857–871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857void PlotDataDialog::setAxesColumnLabels(CartesianPlot* plot, const Column* column) {
858 // Use value labels if possible
859 if (column && column->valueLabelsInitialized()) {
860 auto axes = plot->children(AspectType::Axis);
861 for (auto a : axes) {
862 auto axis = static_cast<Axis*>(a);
863 if (axis->orientation() == Axis::Orientation::Vertical) {
864 // Use first vertical axis
865 axis->setMajorTicksType(Axis::TicksType::ColumnLabels);
866 axis->setMajorTicksColumn(column);
867 break;
868 }
869 }
870 }
871}
872
873void PlotDataDialog::setAxesColumnLabels(CartesianPlot* plot, const QString& columnName) {
874 Column* column = columnFromName(columnName);

Callers

nothing calls this directly

Calls 5

setMajorTicksTypeMethod · 0.80
setMajorTicksColumnMethod · 0.80
childrenMethod · 0.45
orientationMethod · 0.45

Tested by

no test coverage detected