~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to parts/konsole/konsoleviewpart.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2003 by KDevelop Authors                                *
 
3
 *   kdevelop-devel@kde.org                                                *
 
4
 *                                                                         *
 
5
 *   This program is free software; you can redistribute it and/or modify  *
 
6
 *   it under the terms of the GNU General Public License as published by  *
 
7
 *   the Free Software Foundation; either version 2 of the License, or     *
 
8
 *   (at your option) any later version.                                   *
 
9
 *                                                                         *
 
10
 ***************************************************************************/
 
11
 
 
12
#include "konsoleviewpart.h"
 
13
 
 
14
#include <qwhatsthis.h>
 
15
 
 
16
#include <kdevgenericfactory.h>
 
17
#include <kiconloader.h>
 
18
#include <klocale.h>
 
19
 
 
20
#include "kdevcore.h"
 
21
#include "kdevmainwindow.h"
 
22
#include "kdevplugininfo.h"
 
23
 
 
24
#include "konsoleviewwidget.h"
 
25
 
 
26
 
 
27
static const KDevPluginInfo data("kdevkonsoleview");
 
28
K_EXPORT_COMPONENT_FACTORY( libkdevkonsoleview, KDevGenericFactory<KonsoleViewPart>( data ) )
 
29
 
 
30
KonsoleViewPart::KonsoleViewPart(QObject *parent, const char *name, const QStringList &)
 
31
  : KDevPlugin(&data, parent, name ? name : "KonsoleViewPart")
 
32
{
 
33
    m_widget = new KonsoleViewWidget(this);
 
34
 
 
35
    QWhatsThis::add(m_widget, i18n("<b>Konsole</b><p>"
 
36
        "This window contains an embedded konsole window. It will try to follow you when "
 
37
        "you navigate in the source directories")
 
38
    );
 
39
 
 
40
    m_widget->setIcon( SmallIcon("konsole") );
 
41
    m_widget->setCaption(i18n("Konsole"));
 
42
    
 
43
    mainWindow()->embedOutputView(m_widget, i18n("Konsole"), i18n("Embedded console window"));
 
44
}
 
45
 
 
46
 
 
47
KonsoleViewPart::~KonsoleViewPart()
 
48
{
 
49
    if ( m_widget )
 
50
        mainWindow()->removeView( m_widget );
 
51
    delete m_widget;
 
52
}
 
53
 
 
54
 
 
55
#include "konsoleviewpart.moc"