mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Whitespace cleanup
Quite a bit of wild white space going on... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b6f47883c3
commit
c4954d90a1
4 changed files with 53 additions and 52 deletions
|
@ -869,7 +869,8 @@ MeanDepthLine::MeanDepthLine() : meanDepth(0), leftText(new DiveTextItem(this)),
|
||||||
rightText->setPos(line().length(), 0);
|
rightText->setPos(line().length(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeanDepthLine::setModel(DivePlotDataModel *m){
|
void MeanDepthLine::setModel(DivePlotDataModel *m)
|
||||||
|
{
|
||||||
model = m;
|
model = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -979,7 +980,6 @@ void PartialPressureGasItem::setColors(const QColor &normal, const QColor &alert
|
||||||
|
|
||||||
InstantMeanDepthLine::InstantMeanDepthLine() : vAxis(NULL), hAxis(NULL)
|
InstantMeanDepthLine::InstantMeanDepthLine() : vAxis(NULL), hAxis(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstantMeanDepthLine::mouseMoved(int time, int depth)
|
void InstantMeanDepthLine::mouseMoved(int time, int depth)
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
void plot_depth_sample(struct plot_data *entry, QFlags<Qt::AlignmentFlag> flags, const QColor &color);
|
void plot_depth_sample(struct plot_data *entry, QFlags<Qt::AlignmentFlag> flags, const QColor &color);
|
||||||
int maxCeiling(int row);
|
int maxCeiling(int row);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned int show_reported_ceiling;
|
unsigned int show_reported_ceiling;
|
||||||
unsigned int reported_ceiling_in_red;
|
unsigned int reported_ceiling_in_red;
|
||||||
|
@ -91,9 +92,9 @@ public:
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
|
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class DiveTemperatureItem : public AbstractProfilePolygonItem {
|
class DiveTemperatureItem : public AbstractProfilePolygonItem {
|
||||||
|
@ -114,6 +115,7 @@ public:
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createTextItem(int seconds, int hr);
|
void createTextItem(int seconds, int hr);
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
|
@ -126,6 +128,7 @@ public:
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
};
|
};
|
||||||
|
@ -137,6 +140,7 @@ public:
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
};
|
};
|
||||||
|
@ -148,6 +152,7 @@ public:
|
||||||
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
virtual void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
|
||||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
virtual void settingsChanged();
|
virtual void settingsChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString visibilityKey;
|
QString visibilityKey;
|
||||||
};
|
};
|
||||||
|
@ -224,7 +229,8 @@ public:
|
||||||
DiveCartesianAxis *hAxis;
|
DiveCartesianAxis *hAxis;
|
||||||
DiveCartesianAxis *vAxis;
|
DiveCartesianAxis *vAxis;
|
||||||
InstantMeanDepthLine();
|
InstantMeanDepthLine();
|
||||||
public slots:
|
public
|
||||||
|
slots:
|
||||||
void mouseMoved(int time, int depth);
|
void mouseMoved(int time, int depth);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,6 @@ void ProfileWidget2::setupItemOnScene()
|
||||||
setupItem(meanDepthItem, timeAxis, profileYAxis, dataModel, DivePlotDataModel::INSTANT_MEANDEPTH, DivePlotDataModel::TIME, 1);
|
setupItem(meanDepthItem, timeAxis, profileYAxis, dataModel, DivePlotDataModel::INSTANT_MEANDEPTH, DivePlotDataModel::TIME, 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CREATE_PP_GAS(ITEM, VERTICAL_COLUMN, COLOR, COLOR_ALERT, THRESHOULD_SETTINGS, VISIBILITY_SETTINGS) \
|
#define CREATE_PP_GAS(ITEM, VERTICAL_COLUMN, COLOR, COLOR_ALERT, THRESHOULD_SETTINGS, VISIBILITY_SETTINGS) \
|
||||||
setupItem(ITEM, timeAxis, gasYAxis, dataModel, DivePlotDataModel::VERTICAL_COLUMN, DivePlotDataModel::TIME, 0); \
|
setupItem(ITEM, timeAxis, gasYAxis, dataModel, DivePlotDataModel::VERTICAL_COLUMN, DivePlotDataModel::TIME, 0); \
|
||||||
ITEM->setThreshouldSettingsKey(THRESHOULD_SETTINGS); \
|
ITEM->setThreshouldSettingsKey(THRESHOULD_SETTINGS); \
|
||||||
|
@ -836,18 +835,13 @@ void ProfileWidget2::mouseMoveEvent(QMouseEvent *event)
|
||||||
QPointF pos = mapToScene(event->pos());
|
QPointF pos = mapToScene(event->pos());
|
||||||
qreal vValue = profileYAxis->valueAt(pos);
|
qreal vValue = profileYAxis->valueAt(pos);
|
||||||
qreal hValue = timeAxis->valueAt(pos);
|
qreal hValue = timeAxis->valueAt(pos);
|
||||||
if ( profileYAxis->maximum() >= vValue
|
if (profileYAxis->maximum() >= vValue && profileYAxis->minimum() <= vValue) {
|
||||||
&& profileYAxis->minimum() <= vValue){
|
|
||||||
mouseFollowerHorizontal->setPos(timeAxis->pos().x(), pos.y());
|
mouseFollowerHorizontal->setPos(timeAxis->pos().x(), pos.y());
|
||||||
}
|
}
|
||||||
if ( timeAxis->maximum() >= hValue
|
if (timeAxis->maximum() >= hValue && timeAxis->minimum() <= hValue) {
|
||||||
&& timeAxis->minimum() <= hValue){
|
|
||||||
mouseFollowerVertical->setPos(pos.x(), profileYAxis->line().y1());
|
mouseFollowerVertical->setPos(pos.x(), profileYAxis->line().y1());
|
||||||
}
|
}
|
||||||
if ( timeAxis->maximum() >= hValue
|
if (timeAxis->maximum() >= hValue && timeAxis->minimum() <= hValue && profileYAxis->maximum() >= vValue && profileYAxis->minimum() <= vValue)
|
||||||
&& timeAxis->minimum() <= hValue
|
|
||||||
&& profileYAxis->maximum() >= vValue
|
|
||||||
&& profileYAxis->minimum() <= vValue )
|
|
||||||
emit mouseMoved(hValue, vValue);
|
emit mouseMoved(hValue, vValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ slots: // Necessary to call from QAction's signals.
|
||||||
|
|
||||||
void divePlannerHandlerClicked();
|
void divePlannerHandlerClicked();
|
||||||
void divePlannerHandlerReleased();
|
void divePlannerHandlerReleased();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~ProfileWidget2();
|
virtual ~ProfileWidget2();
|
||||||
virtual void resizeEvent(QResizeEvent *event);
|
virtual void resizeEvent(QResizeEvent *event);
|
||||||
|
|
Loading…
Add table
Reference in a new issue