mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 21:43:23 +00:00
profilewidget: remove QSettings
Update profilewidget to use qPrefDisplay (amended variable) Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
ebc0e6d3f3
commit
31eb48c3c2
2 changed files with 2 additions and 9 deletions
|
@ -6,7 +6,6 @@
|
|||
#include "core/metrics.h"
|
||||
#include "core/settings/qPrefDisplay.h"
|
||||
#include <QPropertyAnimation>
|
||||
#include <QSettings>
|
||||
#include <QGraphicsView>
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include "core/qthelper.h"
|
||||
|
@ -207,17 +206,12 @@ void ToolTipItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio
|
|||
|
||||
void ToolTipItem::persistPos()
|
||||
{
|
||||
QSettings s;
|
||||
s.beginGroup("ProfileMap");
|
||||
s.setValue("tooltip_position", pos());
|
||||
s.endGroup();
|
||||
qPrefDisplay::set_tooltip_position(pos());
|
||||
}
|
||||
|
||||
void ToolTipItem::readPos()
|
||||
{
|
||||
QSettings s;
|
||||
s.beginGroup("ProfileMap");
|
||||
QPointF value = s.value("tooltip_position").toPoint();
|
||||
QPointF value = qPrefDisplay::tooltip_position();
|
||||
if (!scene()->sceneRect().contains(value)) {
|
||||
value = QPointF(0, 0);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <QInputDialog>
|
||||
#include <QDebug>
|
||||
#include <QWheelEvent>
|
||||
#include <QSettings>
|
||||
#include <QMenu>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue