summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--icons/warning.pngbin0 -> 24526 bytes
-rw-r--r--qt-ui/maintab.cpp7
-rw-r--r--qt-ui/mainwindow.h1
-rw-r--r--subsurface.qrc1
4 files changed, 7 insertions, 2 deletions
diff --git a/icons/warning.png b/icons/warning.png
new file mode 100644
index 000000000..cf53cddc3
--- /dev/null
+++ b/icons/warning.png
Binary files differ
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 5905285fa..3b879133b 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -132,10 +132,12 @@ void MainTab::enableEdition()
bool MainTab::eventFilter(QObject* object, QEvent* event)
{
if (isEnabled() && event->type() == QEvent::FocusIn && (object == ui->rating || object == ui->visibility)){
+ tabBar()->setTabIcon(currentIndex(), QIcon(":warning"));
enableEdition();
}
if (isEnabled() && event->type() == QEvent::MouseButtonPress ) {
+ tabBar()->setTabIcon(currentIndex(), QIcon(":warning"));
enableEdition();
}
return false; // don't "eat" the event.
@@ -340,7 +342,8 @@ void MainTab::reload()
void MainTab::acceptChanges()
{
mainWindow()->dive_list()->setEnabled(true);
-
+ tabBar()->setTabIcon(0, QIcon()); // Notes
+ tabBar()->setTabIcon(1, QIcon()); // Equipment
ui->diveNotesMessage->animatedHide();
ui->notesButtonBox->hide();
/* now figure out if things have changed */
@@ -388,6 +391,8 @@ void MainTab::acceptChanges()
void MainTab::rejectChanges()
{
+ tabBar()->setTabIcon(0, QIcon()); // Notes
+ tabBar()->setTabIcon(1, QIcon()); // Equipment
mainWindow()->dive_list()->setEnabled(true);
if (mainWindow() && mainWindow()->dive_list()->selectedTrips.count() == 1){
ui->notes->setText(notesBackup[NULL].notes );
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 6cc99db96..b30f10a03 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -14,7 +14,6 @@ struct DiveList;
class QSortFilterProxyModel;
class DiveTripModel;
-
namespace Ui
{
class MainWindow;
diff --git a/subsurface.qrc b/subsurface.qrc
index cf7864b27..4e9e8ff84 100644
--- a/subsurface.qrc
+++ b/subsurface.qrc
@@ -10,6 +10,7 @@
<file alias="minimum">icons/minimum.svg</file>
<file alias="maximum">icons/maximum.svg</file>
<file alias="average">icons/average.svg</file>
+ <file alias="warning">icons/warning.png</file>
<file alias="table-css">qt-ui/css/tableviews.css</file>
</qresource>
</RCC>