aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-09-30 14:40:40 -0400
committerKen Moore <ken@ixsystems.com>2016-09-30 14:40:40 -0400
commit04b5af3c9996f24764fddb4819f38e178c5dff4a (patch)
tree7acc524cd667ff99153877afa8b80f392ee3f894 /src-qt5/desktop-utils/lumina-fm/BrowserWidget.h
parentAdjust the default settings for the new GPU accel detection routine to prefer... (diff)
downloadlumina-04b5af3c9996f24764fddb4819f38e178c5dff4a.tar.gz
lumina-04b5af3c9996f24764fddb4819f38e178c5dff4a.tar.bz2
lumina-04b5af3c9996f24764fddb4819f38e178c5dff4a.zip
Commit a large update to lumina-fm:
The entire backend has been rewritten around multi-threading, and is much faster and more responsive now. The entire browsing widget has been redesigned for a better workflow and cleaner UI. The tabs/columns "group modes" have been removed. Instead, tabs are always used, but each browser supports a single/dual columns *within* each tab (via a couple simple buttons on the toolbar). Each column within a tab will share the same interface buttons (toolbar actions, ZFS snapshot slider,etc) - and they will reflect the settings on the "Active" column (with appropriate visual changes to indicate which one is active). The icon size options have also been removed from the menu bar and are now a couple small "zoom" buttons on the browsing widgets instead. KNOWN REGRESSION: Keyboard shortcuts have not been tested and re-added as necessary yet.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/BrowserWidget.h')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/BrowserWidget.h82
1 files changed, 32 insertions, 50 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h
index 84b68b2c..803a036d 100644
--- a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h
+++ b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h
@@ -10,6 +10,7 @@
#include <QString>
#include <QWidget>
+#include <QThread>
#include "Browser.h"
#include "widgets/DDListWidgets.h"
@@ -18,9 +19,11 @@ class BrowserWidget : public QWidget{
Q_OBJECT
private:
Browser *BROWSER;
+ //QThread *bThread; //browserThread
int numItems; //used for checking if all the items have loaded yet
- QString ID;
- QStringList date_format;
+ QString ID, statustip;
+ QStringList date_format, historyList;
+ bool freshload;
//The drag and drop brower widgets
DDListWidget *listWidget;
@@ -40,12 +43,26 @@ public:
void showDetails(bool show);
bool hasDetails();
+ void showHiddenFiles(bool show);
+ bool hasHiddenFiles();
+
void setThumbnailSize(int px);
+ int thumbnailSize();
+
+ void setHistory(QStringList);
+ QStringList history();
+
+ void setShowActive(bool show); //used for accenting if the widget is "active"
+
+ QString status(){ return statustip; }
//Date format for show items
- QStringList getDateFormat();
void readDateFormat();
+ //Return all the items which are currently selected
+ QStringList currentSelection();
+ QStringList currentItems(int type = 0); //type: 0=all, -1=files, +1=dirs
+
public slots:
void retranslate();
@@ -55,56 +72,21 @@ private slots:
void itemRemoved(QString);
void itemDataAvailable(QIcon, LFileInfo);
void itemsLoading(int total);
+ void selectionChanged();
+
+protected:
+ void resizeEvent(QResizeEvent *ev);
signals:
- //void activated(QString); //current dir path
+ //External signals
+ void itemsActivated();
+ void updateDirectoryStatus(QString);
+ void contextMenuRequested();
+ void DataDropped(QString, QStringList);
+ void hasFocus(QString); //ID output
+
+ //Internal signal
void dirChange(QString); //current dir path
};
-
-/*
- * Virtual class for managing the sort of folders/files items. The problem with base class is that it only manages texts fields and
- * we have dates and sizes.
- *
- * On this class, we overwrite the function operator<.
- */
-
-/*class CQTreeWidgetItem : public QTreeWidgetItem {
-public:
- CQTreeWidgetItem(int type = Type) : QTreeWidgetItem(type) {}
- CQTreeWidgetItem(const QStringList & strings, int type = Type) : QTreeWidgetItem(strings, type) {}
- CQTreeWidgetItem(QTreeWidget * parent, int type = Type) : QTreeWidgetItem(parent, type) {}
- CQTreeWidgetItem(QTreeWidget * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {}
- CQTreeWidgetItem(QTreeWidget * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {}
- CQTreeWidgetItem(QTreeWidgetItem * parent, int type = Type) : QTreeWidgetItem(parent, type) {}
- CQTreeWidgetItem(QTreeWidgetItem * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {}
- CQTreeWidgetItem(QTreeWidgetItem * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {}
- virtual ~CQTreeWidgetItem() {}
- inline virtual bool operator<(const QTreeWidgetItem &tmp) const {
- int column = this->treeWidget()->sortColumn();
- // We are in date text
- if(column == DirWidget::DATEMOD || column == DirWidget::DATECREATE)
- return this->whatsThis(column) < tmp.whatsThis(column);
- // We are in size text
- else if(column == DirWidget::SIZE) {
- QString text = this->text(column);
- QString text_tmp = tmp.text(column);
- double filesize, filesize_tmp;
- // On folders, text is empty so we check for that
- // In case we are in folders, we put -1 for differentiate of regular files with 0 bytes.
- // Doing so, all folders we'll be together instead of mixing with files with 0 bytes.
- if(text.isEmpty())
- filesize = -1;
- else
- filesize = LUtils::DisplaySizeToBytes(text);
- if(text_tmp.isEmpty())
- filesize_tmp = -1;
- else
- filesize_tmp = LUtils::DisplaySizeToBytes(text_tmp);
- return filesize < filesize_tmp;
- }
- // In other cases, we trust base class implementation
- return QTreeWidgetItem::operator<(tmp);
- }
-};*/
#endif
bgstack15