kexi

kexidatetimetableedit.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002   Lucijan Busch <lucijan@gmx.at>
00003    Copyright (C) 2003   Daniel Molkentin <molkentin@kde.org>
00004    Copyright (C) 2003-2004,2006 Jaroslaw Staniek <js@iidea.pl>
00005 
00006    This program is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this program; see the file COPYING.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef KEXIDATETIMETABLEEDIT_H
00023 #define KEXIDATETIMETABLEEDIT_H
00024 
00025 #include "kexidatetableedit.h"
00026 #include "kexitimetableedit.h"
00027 
00034 class KEXIDATATABLE_EXPORT KexiDateTimeTableEdit : public KexiInputTableEdit
00035 {
00036     Q_OBJECT
00037 
00038     public:
00039         KexiDateTimeTableEdit(KexiTableViewColumn &column, QScrollView *parent=0);
00040         virtual ~KexiDateTimeTableEdit();
00041         virtual void setupContents( QPainter *p, bool focused, QVariant val, 
00042             QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
00043         virtual QVariant value();
00044         virtual bool valueIsNull();
00045         virtual bool valueIsEmpty();
00046         virtual bool valueIsValid();
00047 
00048     protected slots:
00049 
00050     protected:
00051         virtual void setValueInternal(const QVariant& add, bool removeOld);
00052         QDateTime dateTimeValue();
00053         bool textIsEmpty() const;
00054 
00056         KexiDateFormatter m_dateFormatter;
00057 
00059         KexiTimeFormatter m_timeFormatter;
00060 };
00061 
00062 KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiDateTimeEditorFactoryItem)
00063 
00064 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys