• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

Part.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2007 by Robert Knight <robertknight@gmail.com>
00003 
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with this program; if not, write to the Free Software
00016     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301  USA.
00018 */
00019 
00020 #ifndef PART_H
00021 #define PART_H
00022 
00023 // KDE
00024 #include <KParts/Factory>
00025 #include <KParts/Part>
00026 #include <kde_terminal_interface.h>
00027 
00028 class QAction;
00029 class QStringList;
00030 
00031 namespace Konsole
00032 {
00033 class Session;
00034 class SessionController;
00035 class ViewManager;
00036 class ViewProperties;
00037 
00041 class PartFactory : public KParts::Factory
00042 {
00043 protected:
00045     virtual KParts::Part* createPartObject(QWidget* parentWidget = 0,
00046                                            QObject* parent = 0,
00047                                            const char* classname = "KParts::Part",
00048                                            const QStringList& args = QStringList());
00049 };
00050 
00055 class Part : public KParts::ReadOnlyPart , public TerminalInterface
00056 {
00057 Q_OBJECT
00058     Q_INTERFACES(TerminalInterface) 
00059 public:
00061     explicit Part(QWidget* parentWidget , QObject* parent = 0);
00062     virtual ~Part();
00063 
00065     virtual void startProgram( const QString& program,
00066                                const QStringList& arguments );
00068     virtual void showShellInDir( const QString& dir );
00070     virtual void sendInput( const QString& text );
00071 
00072 public slots:
00082     void showManageProfilesDialog(QWidget* parent);
00092     void showEditCurrentProfileDialog(QWidget* parent);
00102     void changeSessionSettings(const QString& text);
00103 
00104 protected:
00106     virtual bool openFile();
00107 
00108 private slots:
00109     // creates a new session using the specified key.
00110     // call the run() method on the returned Session instance to begin the session
00111     Session* createSession(const QString& key);
00112     void activeViewChanged(SessionController* controller);
00113     void activeViewTitleChanged(ViewProperties* properties);
00114     void showManageProfilesDialog();
00115     void terminalExited();
00116     void newTab();
00117 
00118 private:
00119     Session* activeSession() const;
00120     void setupActionsForSession(SessionController* session);
00121     void createGlobalActions();
00122     bool transparencyAvailable();
00123 
00124 private:
00125     ViewManager* _viewManager;
00126     SessionController* _pluggedController;
00127     QAction* _manageProfilesAction;
00128 };
00129 
00130 }
00131 
00132 #endif // PART_H

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal