You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
3.7 KiB
140 lines
3.7 KiB
15 years ago
|
/* This file is part of the KDE project
|
||
|
Copyright (C) 2002 Simon Hausmann <hausmann@kde.org>
|
||
|
Copyright (C) 2002 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
|
||
11 years ago
|
Copyright (C) 2002 Harald Fernengel <harry@kdevelop.org>
|
||
|
Copyright (C) 2002 F@lk Brettschneider <falkbr@kdevelop.org>
|
||
15 years ago
|
Copyright (C) 2003 Julian Rockey <linux@jrockey.com>
|
||
11 years ago
|
Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
|
||
15 years ago
|
Copyright (C) 2003 Jens Dagerbo <jens.dagerbo@swipnet.se>
|
||
|
Copyright (C) 2003 Mario Scalas <mario.scalas@libero.it>
|
||
11 years ago
|
Copyright (C) 2003-2004 Alexander Dymo <adymo@kdevelop.org>
|
||
15 years ago
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License as published by the Free Software Foundation; either
|
||
|
version 2 of the License, or (at your option) any later version.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
15 years ago
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
15 years ago
|
*/
|
||
11 years ago
|
#include "tdevplugin.h"
|
||
15 years ago
|
|
||
11 years ago
|
#include "tdevapi.h"
|
||
|
#include "tdevcore.h"
|
||
|
#include "tdevplugininfo.h"
|
||
|
#include "tdevpartcontroller.h"
|
||
|
#include "tdevplugincontroller.h"
|
||
15 years ago
|
|
||
12 years ago
|
#include <tdeaction.h>
|
||
12 years ago
|
#include <tdeglobal.h>
|
||
15 years ago
|
#include <kiconloader.h>
|
||
|
|
||
15 years ago
|
#include <tqdom.h>
|
||
|
#include <tqmap.h>
|
||
15 years ago
|
|
||
|
#include <assert.h>
|
||
|
|
||
|
///////////////////////////////////////////////////////////////////////////////
|
||
11 years ago
|
// struct TDevPlugin::Private
|
||
15 years ago
|
///////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
11 years ago
|
struct TDevPlugin::Private
|
||
15 years ago
|
{
|
||
11 years ago
|
const TDevPluginInfo *info;
|
||
15 years ago
|
};
|
||
|
|
||
|
///////////////////////////////////////////////////////////////////////////////
|
||
11 years ago
|
// class TDevPlugin
|
||
15 years ago
|
///////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
11 years ago
|
TDevPlugin::TDevPlugin(const TDevPluginInfo *info, TQObject *parent, const char *name)
|
||
14 years ago
|
:TQObject(parent, name), d(new Private)
|
||
15 years ago
|
{
|
||
11 years ago
|
assert(parent->inherits( "TDevApi" ));
|
||
|
m_api = static_cast<TDevApi *>( parent );
|
||
15 years ago
|
|
||
|
actionCollection()->setHighlightingEnabled( true );
|
||
|
|
||
|
d->info = info;
|
||
12 years ago
|
TDEGlobal::iconLoader()->addAppDir("tdevelop");
|
||
15 years ago
|
}
|
||
|
|
||
11 years ago
|
TDevPlugin::~TDevPlugin()
|
||
15 years ago
|
{
|
||
|
delete( d );
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevMainWindow *TDevPlugin::mainWindow()
|
||
15 years ago
|
{
|
||
|
return m_api->mainWindow();
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevCore *TDevPlugin::core() const
|
||
15 years ago
|
{
|
||
|
return m_api->core();
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevProject *TDevPlugin::project() const
|
||
15 years ago
|
{
|
||
|
return m_api->project();
|
||
|
}
|
||
|
|
||
11 years ago
|
CodeModel *TDevPlugin::codeModel() const
|
||
15 years ago
|
{
|
||
|
return m_api->codeModel();
|
||
|
}
|
||
|
|
||
11 years ago
|
TQDomDocument *TDevPlugin::projectDom() const
|
||
15 years ago
|
{
|
||
|
return m_api->projectDom();
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevLanguageSupport *TDevPlugin::languageSupport() const
|
||
15 years ago
|
{
|
||
|
return m_api->languageSupport();
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevPartController *TDevPlugin::partController() const
|
||
15 years ago
|
{
|
||
|
return m_api->partController();
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevPluginController *TDevPlugin::pluginController() const
|
||
15 years ago
|
{
|
||
|
return m_api->pluginController();
|
||
|
}
|
||
|
|
||
11 years ago
|
void TDevPlugin::restorePartialProjectSession(const TQDomElement* /*el*/)
|
||
15 years ago
|
{
|
||
|
// there's still nothing to do in the base class
|
||
|
}
|
||
|
|
||
11 years ago
|
void TDevPlugin::savePartialProjectSession(TQDomElement* /*el*/)
|
||
15 years ago
|
{
|
||
|
// there's still nothing to do in the base class
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevCodeRepository * TDevPlugin::codeRepository() const
|
||
15 years ago
|
{
|
||
|
return m_api->codeRepository();
|
||
|
}
|
||
|
|
||
11 years ago
|
TDevPlugin * TDevPlugin::extension_internal(const TQString &serviceType, const TQString &constraint)
|
||
15 years ago
|
{
|
||
|
return m_api->pluginController()->extension(serviceType, constraint);
|
||
|
}
|
||
|
|
||
11 years ago
|
const TDevPluginInfo *TDevPlugin::info()
|
||
15 years ago
|
{
|
||
|
return d->info;
|
||
|
}
|
||
|
|
||
11 years ago
|
#include "tdevplugin.moc"
|