mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Animate transition between show / hide partial pressure graphs
When the user checked the option to show or hide the partial presure graph the size of the profile graph was kept the same; usually I do those changes on the objects themselves, on the settingsChanged method, but since the calculation of the size of the profile was done on the ProfileView class for consistency with the other objects, I had to change it there too. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5ca13b0024
commit
b08c38da33
1 changed files with 9 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <QTableView>
|
||||
#endif
|
||||
#include "mainwindow.h"
|
||||
#include <preferences.h>
|
||||
|
||||
/* This is the global 'Item position' variable.
|
||||
* it should tell you where to position things up
|
||||
|
@ -82,6 +83,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
|
|||
addItemsToScene();
|
||||
scene()->installEventFilter(this);
|
||||
setEmptyState();
|
||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
QTableView *diveDepthTableView = new QTableView();
|
||||
|
@ -359,6 +361,13 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
|
|||
|
||||
void ProfileWidget2::settingsChanged()
|
||||
{
|
||||
QSettings s;
|
||||
s.beginGroup("TecDetails");
|
||||
if(s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()){
|
||||
profileYAxis->animateChangeLine(itemPos.depth.shrinked);
|
||||
}else{
|
||||
profileYAxis->animateChangeLine(itemPos.depth.expanded);
|
||||
}
|
||||
}
|
||||
|
||||
void ProfileWidget2::resizeEvent(QResizeEvent* event)
|
||||
|
|
Loading…
Add table
Reference in a new issue