kexirelationpartimpl.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2004 Lucijan Busch <lucijan@kde.org>
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#include "kexirelationmaindlg.h"
21#include "kexirelationpartimpl.h"
22
23#include <kexirelationwidget.h>
24#include <kexidialogbase.h>
25#include <keximainwindow.h>
26
27#include <kgenericfactory.h>
28#include <kiconloader.h>
29#include <kdebug.h>
30
31KexiRelationPartImpl::KexiRelationPartImpl(TQObject *parent, const char *name, const TQStringList &args)
32 : KexiInternalPart(parent, name, args)
33{
34 kdDebug() << "KexiRelationPartImpl()" << endl;
35}
36
37KexiRelationPartImpl::~KexiRelationPartImpl()
38{
39}
40
41/*TQWidget *
42KexiRelationPartImpl::createWidget(const char* , KexiMainWindow* mainWin,
43 TQWidget *parent, const char *objName)
44{
45 return new KexiRelationWidget(mainWin, parent, objName);
46}*/
47
48/*KexiDialogBase *
49KexiRelationPartImpl::createDialog(KexiMainWindow* mainWin, const char *)
50{
51 kdDebug() << "KexiRelationPartImpl::createDialog()" << endl;
52 KexiDialogBase * dlg = new KexiDialogBase(mainWin, i18n("Relations"));
53 dlg->setIcon(SmallIcon("relation"));
54 dlg->setDocID( mainWin->generatePrivateDocID() );
55
56 KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, 0, "relations");
57 dlg->addView(view);
58// dlg->show();
59// dlg->registerDialog();
60
61 return dlg;
62}*/
63
65KexiRelationPartImpl::createView(KexiMainWindow* mainWin, TQWidget *parent, const char *)
66{
67// kdDebug() << "KexiRelationPartImpl::createDialog()" << endl;
68// KexiDialogBase * dlg = new KexiDialogBase(mainWin, i18n("Relations"));
69// dlg->setIcon(SmallIcon("relation"));
70// dlg->setDocID( mainWin->generatePrivateDocID() );
71
72 KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, parent, "relations");
73// dlg->addView(view);
74// dlg->show();
75// dlg->registerDialog();
76
77 return view;
78}
79
80
81K_EXPORT_COMPONENT_FACTORY( kexihandler_relation,
82 KGenericFactory<KexiRelationPartImpl>("kexihandler_relation") )
83
84#include "kexirelationpartimpl.moc"
85
A prototype for Kexi Internal Parts (plugins) implementation.
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
Base class for single view embeddable of in KexiDialogBase.