kexi
kexiinputtableedit.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KEXIINPUTTABLEEDIT_H
00022 #define KEXIINPUTTABLEEDIT_H
00023
00024 #include <klineedit.h>
00025 #include <qvariant.h>
00026
00027 #include "kexitableedit.h"
00028 #include "kexicelleditorfactory.h"
00029 #include "kexitextformatter.h"
00030
00033 class KEXIDATATABLE_EXPORT KexiInputTableEdit : public KexiTableEdit
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 KexiInputTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
00039
00040 virtual ~KexiInputTableEdit();
00041
00042 #if 0
00043
00047 static QString valueToText(KexiDB::Field* field, const QVariant& value, const QString& add);
00048 #endif
00049
00050 virtual bool valueChanged();
00051
00053 virtual bool valueIsNull();
00054
00058 virtual bool valueIsEmpty();
00059
00060 virtual QVariant value();
00061
00062 virtual bool cursorAtStart();
00063 virtual bool cursorAtEnd();
00064
00065
00066
00067
00068 virtual void clear();
00069
00071 virtual QSize totalSize();
00072
00075 virtual void handleAction(const QString& actionName);
00076
00080 virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
00081
00089 virtual bool showToolTipIfNeeded(const QVariant& value, const QRect& rect, const QFontMetrics& fm,
00090 bool focused);
00091
00092 public slots:
00094 virtual void moveCursorToEnd();
00095
00097 virtual void moveCursorToStart();
00098
00100 virtual void selectAll();
00101
00102 protected slots:
00103 void setRestrictedCompletion();
00104 void completed(const QString &);
00105
00106 protected:
00108 virtual void setValueInternal(const QVariant& add, bool removeOld);
00109
00110 void showHintButton();
00111 void init();
00112 virtual void paintEvent( QPaintEvent *e );
00113
00114 KexiTextFormatter m_textFormatter;
00115 bool m_calculatedCell;
00116 QString m_decsym;
00117 QString m_origText;
00118 KLineEdit *m_lineedit;
00119
00120 signals:
00121 void hintClicked();
00122 };
00123
00124 KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiInputEditorFactoryItem)
00125
00126 #endif
|