kexi

kexidatetimetableedit.h
1/* This file is part of the KDE project
2 Copyright (C) 2002 Lucijan Busch <lucijan@gmx.at>
3 Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org>
4 Copyright (C) 2003-2004,2006 Jaroslaw Staniek <js@iidea.pl>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#ifndef KEXIDATETIMETABLEEDIT_H
23#define KEXIDATETIMETABLEEDIT_H
24
25#include "kexidatetableedit.h"
26#include "kexitimetableedit.h"
27
34class KexiDateTimeTableEdit : public KexiInputTableEdit
35{
36 TQ_OBJECT
37
38
39 public:
41 virtual ~KexiDateTimeTableEdit();
42 virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
43 TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
44 virtual TQVariant value();
45 virtual bool valueIsNull();
46 virtual bool valueIsEmpty();
47 virtual bool valueIsValid();
48
50 virtual void handleAction(const TQString& actionName);
51
53 virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
54
55 protected:
57 void setValueInInternalEditor(const TQVariant &value);
58 virtual void setValueInternal(const TQVariant& add, bool removeOld);
59 bool textIsEmpty() const;
60
63
66};
67
68KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiDateTimeEditorFactoryItem)
69
70#endif
virtual TQVariant visibleValue()
Date formatter used by KexiDateTableEdit and KexiDateTimeTableEdit.
virtual void setValueInternal(const TQVariant &add, bool removeOld)
initializes this editor with add value
KexiDateTimeTableEdit(KexiTableViewColumn &column, TQWidget *parent=0)
KexiDateFormatter m_dateFormatter
Used to format and convert date values.
virtual void setupContents(TQPainter *p, bool focused, const TQVariant &val, TQString &txt, int &align, int &x, int &y_offset, int &w, int &h)
virtual void handleAction(const TQString &actionName)
KexiTimeFormatter m_timeFormatter
Used to format and convert time values.
void setValueInInternalEditor(const TQVariant &value)
helper
virtual void handleCopyAction(const TQVariant &value, const TQVariant &visibleValue)
KexiTableViewColumn * column() const
Time formatter used by KexiTimeTableEdit and KexiDateTimeTableEdit Following time formats are allowed...