1 /***************************************************************************** 2 * Copyright (C) 2010 Jan Lepper <krusader@users.sourceforge.net> * 3 * Copyright (C) 2010-2019 Krusader Krew [https://krusader.org] * 4 * * 5 * This file is part of Krusader [https://krusader.org]. * 6 * * 7 * Krusader is free software: you can redistribute it and/or modify * 8 * it under the terms of the GNU General Public License as published by * 9 * the Free Software Foundation, either version 2 of the License, or * 10 * (at your option) any later version. * 11 * * 12 * Krusader is distributed in the hope that it will be useful, * 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 15 * GNU General Public License for more details. * 16 * * 17 * You should have received a copy of the GNU General Public License * 18 * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * 19 *****************************************************************************/ 20 21 22 #ifndef KRPANEL_H 23 #define KRPANEL_H 24 25 // QtCore 26 #include <QUrl> 27 28 class AbstractPanelManager; 29 class ListPanelFunc; 30 class ListPanel; 31 class KrView; 32 33 class KrPanel 34 { 35 public: KrPanel(AbstractPanelManager * manager,ListPanel * panel,ListPanelFunc * func)36 KrPanel(AbstractPanelManager *manager, ListPanel *panel, ListPanelFunc *func) : 37 gui(panel), func(func), view(0), _manager(manager) {} ~KrPanel()38 virtual ~KrPanel() {} 39 QUrl virtualPath() const; // the current directory path of this panel manager()40 AbstractPanelManager *manager() const { 41 return _manager; 42 } 43 KrPanel *otherPanel() const; 44 bool isLeft() const; 45 virtual void otherPanelChanged() = 0; 46 47 ListPanel *const gui; 48 ListPanelFunc *const func; 49 KrView *view; 50 51 protected: 52 AbstractPanelManager *_manager; 53 }; 54 55 #endif 56