diff options
Diffstat (limited to 'kexi/core/kexiviewbase.h')
-rw-r--r-- | kexi/core/kexiviewbase.h | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/kexi/core/kexiviewbase.h b/kexi/core/kexiviewbase.h index 18cd056d..24f5d8ad 100644 --- a/kexi/core/kexiviewbase.h +++ b/kexi/core/kexiviewbase.h @@ -20,7 +20,7 @@ #ifndef KEXIVIEWBASE_H #define KEXIVIEWBASE_H -#include <qwidget.h> +#include <tqwidget.h> #include "kexiactionproxy.h" @@ -40,7 +40,7 @@ namespace KexiDB { KexiViewBase has 'dirty' flag to indicate that view's data has changed. This flag's state is reused by KexiDialogBase object that contain the view. KexiViewBase objects can be also nested, using addChildView(): any actions and 'dirty' flag - are transmited to parent view in this case. + are transmited to tqparent view in this case. KexiViewBase objects are usually allocated within KexiDialogBase objects by implementing KexiPart::createView() method. See query or table part code for examples. @@ -49,33 +49,34 @@ namespace KexiDB { especially withinn dock window. see KexiMainWindowImpl::initNavigator() to see example how KexiBrowser does this. */ -class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy +class KEXICORE_EXPORT KexiViewBase : public TQWidget, public KexiActionProxy { Q_OBJECT + TQ_OBJECT public: - KexiViewBase(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0); + KexiViewBase(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0); virtual ~KexiViewBase(); //! \return kexi main window that contain this view inline KexiMainWindow *mainWin() const { return m_mainWin; } - //! \return parent KexiDialogBase that contains this view, or 0 if no dialog contain this view - KexiDialogBase* parentDialog() const { return m_dialog; } + //! \return tqparent KexiDialogBase that contains this view, or 0 if no dialog contain this view + KexiDialogBase* tqparentDialog() const { return m_dialog; } /*! Added for convenience. \return KexiPart object that was used to create this view (with a dialog) - or 0 if this view is not created using KexiPart. \sa parentDialog() */ + or 0 if this view is not created using KexiPart. \sa tqparentDialog() */ KexiPart::Part* part() const; /*! \return preferred size hint, that can be used to resize the view. It is computed using maximum of (a) \a otherSize and (b) current KMDI dock area's size, - so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::sizeHint(). + so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::tqsizeHint(). If you reimplement this method, do not forget to return value of yoursize.boundedTo( KexiViewBase::preferredSizeHint(otherSize) ). */ - virtual QSize preferredSizeHint(const QSize& otherSize); + virtual TQSize preferredSizeHint(const TQSize& otherSize); - virtual bool eventFilter( QObject *o, QEvent *e ); + virtual bool eventFilter( TQObject *o, TQEvent *e ); void addChildView( KexiViewBase* childView ); @@ -111,9 +112,9 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy virtual void propertySetSwitched(); /*! Sets dirty flag on or off. It the flag changes, - dirty(bool) signal is emitted by parent dialog (KexiDialog), - to inform the world about that. If this view has a parent view, setDirty() - is called also on parent view. + dirty(bool) signal is emitted by tqparent dialog (KexiDialog), + to inform the world about that. If this view has a tqparent view, setDirty() + is called also on tqparent view. Always use this function to update 'dirty' flag information. */ void setDirty(bool set); @@ -145,7 +146,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy (probably after showing some info messages), you need to return cancelled. */ virtual tristate afterSwitchFrom(int mode); - virtual void closeEvent( QCloseEvent * e ); + virtual void closeEvent( TQCloseEvent * e ); /*! \return a property set for this view. For reimplementation. By default returns NULL. */ virtual KoProperty::Set *propertySet(); @@ -156,7 +157,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy If \a preservePrevSelection is true and there was a property set assigned before call, previously selected item will be preselected in the editor (if found). */ - void propertySetReloaded(bool preservePrevSelection = false, const QCString& propertyToSelect = QCString()); + void propertySetReloaded(bool preservePrevSelection = false, const TQCString& propertyToSelect = TQCString()); /*! Tells this dialog to create and store data of the new object pointed by \a sdata on the backend. @@ -185,7 +186,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy and \a dataString is set to null string. The default is false. \return true on success \sa storeDataBlock(). */ - bool loadDataBlock( QString &dataString, const QString& dataID = QString::null, bool canBeEmpty = false ); + bool loadDataBlock( TQString &dataString, const TQString& dataID = TQString(), bool canBeEmpty = false ); /*! Tells this view to store data changes on the backend. Called by KexiDialogBase::storeData(). @@ -211,16 +212,16 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy If there is already such record in the table, it's simply overwritten. \return true on success */ - bool storeDataBlock( const QString &dataString, const QString &dataID = QString::null ); + bool storeDataBlock( const TQString &dataString, const TQString &dataID = TQString() ); /*! Removes (potentially large) string data (e.g. xml form's representation), pointed by optional \a dataID, from the database backend. \return true on success. Does not fail if the block doe not exists. Note that if \a dataID is not specified, all data blocks for this view will be removed. \sa storeDataBlock(). */ - bool removeDataBlock( const QString& dataID = QString::null); + bool removeDataBlock( const TQString& dataID = TQString()); - void setViewWidget(QWidget* w, bool focusProxy = false); + void setViewWidget(TQWidget* w, bool focusProxy = false); /*! Updates actions (e.g. availability). Reimplement it, if needed (you must call superclass impelmentation at the end!). @@ -230,31 +231,31 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy or deactivation. */ virtual void updateActions(bool activated); - virtual void setFocusInternal() { QWidget::setFocus(); } + virtual void setFocusInternal() { TQWidget::setFocus(); } - /*! Allows to react on parent dialog's detaching (only for KMDI's ChildFrame mode) + /*! Allows to react on tqparent dialog's detaching (only for KMDI's ChildFrame mode) - it is called by KexiDialogBase::youAreDetached(). Default implementation does nothing. Implement it if you want to perform some appropriate actions. */ - virtual void parentDialogDetached() {}; + virtual void tqparentDialogDetached() {}; - /*! Allows to react on parent dialog's attaching (only for KMDI's ChildFrame mode) + /*! Allows to react on tqparent dialog's attaching (only for KMDI's ChildFrame mode) - it is called by KexiDialogBase::youAreAttached(). Default implementation does nothing. Implement it if you want to perform some appropriate actions. */ - virtual void parentDialogAttached() {}; + virtual void tqparentDialogAttached() {}; - QString m_defaultIconName; + TQString m_defaultIconName; KexiMainWindow *m_mainWin; KexiDialogBase *m_dialog; - QWidget *m_viewWidget; + TQWidget *m_viewWidget; KexiViewBase *m_parentView; - QGuardedPtr<QWidget> m_lastFocusedChildBeforeFocusOut; + TQGuardedPtr<TQWidget> m_lastFocusedChildBeforeFocusOut; private: /*! Member set to newly assigned object's ID in storeNewData() @@ -269,7 +270,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy Can be useful when single class is used for more than one view (e.g. KexiDBForm). */ int m_viewMode; - QPtrList<KexiViewBase> m_children; + TQPtrList<KexiViewBase> m_tqchildren; bool m_dirty : 1; |