diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h index 5f06e2b6..20b677d7 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h @@ -15,6 +15,7 @@ #include <QLineEdit> #include <QShortcut> #include <QFileSystemWatcher> +#include <QFileSystemModel> #include <QTimer> #include <QFuture> @@ -33,28 +34,34 @@ public: enum DETAILTYPES{ NAME, SIZE, TYPE, DATEMOD, DATECREATE}; DirWidget(QString objID, QWidget *parent = 0); //needs a unique ID (to distinguish from other DirWidgets) ~DirWidget(); - + void cleanup(); //called before the browser is closed down - + //Directory Managment void ChangeDir(QString dirpath); void setDirCompleter(QCompleter *comp); - + //Information QString id(); QString currentDir(); + QFileSystemModel *dirtreeModel; + QStringList PREFAPPS; //View Settings void setShowDetails(bool show); void showHidden(bool show); void showThumbnails(bool show); void setThumbnailSize(int px); - void setFocusLineDir(); - + void setFocusLineDir(); + void showDirTreePane(bool show); + bool showingDirTreePane(); + + + public slots: //void LoadDir(QString dir, LFileInfoList list); void LoadSnaps(QString basedir, QStringList snaps); - + //Refresh options void refresh(); //Refresh current directory @@ -69,18 +76,18 @@ private: QString ID, cBID; //unique ID assigned by the parent, and currently active browser widget QString normalbasedir, snapbasedir, snaprelpath; //for maintaining directory context while moving between snapshots QStringList snapshots, needThumbs, tmpSel; - bool canmodify; + bool canmodify, showdirtree; //The Toolbar and associated items QToolBar *toolbar; QLineEdit *line_dir; //The context menu and associated items - QMenu *contextMenu, *cNewMenu, *cOpenMenu, *cFModMenu, *cFViewMenu; + QMenu *contextMenu, *cNewMenu, *cOpenMenu, *cFModMenu, *cFViewMenu, *cOpenWithMenu; //The keyboard shortcuts for context menu items - QShortcut *kZoomIn, *kZoomOut, *kNewFile, *kNewDir, *kNewXDG, *kCut, *kCopy, *kPaste, *kRename, \ - *kFav, *kDel, *kOpSS, *kOpMM, *kOpTerm; + QShortcut *kZoomIn, *kZoomOut, *kNewFile, *kNewDir, *kNewXDG, *kCut, *kCopy, *kPaste, *kRename, \ + *kFav, *kDel, *kOpSS, *kOpMM, *kOpTerm, *kExtract; //Functions for internal use void createShortcuts(); //on init only @@ -89,19 +96,27 @@ private: BrowserWidget* currentBrowser(); QStringList currentDirFiles(); //all the "files" available within the current dir/browser + QProcess *pExtract; + + //OpenWithMenu + QString fileEXT, filePath; + QStringList mimetypes, keys, files; + //QStringList getPreferredApplications(); + + private slots: //UI BUTTONS/Actions // -- Bottom Action Buttons void on_tool_zoom_in_clicked(); - void on_tool_zoom_out_clicked(); + void on_tool_zoom_out_clicked(); // -- Top Snapshot Buttons void on_tool_snap_newer_clicked(); void on_tool_snap_older_clicked(); void on_slider_snap_valueChanged(int val = -1); void direct_snap_selected(QAction*); - + //Top Toolbar buttons void on_actionBack_triggered(); void on_actionUp_triggered(); @@ -115,7 +130,7 @@ private slots: void fileCheckSums(); void fileProperties(); void openTerminal(); - + //Browser Functions void OpenContextMenu(); @@ -123,7 +138,8 @@ private slots: void currentDirectoryChanged(bool widgetonly = false); void dirStatusChanged(QString); void setCurrentBrowser(QString); - + void on_folderViewPane_clicked(const QModelIndex &index); + //Context Menu Functions // - DIRECTORY operations void createNewFile(); @@ -140,18 +156,20 @@ private slots: void removeFiles(); void runFiles(); void runWithFiles(); - //void attachToNewEmail(); + //void attachToNewEmail(); + void autoExtractFiles(); // - Context-specific operations void openInSlideshow(); - void openMultimedia(); + void openMultimedia(); + signals: //Directory loading/finding signals void OpenDirectories(QStringList); //Directories to open in other tabs/columns 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(LFileInfoList); //open in multimedia player void ViewFiles(LFileInfoList); //open in slideshow |