File indexing completed on 2024-04-28 05:49:07
0001 /* This file is part of the Kate project. 0002 * 0003 * SPDX-FileCopyrightText: 2010 Christoph Cullmann <cullmann@kde.org> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include <QTabWidget> 0011 0012 class KateProjectPluginView; 0013 class KateProject; 0014 class KateProjectInfoViewTerminal; 0015 0016 /** 0017 * Class representing a view of a project. 0018 * A tree like view of project content. 0019 */ 0020 class KateProjectInfoView : public QTabWidget 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 /** 0026 * construct project info view for given project 0027 * @param pluginView our plugin view 0028 * @param project project this view is for 0029 */ 0030 KateProjectInfoView(KateProjectPluginView *pluginView, KateProject *project); 0031 0032 /** 0033 * deconstruct info view 0034 */ 0035 ~KateProjectInfoView() override; 0036 0037 /** 0038 * our project. 0039 * @return project 0040 */ 0041 KateProject *project() const 0042 { 0043 return m_project; 0044 } 0045 0046 void showEvent(QShowEvent *) override; 0047 0048 /** 0049 * Shall the ESC key press be ignored? 0050 * If not, the toolview will be hidden. 0051 * @return ignore ESC shortcut? 0052 */ 0053 bool ignoreEsc() const; 0054 0055 void resetTerminal(const QString &directory); 0056 0057 void runCmdInTerminal(const QString &workingDir, const QString &cmd); 0058 0059 private: 0060 /** 0061 * our project 0062 */ 0063 KateProject *m_project; 0064 0065 KateProjectInfoViewTerminal *m_terminal; 0066 };