connectiondialog.h
1/* This file is part of the KDE project
2 Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
3 Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef FORMCONNECTIONDIALOG_H
22#define FORMCONNECTIONDIALOG_H
23
24#include <tqintdict.h>
25#include <kdialogbase.h>
26
27namespace KexiDB {
28 class ResultInfo;
29}
30
31class TQLabel;
32class TQButton;
33class KexiTableView;
35class KexiTableItem;
36
37namespace KFormDesigner {
38
39class Form;
40class ConnectionBuffer;
41class Connection;
42
43
46class KFORMEDITOR_EXPORT ConnectionDialog : public KDialogBase
47{
48 TQ_OBJECT
49
50
51 public:
52 ConnectionDialog(TQWidget *parent);
54
56 void exec(Form *form);
57
58 protected:
60 void setStatusOk(KexiTableItem *item = 0);
63 void setStatusError(const TQString &msg, KexiTableItem *item = 0);
65 void initTable();
67 void updateTableData();
69 void updateSlotList(KexiTableItem *item);
71 void updateSignalList(KexiTableItem *item);
72
73 protected slots:
75 void slotCellChanged(KexiTableItem*, int, TQVariant&, KexiDB::ResultInfo*);
79 void checkConnection(KexiTableItem *item);
80
83 void newItemByDragnDrop();
85 void newItem();
86 void removeItem();
87
90 void slotConnectionCreated(KFormDesigner::Form *form, KFormDesigner::Connection &connection);
93 void slotConnectionAborted(KFormDesigner::Form *form);
94
95 void slotCellSelected(int col, int row);
96 void slotRowInserted(KexiTableItem*,bool);
97
100 virtual void slotOk();
101
102 protected:
103 enum {BAdd = 10, BRemove};
104 Form *m_form;
105 ConnectionBuffer *m_buffer;
106 KexiTableView *m_table;
107 KexiTableViewData *m_data;
108 KexiTableViewData *m_widgetsColumnData, *m_slotsColumnData, *m_signalsColumnData;
109 TQLabel *m_pixmapLabel, *m_textLabel;
110 TQIntDict<TQButton> m_buttons;
111};
112
113}
114
115#endif
A simple class representing a form.
Definition form.h:136
KexiTableView class provides a widget for displaying data in a tabular view.
High-level database connectivity library with database backend drivers.