File indexing completed on 2024-04-28 16:26:31

0001 /**********************************************************************
0002  Copyright (C) 2001 - 2003 by Brachet Pascal
0003                2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
0004                2007-2019 by Michel Ludwig (michel.ludwig@kdemail.net)
0005  **********************************************************************/
0006 
0007 /***************************************************************************
0008  *                                                                         *
0009  *   This program is free software; you can redistribute it and/or modify  *
0010  *   it under the terms of the GNU General Public License as published by  *
0011  *   the Free Software Foundation; either version 2 of the License, or     *
0012  *   (at your option) any later version.                                   *
0013  *                                                                         *
0014  ***************************************************************************/
0015 
0016 #ifndef KONSOLEWIDGET_H
0017 #define KONSOLEWIDGET_H
0018 
0019 #include <QFrame>
0020 #include <QShowEvent>
0021 
0022 namespace KParts {
0023 class ReadOnlyPart;
0024 }
0025 
0026 class KileInfo;
0027 
0028 namespace KileWidget
0029 {
0030 class Konsole : public QFrame
0031 {
0032     Q_OBJECT
0033 
0034 public:
0035     Konsole(KileInfo *, QWidget* parent);
0036     ~Konsole();
0037 
0038 public Q_SLOTS:
0039     void setDirectory(const QString& dir);
0040     void activate();
0041     void sync();
0042 
0043 private Q_SLOTS:
0044     void slotDestroyed();
0045 
0046 protected:
0047     void showEvent(QShowEvent *ev) override;
0048     void spawn();
0049 
0050 private:
0051     KParts::ReadOnlyPart    *m_part;
0052     bool            m_bPresent;
0053     KileInfo        *m_ki;
0054     QString         m_currentDir;
0055 };
0056 }
0057 
0058 #endif