Minor improvements in Plot Dock columns

The Column Field is resized to the content.

The dummy column has been removed and the header no longer stretches the
last section property.

The table has alternating row colors for easy following of the field
checks.
This commit is contained in:
mgr
2017-11-13 23:59:36 +01:00
parent 124b209fa8
commit ade562769a
3 changed files with 8 additions and 16 deletions

View File

@@ -117,6 +117,7 @@ void PlotDock::updatePlot(SqliteTableModel* model, BrowseDataTableSettings* sett
columnitem->setCheckState(PlotColumnX, Qt::Unchecked);
}
}
ui->treePlotColumns->resizeColumnToContents(PlotColumnField);
// Add a row number column at the beginning of the column list, but only when there were (other) columns added
if(ui->treePlotColumns->topLevelItemCount())

View File

@@ -57,7 +57,6 @@ private:
PlotColumnField = 0,
PlotColumnX = 1,
PlotColumnY = 2,
PlotColumnDummy = 3
};
Ui::PlotDock* ui;

View File

@@ -26,12 +26,18 @@
<verstretch>2</verstretch>
</sizepolicy>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="columnCount">
<number>4</number>
<number>3</number>
</property>
<attribute name="headerDefaultSectionSize">
<number>100</number>
</attribute>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>Columns</string>
@@ -47,20 +53,6 @@
<string>Y</string>
</property>
</column>
<column>
<property name="text">
<string notr="true">_</string>
</property>
<property name="foreground">
<brush brushstyle="NoBrush">
<color alpha="0">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</property>
</column>
</widget>
<widget class="QCustomPlot" name="plotWidget" native="true">
<property name="sizePolicy">