KDevelop API Documentation

konsoleviewpart.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2003 by KDevelop Authors                                *
00003  *   kdevelop-devel@kde.org                                                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  ***************************************************************************/
00011 
00012 #include "konsoleviewpart.h"
00013 
00014 #include <qwhatsthis.h>
00015 
00016 #include <kdevgenericfactory.h>
00017 #include <kiconloader.h>
00018 #include <klocale.h>
00019 
00020 #include "kdevcore.h"
00021 #include "kdevmainwindow.h"
00022 
00023 #include "konsoleviewwidget.h"
00024 
00025 
00026 static const KAboutData data("kdevkonsoleview", I18N_NOOP("Konsole"), "1.0");
00027 K_EXPORT_COMPONENT_FACTORY( libkdevkonsoleview, KDevGenericFactory<KonsoleViewPart>( &data ) )
00028 
00029 KonsoleViewPart::KonsoleViewPart(QObject *parent, const char *name, const QStringList &)
00030   : KDevPlugin("Konsole", "konsole", parent, name ? name : "KonsoleViewPart")
00031 {
00032     m_widget = new KonsoleViewWidget(this);
00033 
00034     QWhatsThis::add(m_widget, i18n("<b>Konsole</b><p>"
00035         "This window contains an embedded konsole window. It will try to follow you when "
00036         "you navigate in the source directories")
00037     );
00038 
00039     m_widget->setIcon( SmallIcon("konsole") );
00040     m_widget->setCaption(i18n("Konsole"));
00041     
00042     mainWindow()->embedOutputView(m_widget, i18n("Konsole"), i18n("Embedded console window"));
00043 }
00044 
00045 
00046 KonsoleViewPart::~KonsoleViewPart()
00047 {
00048     if ( m_widget )
00049         mainWindow()->removeView( m_widget );
00050     delete m_widget;
00051 }
00052 
00053 
00054 #include "konsoleviewpart.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:57 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003