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

TDevelop Interfaces Library

  • lib
  • interfaces
kdevlanguagesupport.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2001 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
3  Copyright (C) 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
4  Copyright (C) 2002-2003 Roberto Raggi <roberto@kdevelop.org>
5  Copyright (C) 2002 Simon Hausmann <hausmann@kde.org>
6  Copyright (C) 2002 F@lk Brettschneider <falkbr@kdevelop.org>
7  Copyright (C) 2003 Alexander Dymo <adymo@kdevelop.org>
8  Copyright (C) 2003 Amilcar do Carmo Lucas <amilcar@ida.ing.tu-bs.de>
9 
10  This library is free software; you can redistribute it and/or
11  modify it under the terms of the GNU Library General Public
12  License as published by the Free Software Foundation; either
13  version 2 of the License, or (at your option) any later version.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Library General Public License for more details.
19 
20  You should have received a copy of the GNU Library General Public License
21  along with this library; see the file COPYING.LIB. If not, write to
22  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23  Boston, MA 02110-1301, USA.
24 */
25 #include "codemodel.h"
26 
27 #include <kdebug.h>
28 
29 #include "kdevdesignerintegration.h"
30 #include "kdevlanguagesupport.h"
31 
32 KDevLanguageSupport::KDevLanguageSupport(const KDevPluginInfo *info, TQObject *parent, const char *name)
33  : KDevPlugin(info, parent, name ? name : "KDevLanguageSupport" )
34 {
35 }
36 
37 KDevLanguageSupport::~KDevLanguageSupport()
38 {
39 }
40 
41 KDevLanguageSupport::Features KDevLanguageSupport::features()
42 {
43  return Features(0);
44 }
45 
46 KMimeType::List KDevLanguageSupport::mimeTypes()
47 {
48  return KMimeType::List();
49 }
50 
51 TQString KDevLanguageSupport::formatTag( const Tag& /*tag*/ )
52 {
53  return TQString();
54 }
55 
56 TQString KDevLanguageSupport::formatClassName(const TQString &name)
57 {
58  return name;
59 }
60 
61 TQString KDevLanguageSupport::unformatClassName(const TQString &name)
62 {
63  return name;
64 }
65 
66 bool KDevLanguageSupport::shouldSplitDocument(const KURL &url)
67 {
68  return false;
69 }
70 
71 Qt::Orientation KDevLanguageSupport::splitOrientation() const
72 {
73  return Qt::Vertical;
74 }
75 
76 void KDevLanguageSupport::addClass()
77 {
78 }
79 
80 void KDevLanguageSupport::addMethod( ClassDom /*klass*/ )
81 {
82 }
83 
84 void KDevLanguageSupport::implementVirtualMethods( ClassDom /*klass*/ )
85 {
86 }
87 
88 void KDevLanguageSupport::addAttribute( ClassDom /*klass*/ )
89 {
90 }
91 
92 TQStringList KDevLanguageSupport::subclassWidget(const TQString& /*formName*/)
93 {
94  return TQStringList();
95 }
96 
97 TQStringList KDevLanguageSupport::updateWidget(const TQString& /*formName*/, const TQString& /*fileName*/)
98 {
99  return TQStringList();
100 }
101 
102 TQString KDevLanguageSupport::formatModelItem( const CodeModelItem *item, bool /*shortDescription*/ )
103 {
104  return item->name();
105 }
106 
107 void KDevLanguageSupport::addFunction( DesignerType type, const TQString & formName, Function function )
108 {
109 // kdDebug() << "KDevLanguageSupport::addFunction: 1" << endl;
110  KDevDesignerIntegration *designerIntegration = designer(type);
111 // kdDebug() << "KDevLanguageSupport::addFunction: 2" << endl;
112  if (!designerIntegration)
113  {
114 // kdDebug() << "KDevLanguageSupport::addFunction: x" << endl;
115  return;
116  }
117 // kdDebug() << "KDevLanguageSupport::addFunction: 3" << endl;
118  designerIntegration->addFunction(formName, function);
119 // kdDebug() << "KDevLanguageSupport::addFunction: 4" << endl;
120 }
121 
122 void KDevLanguageSupport::editFunction( DesignerType type, const TQString & formName, Function oldFunction, Function function )
123 {
124  KDevDesignerIntegration *designerIntegration = designer(type);
125  if (!designerIntegration)
126  return;
127  designerIntegration->editFunction(formName, oldFunction, function);
128 }
129 
130 void KDevLanguageSupport::removeFunction( DesignerType type, const TQString & formName, Function function )
131 {
132  KDevDesignerIntegration *designerIntegration = designer(type);
133  if (!designerIntegration)
134  return;
135  designerIntegration->removeFunction(formName, function);
136 }
137 
138 KDevDesignerIntegration * KDevLanguageSupport::designer( DesignerType // type
139  )
140 {
141  return 0;
142 }
143 
144 void KDevLanguageSupport::openFunction( DesignerType type, const TQString & formName, const TQString & functionName )
145 {
146  KDevDesignerIntegration *designerIntegration = designer(type);
147  if (!designerIntegration)
148  return;
149  designerIntegration->openFunction(formName, functionName);
150 }
151 
152 void KDevLanguageSupport::createAccessMethods( ClassDom // theClass
153  , VariableDom // theVariable
154  )
155 {
156 }
157 
158 void KDevLanguageSupport::openSource( DesignerType type, const TQString & formName)
159 {
160  KDevDesignerIntegration *designerIntegration = designer(type);
161  if (!designerIntegration)
162  return;
163  designerIntegration->openSource(formName);
164 }
165 
166 #include "kdevlanguagesupport.moc"
KDevLanguageSupport::formatModelItem
virtual TQString formatModelItem(const CodeModelItem *item, bool shortDescription=false)
Formats a CodeModelItem as used by the CodeModel to the human-readable convention.
Definition: kdevlanguagesupport.cpp:102
KDevPlugin
The base class for all TDevelop plugins.
Definition: kdevplugin.h:107
KDevLanguageSupport::mimeTypes
virtual KMimeType::List mimeTypes()
Definition: kdevlanguagesupport.cpp:46
KDevLanguageSupport::addAttribute
virtual void addAttribute(ClassDom klass)
Opens an "Add attribute" dialog and adds the configured attribute to the sources. ...
Definition: kdevlanguagesupport.cpp:88
KDevLanguageSupport::formatTag
virtual TQString formatTag(const Tag &tag)
Formats a Tag as used by the persistent symbol store to the human-readable convention.
Definition: kdevlanguagesupport.cpp:51
codemodel.h
Code Model - a memory symbol store.
KDevDesignerIntegration::openSource
virtual void openSource(const TQString &formName)=0
Opens the form source.
KDevLanguageSupport::addClass
virtual void addClass()
Opens a "New class" dialog and adds the configured class to the sources.
Definition: kdevlanguagesupport.cpp:76
KDevDesignerIntegration
TDevelop designer integration interface.
Definition: kdevdesignerintegration.h:51
KDevDesignerIntegration::editFunction
virtual void editFunction(const TQString &formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function)=0
Edites the implementation of a function.
VariableDom
Safe pointer to the VariableModel.
KDevDesignerIntegration::removeFunction
virtual void removeFunction(const TQString &formName, KInterfaceDesigner::Function function)=0
Removes the implementation of a function.
KDevLanguageSupport::updateWidget
virtual TQStringList updateWidget(const TQString &formName, const TQString &fileName)
Opens an "Update Widget" dialog for given TQt .ui file (formName) and prompts to add missing slot imp...
Definition: kdevlanguagesupport.cpp:97
KDevLanguageSupport::Features
Features
Features supported by this language support.
Definition: kdevlanguagesupport.h:69
KDevLanguageSupport::implementVirtualMethods
virtual void implementVirtualMethods(ClassDom klass)
Opens an "Implement Virtual Methods" dialog and adds the configured methods to the sources...
Definition: kdevlanguagesupport.cpp:84
KDevLanguageSupport::openSource
void openSource(DesignerType type, const TQString &formName)
Opens a form source requested by a GUI designer.
Definition: kdevlanguagesupport.cpp:158
KDevLanguageSupport::editFunction
void editFunction(DesignerType type, const TQString &formName, Function oldFunction, Function function)
Edits a function requested by a GUI designer.
Definition: kdevlanguagesupport.cpp:122
KDevLanguageSupport::openFunction
void openFunction(DesignerType type, const TQString &formName, const TQString &functionName)
Opens a function requested by a GUI designer.
Definition: kdevlanguagesupport.cpp:144
KDevLanguageSupport::subclassWidget
virtual TQStringList subclassWidget(const TQString &formName)
Opens an "Subclass Widget" dialog for given TQt .ui file (formName) and propmts to implement it&#39;s slo...
Definition: kdevlanguagesupport.cpp:92
KDevLanguageSupport::unformatClassName
virtual TQString unformatClassName(const TQString &name)
The opposite of formatClassName.
Definition: kdevlanguagesupport.cpp:61
kdevdesignerintegration.h
TDevelop designer integration interface.
KDevLanguageSupport::formatClassName
virtual TQString formatClassName(const TQString &name)
Formats a canonicalized class path as used by the symbol store to the human-readable convention...
Definition: kdevlanguagesupport.cpp:56
KDevDesignerIntegration::addFunction
virtual void addFunction(const TQString &formName, KInterfaceDesigner::Function function)=0
Adds the implementation for a function.
KDevLanguageSupport::splitOrientation
virtual Qt::Orientation splitOrientation() const
Returns the language parts Split View orientation.
Definition: kdevlanguagesupport.cpp:71
CodeModelItem
Item in code model (symbol store).
Definition: codemodel.h:461
KDevLanguageSupport::~KDevLanguageSupport
~KDevLanguageSupport()
Destructor.
Definition: kdevlanguagesupport.cpp:37
ClassDom
Safe pointer to the ClassModel.
KDevDesignerIntegration::openFunction
virtual void openFunction(const TQString &formName, const TQString &functionName)=0
Opens the function and jumps to the line number of its definition (declaration).
KDevLanguageSupport::features
virtual Features features()
Definition: kdevlanguagesupport.cpp:41
KDevLanguageSupport::addMethod
virtual void addMethod(ClassDom klass)
Opens an "Add method" dialog and adds the configured method to the sources.
Definition: kdevlanguagesupport.cpp:80
KDevLanguageSupport::shouldSplitDocument
virtual bool shouldSplitDocument(const KURL &url)
Determines whether the document should be opened in a split view.
Definition: kdevlanguagesupport.cpp:66
KDevLanguageSupport::KDevLanguageSupport
KDevLanguageSupport(const KDevPluginInfo *info, TQObject *parent, const char *name)
Constructs a language support plugin.
Definition: kdevlanguagesupport.cpp:32
KDevLanguageSupport::designer
virtual KDevDesignerIntegration * designer(KInterfaceDesigner::DesignerType type)
Reimplement this method if you want to use integrated GUI designer for the language.
Definition: kdevlanguagesupport.cpp:138
KDevLanguageSupport::removeFunction
void removeFunction(DesignerType type, const TQString &formName, Function function)
Removes a function requested by a GUI designer.
Definition: kdevlanguagesupport.cpp:130
KDevLanguageSupport::addFunction
void addFunction(DesignerType type, const TQString &formName, Function function)
Adds a function requested by a GUI designer.
Definition: kdevlanguagesupport.cpp:107
KDevLanguageSupport::createAccessMethods
virtual void createAccessMethods(ClassDom theClass, VariableDom theVariable)
Opens an "create get/set methods" dialog and adds the configured methods to the sources.
Definition: kdevlanguagesupport.cpp:152
KDevPluginInfo
Information about TDevelop plugin.
Definition: kdevplugininfo.h:39
kdevlanguagesupport.h
Interface to programming language specific features.
CodeModelItem::name
TQString name() const
Definition: codemodel.cpp:595

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.