kexi

kexiinputtableedit.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002 Lucijan Busch <lucijan@gmx.at>
00003    Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this program; see the file COPYING.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
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 
00032 class KEXIDATATABLE_EXPORT KexiInputTableEdit : public KexiTableEdit
00033 {
00034     Q_OBJECT
00035 
00036     public:
00037         KexiInputTableEdit(KexiTableViewColumn &column, QScrollView *parent=0);
00038 
00039         virtual ~KexiInputTableEdit();
00040 
00041         virtual bool valueChanged();
00042 
00044         virtual bool valueIsNull();
00045 
00049         virtual bool valueIsEmpty();
00050 
00051         virtual QVariant value();
00052 
00053         virtual bool cursorAtStart();
00054         virtual bool cursorAtEnd();
00055 
00056 //      virtual bool eventFilter(QObject* watched, QEvent* e);
00057 //js        void end(bool mark);
00058 //js        void backspace();
00059         virtual void clear();
00060 
00062         virtual QSize totalSize();
00063 
00064     protected slots:
00065         void setRestrictedCompletion();
00066         void completed(const QString &);
00067 
00068     protected:
00070         virtual void setValueInternal(const QVariant& add, bool removeOld);
00071 
00072         void showHintButton();
00073         void init();
00074         virtual void paintEvent( QPaintEvent *e );
00075 
00076         bool m_calculatedCell;
00077         QString m_decsym; 
00078         QString m_origText; 
00079         KLineEdit *m_lineedit;
00080 
00081     signals:
00082         void hintClicked();
00083 };
00084 
00085 KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiInputEditorFactoryItem)
00086 
00087 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys