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.
99 lines
4.0 KiB
99 lines
4.0 KiB
15 years ago
|
/* This file is part of the KDE project
|
||
11 years ago
|
Copyright (C) 2004 Alexander Dymo <adymo@kdevelop.org>
|
||
15 years ago
|
|
||
|
This library 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 library 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
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
15 years ago
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
15 years ago
|
*/
|
||
11 years ago
|
#ifndef TDEVDESIGNERINTEGRATION_H
|
||
|
#define TDEVDESIGNERINTEGRATION_H
|
||
15 years ago
|
|
||
|
#include <designer.h>
|
||
15 years ago
|
#include <tqobject.h>
|
||
|
#include <tqdom.h>
|
||
15 years ago
|
|
||
|
/**
|
||
11 years ago
|
@file tdevdesignerintegration.h
|
||
13 years ago
|
TDevelop designer integration interface.
|
||
15 years ago
|
*/
|
||
|
|
||
|
/**
|
||
13 years ago
|
TDevelop designer integration interface.
|
||
15 years ago
|
Designer integration object provides functionality which is used by integrated
|
||
|
into KDevelop GUI designers:
|
||
|
- adding/removing/editing functions (class methods);
|
||
|
- opening form implementation files;
|
||
|
- saving and loading designer integration settings.
|
||
|
.
|
||
|
|
||
|
Designer integration is a layer between visual form (GUI) designer of any type
|
||
|
and the current language support. Usually designers create some kind of forms
|
||
|
and allow developers to define actions which are executed upon some GUI events
|
||
14 years ago
|
(for example, TQt Designer allows to define slots connected to GUI signals).
|
||
15 years ago
|
The actual code with action implementations needs to be written by hand in source
|
||
|
files. Designer integration captures such implementation requests and opens
|
||
|
necessary files at desired line numbers and adds (edits, removes) code for implementations.
|
||
|
|
||
14 years ago
|
For example, TQt Designer integration should be able to create an subclass for a form
|
||
15 years ago
|
and reimplement slots defined in the form.
|
||
|
*/
|
||
11 years ago
|
class TDevDesignerIntegration : public TQObject
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
|
/**Constructor.
|
||
14 years ago
|
@param parent Parent object.
|
||
15 years ago
|
@param name Internal name.*/
|
||
11 years ago
|
TDevDesignerIntegration(TQObject *parent = 0, const char *name = 0);
|
||
15 years ago
|
/**Destructor.*/
|
||
11 years ago
|
~TDevDesignerIntegration();
|
||
15 years ago
|
|
||
|
/**Saves designer integration settings.*/
|
||
15 years ago
|
virtual void saveSettings(TQDomDocument dom, TQString path) = 0;
|
||
15 years ago
|
/**Loads designer integration settings.*/
|
||
15 years ago
|
virtual void loadSettings(TQDomDocument dom, TQString path) = 0;
|
||
15 years ago
|
|
||
|
public slots:
|
||
|
/**Adds the implementation for a function.
|
||
|
@param formName The name of a GUI form.
|
||
|
@param function The function which needs to be implemented in the source.*/
|
||
15 years ago
|
virtual void addFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0;
|
||
15 years ago
|
|
||
|
/**Removes the implementation of a function.
|
||
|
@param formName The name of a GUI form.
|
||
|
@param function The function which needs to be removed from the source.*/
|
||
15 years ago
|
virtual void removeFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0;
|
||
15 years ago
|
|
||
|
/**Edites the implementation of a function.
|
||
|
@param formName The name of a GUI form.
|
||
|
@param oldFunction The function which needs to be edited from the source.
|
||
|
@param function The new function declaration.*/
|
||
15 years ago
|
virtual void editFunction(const TQString &formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function) = 0;
|
||
15 years ago
|
|
||
|
/**Opens the function and jumps to the line number of its definition (declaration).
|
||
|
@param formName The name of a GUI form.
|
||
|
@param functionName The name of a function to find in the source.*/
|
||
15 years ago
|
virtual void openFunction(const TQString &formName, const TQString &functionName) = 0;
|
||
15 years ago
|
|
||
|
/**Opens the form source.
|
||
|
@param formName The name of a GUI form.*/
|
||
15 years ago
|
virtual void openSource(const TQString &formName) = 0;
|
||
15 years ago
|
private:
|
||
11 years ago
|
class TDevDesignerIntegrationPrivate;
|
||
|
TDevDesignerIntegrationPrivate *dptr;
|
||
15 years ago
|
};
|
||
|
|
||
|
#endif
|