kexicomboboxpopup.h
1/* This file is part of the KDE project
2 Copyright (C) 2004-2007 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 KEXICOMBOBOXPOPUP_H
21#define KEXICOMBOBOXPOPUP_H
22
23#include <tqframe.h>
24
25class KexiComboBoxPopupPrivate;
26class KexiTableView;
29class KexiTableItem;
30namespace KexiDB {
31 class Field;
32}
33
35class KexiComboBoxPopup : public TQFrame
36{
37 TQ_OBJECT
38
39 public:
40//js TODO: more ctors!
45 KexiComboBoxPopup(TQWidget* parent, KexiTableViewColumn &column);
46
48 KexiComboBoxPopup(TQWidget* parent, KexiDB::Field &field);
49
50 virtual ~KexiComboBoxPopup();
51
52 KexiTableView* tableView();
53
55 void setMaxRows(int r);
56
58 int maxRows() const;
59
61 static const int defaultMaxRows;
62
63 virtual bool eventFilter( TQObject *o, TQEvent *e );
64
65 signals:
66 void rowAccepted(KexiTableItem *item, int row);
67 void cancelled();
68 void hidden();
69
70 public slots:
71 virtual void resize( int w, int h );
72 void updateSize(int minWidth = 0);
73
74 protected slots:
75 void slotTVItemAccepted(KexiTableItem *item, int row, int col);
76 void slotDataReloadRequested();
77
78 protected:
79 void init();
82 void setData(KexiTableViewColumn *column, KexiDB::Field *field);
83
85 void setDataInternal( KexiTableViewData *data, bool owner = true );
86
87 KexiComboBoxPopupPrivate *d;
88
89 friend class KexiComboBoxTableEdit;
90};
91
92#endif
93
Internal class for displaying popup table view.
void setDataInternal(KexiTableViewData *data, bool owner=true)
used by setData()
void setData(KexiTableViewColumn *column, KexiDB::Field *field)
The main function for setting data; data can be set either by passing column or field.
static const int defaultMaxRows
Drop-down cell editor.
Meta-data for a field.
Definition field.h:73
KexiTableView class provides a widget for displaying data in a tabular view.
High-level database connectivity library with database backend drivers.