mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:43:24 +00:00
Make it possible to hide some of the grid lines.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4699363a9e
commit
44a72b805c
3 changed files with 20 additions and 8 deletions
|
@ -101,6 +101,17 @@ void DiveCartesianAxis::setTextVisible(bool arg1)
|
|||
}
|
||||
}
|
||||
|
||||
void DiveCartesianAxis::setLinesVisible(bool arg1)
|
||||
{
|
||||
if(lineVisibility == arg1){
|
||||
return;
|
||||
}
|
||||
lineVisibility = arg1;
|
||||
Q_FOREACH(DiveLineItem *item, lines){
|
||||
item->setVisible(lineVisibility );
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T> void emptyList( QList<T*>& list, double steps){
|
||||
if (!list.isEmpty() && list.size() > steps) {
|
||||
while (list.size() > steps) {
|
||||
|
@ -223,9 +234,10 @@ void DiveCartesianAxis::updateTicks()
|
|||
}
|
||||
}
|
||||
|
||||
Q_FOREACH(DiveTextItem *item, labels){
|
||||
Q_FOREACH(DiveTextItem *item, labels)
|
||||
item->setVisible(textVisibility);
|
||||
}
|
||||
Q_FOREACH(DiveLineItem *item, lines)
|
||||
item->setVisible(lineVisibility);
|
||||
}
|
||||
|
||||
void DiveCartesianAxis::animateChangeLine(const QLineF& newLine)
|
||||
|
|
|
@ -37,6 +37,7 @@ public:
|
|||
void setTextColor(const QColor& color);
|
||||
void animateChangeLine(const QLineF& newLine);
|
||||
void setTextVisible(bool arg1);
|
||||
void setLinesVisible(bool arg1);
|
||||
void setLineSize(qreal lineSize);
|
||||
int unitSystem;
|
||||
public slots:
|
||||
|
@ -57,6 +58,7 @@ protected:
|
|||
double tick_size;
|
||||
QColor textColor;
|
||||
bool textVisibility;
|
||||
bool lineVisibility;
|
||||
double labelScale;
|
||||
qreal line_size;
|
||||
};
|
||||
|
|
|
@ -176,14 +176,12 @@ void ProfileWidget2::setupItemOnScene()
|
|||
CREATE_PP_GAS( po2GasItem, PO2, PO2, PO2_ALERT, "po2threshold", "po2graph");
|
||||
#undef CREATE_PP_GAS
|
||||
|
||||
#ifdef QT_NO_DEBUG // Some debug helpers.
|
||||
temperatureAxis->setTextVisible(false);
|
||||
temperatureAxis->setLinesVisible(false);
|
||||
cylinderPressureAxis->setTextVisible(false);
|
||||
#else
|
||||
temperatureAxis->setTextVisible(true);
|
||||
cylinderPressureAxis->setTextVisible(true);
|
||||
#endif
|
||||
|
||||
cylinderPressureAxis->setLinesVisible(false);
|
||||
timeAxis->setLinesVisible(true);
|
||||
profileYAxis->setLinesVisible(true);
|
||||
}
|
||||
|
||||
void ProfileWidget2::setupItemSizes()
|
||||
|
|
Loading…
Add table
Reference in a new issue