Use icons which are better distinguishable in file info
This commit is contained in:
parent
72330988ef
commit
54315a3739
|
@ -26,8 +26,18 @@ set(SRC_FILES
|
|||
cli/mainfeatures.cpp
|
||||
application/knownfieldmodel.cpp)
|
||||
|
||||
set(GUI_HEADER_FILES application/targetlevelmodel.h application/settings.h misc/htmlinfo.h misc/utility.h)
|
||||
set(GUI_SRC_FILES application/targetlevelmodel.cpp application/settings.cpp misc/htmlinfo.cpp misc/utility.cpp)
|
||||
set(GUI_HEADER_FILES
|
||||
application/targetlevelmodel.h
|
||||
application/settings.h
|
||||
gui/fileinfomodel.h
|
||||
misc/htmlinfo.h
|
||||
misc/utility.h)
|
||||
set(GUI_SRC_FILES
|
||||
application/targetlevelmodel.cpp
|
||||
application/settings.cpp
|
||||
gui/fileinfomodel.cpp
|
||||
misc/htmlinfo.cpp
|
||||
misc/utility.cpp)
|
||||
|
||||
set(WIDGETS_HEADER_FILES
|
||||
gui/entertargetdialog.h
|
||||
|
@ -49,7 +59,6 @@ set(WIDGETS_HEADER_FILES
|
|||
gui/tagedit.h
|
||||
gui/tagfieldedit.h
|
||||
gui/tageditorwidget.h
|
||||
gui/fileinfomodel.h
|
||||
dbquery/dbquery.h
|
||||
dbquery/musicbrainz.h
|
||||
dbquery/lyricswikia.h
|
||||
|
@ -79,7 +88,6 @@ set(WIDGETS_SRC_FILES
|
|||
gui/tagedit.cpp
|
||||
gui/tagfieldedit.cpp
|
||||
gui/tageditorwidget.cpp
|
||||
gui/fileinfomodel.cpp
|
||||
dbquery/dbquery.cpp
|
||||
dbquery/musicbrainz.cpp
|
||||
dbquery/lyricswikia.cpp
|
||||
|
@ -128,6 +136,9 @@ set(REQUIRED_ICONS
|
|||
edit-clear
|
||||
edit-copy
|
||||
emblem-error
|
||||
emblem-warning
|
||||
emblem-information
|
||||
emblem-question
|
||||
object-locked
|
||||
object-unlocked
|
||||
preferences-other
|
||||
|
|
|
@ -231,33 +231,47 @@ void FileInfoModel::setFileInfo(MediaFileInfo &fileInfo, Diagnostics &diag, Diag
|
|||
updateCache();
|
||||
}
|
||||
|
||||
#if defined(TAGEDITOR_GUI_QTWIDGETS)
|
||||
const QIcon &FileInfoModel::informationIcon()
|
||||
{
|
||||
static const QIcon icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation);
|
||||
static const QIcon icon = QIcon::fromTheme(QStringLiteral("emblem-information")
|
||||
#ifdef GUI_QTWIDGETS
|
||||
,
|
||||
QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation)
|
||||
#endif
|
||||
);
|
||||
return icon;
|
||||
}
|
||||
|
||||
const QIcon &FileInfoModel::warningIcon()
|
||||
{
|
||||
static const QIcon icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning);
|
||||
static const QIcon icon = QIcon::fromTheme(QStringLiteral("emblem-warning")
|
||||
#ifdef GUI_QTWIDGETS
|
||||
,
|
||||
QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning)
|
||||
#endif
|
||||
);
|
||||
return icon;
|
||||
}
|
||||
|
||||
const QIcon &FileInfoModel::errorIcon()
|
||||
{
|
||||
static const QIcon icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical);
|
||||
static const QIcon icon = QIcon::fromTheme(QStringLiteral("emblem-error")
|
||||
#ifdef GUI_QTWIDGETS
|
||||
,
|
||||
QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical)
|
||||
#endif
|
||||
);
|
||||
return icon;
|
||||
}
|
||||
|
||||
const QIcon &FileInfoModel::debugIcon()
|
||||
{
|
||||
static const QIcon icon = QIcon(QStringLiteral("/images/bug"));
|
||||
static const QIcon icon = QIcon::fromTheme(QStringLiteral("emblem-question"));
|
||||
return icon;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Internally called to create to cache the items.
|
||||
* \brief Internally called to cache the items.
|
||||
*/
|
||||
void FileInfoModel::updateCache()
|
||||
{
|
||||
|
@ -606,6 +620,4 @@ void FileInfoModel::updateCache()
|
|||
endResetModel();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace QtGui
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef FILEINFOMODEL_H
|
||||
#define FILEINFOMODEL_H
|
||||
|
||||
#include <QIcon>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include <list>
|
||||
|
@ -22,12 +23,10 @@ public:
|
|||
const TagParser::MediaFileInfo *fileInfo() const;
|
||||
void setFileInfo(TagParser::MediaFileInfo &fileInfo, TagParser::Diagnostics &diag, TagParser::Diagnostics *diagReparsing = nullptr);
|
||||
|
||||
#if defined(GUI_QTWIDGETS)
|
||||
static const QIcon &informationIcon();
|
||||
static const QIcon &warningIcon();
|
||||
static const QIcon &errorIcon();
|
||||
static const QIcon &debugIcon();
|
||||
#endif
|
||||
|
||||
private:
|
||||
void updateCache();
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "./htmlinfo.h"
|
||||
#include "./utility.h"
|
||||
|
||||
#include "../gui/fileinfomodel.h"
|
||||
|
||||
#include <tagparser/abstractattachment.h>
|
||||
#include <tagparser/abstractcontainer.h>
|
||||
#include <tagparser/abstracttrack.h>
|
||||
|
@ -246,25 +248,25 @@ QByteArray mkBase64(const QIcon &icon)
|
|||
|
||||
const QByteArray &mkInfoIconData()
|
||||
{
|
||||
static const QByteArray data = mkBase64(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation));
|
||||
static const QByteArray data = mkBase64(QtGui::FileInfoModel::informationIcon());
|
||||
return data;
|
||||
}
|
||||
|
||||
const QByteArray &mkWarningIconData()
|
||||
{
|
||||
static const QByteArray data = mkBase64(QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning));
|
||||
static const QByteArray data = mkBase64(QtGui::FileInfoModel::warningIcon());
|
||||
return data;
|
||||
}
|
||||
|
||||
const QByteArray &mkErrorIconData()
|
||||
{
|
||||
static const QByteArray data = mkBase64(QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical));
|
||||
static const QByteArray data = mkBase64(QtGui::FileInfoModel::errorIcon());
|
||||
return data;
|
||||
}
|
||||
|
||||
const QByteArray &mkDebugIconData()
|
||||
{
|
||||
static const QByteArray data = mkBase64(QIcon(QStringLiteral(":/images/bug")));
|
||||
static const QByteArray data = mkBase64(QtGui::FileInfoModel::debugIcon());
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue