kexidatetableedit.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 KEXIDATETABLEEDIT_H
23#define KEXIDATETABLEEDIT_H
24
25#include "kexiinputtableedit.h"
26#include <widget/utils/kexidatetimeformatter.h>
27
35{
36 TQ_OBJECT
37
38
39 public:
40 KexiDateTableEdit(KexiTableViewColumn &column, TQWidget *parent=0);
41 virtual ~KexiDateTableEdit();
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 TQDate dateValue() const;
60
63};
64
65KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiDateEditorFactoryItem)
66
67#endif
virtual TQVariant visibleValue()
Date formatter used by KexiDateTableEdit and KexiDateTimeTableEdit.
Editor class for Date type. It is a replacement TQDateEdit due to usability problems: people are accu...
virtual void setValueInternal(const TQVariant &add, bool removeOld)
initializes this editor with add value
KexiDateFormatter m_formatter
Used to format and convert date values.
virtual bool valueIsValid()
virtual TQVariant value()
virtual bool valueIsNull()
virtual void handleAction(const TQString &actionName)
void setValueInInternalEditor(const TQVariant &value)
helper
virtual void setupContents(TQPainter *p, bool focused, const TQVariant &val, TQString &txt, int &align, int &x, int &y_offset, int &w, int &h)
virtual bool valueIsEmpty()
virtual void handleCopyAction(const TQVariant &value, const TQVariant &visibleValue)
General purpose cell editor using line edit widget.
KexiTableViewColumn * column() const