mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove force parameter from ProfileWidget2::plotDive()
The last user was removed in 2789bb05b1
.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4daf687876
commit
8c72ac6b9b
6 changed files with 13 additions and 13 deletions
|
@ -229,7 +229,7 @@ void exportProfile(const struct dive *dive, const QString filename)
|
||||||
profile->setPrintMode(true);
|
profile->setPrintMode(true);
|
||||||
double scale = profile->getFontPrintScale();
|
double scale = profile->getFontPrintScale();
|
||||||
profile->setFontPrintScale(4 * scale);
|
profile->setFontPrintScale(4 * scale);
|
||||||
profile->plotDive(dive, 0, true, false, true);
|
profile->plotDive(dive, 0, false, true);
|
||||||
QImage image = QImage(profile->size() * 4, QImage::Format_RGB32);
|
QImage image = QImage(profile->size() * 4, QImage::Format_RGB32);
|
||||||
QPainter paint;
|
QPainter paint;
|
||||||
paint.begin(&image);
|
paint.begin(&image);
|
||||||
|
@ -238,5 +238,5 @@ void exportProfile(const struct dive *dive, const QString filename)
|
||||||
profile->setToolTipVisibile(true);
|
profile->setToolTipVisibile(true);
|
||||||
profile->setFontPrintScale(scale);
|
profile->setFontPrintScale(scale);
|
||||||
profile->setPrintMode(false);
|
profile->setPrintMode(false);
|
||||||
profile->plotDive(dive, 0, true); // TODO: Shouldn't this plot the current dive?
|
profile->plotDive(dive, 0); // TODO: Shouldn't this plot the current dive?
|
||||||
}
|
}
|
||||||
|
|
|
@ -432,7 +432,7 @@ void MainWindow::selectionChanged()
|
||||||
configureToolbar();
|
configureToolbar();
|
||||||
enableDisableOtherDCsActions();
|
enableDisableOtherDCsActions();
|
||||||
}
|
}
|
||||||
graphics->plotDive(current_dive, dc_number, false);
|
graphics->plotDive(current_dive, dc_number);
|
||||||
MapWidget::instance()->selectionChanged();
|
MapWidget::instance()->selectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -736,7 +736,7 @@ void MainWindow::refreshProfile()
|
||||||
{
|
{
|
||||||
showProfile();
|
showProfile();
|
||||||
configureToolbar();
|
configureToolbar();
|
||||||
graphics->plotDive(current_dive, dc_number, true);
|
graphics->plotDive(current_dive, dc_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::planCanceled()
|
void MainWindow::planCanceled()
|
||||||
|
@ -921,7 +921,7 @@ void MainWindow::on_actionPreviousDC_triggered()
|
||||||
unsigned nrdc = number_of_computers(current_dive);
|
unsigned nrdc = number_of_computers(current_dive);
|
||||||
dc_number = (dc_number + nrdc - 1) % nrdc;
|
dc_number = (dc_number + nrdc - 1) % nrdc;
|
||||||
configureToolbar();
|
configureToolbar();
|
||||||
graphics->plotDive(current_dive, dc_number, false);
|
graphics->plotDive(current_dive, dc_number);
|
||||||
mainTab->updateDiveInfo();
|
mainTab->updateDiveInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -930,7 +930,7 @@ void MainWindow::on_actionNextDC_triggered()
|
||||||
unsigned nrdc = number_of_computers(current_dive);
|
unsigned nrdc = number_of_computers(current_dive);
|
||||||
dc_number = (dc_number + 1) % nrdc;
|
dc_number = (dc_number + 1) % nrdc;
|
||||||
configureToolbar();
|
configureToolbar();
|
||||||
graphics->plotDive(current_dive, dc_number, false);
|
graphics->plotDive(current_dive, dc_number);
|
||||||
mainTab->updateDiveInfo();
|
mainTab->updateDiveInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ void Printer::putProfileImage(const QRect &profilePlaceholder, const QRect &view
|
||||||
int y = profilePlaceholder.y() - viewPort.y();
|
int y = profilePlaceholder.y() - viewPort.y();
|
||||||
// use the placeHolder and the viewPort position to calculate the relative position of the dive profile.
|
// use the placeHolder and the viewPort position to calculate the relative position of the dive profile.
|
||||||
QRect pos(x, y, profilePlaceholder.width(), profilePlaceholder.height());
|
QRect pos(x, y, profilePlaceholder.width(), profilePlaceholder.height());
|
||||||
profile->plotDive(dive, 0, true, true);
|
profile->plotDive(dive, 0, true);
|
||||||
|
|
||||||
if (!printOptions.color_selected) {
|
if (!printOptions.color_selected) {
|
||||||
QImage image(pos.width(), pos.height(), QImage::Format_ARGB32);
|
QImage image(pos.width(), pos.height(), QImage::Format_ARGB32);
|
||||||
|
@ -193,7 +193,7 @@ void Printer::render(int pages)
|
||||||
qPrefDisplay::set_animation_speed(animationOriginal);
|
qPrefDisplay::set_animation_speed(animationOriginal);
|
||||||
|
|
||||||
//replot the dive after returning the settings
|
//replot the dive after returning the settings
|
||||||
profile->plotDive(current_dive, dc_number, true, true);
|
profile->plotDive(current_dive, dc_number, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//value: ranges from 0 : 100 and shows the progress of the templating engine
|
//value: ranges from 0 : 100 and shows the progress of the templating engine
|
||||||
|
|
|
@ -360,7 +360,7 @@ void ProfileWidget2::setupItemOnScene()
|
||||||
|
|
||||||
void ProfileWidget2::replot()
|
void ProfileWidget2::replot()
|
||||||
{
|
{
|
||||||
plotDive(d, dc, true, false);
|
plotDive(d, dc, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
PartialPressureGasItem *ProfileWidget2::createPPGas(int column, color_index_t color, color_index_t colorAlert,
|
PartialPressureGasItem *ProfileWidget2::createPPGas(int column, color_index_t color, color_index_t colorAlert,
|
||||||
|
@ -521,7 +521,7 @@ void ProfileWidget2::resetZoom()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently just one dive, but the plan is to enable All of the selected dives.
|
// Currently just one dive, but the plan is to enable All of the selected dives.
|
||||||
void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool force, bool doClearPictures, bool instant)
|
void ProfileWidget2::plotDive(const struct dive *dIn, int dcIn, bool doClearPictures, bool instant)
|
||||||
{
|
{
|
||||||
d = dIn;
|
d = dIn;
|
||||||
dc = dcIn;
|
dc = dcIn;
|
||||||
|
|
|
@ -80,7 +80,7 @@ public:
|
||||||
~ProfileWidget2();
|
~ProfileWidget2();
|
||||||
void resetZoom();
|
void resetZoom();
|
||||||
void scale(qreal sx, qreal sy);
|
void scale(qreal sx, qreal sy);
|
||||||
void plotDive(const struct dive *d, int dc, bool force = false, bool clearPictures = false, bool instant = false);
|
void plotDive(const struct dive *d, int dc, bool clearPictures = false, bool instant = false);
|
||||||
void setProfileState(const struct dive *d, int dc);
|
void setProfileState(const struct dive *d, int dc);
|
||||||
void setPlanState(const struct dive *d, int dc);
|
void setPlanState(const struct dive *d, int dc);
|
||||||
void setAddState(const struct dive *d, int dc);
|
void setAddState(const struct dive *d, int dc);
|
||||||
|
|
|
@ -135,7 +135,7 @@ void QMLProfile::updateProfile()
|
||||||
return;
|
return;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
qDebug() << "update profile for dive #" << d->number << "offeset" << QString::number(m_xOffset, 'f', 1) << "/" << QString::number(m_yOffset, 'f', 1);
|
qDebug() << "update profile for dive #" << d->number << "offeset" << QString::number(m_xOffset, 'f', 1) << "/" << QString::number(m_yOffset, 'f', 1);
|
||||||
m_profileWidget->plotDive(d, dc_number, true);
|
m_profileWidget->plotDive(d, dc_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMLProfile::setDiveId(int diveId)
|
void QMLProfile::setDiveId(int diveId)
|
||||||
|
@ -189,7 +189,7 @@ void QMLProfile::divesChanged(const QVector<dive *> &dives, DiveField)
|
||||||
for (struct dive *d: dives) {
|
for (struct dive *d: dives) {
|
||||||
if (d->id == m_diveId) {
|
if (d->id == m_diveId) {
|
||||||
qDebug() << "dive #" << d->number << "changed, trigger profile update";
|
qDebug() << "dive #" << d->number << "changed, trigger profile update";
|
||||||
m_profileWidget->plotDive(d, dc_number, true);
|
m_profileWidget->plotDive(d, dc_number);
|
||||||
triggerUpdate();
|
triggerUpdate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue