summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/form.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/formeditor/form.h')
-rw-r--r--kexi/formeditor/form.h93
1 files changed, 47 insertions, 46 deletions
diff --git a/kexi/formeditor/form.h b/kexi/formeditor/form.h
index 899da955..dbe64b52 100644
--- a/kexi/formeditor/form.h
+++ b/kexi/formeditor/form.h
@@ -22,15 +22,15 @@
#ifndef KFORMDESIGNERFORM_H
#define KFORMDESIGNERFORM_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "resizehandle.h"
#include "utils.h"
#include "objecttree.h"
-class QWidget;
-class QDomElement;
+class TQWidget;
+class TQDomElement;
class KActionCollection;
class KCommandHistory;
class KCommand;
@@ -48,7 +48,7 @@ class ConnectionBuffer;
//! Base (virtual) class for all form widgets
/*! You need to inherit this class, and implement the drawing functions. This is necessary
- because you cannot inherit QWidget twice, and we want form widgets to be any widget.
+ because you cannot inherit TQWidget twice, and we want form widgets to be any widget.
See FormWidgetBase in test/kfd_part.cpp and just copy functions there. */
class KFORMEDITOR_EXPORT FormWidget
{
@@ -60,19 +60,19 @@ class KFORMEDITOR_EXPORT FormWidget
using double-buffering. \a type can be 1 (selection rect)
or 2 (insert rect, dotted). */
- virtual void drawRects(const QValueList<QRect> &list, int type) = 0;
+ virtual void drawRects(const TQValueList<TQRect> &list, int type) = 0;
- virtual void drawRect(const QRect &r, int type) = 0;
+ virtual void drawRect(const TQRect &r, int type) = 0;
/*! This function inits the buffer used for double-buffering. Called before drawing rect. */
virtual void initBuffer() = 0;
- /*! Clears the form, ie pastes the whole buffer to repaint the Form. */
+ /*! Clears the form, ie pastes the whole buffer to tqrepaint the Form. */
virtual void clearForm() = 0;
/*! This function highlights two widgets (to is optional), which are
sender and receiver, and draws a link between them. */
- virtual void highlightWidgets(QWidget *from, QWidget *to) = 0;
+ virtual void highlightWidgets(TQWidget *from, TQWidget *to) = 0;
protected:
Form *m_form;
@@ -88,9 +88,9 @@ class FormPrivate
~FormPrivate();
// FormManager *manager;
- QGuardedPtr<Container> toplevel;
+ TQGuardedPtr<Container> toplevel;
ObjectTree *topTree;
- QGuardedPtr<QWidget> widget;
+ TQGuardedPtr<TQWidget> widget;
WidgetList selected;
ResizeHandleSet::Dict resizeHandles;
@@ -98,7 +98,7 @@ class FormPrivate
bool dirty;
bool interactive;
bool design;
- QString filename;
+ TQString filename;
KCommandHistory *history;
KActionCollection *collection;
@@ -109,17 +109,17 @@ class FormPrivate
PixmapCollection *pixcollection;
- //! This map is used to store cursor shapes before inserting (so we can restore them later)
- QMap<QObject*,QCursor> cursors;
+ //! This map is used to store cursor tqshapes before inserting (so we can restore them later)
+ TQMap<TQObject*,TQCursor> cursors;
//!This string list is used to store the widgets which hasMouseTracking() == true (eg lineedits)
- QStringList *mouseTrackers;
+ TQStringList *mouseTrackers;
FormWidget *formWidget;
//! A set of head properties to be stored in a .ui file.
//! This includes KFD format version.
- QMap<QCString,QString> headerProperties;
+ TQMap<TQCString,TQString> headerProperties;
//! Format version, set by FormIO or on creating a new form.
uint formatVersion;
@@ -132,9 +132,10 @@ class FormPrivate
It takes care of widget selection and pasting widgets.
**/
//! A simple class representing a form
-class KFORMEDITOR_EXPORT Form : public QObject
+class KFORMEDITOR_EXPORT Form : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Creates a simple Form, child of the FormManager \a manager.
@@ -149,11 +150,11 @@ class KFORMEDITOR_EXPORT Form : public QObject
Creates a toplevel widget out of another widget.
\a container will become the Form toplevel widget,
will be associated to an ObjectTree and so on.
- \code QWidget *toplevel = new QWidget(this);
+ \code TQWidget *toplevel = new TQWidget(this);
form->createToplevel(toplevel); \endcode
*/
- void createToplevel(QWidget *container, FormWidget *formWidget =0,
- const QCString &classname="QWidget");
+ void createToplevel(TQWidget *container, FormWidget *formWidget =0,
+ const TQCString &classname=TQWIDGET_OBJECT_NAME_STRING);
/*! \return the toplevel Container or 0 if this is a preview Form or createToplevel()
has not been called yet. */
@@ -166,23 +167,23 @@ class KFORMEDITOR_EXPORT Form : public QObject
ObjectTree* objectTree() const { return d->topTree; }
//! \return the form's toplevel widget, or 0 if designMode() == false.
- QWidget* widget() const;
+ TQWidget* widget() const;
-// //! \return the FormManager parent of this form.
+// //! \return the FormManager tqparent of this form.
// FormManager* manager() const { return d->manager; }
- /*! \return A pointer to the currently active Container, ie the parent Container for a simple widget,
+ /*! \return A pointer to the currently active Container, ie the tqparent Container for a simple widget,
and the widget's Container if it is itself a container.
*/
Container* activeContainer();
- /*! \return A pointer to the parent Container of the currently selected widget.
+ /*! \return A pointer to the tqparent Container of the currently selected widget.
It is the same as activeContainer() for a simple widget, but unlike this function
- it will also return the parent Container if the widget itself is a Container.
+ it will also return the tqparent Container if the widget itself is a Container.
*/
- Container* parentContainer(QWidget *w=0);
+ Container* tqparentContainer(TQWidget *w=0);
- /*! \return The \ref Container which is a parent of all widgets in \a wlist.
+ /*! \return The \ref Container which is a tqparent of all widgets in \a wlist.
Used by \ref activeContainer(), and to find where
to paste widgets when multiple widgets are selected. */
ObjectTreeItem* commonParentContainer(WidgetList *wlist);
@@ -193,7 +194,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
/*! \return currently selected widget in this form,
or 0 if there is no widget selected or more than one widget selected.
\see selectedWidgets() */
- QWidget* selectedWidget() const { return d->selected.count()==1 ? d->selected.first() : 0; }
+ TQWidget* selectedWidget() const { return d->selected.count()==1 ? d->selected.first() : 0; }
/*! Emits the action signals, and optionaly the undo/redo related signals
if \a withUndoAction == true. See \a FormManager for signals description. */
@@ -212,7 +213,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
widget were drawn on the Form.
\return false if the Form is being updated by the program, ie the widget
are created by FormIO, and so composed widgets
- should not be populated automatically (such as QTabWidget).
+ should not be populated automatically (such as TQTabWidget).
*/
bool interactiveMode() const { return d->interactive; }
@@ -230,24 +231,24 @@ class KFORMEDITOR_EXPORT Form : public QObject
//! @todo make gridSize configurable at global level
int gridSize() { return 10; }
- //! \return the default margin for all the layout inside this Form.
+ //! \return the default margin for all the tqlayout inside this Form.
int defaultMargin() { return 11;}
- //! \return the default spacing for all the layout inside this Form.
+ //! \return the default spacing for all the tqlayout inside this Form.
int defaultSpacing() { return 6;}
- /*! This function is used by ObjectTree to emit childAdded() signal (as it is not a QObject). */
+ /*! This function is used by ObjectTree to emit childAdded() signal (as it is not a TQObject). */
void emitChildAdded(ObjectTreeItem *item);
- /*! This function is used by ObjectTree to emit childRemoved() signal (as it is not a QObject). */
+ /*! This function is used by ObjectTree to emit childRemoved() signal (as it is not a TQObject). */
void emitChildRemoved(ObjectTreeItem *item);
/*! \return The filename of the UI file this Form was saved to,
- or QString::null if the Form hasn't be saved yet. */
- QString filename() const { return d->filename; }
+ or TQString() if the Form hasn't be saved yet. */
+ TQString filename() const { return d->filename; }
//! Sets the filename of this Form to \a filename.
- void setFilename(const QString &file) { d->filename = file; }
+ void setFilename(const TQString &file) { d->filename = file; }
KCommandHistory* commandHistory() const { return d->history; }
ConnectionBuffer* connectionBuffer() const { return d->connBuffer; }
@@ -284,28 +285,28 @@ class KFORMEDITOR_EXPORT Form : public QObject
(which are by default in order of creation).*/
void setAutoTabStops(bool autoTab) { d->autoTabstops = autoTab;}
- /*! Tells the Form to reassign the tab stops because the widget layout has changed
+ /*! Tells the Form to reassign the tab stops because the widget tqlayout has changed
(called for example before saving or displaying the tab order dialog).
Automatically sorts widget from the top-left to bottom-right corner.
Widget can be grouped with containers. In paticular, for tab widgets,
- child widgets should ordered by parent tab's order. */
+ child widgets should ordered by tqparent tab's order. */
void autoAssignTabStops();
#ifdef KEXI_DEBUG_GUI
//! For debugging purposes
- QString m_recentlyLoadedUICode;
+ TQString m_recentlyLoadedUICode;
#endif
/*! Internal: called by ResizeHandle when mouse move event causes first
resize handle's dragging. As a result, current widget's editing (if any)
is finished - see WidgetFactory::resetEditor(). */
-// void resizeHandleDraggingStarted(QWidget *draggedWidget);
+// void resizeHandleDraggingStarted(TQWidget *draggedWidget);
- ResizeHandleSet* resizeHandlesForWidget(QWidget* w);
+ ResizeHandleSet* resizeHandlesForWidget(TQWidget* w);
/*! A set of value/key pairs provided to be stored as attributes in
<kfd:customHeader/> XML element (saved as a first child of \<UI> element). */
- QMap<QCString,QString>* headerProperties() const { return &d->headerProperties; }
+ TQMap<TQCString,TQString>* headerProperties() const { return &d->headerProperties; }
//! \return format version number for this form.
//! For new forms it is equal to KFormDesigner::version().
@@ -321,7 +322,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
/*! This slot is called when the name of a widget was changed in Property Editor.
It renames the ObjectTreeItem associated to this widget.
*/
- void changeName(const QCString &oldname, const QCString &newname);
+ void changeName(const TQCString &oldname, const TQCString &newname);
/*! Sets \a selected to be the selected widget of this Form.
If \a add is true, the formerly selected widget is still selected,
@@ -329,12 +330,12 @@ class KFORMEDITOR_EXPORT Form : public QObject
The form widget is always selected alone.
\a moreWillBeSelected indicates whether more widgets will be selected soon
(so for multiselection we should not update the property pane before the last widget is selected) */
- void setSelectedWidget(QWidget *selected, bool add=false, bool dontRaise=false,
+ void setSelectedWidget(TQWidget *selected, bool add=false, bool dontRaise=false,
bool moreWillBeSelected = false);
/*! Unselects the widget \a w. Te widget is removed from the Cntainer 's list
and its resizeHandle is removed. */
- void unSelectWidget(QWidget *w);
+ void unSelectWidget(TQWidget *w);
/*! Sets the form widget (it will be uniquely selected widget). */
void selectFormWidget();
@@ -364,7 +365,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
to update both Property Editor and ObjectTreeView.
\a w is the newly selected widget.
*/
- void selectionChanged(QWidget *w, bool add, bool moreWillBeSelected = false);
+ void selectionChanged(TQWidget *w, bool add, bool moreWillBeSelected = false);
/*! This signal is emitted when a new widget is created, to update ObjectTreeView.
\a it is the ObjectTreeItem representing this new widget.