Permalink
Browse files

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.
  • Loading branch information...
mgrojo committed Nov 13, 2017
1 parent 124b209 commit ade562769a06e4f010f15e88ddba2946747f6528
Showing with 8 additions and 16 deletions.
  1. +1 −0 src/PlotDock.cpp
  2. +0 −1 src/PlotDock.h
  3. +7 −15 src/PlotDock.ui
@@ -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())
@@ -57,7 +57,6 @@ public slots:
PlotColumnField = 0,
PlotColumnX = 1,
PlotColumnY = 2,
PlotColumnDummy = 3
};

Ui::PlotDock* ui;
@@ -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">

0 comments on commit ade5627

Please sign in to comment.