You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
3.6 KiB
82 lines
3.6 KiB
15 years ago
|
/***************************************************************************
|
||
|
* Copyright (C) 2004 by Alexander Dymo *
|
||
11 years ago
|
* adymo@kdevelop.org *
|
||
15 years ago
|
* *
|
||
|
* This program is free software; you can redistribute it and/or modify *
|
||
|
* it under the terms of the GNU Library General Public License as *
|
||
|
* published by the Free Software Foundation; either version 2 of the *
|
||
|
* License, or (at your option) any later version. *
|
||
|
* *
|
||
|
* This program is distributed in the hope that it will be useful, *
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||
|
* GNU General Public License for more details. *
|
||
|
* *
|
||
|
* You should have received a copy of the GNU Library General Public *
|
||
|
* License along with this program; if not, write to the *
|
||
|
* Free Software Foundation, Inc., *
|
||
15 years ago
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||
15 years ago
|
***************************************************************************/
|
||
14 years ago
|
#ifndef TQTDESIGNERINTEGRATION_H
|
||
|
#define TQTDESIGNERINTEGRATION_H
|
||
15 years ago
|
|
||
15 years ago
|
#include <tqmap.h>
|
||
15 years ago
|
|
||
|
#include <codemodel.h>
|
||
11 years ago
|
#include "kdevdesignerintegration.h"
|
||
15 years ago
|
|
||
11 years ago
|
class KDevLanguageSupport;
|
||
15 years ago
|
class ImplementationWidget;
|
||
|
|
||
|
/**
|
||
14 years ago
|
TQt Designer integration base class.
|
||
11 years ago
|
Contains language-independent implementation part of a @ref KDevDesignerIntegration interface.
|
||
15 years ago
|
Ready to use in KDevelop language support plugins.
|
||
|
|
||
|
Subclasses of this class should reimplement only pure virtual functions in the common case.
|
||
|
*/
|
||
11 years ago
|
class QtDesignerIntegration : public KDevDesignerIntegration
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
11 years ago
|
QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl,
|
||
15 years ago
|
bool classHasDefinitions, const char* name = 0);
|
||
14 years ago
|
virtual ~QtDesignerIntegration();
|
||
15 years ago
|
|
||
|
public slots:
|
||
15 years ago
|
virtual void addFunction(const TQString& formName, KInterfaceDesigner::Function function);
|
||
|
virtual void editFunction(const TQString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function);
|
||
|
virtual void removeFunction(const TQString& formName, KInterfaceDesigner::Function function);
|
||
15 years ago
|
|
||
15 years ago
|
virtual void openFunction(const TQString &formName, const TQString &functionName);
|
||
15 years ago
|
|
||
15 years ago
|
virtual void openSource(const TQString &formName);
|
||
15 years ago
|
|
||
15 years ago
|
virtual void saveSettings(TQDomDocument dom, TQString path);
|
||
|
virtual void loadSettings(TQDomDocument dom, TQString path);
|
||
15 years ago
|
|
||
15 years ago
|
bool selectImplementation(const TQString &formName);
|
||
15 years ago
|
|
||
|
protected:
|
||
|
/**Reimplement this to add a function to a class. This means you need to modify
|
||
|
the source file and add actual code of a function.*/
|
||
|
virtual void addFunctionToClass(KInterfaceDesigner::Function function, ClassDom klass) = 0;
|
||
|
/**Modifies name to be a name of a implementation file for languages that have
|
||
|
separate files for interface and implementation parts of a class. For example,
|
||
|
C++ language support plugin will do:
|
||
|
@code
|
||
14 years ago
|
name.replace(".h", ".cpp");
|
||
15 years ago
|
@endcode*/
|
||
15 years ago
|
virtual void processImplementationName(TQString &name);
|
||
15 years ago
|
|
||
|
//Form file - derived class name
|
||
15 years ago
|
TQMap<TQString, ClassDom> m_implementations;
|
||
15 years ago
|
|
||
11 years ago
|
KDevLanguageSupport *m_part;
|
||
15 years ago
|
ImplementationWidget *m_impl;
|
||
|
bool m_classHasDefinitions;
|
||
|
};
|
||
|
|
||
|
#endif
|