diff options
author | Ken Moore <moorekou@gmail.com> | 2015-08-25 15:43:53 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-08-25 15:43:53 -0400 |
commit | 88507c36076b100e26a8e2c85533d667675f9daa (patch) | |
tree | 53fc42d5b8b83924e19aa5d6618dae446ba698a4 /lumina-fm/MimeIconProvider.h | |
parent | Disable the "size" output of a directory in lumina-fm: this needs some better... (diff) | |
download | lumina-88507c36076b100e26a8e2c85533d667675f9daa.tar.gz lumina-88507c36076b100e26a8e2c85533d667675f9daa.tar.bz2 lumina-88507c36076b100e26a8e2c85533d667675f9daa.zip |
Commit a major overhaul of lumina-fm: PLEASE TEST!!
1) Seemlessly embed the ZFS rollback options into the main dir browser (simple time slider at the top).
2) Take all the main widgets and put them into separate classes/files (widgets/*)
3) Add support for both tabs and columns for multiple directory viewing
4) Remove the "icon" view mode, and replace it with an icon sizing option (larger/smaller)
5) Add the ability for the multimedia player and slideshow viewer to be running within separate tabs while still browsing the system (new files will be added to the queue instead of replacing it)
6) Ensure that only selected files are added to the player/slideshow on demand.
7) Add the ability to zoom in/out on a slideshow image.
KNOWN ISSUES:
1) The new file/dir functionality has not been replaced/re-implemented yet.
2) The drag and drop functionality has been removed until a new implementation is put in.
PLEASE TEST:
ZFS snapshot use, multimedia file player, browsing and other UI changes
Diffstat (limited to 'lumina-fm/MimeIconProvider.h')
-rw-r--r-- | lumina-fm/MimeIconProvider.h | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/lumina-fm/MimeIconProvider.h b/lumina-fm/MimeIconProvider.h deleted file mode 100644 index 0c9ba98e..00000000 --- a/lumina-fm/MimeIconProvider.h +++ /dev/null @@ -1,67 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is the Icon provider for files based on mime types -//=========================================== -#ifndef _LUMINA_FILE_MANAGER_ICON_PROVIDER_H -#define _LUMINA_FILE_MANAGER_ICON_PROVIDER_H - -#include <QFileIconProvider> -#include <QIcon> -#include <QString> -#include <QFileInfo> - -#include <LuminaXDG.h> - -class MimeIconProvider : public QFileIconProvider{ - -public: - bool showthumbnails; - MimeIconProvider() : QFileIconProvider(){ - showthumbnails = false; - } - ~MimeIconProvider(){} - - - - QIcon icon(const QFileInfo &info) const{ - if(info.isDir()){ - return LXDG::findIcon("folder",""); - }else if(info.isFile()){ - if(showthumbnails && (info.suffix().toLower()=="png" || info.suffix().toLower()=="jpg") ){ - //make sure to only load small versions of the files into memory: could have hundreds of them... - return QIcon( QPixmap(info.absoluteFilePath()).scaledToHeight(64) ); - }else if(info.fileName().endsWith(".desktop") ){ - bool ok = false; - XDGDesktop desk = LXDG::loadDesktopFile(info.absoluteFilePath(), ok); - if(ok){ - return LXDG::findIcon(desk.icon, "unknown"); - }else{ - return LXDG::findMimeIcon(info.fileName()); - } - }else{ - return LXDG::findMimeIcon(info.fileName()); - } - }else{ - return LXDG::findIcon("unknown",""); - } - } - - QString type(const QFileInfo &info) const{ - if(info.isDir()){ - return QObject::tr("Directory"); - }else if(info.completeBaseName().isEmpty() || info.suffix().isEmpty() ){ - return QObject::tr("Unknown"); //hidden file without an extension - }else if(info.suffix()=="desktop"){ - return QObject::tr("Application"); - }else{ - return info.suffix().toUpper(); - } - } - -}; - -#endif |