• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • TDevelop Interfaces Library
 

TDevelop Interfaces Library

  • lib
  • interfaces
kdevplugin.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2002 Simon Hausmann <hausmann@kde.org>
3  Copyright (C) 2002 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
4  Copyright (C) 2002 Harald Fernengel <harry@kdevelop.org>
5  Copyright (C) 2002 F@lk Brettschneider <falkbr@kdevelop.org>
6  Copyright (C) 2003 Julian Rockey <linux@jrockey.com>
7  Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
8  Copyright (C) 2003 Jens Dagerbo <jens.dagerbo@swipnet.se>
9  Copyright (C) 2003 Mario Scalas <mario.scalas@libero.it>
10  Copyright (C) 2003-2004 Alexander Dymo <adymo@kdevelop.org>
11 
12  This library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU Library General Public
14  License as published by the Free Software Foundation; either
15  version 2 of the License, or (at your option) any later version.
16 
17  This library is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  Library General Public License for more details.
21 
22  You should have received a copy of the GNU Library General Public License
23  along with this library; see the file COPYING.LIB. If not, write to
24  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25  Boston, MA 02110-1301, USA.
26 */
27 #include "kdevplugin.h"
28 
29 #include "kdevapi.h"
30 #include "kdevcore.h"
31 #include "kdevplugininfo.h"
32 #include "kdevpartcontroller.h"
33 #include "kdevplugincontroller.h"
34 
35 #include <tdeaction.h>
36 #include <tdeglobal.h>
37 #include <kiconloader.h>
38 
39 #include <tqdom.h>
40 #include <tqmap.h>
41 
42 #include <assert.h>
43 
45 // struct KDevPlugin::Private
47 
48 struct KDevPlugin::Private
49 {
50  const KDevPluginInfo *info;
51 };
52 
54 // class KDevPlugin
56 
57 KDevPlugin::KDevPlugin(const KDevPluginInfo *info, TQObject *parent, const char *name)
58  :TQObject(parent, name), d(new Private)
59 {
60  assert(parent->inherits( "KDevApi" ));
61  m_api = static_cast<KDevApi *>( parent );
62 
63  actionCollection()->setHighlightingEnabled( true );
64 
65  d->info = info;
66  TDEGlobal::iconLoader()->addAppDir("tdevelop");
67 }
68 
69 KDevPlugin::~KDevPlugin()
70 {
71  delete( d );
72 }
73 
74 KDevMainWindow *KDevPlugin::mainWindow()
75 {
76  return m_api->mainWindow();
77 }
78 
79 KDevCore *KDevPlugin::core() const
80 {
81  return m_api->core();
82 }
83 
84 KDevProject *KDevPlugin::project() const
85 {
86  return m_api->project();
87 }
88 
89 CodeModel *KDevPlugin::codeModel() const
90 {
91  return m_api->codeModel();
92 }
93 
94 TQDomDocument *KDevPlugin::projectDom() const
95 {
96  return m_api->projectDom();
97 }
98 
99 KDevLanguageSupport *KDevPlugin::languageSupport() const
100 {
101  return m_api->languageSupport();
102 }
103 
104 KDevPartController *KDevPlugin::partController() const
105 {
106  return m_api->partController();
107 }
108 
109 KDevPluginController *KDevPlugin::pluginController() const
110 {
111  return m_api->pluginController();
112 }
113 
114 void KDevPlugin::restorePartialProjectSession(const TQDomElement* /*el*/)
115 {
116  // there's still nothing to do in the base class
117 }
118 
119 void KDevPlugin::savePartialProjectSession(TQDomElement* /*el*/)
120 {
121  // there's still nothing to do in the base class
122 }
123 
124 KDevCodeRepository * KDevPlugin::codeRepository() const
125 {
126  return m_api->codeRepository();
127 }
128 
129 KDevPlugin * KDevPlugin::extension_internal(const TQString &serviceType, const TQString &constraint)
130 {
131  return m_api->pluginController()->extension(serviceType, constraint);
132 }
133 
134 const KDevPluginInfo *KDevPlugin::info()
135 {
136  return d->info;
137 }
138 
139 #include "kdevplugin.moc"
KDevPlugin
The base class for all TDevelop plugins.
Definition: kdevplugin.h:107
KDevPlugin::partController
KDevPartController * partController() const
Definition: kdevplugin.cpp:104
KDevApi::partController
virtual KDevPartController * partController() const =0
KDevApi::languageSupport
KDevLanguageSupport * languageSupport() const
Definition: kdevapi.cpp:68
KDevPlugin::codeRepository
KDevCodeRepository * codeRepository() const
Definition: kdevplugin.cpp:124
KDevProject
KDevelop project interface.
Definition: kdevproject.h:48
KDevCodeRepository
Code repository - the persistent symbol store accessor.
Definition: kdevcoderepository.h:48
KDevApi::mainWindow
virtual KDevMainWindow * mainWindow() const =0
KDevPlugin::core
KDevCore * core() const
Definition: kdevplugin.cpp:79
KDevPlugin::mainWindow
KDevMainWindow * mainWindow()
Definition: kdevplugin.cpp:74
KDevPlugin::project
KDevProject * project() const
Definition: kdevplugin.cpp:84
kdevplugininfo.h
TDevelop plugin information container class.
KDevApi::pluginController
virtual KDevPluginController * pluginController() const =0
KDevPlugin::~KDevPlugin
virtual ~KDevPlugin()
Destructs a plugin.
Definition: kdevplugin.cpp:69
KDevPlugin::languageSupport
KDevLanguageSupport * languageSupport() const
Definition: kdevplugin.cpp:99
KDevApi
The interface to KDevelop&#39;s core components.
Definition: kdevapi.h:47
KDevPlugin::pluginController
virtual KDevPluginController * pluginController() const
Definition: kdevplugin.cpp:109
KDevPlugin::KDevPlugin
KDevPlugin(const KDevPluginInfo *info, TQObject *parent, const char *name=0)
Constructs a plugin.
Definition: kdevplugin.cpp:57
KDevPluginController::extension
virtual KDevPlugin * extension(const TQString &serviceType, const TQString &constraint="")=0
Queries for the plugin which supports given service type.
KDevLanguageSupport
KDevelop language support interface - the base class for all programming language support plugins...
Definition: kdevlanguagesupport.h:61
kdevcore.h
The interface to the application core and context menu classes.
KDevPlugin::projectDom
TQDomDocument * projectDom() const
Definition: kdevplugin.cpp:94
kdevapi.h
KDevelop API interface.
KDevMainWindow
KDevelop main window interface.
Definition: kdevmainwindow.h:40
KDevPluginController
The base class for TDevelop plugin controller.
Definition: kdevplugincontroller.h:39
KDevPlugin::codeModel
CodeModel * codeModel() const
Definition: kdevplugin.cpp:89
kdevpartcontroller.h
KDevelop part controller interface.
kdevplugin.h
TDevelop plugin interface.
KDevApi::codeRepository
KDevCodeRepository * codeRepository() const
Definition: kdevapi.cpp:88
kdevplugincontroller.h
TDevelop plugin controller interface.
KDevApi::project
KDevProject * project() const
Definition: kdevapi.cpp:58
CodeModel
Code Model - a memory symbol store.
Definition: codemodel.h:324
KDevApi::codeModel
virtual CodeModel * codeModel() const =0
KDevApi::projectDom
TQDomDocument * projectDom() const
Definition: kdevapi.cpp:78
KDevPlugin::restorePartialProjectSession
virtual void restorePartialProjectSession(const TQDomElement *el)
Override this base class method to restore any settings which differs from project to project...
Definition: kdevplugin.cpp:114
KDevPlugin::info
const KDevPluginInfo * info()
Provides an information about the plugin.
Definition: kdevplugin.cpp:134
KDevApi::core
virtual KDevCore * core() const =0
KDevPluginInfo
Information about TDevelop plugin.
Definition: kdevplugininfo.h:39
KDevPlugin::savePartialProjectSession
virtual void savePartialProjectSession(TQDomElement *el)
Saves session settings.
Definition: kdevplugin.cpp:119
KDevCore
A KDevCore class defines an object which takes care about the cooperation between the various plug-in...
Definition: kdevcore.h:300
KDevPartController
Interface to control loaded parts and other documents.
Definition: kdevpartcontroller.h:56

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for TDevelop Interfaces Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.