1
/***************************************************************************
2
* Copyright (C) 2004 by Alexander Dymo *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU Library General Public License as *
7
* published by the Free Software Foundation; either version 2 of the *
8
* License, or (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU Library General Public *
16
* License along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
20
#ifndef QTDESIGNERINTEGRATION_H
21
#define QTDESIGNERINTEGRATION_H
25
#include <codemodel.h>
26
#include "kdevdesignerintegration.h"
28
class KDevLanguageSupport;
29
class ImplementationWidget;
32
Qt Designer integration base class.
33
Contains language-independent implementation part of a @ref KDevDesignerIntegration interface.
34
Ready to use in KDevelop language support plugins.
36
Subclasses of this class should reimplement only pure virtual functions in the common case.
38
class QtDesignerIntegration : public KDevDesignerIntegration
42
QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl,
43
bool classHasDefinitions, const char* name = 0);
44
virtual ~QtDesignerIntegration();
47
virtual void addFunction(const QString& formName, KInterfaceDesigner::Function function);
48
virtual void editFunction(const QString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function);
49
virtual void removeFunction(const QString& formName, KInterfaceDesigner::Function function);
51
virtual void openFunction(const QString &formName, const QString &functionName);
53
virtual void openSource(const QString &formName);
55
virtual void saveSettings(QDomDocument dom, QString path);
56
virtual void loadSettings(QDomDocument dom, QString path);
58
bool selectImplementation(const QString &formName);
61
/**Reimplement this to add a function to a class. This means you need to modify
62
the source file and add actual code of a function.*/
63
virtual void addFunctionToClass(KInterfaceDesigner::Function function, ClassDom klass) = 0;
64
/**Modifies name to be a name of a implementation file for languages that have
65
separate files for interface and implementation parts of a class. For example,
66
C++ language support plugin will do:
68
name.replace(".h", ".cpp");
70
virtual void processImplementationName(QString &name);
72
//Form file - derived class name
73
QMap<QString, ClassDom> m_implementations;
75
KDevLanguageSupport *m_part;
76
ImplementationWidget *m_impl;
77
bool m_classHasDefinitions;