kexi

kexidatasourcecombobox.h
1/* This file is part of the KDE project
2 Copyright (C) 2005-2006 Jaroslaw Staniek <js@iidea.pl>
3
4 This library 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 library 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 library; see the file COPYING.LIB. 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 KEXIDATASOURCECOMBOBOX_H
21#define KEXIDATASOURCECOMBOBOX_H
22
23#include <kcombobox.h>
24
25class KexiProject;
26namespace KexiPart {
27 class Item;
28}
29
34class KEXIEXTWIDGETS_EXPORT KexiDataSourceComboBox : public KComboBox
35{
36 TQ_OBJECT
37
38
39 public:
40 KexiDataSourceComboBox(TQWidget *parent, const char *name=0);
42
44 KexiProject* project() const;
45
48 TQString selectedMimeType() const;
49
52 TQString selectedName() const;
53
55 bool isSelectionValid() const;
56
59 int findItem(const TQString& mimeType, const TQString& name);
60
61 public slots:
64 void setProject(KexiProject *prj, bool showTables = true, bool showQueries = true);
65
68 void setDataSource(const TQString& mimeType, const TQString& name);
69
70 signals:
74
75 protected slots:
76 void slotNewItemStored(KexiPart::Item& item);
77 void slotItemRemoved(const KexiPart::Item& item);
78 void slotItemRenamed(const KexiPart::Item& item, const TQCString& oldName);
79 void slotActivated( int index );
80 void slotReturnPressed(const TQString & text);
81
82 protected:
83 virtual void focusOutEvent( TQFocusEvent *e );
84
85 class Private;
86 Private *d;
87};
88
89#endif
A combo box listing availabe data sources (tables and queries) with icons.
void dataSourceChanged()
Emitted whenever data source changes.
Information about a single object that can be instantiated using Kexi Part.
A project's main controller.
Definition kexiproject.h:68