diff options
author | q5sys <jt@obs-sec.com> | 2017-06-13 12:37:41 -0400 |
---|---|---|
committer | q5sys <jt@obs-sec.com> | 2017-06-13 12:37:41 -0400 |
commit | 3dfc37ec6be3e1cf08c5953df66703ccc49413b1 (patch) | |
tree | a256bea8b0e8e17455de2eb521c652a5c1c011db | |
parent | add dirtreepane prototype code (diff) | |
download | lumina-3dfc37ec6be3e1cf08c5953df66703ccc49413b1.tar.gz lumina-3dfc37ec6be3e1cf08c5953df66703ccc49413b1.tar.bz2 lumina-3dfc37ec6be3e1cf08c5953df66703ccc49413b1.zip |
redo dirtreepane to work the same as other options
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 11 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.h | 6 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.ui | 19 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 15 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h | 4 |
5 files changed, 43 insertions, 12 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 9962a4bf..0de89b2e 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -181,6 +181,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() ); //Now load the directory DW->ChangeDir(dirs[i]); //kick off loading the directory info } @@ -254,6 +255,8 @@ 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() ) ); + } void MainUI::focusDirWidget() @@ -270,6 +273,14 @@ void MainUI::togglehiddenfiles() on_actionView_Hidden_Files_triggered(); } +void MainUI::toggleDirTreePane() +{ + //change setChecked to inverse value + ui->actionView_Hidden_Files->setChecked( !settings->value("showhidden", true).toBool() ); + // then trigger function + on_showDirTreePane_triggered(); +} + void MainUI::loadSettings(){ //Note: make sure this is run after all the UI elements are created and connected to slots // but before the first directory gets loaded diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h index 9f542ea9..13500050 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; + QShortcut *nextTabLShort, *nextTabRShort, *togglehiddenfilesShort, *focusDirWidgetShort, *toggledirtreepanelShort; //QCompleter *dirCompleter; //Simplification Functions @@ -126,8 +126,9 @@ private slots: void on_actionDelete_Selection_triggered();*/ void on_actionRefresh_triggered(); void on_actionView_Hidden_Files_triggered(); + void on_actionView_showDirTreePane_triggered(); //void on_actionShow_Action_Buttons_triggered(); - void on_actionShow_Thumbnails_triggered(); + void on_showDirTreePane_triggered(); void goToBookmark(QAction*); void goToDevice(QAction*); void viewModeChanged(bool); @@ -148,6 +149,7 @@ private slots: //Other Shortcuts void togglehiddenfiles(); + void toggleDirTreePane(); void focusDirWidget(); //Backend Info passing diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.ui b/src-qt5/desktop-utils/lumina-fm/MainUI.ui index 189b563f..d111cb85 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.ui +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.ui @@ -69,7 +69,7 @@ <x>0</x> <y>0</y> <width>567</width> - <height>367</height> + <height>359</height> </rect> </property> <layout class="QHBoxLayout" name="BrowserLayout"> @@ -106,7 +106,7 @@ <x>0</x> <y>0</y> <width>567</width> - <height>24</height> + <height>28</height> </rect> </property> <widget class="QMenu" name="menuFile"> @@ -134,6 +134,7 @@ <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"/> @@ -420,6 +421,20 @@ <string>Clone Repository</string> </property> </action> + <action name="actionView_showDirTreePane"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Show Directory Tree Window</string> + </property> + <property name="toolTip"> + <string>Show Directory Tree Pane</string> + </property> + <property name="shortcut"> + <string>Ctrl+P</string> + </property> + </action> </widget> <resources/> <connections/> diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp index 377a92d8..64cb4718 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -223,7 +223,7 @@ 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_),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()) ); @@ -754,12 +754,15 @@ // Folder Pane //==================== - void DirWidget::showFolderPane(){ - //ui->folderViewPane->setVisible(true); - } + void DirWidget::showDirTreePane(bool showdirtree){ + if(showdirtree !=showHidden){ + showHidden = showdirtree; + if(!currentDir.isEmpty()){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } + } + } - void DirWidget::hideFolderPane(){ - //ui->folderViewPane->setVisible(false); + bool DirWidget::showingDirTreePane(){ + return showHidden; } diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h index c8453e65..3626e85d 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h @@ -63,8 +63,8 @@ public slots: //Theme change functions void UpdateIcons(); void UpdateText(); - void showFolderPane(); - void hideFolderPane(); + void showDirTreePane(bool); + bool showingDirTreePane(); private: |