aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/widgets/DirWidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm/widgets/DirWidget.h')
-rw-r--r--lumina-fm/widgets/DirWidget.h49
1 files changed, 43 insertions, 6 deletions
diff --git a/lumina-fm/widgets/DirWidget.h b/lumina-fm/widgets/DirWidget.h
index 646df309..193d1789 100644
--- a/lumina-fm/widgets/DirWidget.h
+++ b/lumina-fm/widgets/DirWidget.h
@@ -11,6 +11,11 @@
#include <QWidget>
#include <QObject>
#include <QMenu>
+#include <QToolBar>
+#include <QLineEdit>
+#include <QShortcut>
+#include <QFileSystemWatcher>
+
#include "../DirData.h"
@@ -26,16 +31,30 @@ public:
enum DETAILTYPES{ NAME, SIZE, TYPE, DATEMOD, DATECREATE};
DirWidget(QString objID, QWidget *parent = 0); //needs a unique ID (to distinguish from other DirWidgets)
~DirWidget();
-
+
+ //Directory Managment
+ void ChangeDir(QString dirpath);
+ void setDirCompleter(QCompleter *comp);
+
+ //Information
QString id();
+ QString currentDir();
+
+ //View Settings
void setShowDetails(bool show);
void setShowSidebar(bool show);
+ void setShowThumbnails(bool show);
void setDetails(QList<DETAILTYPES> list); //Which details to show and in which order (L->R)
void setThumbnailSize(int px);
+ void setShowCloseButton(bool show);
public slots:
- void LoadDir(QString dir, QList<LFileInfo> list);
+ void LoadDir(QString dir, LFileInfoList list);
void LoadSnaps(QString basedir, QStringList snaps);
+
+ //Refresh options
+ void refresh(); //Refresh current directory
+ void refreshButtons(); //Refresh action buttons only
//Theme change functions
void UpdateIcons();
@@ -47,13 +66,22 @@ public slots:
private:
Ui::DirWidget *ui;
QString ID, CDIR; //unique ID assigned by the parent and the current dir path
- QList<LFileInfo> CLIST; //current item list (snap or not)
+ LFileInfoList CLIST; //current item list (snap or not)
QString normalbasedir, snapbasedir, snaprelpath; //for maintaining direcoty context while moving between snapshots
QStringList snapshots;
- bool showDetails, canmodify; //which widget to use for showing items
+ bool showDetails, showThumbs, canmodify, stopload; //which widget to use for showing items
QList<DETAILTYPES> listDetails;
QMenu *contextMenu;
+ //The Toolbar and associated items
+ QToolBar *toolbar;
+ QLineEdit *line_dir;
+ QStringList history;
+ //Keyboard Shortcuts
+ QShortcut *copyFilesShort, *cutFilesShort, *pasteFilesShort, *deleteFilesShort, *refreshShort;
+ //Watcher to determine when the dir changes
+ QFileSystemWatcher *watcher;
+ //Functions for internal use
void setupConnections();
QStringList currentSelection();
@@ -75,6 +103,14 @@ private slots:
void on_tool_snap_newer_clicked();
void on_tool_snap_older_clicked();
void on_slider_snap_valueChanged(int);
+ //Top Toolbar buttons
+ void on_actionBack_triggered();
+ void on_actionUp_triggered();
+ void on_actionHome_triggered();
+ void on_actionStopLoad_triggered();
+ void dir_changed(); //user manually changed the directory
+ void on_actionClose_Browser_triggered();
+
// - Other Actions without a specific button on the side
void fileCheckSums();
void fileProperties();
@@ -91,10 +127,11 @@ signals:
void OpenDirectories(QStringList); //Directories to open in other tabs/columns
void LoadDirectory(QString, QString); //ID, dirpath (Directory to load here)
void findSnaps(QString, QString); //ID, dirpath (Request snapshot information for a directory)
+ void CloseBrowser(QString); //ID (Request that this browser be closed)
//External App/Widget launching
- void PlayFiles(QList<LFileInfo>); //open in multimedia player
- void ViewFiles(QList<LFileInfo>); //open in slideshow
+ void PlayFiles(LFileInfoList); //open in multimedia player
+ void ViewFiles(LFileInfoList); //open in slideshow
void LaunchTerminal(QString); //dirpath
//System Interactions
bgstack15