aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h
diff options
context:
space:
mode:
authorq5sys <jt@obs-sec.com>2017-08-17 19:32:10 -0400
committerq5sys <jt@obs-sec.com>2017-08-17 19:32:10 -0400
commite4b589cbc66a1d601bd9f098fe775421466ff820 (patch)
treecfa03948bec7e7962d330ad201e621079a644db6 /src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h
parentTranslated using Weblate (Catalan) (diff)
downloadlumina-e4b589cbc66a1d601bd9f098fe775421466ff820.tar.gz
lumina-e4b589cbc66a1d601bd9f098fe775421466ff820.tar.bz2
lumina-e4b589cbc66a1d601bd9f098fe775421466ff820.zip
add lumina-fm-dev to tree while I work on it
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h')
-rw-r--r--src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h b/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h
new file mode 100644
index 00000000..fafb3746
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-fm-dev/BrowserWidget.h
@@ -0,0 +1,94 @@
+// Lumina-DE source code
+// Copyright (c) 2016, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This is the main browsing frontend for the file manager
+//===========================================
+#ifndef _LUMINA_FM_BROWSE_FRONTEND_H
+#define _LUMINA_FM_BROWSE_FRONTEND_H
+
+#include <QString>
+#include <QWidget>
+#include <QThread>
+
+#include "Browser.h"
+#include "widgets/DDListWidgets.h"
+
+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, statustip;
+ QStringList date_format, historyList;
+ bool freshload;
+
+ //The drag and drop brower widgets
+ DDListWidget *listWidget;
+ DDTreeWidget *treeWidget;
+
+ QString DTtoString(QDateTime dt); //QDateTime to string simplification routine
+
+public:
+ BrowserWidget(QString objID, QWidget *parent = 0);
+ ~BrowserWidget();
+
+ QString id(){ return ID; }
+
+ void changeDirectory(QString dir);
+ QString currentDirectory(){ return BROWSER->currentDirectory(); }
+
+ void showDetails(bool show);
+ bool hasDetails();
+
+ void showHiddenFiles(bool show);
+ bool hasHiddenFiles();
+
+ void showThumbnails(bool show);
+ bool hasThumbnails();
+ 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
+ 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();
+
+private slots:
+ //Browser connections
+ void clearItems();
+ void itemRemoved(QString);
+ void itemDataAvailable(QIcon, LFileInfo*);
+ void itemsLoading(int total);
+ void selectionChanged();
+
+protected:
+ void resizeEvent(QResizeEvent *ev);
+
+signals:
+ //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
+
+};
+#endif
bgstack15