1 /************************************************************************** 2 * Copyright (C) 2005-2020 by Oleksandr Shneyder * 3 * <o.shneyder@phoca-gmbh.de> * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * This program is distributed in the hope that it will be useful, * 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 * GNU General Public License for more details. * 13 * * 14 * You should have received a copy of the GNU General Public License * 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. * 16 ***************************************************************************/ 17 #ifndef FOLDEREXPLORER_H 18 #define FOLDEREXPLORER_H 19 #include "ui_folderexplorer.h" 20 class SessionExplorer; 21 class FolderExplorer: public QDialog, Ui_FolderExplorer 22 { 23 Q_OBJECT 24 public: 25 FolderExplorer(QString path, SessionExplorer* explorer, QWidget* parent=0); getCurrentPath()26 QString getCurrentPath() 27 { 28 return currentPath; 29 } 30 private: 31 SessionExplorer* explorer; 32 QTreeWidgetItem* root; 33 QTreeWidgetItem* menuItem; 34 QString currentPath; 35 void initFolders(QTreeWidgetItem* parent, QString path); 36 private slots: 37 void slotContextMenu(QPoint p); 38 void slotItemSelected(QTreeWidgetItem* it, int); 39 void slotNewFolder(); 40 void slotChangeName(); 41 void slotChangeIcon(); 42 void slotDeleteFolder(); 43 }; 44 #endif 45