kexi

kexitimetableedit.h
1/* This file is part of the KDE project
2 Copyright (C) 2004,2006 Jaroslaw Staniek <js@iidea.pl>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef KEXITIMETABLEEDIT_H
21#define KEXITIMETABLEEDIT_H
22
23#include "kexiinputtableedit.h"
24#include <widget/utils/kexidatetimeformatter.h>
25
32class KexiTimeTableEdit : public KexiInputTableEdit
33{
34 TQ_OBJECT
35
36
37 public:
38 KexiTimeTableEdit(KexiTableViewColumn &column, TQWidget *parent=0);
39 virtual ~KexiTimeTableEdit();
40 virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
41 TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
42 virtual TQVariant value();
43 virtual bool valueIsNull();
44 virtual bool valueIsEmpty();
45 virtual bool valueIsValid();
46
48 virtual void handleAction(const TQString& actionName);
49
51 virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
52
53 protected:
55 void setValueInInternalEditor(const TQVariant &value);
56 virtual void setValueInternal(const TQVariant& add, bool removeOld);
57 TQTime timeValue();
58
61};
62
63KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiTimeEditorFactoryItem)
64
65#endif
virtual TQVariant visibleValue()
KexiTableViewColumn * column() const
Time formatter used by KexiTimeTableEdit and KexiDateTimeTableEdit Following time formats are allowed...
KexiTimeTableEdit(KexiTableViewColumn &column, TQWidget *parent=0)
virtual void handleAction(const TQString &actionName)
KexiTimeFormatter m_formatter
Used to format and convert time 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 bool valueIsValid()
virtual bool valueIsEmpty()
virtual TQVariant value()
virtual void setValueInternal(const TQVariant &add, bool removeOld)
initializes this editor with add value
virtual void handleCopyAction(const TQVariant &value, const TQVariant &visibleValue)
virtual bool valueIsNull()
void setValueInInternalEditor(const TQVariant &value)
helper