diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/formeditor/formmanager.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/formeditor/formmanager.h')
-rw-r--r-- | kexi/formeditor/formmanager.h | 133 |
1 files changed, 67 insertions, 66 deletions
diff --git a/kexi/formeditor/formmanager.h b/kexi/formeditor/formmanager.h index 48e00b0f..a4622d1b 100644 --- a/kexi/formeditor/formmanager.h +++ b/kexi/formeditor/formmanager.h @@ -21,15 +21,15 @@ #ifndef FORMMANAGER_H #define FORMMANAGER_H -#include <qobject.h> -#include <qdom.h> -#include <qptrlist.h> -#include <qtimer.h> -#include <qguardedptr.h> -#include <qstringlist.h> - -class QWidget; -class QWorkspace; +#include <tqobject.h> +#include <tqdom.h> +#include <tqptrlist.h> +#include <tqtimer.h> +#include <tqguardedptr.h> +#include <tqstringlist.h> + +class TQWidget; +class TQWorkspace; class KPopupMenu; class KActionCollection; class KAction; @@ -55,7 +55,7 @@ class WidgetLibrary; class ObjectTreeView; class Connection; class FormManager; -typedef QPtrList<KAction> ActionList; +typedef TQPtrList<KAction> ActionList; //! @internal //static FormManager* FormManager_static = 0; @@ -69,21 +69,22 @@ typedef QPtrList<KAction> ActionList; It holds the WidgetLibrary, the WidgetPropertySet, links to ObjectTreeView and PropertyEditor, as well as the copied widget and the insert state. **/ -class KFORMEDITOR_EXPORT FormManager : public QObject +class KFORMEDITOR_EXPORT FormManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /*! Constructs FormManager object. Using \a options you can control manager's behaviour, see Options. */ - FormManager(QObject *parent = 0, int options = 0, const char *name = 0); + FormManager(TQObject *tqparent = 0, int options = 0, const char *name = 0); virtual ~FormManager(); //! Creates widget library for supportedFactoryGroups //! and initializes FormManager singleton. \a m should be always the same for every call. static WidgetLibrary* createWidgetLibrary(FormManager* m, - const QStringList& supportedFactoryGroups); + const TQStringList& supportedFactoryGroups); //! Access to FormManager singleton static FormManager* self(); @@ -98,7 +99,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject into the \a collection. \a client XML GUI client is used to call lib->addCustomWidgetActions(client). These actions are automatically connected to \ref insertWidget() slot. - \return a QPtrList of the created actions. + \return a TQPtrList of the created actions. */ ActionList createActions(WidgetLibrary *lib, KActionCollection* collection, KXMLGUIClient *client); @@ -124,10 +125,10 @@ class KFORMEDITOR_EXPORT FormManager : public QObject /*! \return The name of the class being inserted, corresponding to the menu item or the toolbar button clicked. */ - QCString selectedClass() const { return m_selectedClass; } + TQCString selectedClass() const { return m_selectedClass; } /*! Sets the point where the pasted widget should be moved to. */ - void setInsertPoint(const QPoint &p); + void setInsertPoint(const TQPoint &p); //! \return If we are creating a Connection by drag-and-drop or not. bool isCreatingConnection() { return m_drawingSlot; } @@ -141,13 +142,13 @@ class KFORMEDITOR_EXPORT FormManager : public QObject void resetCreatedConnection(); //! Creates and display a menu with all the signals of widget \a w. - void createSignalMenu(QWidget *w); + void createSignalMenu(TQWidget *w); //! Creates and display a menu with all the slots of widget \a w. - void createSlotMenu(QWidget *w); + void createSlotMenu(TQWidget *w); //! Emits the signal \ref createFormSlot(). Used by WidgetPropertySet. - void emitCreateSlot(const QString &widget, const QString &value) + void emitCreateSlot(const TQString &widget, const TQString &value) { emit createFormSlot(m_active, widget, value); } /*! \return The Form actually active and focused. @@ -156,12 +157,12 @@ class KFORMEDITOR_EXPORT FormManager : public QObject /*! \return the Form whose toplevel widget is \a w, or 0 if there is not or the Form is in preview mode. */ - Form* formForWidget(QWidget *w); + Form* formForWidget(TQWidget *w); /*! \return true if \a w is a toplevel widget, ie. it is the main widget of a Form (so it should have a caption , an icon ...) */ - bool isTopLevel(QWidget *w); + bool isTopLevel(TQWidget *w); //! \return A pointer to the KoProperty::Editor we use. //unused KoProperty::Editor* propertyEditor() const { return m_editor; } @@ -173,7 +174,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject If \a propertyToSelect is not empty, an item for this name will be selected (usable when previously there was no set visible). */ virtual void showPropertySet(WidgetPropertySet *set, bool forceReload = false, - const QCString& propertyToSelect = QCString()); + const TQCString& propertyToSelect = TQCString()); void blockPropertyEditorUpdating(void *blockingObject); @@ -188,7 +189,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject void setObjectTreeView(ObjectTreeView *treeview); /*! Previews the Form \a form using the widget \a w as toplevel container for this Form. */ - void previewForm(Form *form, QWidget *w, Form *toForm=0); + void previewForm(Form *form, TQWidget *w, Form *toForm=0); /*! Adds a existing form w and changes it to a container */ void importForm(Form *form=0, bool preview=false); @@ -199,7 +200,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject /*! This function creates and displays the context menu corresponding to the widget \a w. The menu item are disabled if necessary, and the widget specific part is added (menu from the factory and buddy selection). */ - void createContextMenu(QWidget *w, Container *container, bool popupAtCursor = true); + void createContextMenu(TQWidget *w, Container *container, bool popupAtCursor = true); //! \return If we align widgets to grid or not. bool snapWidgetsToGrid(); @@ -220,13 +221,13 @@ class KFORMEDITOR_EXPORT FormManager : public QObject bool isRedoing() const { return m_isRedoing; } public slots: - /*! Deletes the selected widget in active Form and all of its children. */ + /*! Deletes the selected widget in active Form and all of its tqchildren. */ void deleteWidget(); - /*! Copies the slected widget and all its children of the active Form using an XML representation. */ + /*! Copies the slected widget and all its tqchildren of the active Form using an XML representation. */ void copyWidget(); - /*! Cuts (ie Copies and deletes) the selected widget and all its children of + /*! Cuts (ie Copies and deletes) the selected widget and all its tqchildren of the active Form using an XML representation. */ void cutWidget(); @@ -257,22 +258,22 @@ class KFORMEDITOR_EXPORT FormManager : public QObject /*! Creates a dialog to edit the Connection of \ref activeForm(). */ void editConnections(); - //! Lay out selected widgets using HBox layout (calls \ref CreateLayoutCommand). - void layoutHBox(); - //! Lay out selected widgets using VBox layout. - void layoutVBox(); - //! Lay out selected widgets using Grid layout. - void layoutGrid(); + //! Lay out selected widgets using HBox tqlayout (calls \ref CreateLayoutCommand). + void tqlayoutHBox(); + //! Lay out selected widgets using VBox tqlayout. + void tqlayoutVBox(); + //! Lay out selected widgets using Grid tqlayout. + void tqlayoutGrid(); //! Lay out selected widgets in an horizontal splitter - void layoutHSplitter(); + void tqlayoutHSplitter(); //! Lay out selected widgets in a verticak splitter - void layoutVSplitter(); - //! Lay out selected widgets using HFlow layout - void layoutHFlow(); - //! Lay out selected widgets using VFlow layout. - void layoutVFlow(); + void tqlayoutVSplitter(); + //! Lay out selected widgets using HFlow tqlayout + void tqlayoutHFlow(); + //! Lay out selected widgets using VFlow tqlayout. + void tqlayoutVFlow(); - //! Breaks selected layout(calls \ref BreakLayoutCommand). + //! Breaks selected tqlayout(calls \ref BreakLayoutCommand). void breakLayout(); void alignWidgetsToLeft(); @@ -302,7 +303,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject or a "Widget" menu item. Prepares all Forms for creation of a new widget (ie changes cursor ...). */ - void insertWidget(const QCString &classname); + void insertWidget(const TQCString &classname); /*! Stops the current widget insertion (ie unset the cursor ...). */ void stopInsert(); @@ -317,13 +318,13 @@ class KFORMEDITOR_EXPORT FormManager : public QObject void stopCreatingConnection(); /*! Calls this slot when the window activated changes (eg connect - to QWorkspace::windowActivated(QWidget*)). You <b>need</b> to connect + to TQWorkspace::windowActivated(TQWidget*)). You <b>need</b> to connect to this slot, it will crash otherwise. */ - void windowChanged(QWidget *w); + void windowChanged(TQWidget *w); //! Used to delayed widgets' deletion (in Container::deleteItem()) - void deleteWidgetLater( QWidget *w ); + void deleteWidgetLater( TQWidget *w ); /*! For debugging purposes only: shows a text window containing contents of .ui XML definition of the current form. */ @@ -336,7 +337,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject /*! This signal is emitted as the property set switched. If \a forceReload is true, the set needs to be reloaded even if it's the same as previous one. */ - void propertySetSwitched(KoProperty::Set *set, bool forceReload = false, const QCString& propertyToSelect = QCString()); + void propertySetSwitched(KoProperty::Set *set, bool forceReload = false, const TQCString& propertyToSelect = TQCString()); /*! This signal is emitted when any change is made to the Form \a form, so it will need to be saved. */ @@ -357,16 +358,16 @@ class KFORMEDITOR_EXPORT FormManager : public QObject /*! Signal emitted when undo action activation changes. \a text is the full text of the action (including command name). */ - void undoEnabled(bool enabled, const QString &text = QString::null); + void undoEnabled(bool enabled, const TQString &text = TQString()); /*! Signal emitted when redo action activation changes. \a text is the full text of the action (including command name). */ - void redoEnabled(bool enabled, const QString &text = QString::null); + void redoEnabled(bool enabled, const TQString &text = TQString()); /*! Signal emitted when the user choose a signal in 'Events' menu in context menu, or in 'Events' in property editor. The code editor should then create the slot connected to this signal. */ - void createFormSlot(KFormDesigner::Form *form, const QString &widget, const QString &signal); + void createFormSlot(KFormDesigner::Form *form, const TQString &widget, const TQString &signal); /*! Signal emitted when the Connection creation by drag-and-drop ends. \a connection is the created Connection. You should copy it, @@ -411,24 +412,24 @@ class KFORMEDITOR_EXPORT FormManager : public QObject #if 0 /*! Default implementation just calls FormIO::loadFormFromDom(). Change this if you need to handle, eg. custom UI XML tags, as in Kexi's Form Designer. */ - virtual bool loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf); + virtual bool loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf); /*! Default implementation just calls FormIO::saveFormToString(). Change this if you need to handle, eg. custom UI XML tags, as in Kexi's Form Designer. */ - virtual bool saveFormToStringInternal(Form *form, QString &dest, int indent = 0); + virtual bool saveFormToStringInternal(Form *form, TQString &dest, int indent = 0); #endif - /*! Function called by the "Lay out in..." menu items. It creates a layout from the - currently selected widgets (that must have the same parent). + /*! Function called by the "Lay out in..." menu items. It creates a tqlayout from the + currently selected widgets (that must have the same tqparent). Calls \ref CreateLayoutCommand. */ - void createLayout(int layoutType); + void createLayout(int tqlayoutType); /*! Function called by all other AlignWidgets*() function. Calls \ref AlignWidgetsCommand. */ void alignWidgets(int type); void enableFormActions(); void disableWidgetActions(); - void emitUndoEnabled(bool enabled, const QString &text); - void emitRedoEnabled(bool enabled, const QString &text); + void emitUndoEnabled(bool enabled, const TQString &text); + void emitRedoEnabled(bool enabled, const TQString &text); /*! True if emitSelectionSignals() updates property set so showPropertySet() will not be needed in windowChanged(). False by default. Set to true in KexiFormManager. */ @@ -443,22 +444,22 @@ class KFORMEDITOR_EXPORT FormManager : public QObject WidgetPropertySet *m_propSet; // WidgetLibrary *m_lib; - QGuardedPtr<KoProperty::Editor> m_editor; - QGuardedPtr<ObjectTreeView> m_treeview; + TQGuardedPtr<KoProperty::Editor> m_editor; + TQGuardedPtr<ObjectTreeView> m_treeview; // Forms - QPtrList<Form> m_forms; - QPtrList<Form> m_preview; - QGuardedPtr<Form> m_active; + TQPtrList<Form> m_forms; + TQPtrList<Form> m_preview; + TQGuardedPtr<Form> m_active; // Copy/Paste - QDomDocument m_domDoc; + TQDomDocument m_domDoc; KPopupMenu *m_popup; - QPoint m_insertPoint; - QGuardedPtr<QWidget> m_menuWidget; + TQPoint m_insertPoint; + TQGuardedPtr<TQWidget> m_menuWidget; // Insertion bool m_inserting; - QCString m_selectedClass; + TQCString m_selectedClass; // Connection stuff bool m_drawingSlot; @@ -470,8 +471,8 @@ class KFORMEDITOR_EXPORT FormManager : public QObject KToggleAction *m_pointer, *m_dragConnection, *m_snapToGrid; //! Used to delayed widgets deletion - QTimer m_deleteWidgetLater_timer; - QPtrList<QWidget> m_deleteWidgetLater_list; + TQTimer m_deleteWidgetLater_timer; + TQPtrList<TQWidget> m_deleteWidgetLater_list; #ifdef KEXI_DEBUG_GUI KDialogBase *m_uiCodeDialog; |