21#ifndef _KEXITABLEEDIT_H_
22#define _KEXITABLEEDIT_H_
24#include <kexidataiteminterface.h>
27#include <tqscrollview.h>
29#include "kexitableviewdata.h"
33 class QueryColumnInfo;
73 virtual void resize( int w, int h);
76 virtual TQWidget* widget() { return m_view; }
87 virtual void paintFocusBorders( TQPainter *p, TQVariant &cal, int x, int y, int w, int h );
105 virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
106 TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
119 virtual void paintSelectionBackground( TQPainter *p, bool focused, const TQString& txt,
120 int align, int x, int y_offset, int w, int h, const TQColor& fillColor,
121 const TQFontMetrics &fm, bool readOnly, bool fullRowSelection );
131 int rightMargin( bool focused) const;
138 Q_UNUSED(ke); Q_UNUSED(editorActive); return false; }
154 virtual int widthForValue( TQVariant &val, const TQFontMetrics &fm );
167 virtual bool showToolTipIfNeeded( const TQVariant& value, const TQRect& rect, const TQFontMetrics& fm,
176 void editRequested();
177 void cancelRequested();
178 void acceptRequested();
181 virtual bool eventFilter(TQObject* watched, TQEvent* e);
185 void setViewWidget(TQWidget *v);
189 void moveChild( TQWidget * child, int x, int y );
193 void repaintRelatedCell();
197 int m_rightMargin, m_rightMarginWhenFocused;
206#define KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(factoryclassname) \
207 class factoryclassname : public KexiCellEditorFactoryItem \
210 factoryclassname(); \
211 virtual ~factoryclassname(); \
214 virtual KexiTableEdit* createEditor(KexiTableViewColumn &column, TQWidget* parent = 0); \
218#define KEXI_CELLEDITOR_FACTORY_ITEM_IMPL(factoryclassname, itemclassname) \
219factoryclassname::factoryclassname() \
220 : KexiCellEditorFactoryItem() \
222 m_className = "" #itemclassname ""; \
225factoryclassname::~factoryclassname() \
228KexiTableEdit* factoryclassname::createEditor( \
229 KexiTableViewColumn &column, TQWidget* parent) \
231 return new itemclassname(column, parent); \
Helper class that assigns additional information for the column in a query.
KexiDB::QuerySchema provides information about database query.
An interface for declaring widgets to be data-aware.
Abstract class for a cell editor. Handles cell painting and displaying the editor widget.
virtual TQSize totalSize()
virtual bool handleKeyPress(TQKeyEvent *ke, bool editorActive)
KexiTableViewColumn * column() const
virtual TQWidget * widget()
virtual void setColumnInfo(KexiDB::QueryColumnInfo *) Implemented for KexiDataItemInterface.
bool usesSelectedTextColor() const
virtual void hideWidget()
bool m_usesSelectedTextColor set in ctor,
virtual KexiDB::Field * field() const Implemented for KexiDataItemInterface.
virtual KexiDB::QueryColumnInfo * columnInfo() const
virtual void createInternalEditor(KexiDB::QuerySchema &schema)
virtual void handleCopyAction(const TQVariant &value, const TQVariant &visibleValue)=0
TQScrollView * m_scrollView may be 0 if the parent is not a scrollview
virtual void showWidget()
virtual bool handleDoubleClick()
High-level database connectivity library with database backend drivers.
|