summaryrefslogtreecommitdiffstats
path: root/kexi/widget/tableview/kexitableedit.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/widget/tableview/kexitableedit.h')
-rw-r--r--kexi/widget/tableview/kexitableedit.h67
1 files changed, 34 insertions, 33 deletions
diff --git a/kexi/widget/tableview/kexitableedit.h b/kexi/widget/tableview/kexitableedit.h
index ef38a11f2..d8ac7c86a 100644
--- a/kexi/widget/tableview/kexitableedit.h
+++ b/kexi/widget/tableview/kexitableedit.h
@@ -23,8 +23,8 @@
#include <kexidataiteminterface.h>
-#include <qvariant.h>
-#include <qscrollview.h>
+#include <tqvariant.h>
+#include <tqscrollview.h>
#include "kexitableviewdata.h"
@@ -36,12 +36,13 @@ namespace KexiDB {
/*! @short Abstract class for a cell editor.
Handles cell painting and displaying the editor widget.
*/
-class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemInterface
+class KEXIDATATABLE_EXPORT KexiTableEdit : public TQWidget, public KexiDataItemInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTableEdit(KexiTableViewColumn &column, QWidget* parent = 0);
+ KexiTableEdit(KexiTableViewColumn &column, TQWidget* tqparent = 0);
virtual ~KexiTableEdit();
@@ -72,7 +73,7 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
virtual void resize(int w, int h);
/*! \return the view widget of this editor, e.g. line edit widget. */
- virtual QWidget* widget() { return m_view; }
+ virtual TQWidget* widget() { return m_view; }
/*! Hides item's widget, if available. */
inline virtual void hideWidget() { hide(); }
@@ -83,11 +84,11 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
/*! Paints a border for the cell described by \a x, \a y, \a w, \a h on \a p painter.
The cell's value is \a val (may be useful if you want to reimplement this method).
*/
- virtual void paintFocusBorders( QPainter *p, QVariant &cal, int x, int y, int w, int h );
+ virtual void paintFocusBorders( TQPainter *p, TQVariant &cal, int x, int y, int w, int h );
/*! For reimplementation.
Sets up and paints cell's contents using context of \a val value.
- \a focused is true if the cell is focused. \a align is set using Qt::AlignmentFlags.
+ \a focused is true if the cell is focused. \a align is set using TQt::AlignmentFlags.
Some additional things may be painted using \a p,
but it is not needed to paint the text (this is done automatically outside of this method).
@@ -101,8 +102,8 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
\a p painter's pen is set to foreground color (usually black) that should be used to paint
foreground information, if needed. For example boolean editor widget paints
a rectangle using this color. */
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
/*! \return true if "selected text" color should be used to paint contents of the editor.
True by default. It's false e.g. in boolean editor, where no selection is painted
@@ -115,16 +116,16 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
/*! For reimplementation.
Paints selection's background using \a p. Most parameters are similar to these from
setupContents(). */
- virtual void paintSelectionBackground( QPainter *p, bool focused, const QString& txt,
- int align, int x, int y_offset, int w, int h, const QColor& fillColor,
- const QFontMetrics &fm, bool readOnly, bool fullRowSelection );
+ virtual void paintSelectionBackground( TQPainter *p, bool focused, const TQString& txt,
+ int align, int x, int y_offset, int w, int h, const TQColor& fillColor,
+ const TQFontMetrics &fm, bool readOnly, bool fullRowSelection );
- /*! Sometimes, editor can contain non-standard margin, for example combobox editor contains
+ /*! Sometimes, editor can contain non-standard margin, for example combobox editor tqcontains
dropdown button at the right side. \return left margin's size;
0 by default. For reimplementation. */
int leftMargin() const { return m_leftMargin; }
- /*! Sometimes, editor can contain non-standard margin, for example combobox editor contains
+ /*! Sometimes, editor can contain non-standard margin, for example combobox editor tqcontains
dropdown button at the right side. THe dropdown button's width is counted only if \a focused is true.
\return right margin's size; 0 by default. For reimplementation. */
int rightMargin(bool focused) const;
@@ -133,7 +134,7 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
For implementation: true should be returned if \a ke should be accepted.
If \a editorActive is true, this editor is currently active, i.e. the table view is in edit mode.
By default false is returned. */
- virtual bool handleKeyPress( QKeyEvent* ke, bool editorActive ) {
+ virtual bool handleKeyPress( TQKeyEvent* ke, bool editorActive ) {
Q_UNUSED(ke); Q_UNUSED(editorActive); return false; }
/*! Handles double click request coming from the table view.
@@ -146,24 +147,24 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
For a special case (combo box), \a visibleValue can be provided,
so it can be copied to the clipboard instead of unreadable \a value.
For reimplementation. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue) = 0;
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue) = 0;
/*! \return width of \a value. For the default implementation \a val is converted to a string
and width of this string is returned. */
- virtual int widthForValue( QVariant &val, const QFontMetrics &fm );
+ virtual int widthForValue( TQVariant &val, const TQFontMetrics &fm );
/*! \return total size of this editor, including any buttons, etc. (if present).
Reimpelment this if you want to return more appropriate size. This impelmentation just
- returns QWidget::size(). */
- virtual QSize totalSize() { return QWidget::size(); }
+ returns TQWidget::size(). */
+ virtual TQSize totalSize() { return TQWidget::size(); }
/*! Shows a special tooltip for \a value if needed, i.e. if the value could not fit inside \a rect
for a given font metrics \a fm.
- \return true a normal tooltip should be displayed (using QToolTip,) and false if
+ \return true a normal tooltip should be displayed (using TQToolTip,) and false if
no tooltip should be displayed or a custom tooltip was displayed internally (not yet supported).
Default implementation does nothing and returns false.
If the cell is currentl focused (selected), \a focused is true. */
- virtual bool showToolTipIfNeeded(const QVariant& value, const QRect& rect, const QFontMetrics& fm,
+ virtual bool showToolTipIfNeeded(const TQVariant& value, const TQRect& rect, const TQFontMetrics& fm,
bool focused);
/*! Created internal editor for this editor is needed. This method is only implemented
@@ -177,28 +178,28 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
void acceptRequested();
protected:
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
/*! Sets \a v as view widget for this editor. The view will be assigned as focus proxy
for the editor, its events will be filtered, it will be resized when neede, and so on. */
- void setViewWidget(QWidget *v);
+ void setViewWidget(TQWidget *v);
- /*! Moves child widget within the viewport if the parent is scrollview (otherwise does nothing).
- Use this for child widgets that are outside of this editor widget, instead of calling QWidget::move(). */
- void moveChild( QWidget * child, int x, int y );
+ /*! Moves child widget within the viewport if the tqparent is scrollview (otherwise does nothing).
+ Use this for child widgets that are outside of this editor widget, instead of calling TQWidget::move(). */
+ void moveChild( TQWidget * child, int x, int y );
/*! Allows to force redrawing the related cell by the editor itself. Usable when the editor is not
- displayed by a QWidget but rather by table view cell itself, for example KexiBlobTableEdit. */
- void repaintRelatedCell();
+ displayed by a TQWidget but rather by table view cell itself, for example KexiBlobTableEdit. */
+ void tqrepaintRelatedCell();
KexiTableViewColumn *m_column;
int m_leftMargin;
int m_rightMargin, m_rightMarginWhenFocused;
- QScrollView* m_scrollView; //!< may be 0 if the parent is not a scrollview
+ TQScrollView* m_scrollView; //!< may be 0 if the tqparent is not a scrollview
bool m_usesSelectedTextColor : 1; //!< set in ctor, @see usesSelectedTextColor()
private:
- QWidget* m_view;
+ TQWidget* m_view;
};
//! Declaration of cell editor factory
@@ -210,7 +211,7 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
virtual ~factoryclassname(); \
\
protected: \
- virtual KexiTableEdit* createEditor(KexiTableViewColumn &column, QWidget* parent = 0); \
+ virtual KexiTableEdit* createEditor(KexiTableViewColumn &column, TQWidget* tqparent = 0); \
};
//! Implementation of cell editor factory
@@ -225,9 +226,9 @@ factoryclassname::~factoryclassname() \
{} \
\
KexiTableEdit* factoryclassname::createEditor( \
- KexiTableViewColumn &column, QWidget* parent) \
+ KexiTableViewColumn &column, TQWidget* tqparent) \
{ \
- return new itemclassname(column, parent); \
+ return new itemclassname(column, tqparent); \
}
#endif