summaryrefslogtreecommitdiffstats
path: root/kexi/widget/tableview/kexitableview.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/widget/tableview/kexitableview.h')
-rw-r--r--kexi/widget/tableview/kexitableview.h171
1 files changed, 86 insertions, 85 deletions
diff --git a/kexi/widget/tableview/kexitableview.h b/kexi/widget/tableview/kexitableview.h
index 9f9c632e9..f06fce101 100644
--- a/kexi/widget/tableview/kexitableview.h
+++ b/kexi/widget/tableview/kexitableview.h
@@ -27,11 +27,11 @@
#ifndef KEXITABLEVIEW_H
#define KEXITABLEVIEW_H
-#include <qscrollview.h>
-#include <qvariant.h>
-#include <qptrlist.h>
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqscrollview.h>
+#include <tqvariant.h>
+#include <tqptrlist.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
#include <kdebug.h>
@@ -64,37 +64,38 @@ namespace KexiDB {
/*! @see KexiFormScrollView
*/
class KEXIDATATABLE_EXPORT KexiTableView :
- public QScrollView,
+ public TQScrollView,
public KexiRecordNavigatorHandler,
public KexiSharedActionClient,
public KexiDataAwareObjectInterface
{
Q_OBJECT
+ TQ_OBJECT
KEXI_DATAAWAREOBJECTINTERFACE
public:
/*! Defines table view's detailed appearance settings. */
class KEXIDATATABLE_EXPORT Appearance {
public:
- Appearance(QWidget *widget = 0);
+ Appearance(TQWidget *widget = 0);
/*! base color for cells, default is "Base" color for application's
current active palette */
- QColor baseColor;
+ TQColor baseColor;
/*! text color for cells, default is "Text" color for application's
current active palette */
- QColor textColor;
+ TQColor textColor;
- /*! border color for cells, default is QColor(200,200,200) */
- QColor borderColor;
+ /*! border color for cells, default is TQColor(200,200,200) */
+ TQColor borderColor;
/*! empty area color, default is "Base" color for application's
current active palette */
- QColor emptyAreaColor;
+ TQColor emptyAreaColor;
/*! alternate background color, default is KGlobalSettings::alternateBackgroundColor() */
- QColor alternateBackgroundColor;
+ TQColor alternateBackgroundColor;
/*! true if background altering should be enabled, true by default */
bool backgroundAltering : 1;
@@ -129,26 +130,26 @@ public:
/*! color for row highlight, default is intermediate (33%/60%) between
active highlight and base color. */
- QColor rowHighlightingColor;
+ TQColor rowHighlightingColor;
/*! color for text under row highlight, default is the same as textColor.
Used when rowHighlightingEnabled is true; */
- QColor rowHighlightingTextColor;
+ TQColor rowHighlightingTextColor;
/*! color for row highlight for mouseover, default is intermediate (20%/80%) between
active highlight and base color. Used when rowMouseOverHighlightingEnabled is true. */
- QColor rowMouseOverHighlightingColor;
+ TQColor rowMouseOverHighlightingColor;
/*! color for text under row highlight for mouseover, default is the same as textColor.
Used when rowMouseOverHighlightingEnabled is true; */
- QColor rowMouseOverHighlightingTextColor;
+ TQColor rowMouseOverHighlightingTextColor;
/*! Like rowMouseOverHighlightingColor but for areas painted with alternate color.
This is computed using active highlight color and alternateBackgroundColor. */
- QColor rowMouseOverAlternateHighlightingColor;
+ TQColor rowMouseOverAlternateHighlightingColor;
};
- KexiTableView(KexiTableViewData* data=0, QWidget* parent=0, const char* name=0);
+ KexiTableView(KexiTableViewData* data=0, TQWidget* tqparent=0, const char* name=0);
virtual ~KexiTableView();
/*! \return current appearance settings */
@@ -158,7 +159,7 @@ public:
void setAppearance(const Appearance& a);
/*! \return string displayed for column's header \a colNum */
- QString columnCaption(int colNum) const;
+ TQString columnCaption(int colNum) const;
/*! Convenience function.
\return field object that define column \a colNum or NULL if there is no such column */
@@ -177,7 +178,7 @@ public:
for current table view's size. */
virtual int rowsPerPage() const;
- QRect cellGeometry(int row, int col) const;
+ TQRect cellGeometry(int row, int col) const;
int columnWidth(int col) const;
int rowHeight() const;
int columnPos(int col) const;
@@ -221,14 +222,14 @@ public:
#endif
// reimplemented for internal reasons
- virtual QSizePolicy sizePolicy() const;
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSizePolicy sizePolicy() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
/*! Reimplemented to update cached fonts and row sizes for the painter. */
- void setFont(const QFont &f);
+ void setFont(const TQFont &f);
- virtual QSize tableSize() const;
+ virtual TQSize tableSize() const;
void emitSelected();
@@ -243,7 +244,7 @@ public:
ScrollRight
};
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! Initializes standard editor cell editor factories. This is called internally, once.
static void initCellEditorFactories();
@@ -256,13 +257,13 @@ public:
KexiTableItem *highlightedItem() const;
/*! \return vertical scrollbar. Implemented for KexiDataAwareObjectInterface. */
- virtual QScrollBar* verticalScrollBar() const { return QScrollView::verticalScrollBar(); }
+ virtual TQScrollBar* verticalScrollBar() const { return TQScrollView::verticalScrollBar(); }
public slots:
virtual void setData( KexiTableViewData *data, bool owner = true )
{ KexiDataAwareObjectInterface::setData( data, owner ); }
- virtual void clearColumnsInternal(bool repaint);
+ virtual void clearColumnsInternal(bool tqrepaint);
/*! Adjusts \a colNum column's width to its (current) contents.
If \a colNum == -1, all columns' width is adjusted. */
@@ -274,18 +275,18 @@ public slots:
/*! If \a set is true, \a colNum column is resized to take full possible width.
If \a set is false, no automatic resize will be performed.
If \a colNum is -1, all columns are equally resized, when needed, to take full possible width.
- This method behaves like QHeader::setStretchEnabled ( bool b, int section ). */
+ This method behaves like TQHeader::setStretchEnabled ( bool b, int section ). */
void setColumnStretchEnabled( bool set, int colNum );
/*! Maximizes widths of columns selected by \a columnList, so the horizontal
header has maximum overall width. Each selected column's width will be increased
by the same value. Does nothing if \a columnList is empty or there is no free space
to resize columns. If this table view is not visible, resizing will be performed on showing. */
- void maximizeColumnsWidth( const QValueList<int> &columnList );
+ void maximizeColumnsWidth( const TQValueList<int> &columnList );
/*! Adjusts the size of the sections to fit the size of the horizontal header
as completely as possible. Only sections for which column stretch is enabled will be resized.
- \sa setColumnStretchEnabled() QHeader::adjustHeaderSize() */
+ \sa setColumnStretchEnabled() TQHeader::adjustHeaderSize() */
void adjustHorizontalHeaderSize();
/*! Sets highlighted row number or -1 if no row has to be highlighted.
@@ -302,7 +303,7 @@ public slots:
virtual void ensureCellVisible(int row, int col/*=-1*/);
// void gotoNext();
-//js int findString(const QString &string);
+//js int findString(const TQString &string);
/*! Deletes currently selected record; does nothing if no record
is currently selected. If record is in edit mode, editing
@@ -325,7 +326,7 @@ public slots:
was displayed (in this case, \a setText is usually not empty, what means
that text will be set in the cell replacing previous value).
*/
- virtual void startEditCurrentCell(const QString& setText = QString::null)
+ virtual void startEditCurrentCell(const TQString& setText = TQString())
{ KexiDataAwareObjectInterface::startEditCurrentCell(setText); }
/*! Deletes currently selected cell's contents, if allowed.
@@ -371,20 +372,20 @@ signals:
void itemDblClicked(KexiTableItem *, int row, int col);
void itemMouseReleased(KexiTableItem *, int row, int col);
- void dragOverRow(KexiTableItem *item, int row, QDragMoveEvent* e);
- void droppedAtRow(KexiTableItem *item, int row, QDropEvent *e, KexiTableItem*& newItem);
+ void dragOverRow(KexiTableItem *item, int row, TQDragMoveEvent* e);
+ void droppedAtRow(KexiTableItem *item, int row, TQDropEvent *e, KexiTableItem*& newItem);
/*! Data has been refreshed on-screen - emitted from initDataContents(). */
virtual void dataRefreshed();
virtual void itemChanged(KexiTableItem *, int row, int col);
- virtual void itemChanged(KexiTableItem *, int row, int col, QVariant oldValue);
+ virtual void itemChanged(KexiTableItem *, int row, int col, TQVariant oldValue);
virtual void itemDeleteRequest(KexiTableItem *, int row, int col);
virtual void currentItemDeleteRequest();
//! Emitted for spreadsheet mode when an item was deleted and a new item has been appended
virtual void newItemAppendedForAfterDeletingInSpreadSheetMode();
// void addRecordRequest();
-// void contextMenuRequested(KexiTableItem *, int row, int col, const QPoint &);
+// void contextMenuRequested(KexiTableItem *, int row, int col, const TQPoint &);
void sortedColumnChanged(int col);
//! emmited when row editing is started (for updating or inserting)
@@ -403,7 +404,7 @@ protected slots:
virtual void slotDataDestroying() { KexiDataAwareObjectInterface::slotDataDestroying(); }
- virtual void slotRowsDeleted( const QValueList<int> & );
+ virtual void slotRowsDeleted( const TQValueList<int> & );
//! updates display after many rows deletion
void slotColumnWidthChanged( int col, int os, int ns );
@@ -431,19 +432,19 @@ protected slots:
virtual void slotRowRepaintRequested(KexiTableItem& item);
//! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().
- virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint)
- { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); }
+ virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); }
- //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed.
+ //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed.
virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); }
- //! Handles KexiTableViewData::rowInserted() signal to repaint when needed.
- virtual void slotRowInserted(KexiTableItem *item, bool repaint)
- { KexiDataAwareObjectInterface::slotRowInserted(item, repaint); }
+ //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed.
+ virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotRowInserted(item, tqrepaint); }
//! Like above, not db-aware version
- virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint)
- { KexiDataAwareObjectInterface::slotRowInserted(item, row, repaint); }
+ virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotRowInserted(item, row, tqrepaint); }
/*! Handles verticalScrollBar()'s valueChanged(int) signal.
Called when vscrollbar's value has been changed. */
@@ -465,7 +466,7 @@ protected:
virtual void initDataContents();
/*! Implementation for KexiDataAwareObjectInterface.
- Updates widget's contents size using QScrollView::resizeContents()
+ Updates widget's contents size using TQScrollView::resizeContents()
depending on tableSize(). */
virtual void updateWidgetContentsSize();
@@ -495,42 +496,42 @@ protected:
/*! Implementation for KexiDataAwareObjectInterface.
Adds another section within the horizontal header. */
- virtual void addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int size);
+ virtual void addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int size);
/*! @internal \return true if the row defined by \a item has default
value at column \a col. If this is the case and \a value is not NULL,
*value is set to the default value. */
- bool isDefaultValueDisplayed(KexiTableItem *item, int col, QVariant* value = 0);
+ bool isDefaultValueDisplayed(KexiTableItem *item, int col, TQVariant* value = 0);
- //! painting and layout
- void drawContents(QPainter *p, int cx, int cy, int cw, int ch);
+ //! painting and tqlayout
+ void drawContents(TQPainter *p, int cx, int cy, int cw, int ch);
void createBuffer(int width, int height);
- void paintCell(QPainter* p, KexiTableItem *item, int col, int row, const QRect &cr, bool print=false);
- void paintEmptyArea(QPainter *p, int cx, int cy, int cw, int ch);
+ void paintCell(TQPainter* p, KexiTableItem *item, int col, int row, const TQRect &cr, bool print=false);
+ void paintEmptyArea(TQPainter *p, int cx, int cy, int cw, int ch);
void updateGeometries();
- QPoint contentsToViewport2( const QPoint &p );
+ TQPoint contentsToViewport2( const TQPoint &p );
void contentsToViewport2( int x, int y, int& vx, int& vy );
- QPoint viewportToContents2( const QPoint& vp );
+ TQPoint viewportToContents2( const TQPoint& vp );
// event handling
- virtual void contentsMousePressEvent(QMouseEvent* e);
- virtual void contentsMouseReleaseEvent(QMouseEvent* e);
+ virtual void contentsMousePressEvent(TQMouseEvent* e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent* e);
//! @internal called by contentsMouseOrEvent() contentsMouseReleaseEvent() to move cursor
- bool handleContentsMousePressOrRelease(QMouseEvent* e, bool release);
- virtual void contentsMouseMoveEvent(QMouseEvent* e);
- virtual void contentsMouseDoubleClickEvent(QMouseEvent* e);
- virtual void keyPressEvent(QKeyEvent* e);
- virtual void focusInEvent(QFocusEvent* e);
- virtual void focusOutEvent(QFocusEvent* e);
- virtual void resizeEvent(QResizeEvent* e);
- virtual void viewportResizeEvent(QResizeEvent *e);
- virtual void showEvent(QShowEvent *e);
- virtual void contentsDragMoveEvent(QDragMoveEvent *e);
- virtual void contentsDropEvent(QDropEvent *e);
- virtual void viewportDragLeaveEvent(QDragLeaveEvent *e);
- virtual void paletteChange( const QPalette &oldPalette );
+ bool handleContentsMousePressOrRelease(TQMouseEvent* e, bool release);
+ virtual void contentsMouseMoveEvent(TQMouseEvent* e);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
+ virtual void focusInEvent(TQFocusEvent* e);
+ virtual void focusOutEvent(TQFocusEvent* e);
+ virtual void resizeEvent(TQResizeEvent* e);
+ virtual void viewportResizeEvent(TQResizeEvent *e);
+ virtual void showEvent(TQShowEvent *e);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent *e);
+ virtual void contentsDropEvent(TQDropEvent *e);
+ virtual void viewportDragLeaveEvent(TQDragLeaveEvent *e);
+ virtual void paletteChange( const TQPalette &oldPalette );
/*! Implementation for KexiDataAwareObjectInterface */
virtual KexiDataItemInterface *editor( int col, bool ignoreMissingEditor = false );
@@ -542,7 +543,7 @@ protected:
virtual void editorShowFocus( int row, int col );
//! Creates editors and shows it, what usually means the beginning of a cell editing
- virtual void createEditor(int row, int col, const QString& addText = QString::null,
+ virtual void createEditor(int row, int col, const TQString& addText = TQString(),
bool removeOld = false);
bool focusNextPrevChild(bool next);
@@ -552,7 +553,7 @@ protected:
given action's shortcut - false is returned (beause action is already performed at main
window's level).
*/
- bool shortCutPressed( QKeyEvent *e, const QCString &action_name );
+ bool shortCutPressed( TQKeyEvent *e, const TQCString &action_name );
#if 0 //we have now KexiActionProxy
/*! Updates visibility/accesibility of popup menu items,
@@ -564,30 +565,30 @@ protected:
if menu is configured,
else: contextMenuRequested() signal is emmited.
Method used in contentsMousePressEvent() (for right button)
- and keyPressEvent() for Qt::Key_Menu key.
- If \a pos is QPoint(-1,-1) (the default), menu is positioned below the current cell.
+ and keyPressEvent() for TQt::Key_Menu key.
+ If \a pos is TQPoint(-1,-1) (the default), menu is positioned below the current cell.
*/
- void showContextMenu( const QPoint& pos = QPoint(-1,-1) );
+ void showContextMenu( const TQPoint& pos = TQPoint(-1,-1) );
/*! internal */
inline void paintRow(KexiTableItem *item,
- QPainter *pb, int r, int rowp, int cx, int cy,
+ TQPainter *pb, int r, int rowp, int cx, int cy,
int colfirst, int collast, int maxwc);
- virtual void setHBarGeometry( QScrollBar & hbar, int x, int y, int w, int h );
+ virtual void setHBarGeometry( TQScrollBar & hbar, int x, int y, int w, int h );
//! Setups navigator widget
void setupNavigator();
//! internal, to determine valid row number when navigator text changed
- int validRowNumber(const QString& text);
+ int validRowNumber(const TQString& text);
/*! Reimplementation for KexiDataAwareObjectInterface
(viewport()->setFocus() is just added) */
virtual void removeEditor();
//! Internal: updated sched fonts for painting.
- void updateFonts(bool repaint = false);
+ void updateFonts(bool tqrepaint = false);
/*! @internal Changes bottom margin settings, in pixels.
At this time, it's used by KexiComboBoxPopup to decrease margin for popup's table. */
@@ -613,7 +614,7 @@ protected:
virtual void paste();
/*! Used in KexiDataAwareObjectInterface::slotRowDeleted()
- to repaint tow \a row and all visible below. */
+ to tqrepaint tow \a row and all visible below. */
virtual void updateAllVisibleRowsBelow(int row);
void updateAfterCancelRowEdit();
@@ -622,11 +623,11 @@ protected:
/*! Sets \a cellValue if there is a lookup value for the cell \a item.
Used in KexiTableView::paintCell() and KexiTableViewCellToolTip::maybeTip()
\return true is \a cellValue has been found. */
- bool getVisibleLookupValue(QVariant& cellValue, KexiTableEdit *edit,
+ bool getVisibleLookupValue(TQVariant& cellValue, KexiTableEdit *edit,
KexiTableItem *item, KexiTableViewColumn *tvcol) const;
-// //! Called to repaint contents after a row is deleted.
-// void repaintAfterDelete();
+// //! Called to tqrepaint contents after a row is deleted.
+// void tqrepaintAfterDelete();
KexiTableViewPrivate *d;