aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/MainUI.h
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm/MainUI.h')
-rw-r--r--lumina-fm/MainUI.h155
1 files changed, 35 insertions, 120 deletions
diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h
index 6847f6f6..80582af6 100644
--- a/lumina-fm/MainUI.h
+++ b/lumina-fm/MainUI.h
@@ -1,6 +1,6 @@
//===========================================
// Lumina-DE source code
-// Copyright (c) 2014, Ken Moore
+// Copyright (c) 2014-2015, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
@@ -51,13 +51,11 @@
// Local includes
#include "FODialog.h" //file operation dialog
#include "BMMDialog.h" //bookmark manager dialog
-#include "MimeIconProvider.h" //icon provider for the view widgets
-#include "BackgroundWorker.h"
-#include "DDFileSystemModel.h"
#include "DirData.h"
#include "widgets/MultimediaWidget.h"
#include "widgets/SlideshowWidget.h"
+#include "widgets/DirWidget.h"
namespace Ui{
class MainUI;
@@ -69,42 +67,29 @@ public:
MainUI();
~MainUI();
- void OpenDirs(QStringList); //called from the main.cpp after initialization
-
public slots:
+ void OpenDirs(QStringList); //also called from the main.cpp after initialization
void setupIcons(); //used during initialization
private:
Ui::MainUI *ui;
QThread *workThread;
- BackgroundWorker *worker;
+ DirData *worker;
//Internal non-ui widgets
QTabBar *tabBar;
- QLineEdit *currentDir;
- DDFileSystemModel *fsmod;
- QFileSystemModel *snapmod;
- //QFileSystemWatcher *fswatcher;
- MimeIconProvider *iconProv;
+ QFileSystemModel *fsmod;
QMenu *contextMenu;
- QRadioButton *radio_view_details, *radio_view_list, *radio_view_icons;
- QWidgetAction *detWA, *listWA, *icoWA;
+ QRadioButton *radio_view_details, *radio_view_list, *radio_view_tabs, *radio_view_cols;
+ QWidgetAction *detWA, *listWA, *tabsWA, *colsWA;
QString favdir;
-
- //Phonon Widgets for the multimedia player
- QMediaPlayer *mediaObj;
- QVideoWidget *videoDisplay;
- QSlider *playerSlider;
- QString playerTTime; //total time - to prevent recalculation every tick
-
- //Internal variables
- QStringList snapDirs; //internal saved variable for the discovered zfs snapshot dirs
- QString CItem; //the item that was right-clicked (for the context menu)
- //QStringList imgFilter, multiFilter; //image/multimedia filters
+ //UI Widgets
+ QList<DirWidget*> DWLIST;
+ MultimediaWidget *MW;
+ SlideshowWidget *SW;
+
QSettings *settings;
- QShortcut *nextTabLShort, *nextTabRShort, *closeTabShort, *copyFilesShort, *cutFilesShort, *pasteFilesShort, *deleteFilesShort;
+ QShortcut *nextTabLShort, *nextTabRShort, *closeTabShort;
QCompleter *dirCompleter;
- bool isUserWritable, keepFocus;
- QTimer *syncTimer;
//Simplification Functions
void setupConnections(); //used during initialization
@@ -113,15 +98,6 @@ private:
void RebuildBookmarksMenu();
void RebuildDeviceMenu();
- bool checkUserPerms();
- QString msToText(qint64 ms);
-
- //Common functions for browser info/usage
- QString getCurrentDir();
- void setCurrentDir(QString);
- QFileInfoList getSelectedItems();
- //QModelIndexList getVisibleItems();
-
private slots:
void slotSingleInstance(QStringList in){
this->show();
@@ -129,18 +105,7 @@ private slots:
this->OpenDirs(in);
}
- void slotStartSyncTimer();
-
- //General button check functions (started in a seperate thread!)
- void AvailableMultimediaFiles(QStringList files);
- void AvailableBackups(QString basedir, QStringList snapdirs);
- void AvailablePictures(QStringList files);
-
- //General page switching
- void goToMultimediaPage();
- void goToRestorePage();
- void goToSlideshowPage();
- void goToBrowserPage();
+ //void slotStartSyncTimer();
//Menu Actions
void on_actionNew_Tab_triggered();
@@ -152,86 +117,36 @@ private slots:
void goToBookmark(QAction*);
void goToDevice(QAction*);
void viewModeChanged(bool);
-
- //Toolbar Actions
- void on_actionBack_triggered();
- void on_actionUpDir_triggered();
- void on_actionHome_triggered();
- void on_actionBookMark_triggered();
+ void groupModeChanged(bool);
+ void on_actionLarger_Icons_triggered();
+ void on_actionSmaller_Icons_triggered();
- //Browser Functions
- void startEditDir(QWidget *old, QWidget *now);
- void goToDirectory(); //go to a manually typed in directory
- void reloadDirectory(); //Update the widget with the dir contents
- void currentDirectoryLoaded(); //The file system model re-loaded the directory
- void on_tool_addToDir_clicked();
- void on_tool_addNewFile_clicked();
- void tabChanged(int tab);
+ //Tab interactions
+ void tabChanged(int tab = -1);
void tabClosed(int tab = -1);
- void prevTab();
- void nextTab();
- void ItemRun( const QModelIndex&);
- //void ItemRun(QTreeWidgetItem *item);
- //void ItemRun(QListWidgetItem *item);
- void OpenContextMenu(const QPoint&);
- void ItemSelectionChanged();
-
- //Slideshow Functions
- void showNewPicture();
- void firstPicture();
- void prevPicture();
- void nextPicture();
- void lastPicture();
- void removePicture();
- void rotatePictureLeft();
- void rotatePictureRight();
-
- //ZFS Restore Functions
- void snapshotLoaded();
- void showSnapshot();
- void nextSnapshot();
- void prevSnapshot();
- void restoreItems();
+ void nextTab(); //For keyboard shortcuts
+ void prevTab(); //For keyboard shortcuts
- //Multimedia Player Functions
- void playerStart();
- void playerError();
- void playerStop();
- void playerPause();
- void playerNext();
- void playerPrevious();
- void playerFinished(); //automatically called by the media object
- void playerStatusChanged(QMediaPlayer::MediaStatus stat); //automatically called
- void playerStateChanged(QMediaPlayer::State newstate); //automatically called by the media object
- void playerVideoAvailable(bool showVideo); //automatically called by the media object
- void playerDurationChanged(qint64);
- void playerTimeChanged(qint64 ctime); //automatically called by the media object
- void playerSliderMoved(int);
- void playerSliderHeld();
- void playerSliderChanged();
- void playerFileChanged();
+ //Backend Info passing
+ void DirDataAvailable(QString, QString, LFileInfoList);
+ void SnapshotDataAvailable(QString, QString, QStringList);
- //Context Menu Actions
- void OpenItem(); //run "lumina-open" on it
- void OpenItemWith(); //run "lumina-open -select" on it
- //void OpenDir(); //open the dir in a new tab
- void RemoveItem(); //Remove the item permanently
- // - single item actions
- void RenameItem();
- void FavoriteItem();
- // - full selection actions
- void ViewPropertiesItem();
- void openTerminal();
- void CutItems();
- void CopyItems();
- void PasteItems();
- void ChecksumItems();
+ //Dir Browser Interactions
+ void OpenPlayer(LFileInfoList);
+ void OpenImages(LFileInfoList);
+ void OpenTerminal(QString dirpath);
+ void CutFiles(QStringList); //file selection
+ void CopyFiles(QStringList); //file selection
+ void PasteFiles(QString); //current dir
+ void FavoriteFiles(QStringList); //file selection
+ void RenameFiles(QStringList); //file selection
+ void RemoveFiles(QStringList); //file selection
+ void CloseBrowser(QString); //ID
//file info in status bar
void DisplayStatusBar(QString);
signals:
- void DirChanged(QString path);
void Si_AdaptStatusBar(QFileInfoList fileList, QString path, QString messageFolders, QString messageFiles);
protected:
bgstack15