mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Don't connect to the PreferencesDialog in Subsurface-mobile
Just more untangling from the desktop UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7e5b66d2c4
commit
bb566f7798
4 changed files with 19 additions and 0 deletions
|
@ -1,7 +1,9 @@
|
||||||
#include "divecartesianaxis.h"
|
#include "divecartesianaxis.h"
|
||||||
#include "divetextitem.h"
|
#include "divetextitem.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
#include "preferences/preferencesdialog.h"
|
#include "preferences/preferencesdialog.h"
|
||||||
|
#endif
|
||||||
#include "diveplotdatamodel.h"
|
#include "diveplotdatamodel.h"
|
||||||
#include "animationfunctions.h"
|
#include "animationfunctions.h"
|
||||||
#include "divelineitem.h"
|
#include "divelineitem.h"
|
||||||
|
@ -376,7 +378,9 @@ QColor DepthAxis::colorForValue(double value)
|
||||||
|
|
||||||
DepthAxis::DepthAxis(ProfileWidget2 *widget) : DiveCartesianAxis(widget)
|
DepthAxis::DepthAxis(ProfileWidget2 *widget) : DiveCartesianAxis(widget)
|
||||||
{
|
{
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||||
|
#endif
|
||||||
changed = true;
|
changed = true;
|
||||||
settingsChanged();
|
settingsChanged();
|
||||||
}
|
}
|
||||||
|
@ -432,7 +436,9 @@ PartialGasPressureAxis::PartialGasPressureAxis(ProfileWidget2 *widget) :
|
||||||
DiveCartesianAxis(widget),
|
DiveCartesianAxis(widget),
|
||||||
model(NULL)
|
model(NULL)
|
||||||
{
|
{
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PartialGasPressureAxis::setModel(DivePlotDataModel *m)
|
void PartialGasPressureAxis::setModel(DivePlotDataModel *m)
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
#include "divepixmapitem.h"
|
#include "divepixmapitem.h"
|
||||||
#include "animationfunctions.h"
|
#include "animationfunctions.h"
|
||||||
#include "divepicturemodel.h"
|
#include "divepicturemodel.h"
|
||||||
|
#include "pref.h"
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
#include "preferences/preferencesdialog.h"
|
#include "preferences/preferencesdialog.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
|
@ -47,7 +50,9 @@ DivePictureItem::DivePictureItem(QObject *parent): DivePixmapItem(parent),
|
||||||
setFlag(ItemIgnoresTransformations);
|
setFlag(ItemIgnoresTransformations);
|
||||||
setAcceptHoverEvents(true);
|
setAcceptHoverEvents(true);
|
||||||
setScale(0.2);
|
setScale(0.2);
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||||
|
#endif
|
||||||
setVisible(prefs.show_pictures_in_profile);
|
setVisible(prefs.show_pictures_in_profile);
|
||||||
|
|
||||||
canvas->setPen(Qt::NoPen);
|
canvas->setPen(Qt::NoPen);
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
#include "animationfunctions.h"
|
#include "animationfunctions.h"
|
||||||
#include "dive.h"
|
#include "dive.h"
|
||||||
#include "profile.h"
|
#include "profile.h"
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
#include "preferences/preferencesdialog.h"
|
#include "preferences/preferencesdialog.h"
|
||||||
|
#endif
|
||||||
#include "diveplannermodel.h"
|
#include "diveplannermodel.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include "libdivecomputer/parser.h"
|
#include "libdivecomputer/parser.h"
|
||||||
|
@ -16,7 +18,9 @@
|
||||||
AbstractProfilePolygonItem::AbstractProfilePolygonItem() : QObject(), QGraphicsPolygonItem(), hAxis(NULL), vAxis(NULL), dataModel(NULL), hDataColumn(-1), vDataColumn(-1)
|
AbstractProfilePolygonItem::AbstractProfilePolygonItem() : QObject(), QGraphicsPolygonItem(), hAxis(NULL), vAxis(NULL), dataModel(NULL), hDataColumn(-1), vDataColumn(-1)
|
||||||
{
|
{
|
||||||
setCacheMode(DeviceCoordinateCache);
|
setCacheMode(DeviceCoordinateCache);
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractProfilePolygonItem::settingsChanged()
|
void AbstractProfilePolygonItem::settingsChanged()
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "ruleritem.h"
|
#include "ruleritem.h"
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
#include "preferences/preferencesdialog.h"
|
#include "preferences/preferencesdialog.h"
|
||||||
|
#endif
|
||||||
#include "profilewidget2.h"
|
#include "profilewidget2.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
|
|
||||||
|
@ -78,7 +80,9 @@ RulerItem2::RulerItem2() : source(new RulerNodeItem2()),
|
||||||
textItemBack->setPen(QColor(Qt::white));
|
textItemBack->setPen(QColor(Qt::white));
|
||||||
textItemBack->setFlag(QGraphicsItem::ItemIgnoresTransformations);
|
textItemBack->setFlag(QGraphicsItem::ItemIgnoresTransformations);
|
||||||
setPen(QPen(QColor(Qt::black), 0.0));
|
setPen(QPen(QColor(Qt::black), 0.0));
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void RulerItem2::settingsChanged()
|
void RulerItem2::settingsChanged()
|
||||||
|
|
Loading…
Reference in a new issue