summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-models/cleanertablemodel.cpp18
-rw-r--r--qt-models/cleanertablemodel.h1
-rw-r--r--qt-models/models.cpp14
-rw-r--r--qt-models/models.h1
-rw-r--r--subsurface.qrc2
5 files changed, 20 insertions, 16 deletions
diff --git a/qt-models/cleanertablemodel.cpp b/qt-models/cleanertablemodel.cpp
index 6a542ef27..36b0f4e76 100644
--- a/qt-models/cleanertablemodel.cpp
+++ b/qt-models/cleanertablemodel.cpp
@@ -2,6 +2,24 @@
#include "cleanertablemodel.h"
#include "core/metrics.h"
+const QPixmap &trashIcon()
+{
+ static QPixmap trash = QPixmap(":list-remove-icon").scaledToHeight(defaultIconMetrics().sz_small);
+ return trash;
+}
+
+const QPixmap &trashForbiddenIcon()
+{
+ static QPixmap trash = QPixmap(":list-remove-disabled-icon").scaledToHeight(defaultIconMetrics().sz_small);
+ return trash;
+}
+
+const QPixmap &editIcon()
+{
+ static QPixmap edit = QPixmap(":edit-icon").scaledToHeight(defaultIconMetrics().sz_small);
+ return edit;
+}
+
CleanerTableModel::CleanerTableModel(QObject *parent) : QAbstractTableModel(parent)
{
}
diff --git a/qt-models/cleanertablemodel.h b/qt-models/cleanertablemodel.h
index d435dad32..0657b2099 100644
--- a/qt-models/cleanertablemodel.h
+++ b/qt-models/cleanertablemodel.h
@@ -9,6 +9,7 @@
/* Retrieve the trash icon pixmap, common to most table models */
const QPixmap &trashIcon();
const QPixmap &trashForbiddenIcon();
+const QPixmap &editIcon();
/* When using a QAbstractTableModel, consider using this instead
* of the default implementation, as it's easyer to setup the columns
diff --git a/qt-models/models.cpp b/qt-models/models.cpp
index 5fa0c7c79..ee68be2ca 100644
--- a/qt-models/models.cpp
+++ b/qt-models/models.cpp
@@ -11,20 +11,6 @@
#include <QLocale>
-// initialize the trash icon if necessary
-
-const QPixmap &trashIcon()
-{
- static QPixmap trash = QPixmap(":list-remove-icon").scaledToHeight(defaultIconMetrics().sz_small);
- return trash;
-}
-
-const QPixmap &trashForbiddenIcon()
-{
- static QPixmap trash = QPixmap(":list-remove-disabled-icon").scaledToHeight(defaultIconMetrics().sz_small);
- return trash;
-}
-
Qt::ItemFlags GasSelectionModel::flags(const QModelIndex&) const
{
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
diff --git a/qt-models/models.h b/qt-models/models.h
index f45c5e614..d11090cd2 100644
--- a/qt-models/models.h
+++ b/qt-models/models.h
@@ -44,7 +44,6 @@ slots:
void repopulate();
};
-
class LanguageModel : public QAbstractListModel {
Q_OBJECT
public:
diff --git a/subsurface.qrc b/subsurface.qrc
index a549f12b3..5c2a6fb6f 100644
--- a/subsurface.qrc
+++ b/subsurface.qrc
@@ -83,7 +83,7 @@
<file alias="edit-clear-icon">icons/edit-undo.svg</file>
<file alias="show-icon">icons/go-top.svg</file>
<file alias="filter-close">icons/process-stop.svg</file>
- <file alias="duplicate-edit-icon">icons/edit-circled.svg</file>
+ <file alias="edit-icon">icons/edit-circled.svg</file>
<file alias="globe-icon">icons/Emblem-earth.svg</file>
<file alias="geotag-icon">icons/geocode.svg</file>
<file alias="photo-in-icon">icons/duringPhoto.png</file>