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