Use better aliases for icons.

Icon aliases were complete mess.
Some icons had alias some didn't.
Named with underscores vs. hyphens vs. camelCase.
Lower vs. upper case.
"ICON" prefix vs. suffix vs. nothing.
With vs. without filename suffix.
Some didn't make sence. Eg. mapwidget-marker-gray
(I can see, it's grey, but what does it represent?)
Some were duplicated, eg warning vs. warning-icon.
Some were name after widget, which is wrong.

Do not reinvent wheel. Use widely used naming scheme
close to Freedesktop Icon Naming Specification. This
will enable usage of common icons from current set in
the future. Thus Subsurface will fit nicely to GUI.

This changes icon aliases to one, easy grep-able style.

Signed-off-by: Martin Měřinský <mermar@centrum.cz>
This commit is contained in:
Martin Měřinský 2017-11-29 10:57:08 +01:00 committed by Dirk Hohndel
parent 0855f6f315
commit 8ef87e618a
26 changed files with 135 additions and 132 deletions

View file

@ -215,7 +215,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icons/ostc3.png</normaloff>:icons/ostc3.png</iconset> <normaloff>:dc-ostc-3-icon</normaloff>:dc-ostc-3-icon</iconset>
</property> </property>
</item> </item>
<item> <item>
@ -224,7 +224,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icons/suunto_vyper.png</normaloff>:icons/suunto_vyper.png</iconset> <normaloff>:dc-suunto-vyper-icon</normaloff>:dc-suunto-vyper-icon</iconset>
</property> </property>
</item> </item>
<item> <item>
@ -233,7 +233,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icons/ostc2n.png</normaloff>:icons/ostc2n.png</iconset> <normaloff>:dc-ostc-2n-icon</normaloff>:dc-ostc-2n-icon</iconset>
</property> </property>
</item> </item>
<item> <item>
@ -242,7 +242,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icons/ostc4.png</normaloff>:icons/ostc4.png</iconset> <normaloff>:dc-ostc-4-icon</normaloff>:dc-ostc-4-icon</iconset>
</property> </property>
</item> </item>
</widget> </widget>

View file

@ -74,7 +74,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:filter-reset</normaloff>:filter-reset</iconset> <normaloff>:edit-clear-icon</normaloff>:edit-clear-icon</iconset>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
<bool>true</bool> <bool>true</bool>
@ -88,7 +88,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:filter-hide</normaloff>:filter-hide</iconset> <normaloff>:hide-icon</normaloff>:hide-icon</iconset>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
<bool>true</bool> <bool>true</bool>

View file

@ -166,7 +166,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:mapwidget-marker-selected</normaloff>:mapwidget-marker-selected</iconset> <normaloff>:dive-location-marker-selected-icon</normaloff>:dive-location-marker-selected-icon</iconset>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -376,8 +376,8 @@ void DiveLocationModel::resetModel()
QVariant DiveLocationModel::data(const QModelIndex &index, int role) const QVariant DiveLocationModel::data(const QModelIndex &index, int role) const
{ {
static const QIcon plusIcon(":plus"); static const QIcon plusIcon(":list-add-icon");
static const QIcon geoCode(":geocode"); static const QIcon geoCode(":geotag-icon");
if (index.row() <= 1) { // two special cases. if (index.row() <= 1) { // two special cases.
if (index.column() == UUID) { if (index.column() == UUID) {

View file

@ -454,7 +454,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_o2</normaloff>:icon_o2</iconset> <normaloff>:pp-o2-icon</normaloff>:pp-o2-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle pO₂ graph</string> <string>Toggle pO₂ graph</string>
@ -466,7 +466,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_n2</normaloff>:icon_n2</iconset> <normaloff>:pp-n2-icon</normaloff>:pp-n2-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle pN₂ graph</string> <string>Toggle pN₂ graph</string>
@ -478,7 +478,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_he</normaloff>:icon_he</iconset> <normaloff>:pp-he-icon</normaloff>:pp-he-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle pHe graph</string> <string>Toggle pHe graph</string>
@ -490,7 +490,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_ceiling_dc</normaloff>:icon_ceiling_dc</iconset> <normaloff>:ceiling-dc-icon</normaloff>:ceiling-dc-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle DC reported ceiling</string> <string>Toggle DC reported ceiling</string>
@ -502,7 +502,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_ceiling_calculated</normaloff>:icon_ceiling_calculated</iconset> <normaloff>:ceiling-calculated-icon</normaloff>:ceiling-calculated-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle calculated ceiling</string> <string>Toggle calculated ceiling</string>
@ -514,7 +514,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_ceiling_alltissues</normaloff>:icon_ceiling_alltissues</iconset> <normaloff>:ceiling-tissues-icon</normaloff>:ceiling-tissues-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle calculating all tissues</string> <string>Toggle calculating all tissues</string>
@ -526,7 +526,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_ceiling_3m</normaloff>:icon_ceiling_3m</iconset> <normaloff>:ceiling-increments-icon</normaloff>:ceiling-increments-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle calculated ceiling with 3m increments</string> <string>Toggle calculated ceiling with 3m increments</string>
@ -538,7 +538,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_HR</normaloff>:icon_HR</iconset> <normaloff>:rate-heart-icon</normaloff>:rate-heart-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle heart rate</string> <string>Toggle heart rate</string>
@ -550,7 +550,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_mod</normaloff>:icon_mod</iconset> <normaloff>:depth-mod-icon</normaloff>:depth-mod-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle MOD</string> <string>Toggle MOD</string>
@ -562,7 +562,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_ead</normaloff>:icon_ead</iconset> <normaloff>:depth-ead-icon</normaloff>:depth-ead-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle EAD, END, EADD</string> <string>Toggle EAD, END, EADD</string>
@ -574,7 +574,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_NDLTTS</normaloff>:icon_NDLTTS</iconset> <normaloff>:depth-ndl-icon</normaloff>:depth-ndl-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle NDL, TTS</string> <string>Toggle NDL, TTS</string>
@ -586,7 +586,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_lung</normaloff>:icon_lung</iconset> <normaloff>:rate-sac-icon</normaloff>:rate-sac-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle SAC rate</string> <string>Toggle SAC rate</string>
@ -598,7 +598,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:ruler</normaloff>:ruler</iconset> <normaloff>:ruler-icon</normaloff>:ruler-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle ruler</string> <string>Toggle ruler</string>
@ -610,7 +610,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:scale</normaloff>:scale</iconset> <normaloff>:scale-graph-icon</normaloff>:scale-graph-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Scale graph</string> <string>Scale graph</string>
@ -622,7 +622,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:pictures</normaloff>:pictures</iconset> <normaloff>:photo-icon</normaloff>:photo-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle pictures</string> <string>Toggle pictures</string>
@ -634,7 +634,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:gaschange</normaloff>:gaschange</iconset> <normaloff>:gaschange-icon</normaloff>:gaschange-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle gas bar</string> <string>Toggle gas bar</string>
@ -657,7 +657,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../subsurface.qrc"> <iconset resource="../subsurface.qrc">
<normaloff>:icon_tissue</normaloff>:icon_tissue</iconset> <normaloff>:heatmap-icon</normaloff>:heatmap-icon</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Toggle tissue heat-map</string> <string>Toggle tissue heat-map</string>

View file

@ -7,7 +7,7 @@
#include <QFileDialog> #include <QFileDialog>
PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("General"), QIcon(":defaults"), 0 ), ui(new Ui::PreferencesDefaults()) PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("General"), QIcon(":preferences-other-icon"), 0 ), ui(new Ui::PreferencesDefaults())
{ {
ui->setupUi(this); ui->setupUi(this);
} }

View file

@ -8,7 +8,7 @@
#include <ctime> #include <ctime>
PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":georeference"), 9) PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":geotag-icon"), 9)
{ {
ui = new Ui::PreferencesGeoreference(); ui = new Ui::PreferencesGeoreference();
ui->setupUi(this); ui->setupUi(this);

View file

@ -7,7 +7,7 @@
#include "qt-models/models.h" #include "qt-models/models.h"
PreferencesGraph::PreferencesGraph() : AbstractPreferencesWidget(tr("Profile"), QIcon(":graph"), 5) PreferencesGraph::PreferencesGraph() : AbstractPreferencesWidget(tr("Profile"), QIcon(":graph-icon"), 5)
{ {
ui = new Ui::PreferencesGraph(); ui = new Ui::PreferencesGraph();
ui->setupUi(this); ui->setupUi(this);

View file

@ -10,7 +10,7 @@
#include "qt-models/models.h" #include "qt-models/models.h"
PreferencesLanguage::PreferencesLanguage() : AbstractPreferencesWidget(tr("Language"), QIcon(":language"), 4) PreferencesLanguage::PreferencesLanguage() : AbstractPreferencesWidget(tr("Language"), QIcon(":preferences-desktop-locale-icon"), 4)
{ {
ui = new Ui::PreferencesLanguage(); ui = new Ui::PreferencesLanguage();
ui->setupUi(this); ui->setupUi(this);

View file

@ -8,7 +8,7 @@
#include "core/subsurface-qt/SettingsObjectWrapper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h"
#include <QNetworkProxy> #include <QNetworkProxy>
PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":network"), 9), ui(new Ui::PreferencesNetwork()) PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":preferences-system-network-icon"), 9), ui(new Ui::PreferencesNetwork())
{ {
ui->setupUi(this); ui->setupUi(this);

View file

@ -5,7 +5,7 @@
#include "core/qthelper.h" #include "core/qthelper.h"
#include "core/subsurface-qt/SettingsObjectWrapper.h" #include "core/subsurface-qt/SettingsObjectWrapper.h"
PreferencesUnits::PreferencesUnits(): AbstractPreferencesWidget(tr("Units"),QIcon(":units"),1), ui(new Ui::PreferencesUnits()) PreferencesUnits::PreferencesUnits(): AbstractPreferencesWidget(tr("Units"),QIcon(":units-icon"),1), ui(new Ui::PreferencesUnits())
{ {
ui->setupUi(this); ui->setupUi(this);
} }

View file

@ -73,7 +73,7 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-up"> <iconset theme="go-up-icon">
<normaloff/> <normaloff/>
</iconset> </iconset>
</property> </property>
@ -97,7 +97,7 @@
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="go-down"> <iconset theme="go-down-icon">
<normaloff/> <normaloff/>
</iconset> </iconset>
</property> </property>

View file

@ -30,13 +30,13 @@ public:
MinMaxAvgWidgetPrivate(MinMaxAvgWidget *owner) MinMaxAvgWidgetPrivate(MinMaxAvgWidget *owner)
{ {
avgIco = new QLabel(owner); avgIco = new QLabel(owner);
avgIco->setPixmap(QIcon(":average").pixmap(16, 16)); avgIco->setPixmap(QIcon(":value-average-icon").pixmap(16, 16));
avgIco->setToolTip(QObject::tr("Average")); avgIco->setToolTip(QObject::tr("Average"));
minIco = new QLabel(owner); minIco = new QLabel(owner);
minIco->setPixmap(QIcon(":minimum").pixmap(16, 16)); minIco->setPixmap(QIcon(":value-minimum-icon").pixmap(16, 16));
minIco->setToolTip(QObject::tr("Minimum")); minIco->setToolTip(QObject::tr("Minimum"));
maxIco = new QLabel(owner); maxIco = new QLabel(owner);
maxIco->setPixmap(QIcon(":maximum").pixmap(16, 16)); maxIco->setPixmap(QIcon(":value-maximum-icon").pixmap(16, 16));
maxIco->setToolTip(QObject::tr("Maximum")); maxIco->setToolTip(QObject::tr("Maximum"));
avgValue = new QLabel(owner); avgValue = new QLabel(owner);
minValue = new QLabel(owner); minValue = new QLabel(owner);

View file

@ -99,7 +99,7 @@ StarWidget::StarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f),
int dim = defaultIconMetrics().sz_small; int dim = defaultIconMetrics().sz_small;
if (activeStar.isNull()) { if (activeStar.isNull()) {
QSvgRenderer render(QString(":star")); QSvgRenderer render(QString(":star-icon"));
QPixmap renderedStar(dim, dim); QPixmap renderedStar(dim, dim);
renderedStar.fill(Qt::transparent); renderedStar.fill(Qt::transparent);

View file

@ -226,7 +226,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../subsurface.qrc"> <iconset resource="../../subsurface.qrc">
<normaloff>:geocode</normaloff>:geocode</iconset> <normaloff>:geotag-icon</normaloff>:geotag-icon</iconset>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -43,7 +43,7 @@ TableView::TableView(QWidget *parent) : QGroupBox(parent)
} }
layout()->setContentsMargins(margins); layout()->setContentsMargins(margins);
QIcon plusIcon(":plus"); QIcon plusIcon(":list-add-icon");
plusBtn = new QPushButton(plusIcon, QString(), this); plusBtn = new QPushButton(plusIcon, QString(), this);
plusBtn->setFlat(true); plusBtn->setFlat(true);

View file

@ -11,9 +11,9 @@ SearchBar::SearchBar(QWidget *parent): QWidget(parent)
{ {
ui.setupUi(this); ui.setupUi(this);
#if defined(Q_OS_MAC) || defined(Q_OS_WIN) #if defined(Q_OS_MAC) || defined(Q_OS_WIN)
ui.findNext->setIcon(QIcon(":icons/subsurface/32x32/actions/go-down.png")); ui.findNext->setIcon(QIcon(":go-down-icon"));
ui.findPrev->setIcon(QIcon(":icons/subsurface/32x32/actions/go-up.png")); ui.findPrev->setIcon(QIcon(":go-up-icon"));
ui.findClose->setIcon(QIcon(":icons/subsurface/32x32/actions/window-close.png")); ui.findClose->setIcon(QIcon(":window-close-icon"));
#endif #endif
connect(ui.findNext, SIGNAL(pressed()), this, SIGNAL(searchNext())); connect(ui.findNext, SIGNAL(pressed()), this, SIGNAL(searchNext()));

View file

@ -56,7 +56,7 @@ Item {
z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0 z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0
sourceItem: Image { sourceItem: Image {
id: mapItemImage id: mapItemImage
source: "qrc:///mapwidget-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : (mapHelper.editMode ? "-gray" : "")) source: "qrc:///dive-location-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : (mapHelper.editMode ? "-inactive" : "")) + "-icon"
SequentialAnimation { SequentialAnimation {
id: mapItemImageAnimation id: mapItemImageAnimation
PropertyAnimation { target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120 } PropertyAnimation { target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120 }
@ -258,7 +258,7 @@ Item {
x: 10; y: x x: 10; y: x
width: 40 width: 40
height: 40 height: 40
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite") source: "qrc:///map-style-" + (map.activeMapType === map.mapType.SATELLITE ? "map" : "photo") + "-icon"
SequentialAnimation { SequentialAnimation {
id: toggleImageAnimation id: toggleImageAnimation
PropertyAnimation { target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120 } PropertyAnimation { target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120 }
@ -278,7 +278,7 @@ Item {
x: 10 + (toggleImage.width - imageZoomIn.width) * 0.5; y: toggleImage.y + toggleImage.height + 10 x: 10 + (toggleImage.width - imageZoomIn.width) * 0.5; y: toggleImage.y + toggleImage.height + 10
width: 20 width: 20
height: 20 height: 20
source: "qrc:///mapwidget-zoom-in" source: "qrc:///zoom-in-icon"
SequentialAnimation { SequentialAnimation {
id: imageZoomInAnimation id: imageZoomInAnimation
PropertyAnimation { target: imageZoomIn; property: "scale"; from: 1.0; to: 0.8; duration: 120 } PropertyAnimation { target: imageZoomIn; property: "scale"; from: 1.0; to: 0.8; duration: 120 }
@ -301,7 +301,7 @@ Item {
Image { Image {
id: imageZoomOut id: imageZoomOut
x: imageZoomIn.x; y: imageZoomIn.y + imageZoomIn.height + 10 x: imageZoomIn.x; y: imageZoomIn.y + imageZoomIn.height + 10
source: "qrc:///mapwidget-zoom-out" source: "qrc:///zoom-out-icon"
width: 20 width: 20
height: 20 height: 20
SequentialAnimation { SequentialAnimation {

View file

@ -31,7 +31,7 @@ Item {
Image { Image {
id: contextMenuImage id: contextMenuImage
x: -width x: -width
source: "qrc:///mapwidget-context-menu" source: "qrc:///open-menu-icon"
SequentialAnimation { SequentialAnimation {
id:contextMenuImageAnimation id:contextMenuImageAnimation

View file

@ -81,19 +81,19 @@ void DiveEventItem::setupPixmap()
#define EVENT_PIXMAP(PIX) QPixmap(QString(PIX)).scaled(sz_pix, sz_pix, Qt::KeepAspectRatio, Qt::SmoothTransformation) #define EVENT_PIXMAP(PIX) QPixmap(QString(PIX)).scaled(sz_pix, sz_pix, Qt::KeepAspectRatio, Qt::SmoothTransformation)
#define EVENT_PIXMAP_BIGGER(PIX) QPixmap(QString(PIX)).scaled(sz_bigger, sz_bigger, Qt::KeepAspectRatio, Qt::SmoothTransformation) #define EVENT_PIXMAP_BIGGER(PIX) QPixmap(QString(PIX)).scaled(sz_bigger, sz_bigger, Qt::KeepAspectRatio, Qt::SmoothTransformation)
if (same_string(internalEvent->name, "")) { if (same_string(internalEvent->name, "")) {
setPixmap(EVENT_PIXMAP(":warning-icon")); setPixmap(EVENT_PIXMAP(":status-warning-icon"));
} else if (internalEvent->type == SAMPLE_EVENT_BOOKMARK) { } else if (internalEvent->type == SAMPLE_EVENT_BOOKMARK) {
setPixmap(EVENT_PIXMAP(":flag")); setPixmap(EVENT_PIXMAP(":dive-bookmark-icon"));
} else if (event_is_gaschange(internalEvent)) { } else if (event_is_gaschange(internalEvent)) {
struct gasmix *mix = get_gasmix_from_event(&displayed_dive, internalEvent); struct gasmix *mix = get_gasmix_from_event(&displayed_dive, internalEvent);
if (mix->he.permille) if (mix->he.permille)
setPixmap(EVENT_PIXMAP_BIGGER(":gaschangeTrimix")); setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-trimix-icon"));
else if (gasmix_is_air(mix)) else if (gasmix_is_air(mix))
setPixmap(EVENT_PIXMAP_BIGGER(":gaschangeAir")); setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-air-icon"));
else if (mix->o2.permille == 1000) else if (mix->o2.permille == 1000)
setPixmap(EVENT_PIXMAP_BIGGER(":gaschangeOxy")); setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-oxygen-icon"));
else else
setPixmap(EVENT_PIXMAP_BIGGER(":gaschangeNitrox")); setPixmap(EVENT_PIXMAP_BIGGER(":gaschange-ean-icon"));
#ifdef SAMPLE_FLAGS_SEVERITY_SHIFT #ifdef SAMPLE_FLAGS_SEVERITY_SHIFT
} else if ((((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 1) || } else if ((((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 1) ||
// those are useless internals of the dive computer // those are useless internals of the dive computer
@ -114,11 +114,11 @@ void DiveEventItem::setupPixmap()
setPixmap(transparentPixmap); setPixmap(transparentPixmap);
#ifdef SAMPLE_FLAGS_SEVERITY_SHIFT #ifdef SAMPLE_FLAGS_SEVERITY_SHIFT
} else if (((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 2) { } else if (((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 2) {
setPixmap(EVENT_PIXMAP(":info-icon")); setPixmap(EVENT_PIXMAP(":status-info-icon"));
} else if (((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 3) { } else if (((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 3) {
setPixmap(EVENT_PIXMAP(":warning-icon")); setPixmap(EVENT_PIXMAP(":status-warning-icon"));
} else if (((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 4) { } else if (((internalEvent->flags & SAMPLE_FLAGS_SEVERITY_MASK) >> SAMPLE_FLAGS_SEVERITY_SHIFT) == 4) {
setPixmap(EVENT_PIXMAP(":violation-icon")); setPixmap(EVENT_PIXMAP(":status-violation-icon"));
#endif #endif
} else if (same_string_caseinsensitive(internalEvent->name, "violation") || // generic libdivecomputer } else if (same_string_caseinsensitive(internalEvent->name, "violation") || // generic libdivecomputer
same_string_caseinsensitive(internalEvent->name, "Safety stop violation") || // the rest are from the Uemis downloader same_string_caseinsensitive(internalEvent->name, "Safety stop violation") || // the rest are from the Uemis downloader
@ -127,17 +127,17 @@ void DiveEventItem::setupPixmap()
same_string_caseinsensitive(internalEvent->name, "Dive time alert") || same_string_caseinsensitive(internalEvent->name, "Dive time alert") ||
same_string_caseinsensitive(internalEvent->name, "Low battery alert") || same_string_caseinsensitive(internalEvent->name, "Low battery alert") ||
same_string_caseinsensitive(internalEvent->name, "Speed alarm")) { same_string_caseinsensitive(internalEvent->name, "Speed alarm")) {
setPixmap(EVENT_PIXMAP(":violation-icon")); setPixmap(EVENT_PIXMAP(":status-violation-icon"));
} else if (same_string_caseinsensitive(internalEvent->name, "non stop time") || // generic libdivecomputer } else if (same_string_caseinsensitive(internalEvent->name, "non stop time") || // generic libdivecomputer
same_string_caseinsensitive(internalEvent->name, "safety stop") || same_string_caseinsensitive(internalEvent->name, "safety stop") ||
same_string_caseinsensitive(internalEvent->name, "safety stop (voluntary)") || same_string_caseinsensitive(internalEvent->name, "safety stop (voluntary)") ||
same_string_caseinsensitive(internalEvent->name, "Tank change suggested") || // Uemis downloader same_string_caseinsensitive(internalEvent->name, "Tank change suggested") || // Uemis downloader
same_string_caseinsensitive(internalEvent->name, "Marker")) { same_string_caseinsensitive(internalEvent->name, "Marker")) {
setPixmap(EVENT_PIXMAP(":info-icon")); setPixmap(EVENT_PIXMAP(":status-info-icon"));
} else { } else {
// we should do some guessing based on the type / name of the event; // we should do some guessing based on the type / name of the event;
// for now they all get the warning icon // for now they all get the warning icon
setPixmap(EVENT_PIXMAP(":warning-icon")); setPixmap(EVENT_PIXMAP(":status-warning-icon"));
} }
#undef EVENT_PIXMAP #undef EVENT_PIXMAP
#undef EVENT_PIXMAP_BIGGER #undef EVENT_PIXMAP_BIGGER

View file

@ -29,7 +29,7 @@ void DiveButtonItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
// paint on screen, but for now, this. // paint on screen, but for now, this.
CloseButtonItem::CloseButtonItem(QObject *parent): DiveButtonItem(parent) CloseButtonItem::CloseButtonItem(QObject *parent): DiveButtonItem(parent)
{ {
static QPixmap p = QPixmap(":trash"); static QPixmap p = QPixmap(":list-remove-icon");
setPixmap(p); setPixmap(p);
setFlag(ItemIgnoresTransformations); setFlag(ItemIgnoresTransformations);
} }

View file

@ -86,7 +86,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
zoomLevel(0), zoomLevel(0),
zoomFactor(1.15), zoomFactor(1.15),
background(new DivePixmapItem()), background(new DivePixmapItem()),
backgroundFile(":poster"), backgroundFile(":poster-icon"),
#ifndef SUBSURFACE_MOBILE #ifndef SUBSURFACE_MOBILE
toolTipItem(new ToolTipItem()), toolTipItem(new ToolTipItem()),
#endif #endif

View file

@ -80,7 +80,7 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons
} }
return textField->text(); return textField->text();
} }
case Qt::DecorationRole : return QIcon(":plus"); case Qt::DecorationRole : return QIcon(":list-add-icon");
} }
} }
@ -108,7 +108,7 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons
break; break;
case Qt::DecorationRole : { case Qt::DecorationRole : {
if (dive_site_has_gps_location(ds)) if (dive_site_has_gps_location(ds))
return QIcon(":geocode"); return QIcon(":geotag-icon");
else else
return QVariant(); return QVariant();
} }

View file

@ -85,7 +85,7 @@ QVariant TripItem::data(int column, int role) const
QVariant DiveItem::data(int column, int role) const QVariant DiveItem::data(int column, int role) const
{ {
QVariant retVal; QVariant retVal;
QString icon_names[4] = {":zero",":duringPhoto", ":outsidePhoto", ":inAndOutPhoto" }; QString icon_names[4] = {":zero",":photo-in-icon", ":photo-out-icon", ":photo-in-out-icon" };
struct dive *dive = get_dive_by_uniq_id(diveId); struct dive *dive = get_dive_by_uniq_id(diveId);
if (!dive) if (!dive)
return QVariant(); return QVariant();

View file

@ -14,13 +14,13 @@
const QPixmap &trashIcon() const QPixmap &trashIcon()
{ {
static QPixmap trash = QPixmap(":trash").scaledToHeight(defaultIconMetrics().sz_small); static QPixmap trash = QPixmap(":list-remove-icon").scaledToHeight(defaultIconMetrics().sz_small);
return trash; return trash;
} }
const QPixmap &trashForbiddenIcon() const QPixmap &trashForbiddenIcon()
{ {
static QPixmap trash = QPixmap(":trashForbidden").scaledToHeight(defaultIconMetrics().sz_small); static QPixmap trash = QPixmap(":list-remove-disabled-icon").scaledToHeight(defaultIconMetrics().sz_small);
return trash; return trash;
} }

View file

@ -3,41 +3,44 @@
<file alias="MapWidget.qml">map-widget/qml/MapWidget.qml</file> <file alias="MapWidget.qml">map-widget/qml/MapWidget.qml</file>
<file alias="MapWidgetError.qml">map-widget/qml/MapWidgetError.qml</file> <file alias="MapWidgetError.qml">map-widget/qml/MapWidgetError.qml</file>
<file alias="MapWidgetContextMenu.qml">map-widget/qml/MapWidgetContextMenu.qml</file> <file alias="MapWidgetContextMenu.qml">map-widget/qml/MapWidgetContextMenu.qml</file>
<file alias="mapwidget-marker">map-widget/qml/icons/mapwidget-marker.png</file> <file alias="dive-location-marker-icon">map-widget/qml/icons/mapwidget-marker.png</file>
<file alias="mapwidget-marker-gray">map-widget/qml/icons/mapwidget-marker-gray.png</file> <file alias="dive-location-marker-inactive-icon">map-widget/qml/icons/mapwidget-marker-gray.png</file>
<file alias="mapwidget-marker-selected">map-widget/qml/icons/mapwidget-marker-selected.png</file> <file alias="dive-location-marker-selected-icon">map-widget/qml/icons/mapwidget-marker-selected.png</file>
<file alias="mapwidget-toggle-satellite">map-widget/qml/icons/mapwidget-toggle-satellite.png</file> <file alias="map-style-photo-icon">map-widget/qml/icons/mapwidget-toggle-satellite.png</file>
<file alias="mapwidget-toggle-street">map-widget/qml/icons/mapwidget-toggle-street.png</file> <file alias="map-style-map-icon">map-widget/qml/icons/mapwidget-toggle-street.png</file>
<file alias="mapwidget-context-menu">map-widget/qml/icons/mapwidget-context-menu.png</file> <file alias="open-menu-icon">map-widget/qml/icons/mapwidget-context-menu.png</file>
<file alias="mapwidget-zoom-in">map-widget/qml/icons/mapwidget-zoom-in.png</file> <file alias="zoom-in-icon">map-widget/qml/icons/mapwidget-zoom-in.png</file>
<file alias="mapwidget-zoom-out">map-widget/qml/icons/mapwidget-zoom-out.png</file> <file alias="zoom-out-icon">map-widget/qml/icons/mapwidget-zoom-out.png</file>
<file alias="satellite.svg">icons/satellite.svg</file> <file alias="satellite-icon">icons/satellite.svg</file>
<file alias="star">icons/star.svg</file> <file alias="graph-icon">icons/graph.png</file>
<file alias="scale-icon">icons/scale.png</file>
<file alias="hide-icon">icons/go-top.svg</file>
<file alias="star-icon">icons/star.svg</file>
<file alias="subsurface-icon">icons/subsurface-icon.png</file> <file alias="subsurface-icon">icons/subsurface-icon.png</file>
<file alias="subsurface-mobile-icon">icons/subsurface-mobile-icon.png</file> <file alias="subsurface-mobile-icon">icons/subsurface-mobile-icon.png</file>
<file alias="plus">icons/plus.png</file> <file alias="list-add-icon">icons/plus.png</file>
<file alias="trash">icons/trash.png</file> <file alias="list-remove-icon">icons/trash.png</file>
<file alias="trashForbidden">icons/trash-forbidden.png</file> <file alias="list-remove-disabled-icon">icons/trash-forbidden.png</file>
<file alias="units">icons/units.png</file> <file alias="units-icon">icons/units.png</file>
<file alias="advanced">icons/advanced.png</file> <file alias="advanced-icon">icons/advanced.png</file>
<file alias="network">icons/network.png</file> <file alias="preferences-system-network-icon">icons/network.png</file>
<file alias="graph">icons/graph.png</file> <file alias="scale-graph-icon">icons/graph.png</file>
<file alias="minimum">icons/minimum.png</file> <file alias="value-minimum-icon">icons/minimum.png</file>
<file alias="maximum">icons/maximum.png</file> <file alias="value-maximum-icon">icons/maximum.png</file>
<file alias="average">icons/average.png</file> <file alias="value-average-icon">icons/average.png</file>
<file alias="warning">icons/warning.png</file> <file alias="duplicate-warning-icon">icons/warning.png</file>
<file alias="warning-icon">icons/warning-icon.png</file> <file alias="status-warning-icon">icons/warning-icon.png</file>
<file alias="violation-icon">icons/violation-icon.png</file> <file alias="status-violation-icon">icons/violation-icon.png</file>
<file alias="info-icon">icons/info-icon.png</file> <file alias="status-info-icon">icons/info-icon.png</file>
<file alias="gaschange">icons/gaschange.png</file> <file alias="gaschange-icon">icons/gaschange.png</file>
<file alias="gaschangeAir">icons/Air_change.png</file> <file alias="gaschange-air-icon">icons/Air_change.png</file>
<file alias="gaschangeNitrox">icons/Nx_change.png</file> <file alias="gaschange-ean-icon">icons/Nx_change.png</file>
<file alias="gaschangeTrimix">icons/Tmx_change.png</file> <file alias="gaschange-trimix-icon">icons/Tmx_change.png</file>
<file alias="gaschangeOxy">icons/Oxy_change.png</file> <file alias="gaschange-oxygen-icon">icons/Oxy_change.png</file>
<file alias="flag">icons/flag.png</file> <file alias="dive-bookmark-icon">icons/flag.png</file>
<file alias="scale">icons/scale.png</file> <file alias="scale-icon">icons/scale.png</file>
<file alias="ruler">icons/ruler.png</file> <file alias="ruler-icon">icons/ruler.png</file>
<file alias="poster">icons/poster.png</file> <file alias="poster-icon">icons/poster.png</file>
<file>xslt/commonTemplates.xsl</file> <file>xslt/commonTemplates.xsl</file>
<file>xslt/csv2xml.xslt</file> <file>xslt/csv2xml.xslt</file>
<file>xslt/divelogs-export.xslt</file> <file>xslt/divelogs-export.xslt</file>
@ -58,40 +61,40 @@
<file>xslt/shearwater.xslt</file> <file>xslt/shearwater.xslt</file>
<file>xslt/DiveLog.xslt</file> <file>xslt/DiveLog.xslt</file>
<file>xslt/av1.xslt</file> <file>xslt/av1.xslt</file>
<file alias="icon_lung">icons/gas.png</file> <file alias="rate-sac-icon">icons/gas.png</file>
<file alias="icon_mod">icons/mod.png</file> <file alias="depth-mod-icon">icons/mod.png</file>
<file alias="icon_he">icons/he.png</file> <file alias="pp-he-icon">icons/he.png</file>
<file alias="icon_n2">icons/n2.png</file> <file alias="pp-n2-icon">icons/n2.png</file>
<file alias="icon_o2">icons/o2.png</file> <file alias="pp-o2-icon">icons/o2.png</file>
<file alias="icon_ceiling_calculated">icons/ss.png</file> <file alias="ceiling-calculated-icon">icons/ss.png</file>
<file alias="icon_ceiling_alltissues">icons/icon-ceiling-alltissues.png</file> <file alias="ceiling-tissues-icon">icons/icon-ceiling-alltissues.png</file>
<file alias="icon_NDLTTS">icons/limit.png</file> <file alias="depth-ndl-icon">icons/limit.png</file>
<file alias="icon_ceiling_3m">icons/3x3.png</file> <file alias="ceiling-increments-icon">icons/3x3.png</file>
<file alias="icon_ceiling_dc">icons/pc.png</file> <file alias="ceiling-dc-icon">icons/pc.png</file>
<file alias="icon_ead">icons/ead.png</file> <file alias="depth-ead-icon">icons/ead.png</file>
<file alias="icon_HR">icons/icon-HR.png</file> <file alias="rate-heart-icon">icons/icon-HR.png</file>
<file alias="icon_tissue">icons/heatmap.png</file> <file alias="heatmap-icon">icons/heatmap.png</file>
<file alias="pictures">icons/pictures.png</file> <file alias="photo-icon">icons/pictures.png</file>
<file>icons/subsurface/index.theme</file> <file>icons/subsurface/index.theme</file>
<file>icons/subsurface/32x32/actions/go-down.png</file> <file alias="go-down-icon">icons/subsurface/32x32/actions/go-down.png</file>
<file>icons/subsurface/32x32/actions/go-up.png</file> <file alias="go-up-icon">icons/subsurface/32x32/actions/go-up.png</file>
<file alias="close">icons/subsurface/32x32/actions/window-close.png</file> <file alias="window-close-icon">icons/subsurface/32x32/actions/window-close.png</file>
<file>icons/ostc2n.png</file> <file alias="dc-ostc-2n-icon">icons/ostc2n.png</file>
<file>icons/ostc3.png</file> <file alias="dc-ostc-3-icon">icons/ostc3.png</file>
<file>icons/ostc4.png</file> <file alias="dc-ostc-4-icon">icons/ostc4.png</file>
<file>icons/suunto_vyper.png</file> <file alias="dc-suunto-vyper-icon">icons/suunto_vyper.png</file>
<file alias="facebook">icons/facebook.png</file> <file alias="facebook-icon">icons/facebook.png</file>
<file alias="georeference">icons/georeference.png</file> <file alias="duplicate-geotag-icon">icons/georeference.png</file>
<file alias="filter-reset">icons/edit-undo.svg</file> <file alias="edit-clear-icon">icons/edit-undo.svg</file>
<file alias="filter-hide">icons/go-top.svg</file> <file alias="show-icon">icons/go-top.svg</file>
<file alias="filter-close">icons/process-stop.svg</file> <file alias="filter-close">icons/process-stop.svg</file>
<file alias="edit">icons/edit-circled.svg</file> <file alias="duplicate-edit-icon">icons/edit-circled.svg</file>
<file alias="globe-icon">icons/Emblem-earth.svg</file> <file alias="globe-icon">icons/Emblem-earth.svg</file>
<file alias="geocode">icons/geocode.svg</file> <file alias="geotag-icon">icons/geocode.svg</file>
<file alias="duringPhoto">icons/duringPhoto.png</file> <file alias="photo-in-icon">icons/duringPhoto.png</file>
<file alias="outsidePhoto">icons/outsidePhoto.png</file> <file alias="photo-out-icon">icons/outsidePhoto.png</file>
<file alias="inAndOutPhoto">icons/inAndOutPhoto.png</file> <file alias="photo-in-out-icon">icons/inAndOutPhoto.png</file>
<file alias="language">icons/language.png</file> <file alias="preferences-desktop-locale-icon">icons/language.png</file>
<file alias="defaults">icons/defaults.png</file> <file alias="preferences-other-icon">icons/defaults.png</file>
</qresource> </qresource>
</RCC> </RCC>