• 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 
42 class KDialogBase;
43 class KDevPlugin;
44 class CodeModelItem;
45 class ProjectModelItem;
46 
47 namespace KParts
48 {
49  class Part;
50 }
51 
52 class TQStatusBar;
53 class TQPopupMenu;
54 
100 class Context
101 {
102 public:
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 
122 protected:
124  Context();
125 
127  virtual ~Context();
128 };
129 
131 class EditorContext: public Context
132 {
133 public:
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 
165 private:
166  class Private;
167  Private *d;
168 
169  EditorContext( const EditorContext &);
170  EditorContext &operator=( const EditorContext &);
171 };
172 
173 
177 class DocumentationContext: public Context
178 {
179 public:
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 
201 private:
202  class Private;
203  Private *d;
204 };
205 
210 class FileContext : public Context
211 {
212 public:
215  FileContext(const KURL::List &someURLs);
216 
218  virtual ~FileContext();
219 
220  virtual int type() const;
221 
223  const KURL::List &urls() const;
224 
225 private:
226  class Private;
227  Private *d;
228 
229  FileContext( const FileContext &);
230  FileContext &operator=( const FileContext &);
231 };
232 
236 class CodeModelItemContext: public Context
237 {
238 public:
242  CodeModelItemContext(const CodeModelItem* item);
243 
245  virtual ~CodeModelItemContext();
246 
247  virtual int type() const;
248 
250  const CodeModelItem* item() const;
251 
252 private:
253  class Private;
254  Private *d;
255 
256  CodeModelItemContext( const CodeModelItemContext &);
257  CodeModelItemContext &operator=( const CodeModelItemContext &);
258 };
259 
263 class ProjectModelItemContext : public Context
264 {
265 public:
268  ProjectModelItemContext(const ProjectModelItem* item);
269 
271  virtual ~ProjectModelItemContext();
272 
273  virtual int type() const;
274 
276  const ProjectModelItem* item() const;
277 
278 private:
279  class Private;
280  Private *d;
281 
282  ProjectModelItemContext( const ProjectModelItemContext &);
283  ProjectModelItemContext &operator=( const ProjectModelItemContext &);
284 };
285 
286 
287 
288 
300 class KDevCore: public TQObject
301 {
302  Q_OBJECT
303 
304 public:
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 
343 signals:
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
KDevPlugin
The base class for all TDevelop plugins.
Definition: kdevplugin.h:107
FileContext
A context for the popup menu in file views and other parts that show files.
Definition: kdevcore.h:210
Context
Base class for every context.
Definition: kdevcore.h:100
DocumentationContext
A context for the popup menu in the documentation browser widget.
Definition: kdevcore.h:177
Context::DocumentationContext
Documentation browser context menu.
Definition: kdevcore.h:109
EditorContext
A context for the popup menu in the editor.
Definition: kdevcore.h:131
Context::Type
Type
Pre-defined context types.
Definition: kdevcore.h:106
CodeModelItem
Item in code model (symbol store).
Definition: codemodel.h:461
Context::FileContext
File context menu.
Definition: kdevcore.h:110
ProjectModelItemContext
A context for the popup menu in project views.
Definition: kdevcore.h:263
Context::ProjectModelItemContext
Project tree context menu.
Definition: kdevcore.h:111
Context::EditorContext
Editor context menu.
Definition: kdevcore.h:108
CodeModelItemContext
A context for the popup menu in class views.
Definition: kdevcore.h:236
KParts
Definition: kdevcore.h:47
KDevCore
A KDevCore class defines an object which takes care about the cooperation between the various plug-in...
Definition: kdevcore.h:300

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.