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

TDevelop Interfaces Library

  • lib
  • interfaces
kdevcore.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
3 Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
4 Copyright (C) 2001 Sandy Meier <smeier@kdevelop.org>
5 Copyright (C) 2002 Daniel Engelschalt <daniel.engelschalt@gmx.net>
6 Copyright (C) 2002 Simon Hausmann <hausmann@kde.org>
7 Copyright (C) 2002-2003 Roberto Raggi <roberto@kdevelop.org>
8 Copyright (C) 2003 Mario Scalas <mario.scalas@libero.it>
9 Copyright (C) 2003 Harald Fernengel <harry@kdevelop.org>
10 Copyright (C) 2003 Hamish Rodda <rodda@kde.org>
11 Copyright (C) 2004 Alexander Dymo <adymo@kdevelop.org>
12
13 This library is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Library General Public
15 License as published by the Free Software Foundation; either
16 version 2 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Library General Public License for more details.
22
23 You should have received a copy of the GNU Library General Public License
24 along with this library; see the file COPYING.LIB. If not, write to
25 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 Boston, MA 02110-1301, USA.
27*/
28#ifndef KDEVCORE_H
29#define KDEVCORE_H
30
36#include <tqstringlist.h>
37#include <tqdict.h>
38#include <tqobject.h>
39
40#include <kurl.h>
41
42class KDialogBase;
43class KDevPlugin;
44class CodeModelItem;
45class ProjectModelItem;
46
47namespace KParts
48{
49 class Part;
50}
51
52class TQStatusBar;
53class TQPopupMenu;
54
100class Context
101{
102public:
106 enum Type
107 {
108 EditorContext,
109 DocumentationContext,
110 FileContext,
111 ProjectModelItemContext,
112 CodeModelItemContext
113 };
114
116 virtual int type() const = 0;
117
120 virtual bool hasType(int type) const;
121
122protected:
124 Context();
125
127 virtual ~Context();
128};
129
131class EditorContext: public Context
132{
133public:
140 EditorContext(const KURL &url, int line, int col,
141 const TQString &linestr, const TQString &wordstr);
142
144 virtual ~EditorContext();
145
146 virtual int type() const;
147
149 const KURL &url() const;
150
152 int line() const;
153
155 int col() const;
156
159 TQString currentLine() const;
160
163 TQString currentWord() const;
164
165private:
166 class Private;
167 Private *d;
168
169 EditorContext( const EditorContext &);
170 EditorContext &operator=( const EditorContext &);
171};
172
173
177class DocumentationContext: public Context
178{
179public:
180
184 DocumentationContext(const TQString &url, const TQString &selection );
185
187 DocumentationContext(const DocumentationContext &);
188 DocumentationContext &operator=(const DocumentationContext &);
189
191 virtual ~DocumentationContext();
192
193 virtual int type() const;
194
196 TQString url() const;
197
199 TQString selection() const;
200
201private:
202 class Private;
203 Private *d;
204};
205
210class FileContext : public Context
211{
212public:
215 FileContext(const KURL::List &someURLs);
216
218 virtual ~FileContext();
219
220 virtual int type() const;
221
223 const KURL::List &urls() const;
224
225private:
226 class Private;
227 Private *d;
228
229 FileContext( const FileContext &);
230 FileContext &operator=( const FileContext &);
231};
232
236class CodeModelItemContext: public Context
237{
238public:
242 CodeModelItemContext(const CodeModelItem* item);
243
245 virtual ~CodeModelItemContext();
246
247 virtual int type() const;
248
250 const CodeModelItem* item() const;
251
252private:
253 class Private;
254 Private *d;
255
256 CodeModelItemContext( const CodeModelItemContext &);
257 CodeModelItemContext &operator=( const CodeModelItemContext &);
258};
259
263class ProjectModelItemContext : public Context
264{
265public:
268 ProjectModelItemContext(const ProjectModelItem* item);
269
271 virtual ~ProjectModelItemContext();
272
273 virtual int type() const;
274
276 const ProjectModelItem* item() const;
277
278private:
279 class Private;
280 Private *d;
281
282 ProjectModelItemContext( const ProjectModelItemContext &);
283 ProjectModelItemContext &operator=( const ProjectModelItemContext &);
284};
285
286
287
288
300class KDevCore: public TQObject
301{
302 TQ_OBJECT
303
304public:
308 KDevCore(TQObject *parent=0, const char *name=0);
309
311 virtual ~KDevCore();
312
323 virtual void fillContextMenu(TQPopupMenu *popup, const Context *context) = 0;
324
331 virtual void openProject(const TQString& projectFileName) = 0;
332
341 virtual void running(KDevPlugin *which, bool runs) = 0;
342
343signals:
346 void coreInitialized();
347
349 void projectOpened();
350
352 void projectClosed();
353
355 void languageChanged();
356
360 void stopButtonClicked(KDevPlugin *which);
361
369 void contextMenu(TQPopupMenu *popupMenu, const Context *context);
370
377 void configWidget(KDialogBase *dlg);
378
385 void projectConfigWidget(KDialogBase *dlg);
386};
387
388#endif
CodeModelItemContext
A context for the popup menu in class views.
Definition kdevcore.h:237
CodeModelItemContext::item
const CodeModelItem * item() const
Definition kdevcore.cpp:245
CodeModelItemContext::type
virtual int type() const
Implement this in the context so we can provide rtti.
Definition kdevcore.cpp:240
CodeModelItemContext::~CodeModelItemContext
virtual ~CodeModelItemContext()
Destructor.
Definition kdevcore.cpp:234
CodeModelItem
Item in code model (symbol store).
Definition codemodel.h:462
Context
Base class for every context.
Definition kdevcore.h:101
Context::hasType
virtual bool hasType(int type) const
Definition kdevcore.cpp:41
Context::~Context
virtual ~Context()
Destructor.
Definition kdevcore.cpp:37
Context::Context
Context()
Constructor.
Definition kdevcore.cpp:33
Context::type
virtual int type() const =0
Implement this in the context so we can provide rtti.
Context::Type
Type
Pre-defined context types.
Definition kdevcore.h:107
Context::EditorContext
@ EditorContext
Editor context menu.
Definition kdevcore.h:108
Context::FileContext
@ FileContext
File context menu.
Definition kdevcore.h:110
Context::DocumentationContext
@ DocumentationContext
Documentation browser context menu.
Definition kdevcore.h:109
Context::ProjectModelItemContext
@ ProjectModelItemContext
Project tree context menu.
Definition kdevcore.h:111
Context::CodeModelItemContext
@ CodeModelItemContext
Class tree context menu.
Definition kdevcore.h:112
DocumentationContext
A context for the popup menu in the documentation browser widget.
Definition kdevcore.h:178
DocumentationContext::selection
TQString selection() const
Definition kdevcore.cpp:212
DocumentationContext::~DocumentationContext
virtual ~DocumentationContext()
Destructor.
Definition kdevcore.cpp:196
DocumentationContext::type
virtual int type() const
Implement this in the context so we can provide rtti.
Definition kdevcore.cpp:202
DocumentationContext::url
TQString url() const
Definition kdevcore.cpp:207
EditorContext
A context for the popup menu in the editor.
Definition kdevcore.h:132
EditorContext::url
const KURL & url() const
Definition kdevcore.cpp:82
EditorContext::col
int col() const
Definition kdevcore.cpp:92
EditorContext::line
int line() const
Definition kdevcore.cpp:87
EditorContext::currentWord
TQString currentWord() const
Definition kdevcore.cpp:102
EditorContext::~EditorContext
virtual ~EditorContext()
Destructor.
Definition kdevcore.cpp:71
EditorContext::type
virtual int type() const
Implement this in the context so we can provide rtti.
Definition kdevcore.cpp:77
EditorContext::currentLine
TQString currentLine() const
Definition kdevcore.cpp:97
FileContext
A context for the popup menu in file views and other parts that show files.
Definition kdevcore.h:211
FileContext::urls
const KURL::List & urls() const
Definition kdevcore.cpp:155
FileContext::~FileContext
virtual ~FileContext()
Destructor.
Definition kdevcore.cpp:144
FileContext::type
virtual int type() const
Implement this in the context so we can provide rtti.
Definition kdevcore.cpp:150
KDevCore
A KDevCore class defines an object which takes care about the cooperation between the various plug-in...
Definition kdevcore.h:301
KDevCore::coreInitialized
void coreInitialized()
Emitted after the core has done all initializations and the main window has been shown.
KDevCore::running
virtual void running(KDevPlugin *which, bool runs)=0
Marks the component as running (or not running).
KDevCore::contextMenu
void contextMenu(TQPopupMenu *popupMenu, const Context *context)
A context menu has been requested somewhere.
KDevCore::languageChanged
void languageChanged()
The language support part has been changed.
KDevCore::projectClosed
void projectClosed()
The project is about to be closed.
KDevCore::configWidget
void configWidget(KDialogBase *dlg)
Expects that a configuration page for use in the KDevelop settings dialog is created by the component...
KDevCore::stopButtonClicked
void stopButtonClicked(KDevPlugin *which)
The user has clicked the stop button.
KDevCore::~KDevCore
virtual ~KDevCore()
Destructor.
Definition kdevcore.cpp:294
KDevCore::projectConfigWidget
void projectConfigWidget(KDialogBase *dlg)
Expects that a configuration page for use in the Project settings dialog is created by the component.
KDevCore::openProject
virtual void openProject(const TQString &projectFileName)=0
Closes the current project and open the new one.
KDevCore::fillContextMenu
virtual void fillContextMenu(TQPopupMenu *popup, const Context *context)=0
Fills the context menu.
KDevCore::projectOpened
void projectOpened()
A project has been opened.
KDevPlugin
The base class for all TDevelop plugins.
Definition kdevplugin.h:108
ProjectModelItemContext
A context for the popup menu in project views.
Definition kdevcore.h:264
ProjectModelItemContext::~ProjectModelItemContext
virtual ~ProjectModelItemContext()
Destructor.
Definition kdevcore.cpp:267
ProjectModelItemContext::item
const ProjectModelItem * item() const
Definition kdevcore.cpp:278
ProjectModelItemContext::type
virtual int type() const
Implement this in the context so we can provide rtti.
Definition kdevcore.cpp:273

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.9.8
This website is maintained by Timothy Pearson.