diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 20 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.h | 4 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.ui | 1 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 32 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h | 12 |
5 files changed, 39 insertions, 30 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 0de89b2e..f1ffe0d8 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -94,6 +94,7 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize(); nextTabRShort = new QShortcut( QKeySequence(tr("Shift+Right")), this); togglehiddenfilesShort = new QShortcut( QKeySequence(tr("Ctrl+H")), this); focusDirWidgetShort = new QShortcut( QKeySequence(tr("Ctrl+L")), this); + toggledirtreepaneShort = new QShortcut( QKeySequence(tr("Ctrl+P")), this); //Finish loading the interface workThread->start(); @@ -181,7 +182,7 @@ void MainUI::OpenDirs(QStringList dirs){ DW->setThumbnailSize(settings->value("iconsize", 32).toInt()); DW->showHidden( ui->actionView_Hidden_Files->isChecked() ); DW->showThumbnails( ui->actionShow_Thumbnails->isChecked() ); - DW->showHidden( ui->actionView_showDirTreePane->isChecked() ); + DW->showDirTreePane( ui->actionView_showDirTreePane->isChecked() ); //Now load the directory DW->ChangeDir(dirs[i]); //kick off loading the directory info } @@ -255,7 +256,7 @@ void MainUI::setupConnections(){ connect(nextTabRShort, SIGNAL(activated()), this, SLOT( nextTab() ) ); connect(togglehiddenfilesShort, SIGNAL(activated()), this, SLOT( togglehiddenfiles() ) ); connect(focusDirWidgetShort, SIGNAL(activated()), this, SLOT( focusDirWidget() ) ); - connect(toggledirtreepanelShort, SIGNAL(activated()), this, SLOT( toggleDirTreePane() ) ); + connect(toggledirtreepaneShort, SIGNAL(activated()), this, SLOT( toggleDirTreePane() ) ); } @@ -276,9 +277,9 @@ void MainUI::togglehiddenfiles() void MainUI::toggleDirTreePane() { //change setChecked to inverse value - ui->actionView_Hidden_Files->setChecked( !settings->value("showhidden", true).toBool() ); + ui->actionView_Hidden_Files->setChecked( !settings->value("showdirtree", true).toBool() ); // then trigger function - on_showDirTreePane_triggered(); + on_actionView_showDirTreePane_triggered(); } void MainUI::loadSettings(){ @@ -288,6 +289,9 @@ void MainUI::loadSettings(){ on_actionView_Hidden_Files_triggered(); //make sure to update the models too ui->actionShow_Thumbnails->setChecked( settings->value("showthumbnails",true).toBool()); on_actionShow_Thumbnails_triggered(); //make sure to update models too + ui->actionView_showDirTreePane->setChecked( settings->value("showdirtree", false).toBool()); + on_actionView_showDirTreePane_triggered(); //make sure to update the models too + //ui->actionShow_Action_Buttons->setChecked(settings->value("showactions", true).toBool() ); //on_actionShow_Action_Buttons_triggered(); //make sure to update the UI //ui->actionShow_Thumbnails->setChecked( settings->value("showthumbnails", true).toBool() ); @@ -487,6 +491,14 @@ void MainUI::on_actionView_Hidden_Files_triggered(){ } +void MainUI::on_actionView_showDirTreePane_triggered(){ + //worker->showdirtree = ui->actionView_showDirTreePane->isChecked(); + settings->setValue("showdirtree", ui->actionView_showDirTreePane->isChecked()); +//Re-load the current browsers + +} + + /*void MainUI::on_actionShow_Action_Buttons_triggered(){ bool show = ui->actionShow_Action_Buttons->isChecked(); settings->setValue("showactions", show); diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h index 13500050..84ab5a64 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.h +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.h @@ -91,7 +91,7 @@ private: bool waitingToClose; QSettings *settings; - QShortcut *nextTabLShort, *nextTabRShort, *togglehiddenfilesShort, *focusDirWidgetShort, *toggledirtreepanelShort; + QShortcut *nextTabLShort, *nextTabRShort, *togglehiddenfilesShort, *focusDirWidgetShort, *toggledirtreepaneShort; //QCompleter *dirCompleter; //Simplification Functions @@ -128,7 +128,7 @@ private slots: void on_actionView_Hidden_Files_triggered(); void on_actionView_showDirTreePane_triggered(); //void on_actionShow_Action_Buttons_triggered(); - void on_showDirTreePane_triggered(); + void on_actionShow_Thumbnails_triggered(); void goToBookmark(QAction*); void goToDevice(QAction*); void viewModeChanged(bool); diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.ui b/src-qt5/desktop-utils/lumina-fm/MainUI.ui index d111cb85..744f31a3 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.ui +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.ui @@ -134,7 +134,6 @@ <addaction name="actionRefresh"/> <addaction name="separator"/> <addaction name="actionView_Hidden_Files"/> - <addaction name="actionView_showDirTreePane"/> <addaction name="separator"/> <addaction name="actionShow_Thumbnails"/> <addaction name="menuView_Mode"/> diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp index 64cb4718..a2adc94f 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -70,7 +70,6 @@ dirtreeModel->setFilter(QDir::NoDotAndDotDot | QDir::AllDirs); // remove extraneous dirs dirtreeModel->setRootPath(folderTreePath); //ui->folderViewPane->setModel(dirtreeModel) - //ui->folderViewPane->setVisible(false); // set hidden initially to preserve legacy appearance of lumina-fm //Now update the rest of the UI canmodify = false; //initial value @@ -139,6 +138,21 @@ ui->tool_zoom_out->setEnabled(px >16); //lower limit on image sizes } + //==================== + // Folder Pane + //==================== + + void DirWidget::showDirTreePane(bool show){ + if(show !=showdirtree){ + showdirtree = show; + } + } + + bool DirWidget::showingDirTreePane(){ + return showdirtree; + } + + // ================ // PUBLIC SLOTS // ================ @@ -223,7 +237,6 @@ kOpSS= new QShortcut(QKeySequence(Qt::Key_F6),this); kOpMM= new QShortcut(QKeySequence(Qt::Key_F7),this); kOpTerm = new QShortcut(QKeySequence(Qt::Key_F1),this); -// kTreePane = new QShortcut(QKeySequence(Qt::CTRL+Qt::Key_P),this); connect(kZoomIn, SIGNAL(activated()), this, SLOT(on_tool_zoom_in_clicked()) ); connect(kZoomOut, SIGNAL(activated()), this, SLOT(on_tool_zoom_out_clicked()) ); @@ -750,21 +763,6 @@ if(!list.isEmpty()){ emit PlayFiles(list); } } - //==================== - // Folder Pane - //==================== - - void DirWidget::showDirTreePane(bool showdirtree){ - if(showdirtree !=showHidden){ - showHidden = showdirtree; - if(!currentDir.isEmpty()){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } - } - } - - bool DirWidget::showingDirTreePane(){ - return showHidden; - } - //==================== // PROTECTED diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h index 3626e85d..aca4f0fe 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h @@ -44,15 +44,17 @@ public: //Information QString id(); QString currentDir(); - QFileSystemModel dirtreeModel; + QFileSystemModel *dirtreeModel; //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); @@ -63,8 +65,6 @@ public slots: //Theme change functions void UpdateIcons(); void UpdateText(); - void showDirTreePane(bool); - bool showingDirTreePane(); private: @@ -73,7 +73,7 @@ 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; |