kexi

kexifieldcombobox.h
1/* This file is part of the KDE project
2 Copyright (C) 2005-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 KEXIFIELDCOMBOBOX_H
21#define KEXIFIELDCOMBOBOX_H
22
23#include <tqpixmap.h>
24#include <kcombobox.h>
25
26namespace KexiDB {
27 class TableOrQuerySchema;
28}
29class KexiProject;
30
34class KEXIEXTWIDGETS_EXPORT KexiFieldComboBox : public KComboBox
35{
36 TQ_OBJECT
37
38
39 public:
40 KexiFieldComboBox(TQWidget *parent, const char *name = 0);
41 virtual ~KexiFieldComboBox();
42
43// /*! Sets table or query schema \a schema.
44// The schema object will be owned by the KexiFieldComboBox object. */
45// void setSchema(KexiDB::TableOrQuerySchema* schema);
46
47// KexiDB::TableOrQuerySchema* schema() const { return m_schema; }
48
49 public slots:
51 KexiProject* project() const;
52
54 void setProject(KexiProject *prj);
55
56 void setTableOrQuery(const TQString& name, bool table);
57 TQString tableOrQueryName() const;
58 bool isTableAssigned() const;
59 void setFieldOrExpression(const TQString& string);
60 void setFieldOrExpression(int index);
61 TQString fieldOrExpression() const;
62 TQString fieldOrExpressionCaption() const;
63
67 int indexOfField() const;
68
69 signals:
70 void selected();
71
72 protected slots:
73 void slotActivated(int);
74 void slotReturnPressed(const TQString & text);
75
76 protected:
77 virtual void focusOutEvent( TQFocusEvent *e );
78
79 class Private;
80 Private *d;
81};
82
83#endif
A project's main controller.
Definition kexiproject.h:68
High-level database connectivity library with database backend drivers.