Move createFileSystemColor back to GUI.
This commit is contained in:
parent
ce3faee105
commit
5c04c17cb7
|
@ -24,16 +24,11 @@
|
|||
#include <KLocalizedString>
|
||||
|
||||
#include <QAction>
|
||||
#include <QIcon>
|
||||
#include <QMenu>
|
||||
#include <QHeaderView>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QRect>
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
void registerMetaTypes()
|
||||
{
|
||||
qRegisterMetaType<Operation*>("Operation*");
|
||||
|
@ -45,18 +40,6 @@ bool caseInsensitiveLessThan(const QString& s1, const QString& s2)
|
|||
return s1.toLower() < s2.toLower();
|
||||
}
|
||||
|
||||
QIcon createFileSystemColor(FileSystem::Type type, quint32 size)
|
||||
{
|
||||
QPixmap pixmap(size, size);
|
||||
QPainter painter(&pixmap);
|
||||
painter.setPen(QColor(0, 0, 0));
|
||||
painter.setBrush(Config::fileSystemColorCode(type));
|
||||
painter.drawRect(QRect(0, 0, pixmap.width() - 1, pixmap.height() - 1));
|
||||
painter.end();
|
||||
|
||||
return QIcon(pixmap);
|
||||
}
|
||||
|
||||
void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree)
|
||||
{
|
||||
QMenu headerMenu(i18nc("@title:menu", "Columns"));
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
class KAboutData;
|
||||
class QString;
|
||||
class QIcon;
|
||||
class QPoint;
|
||||
class QTreeWidget;
|
||||
|
||||
|
@ -33,8 +32,6 @@ LIBKPMCORE_EXPORT void registerMetaTypes();
|
|||
|
||||
LIBKPMCORE_EXPORT bool caseInsensitiveLessThan(const QString& s1, const QString& s2);
|
||||
|
||||
LIBKPMCORE_EXPORT QIcon createFileSystemColor(FileSystem::Type type, quint32 size);
|
||||
|
||||
LIBKPMCORE_EXPORT void showColumnsContextMenu(const QPoint& p, QTreeWidget& tree);
|
||||
|
||||
LIBKPMCORE_EXPORT bool checkAccessibleDevices();
|
||||
|
|
Loading…
Reference in New Issue