summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/relations
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kexi/plugins/relations
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/relations')
-rw-r--r--kexi/plugins/relations/Makefile.am28
-rw-r--r--kexi/plugins/relations/kexirelationhandler.desktop110
-rw-r--r--kexi/plugins/relations/kexirelationmaindlg.cpp81
-rw-r--r--kexi/plugins/relations/kexirelationmaindlg.h47
-rw-r--r--kexi/plugins/relations/kexirelationpartimpl.cpp85
-rw-r--r--kexi/plugins/relations/kexirelationpartimpl.h46
-rw-r--r--kexi/plugins/relations/kexirelationpartinstui.rc6
-rw-r--r--kexi/plugins/relations/kexirelationpartui.rc14
8 files changed, 417 insertions, 0 deletions
diff --git a/kexi/plugins/relations/Makefile.am b/kexi/plugins/relations/Makefile.am
new file mode 100644
index 00000000..6e35ab3a
--- /dev/null
+++ b/kexi/plugins/relations/Makefile.am
@@ -0,0 +1,28 @@
+include $(top_srcdir)/kexi/Makefile.global
+
+kde_module_LTLIBRARIES = kexihandler_relation.la
+
+#kexihandler_relation_la_SOURCES = kexirelationhandler.cpp kexirelationhandlerproxy.cpp kexirelationview.cpp \
+# kexirelationviewtable.cpp kexirelationdialog.cpp \
+# kexirelationviewconnection.cpp
+kexihandler_relation_la_SOURCES = kexirelationpartimpl.cpp \
+ kexirelationmaindlg.cpp
+
+kexihandler_relation_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(VER_INFO) -module
+kexihandler_relation_la_LIBADD = ../../core/libkexicore.la \
+ ../../widget/relations/libkexirelationsview.la
+
+INCLUDES= -I$(top_srcdir)/kexi/core -I$(top_srcdir)/kexi \
+ -I$(top_srcdir)/kexi/widget -I$(top_srcdir)/kexi/widget/relations \
+ -I$(top_srcdir)/kexi/tableview \
+ -I$(top_srcdir)/kexi/kexidb $(all_includes)
+
+servicesdir=$(kde_servicesdir)/kexi
+services_DATA=kexirelationhandler.desktop
+
+rcdir = $(kde_datadir)/kexi
+rc_DATA = kexirelationpartui.rc kexirelationpartinstui.rc
+
+METASOURCES = AUTO
+
+include ../Makefile.common
diff --git a/kexi/plugins/relations/kexirelationhandler.desktop b/kexi/plugins/relations/kexirelationhandler.desktop
new file mode 100644
index 00000000..7232d316
--- /dev/null
+++ b/kexi/plugins/relations/kexirelationhandler.desktop
@@ -0,0 +1,110 @@
+[Desktop Entry]
+Type=Service
+ServiceTypes=Kexi/Handler
+
+GenericName=Relationships
+GenericName[bg]=Релации
+GenericName[ca]=Relacions
+GenericName[cs]=Vztahy
+GenericName[cy]=Perthnasau
+GenericName[de]=Beziehungen
+GenericName[el]=Συσχετίσεις
+GenericName[eo]=Rilatoj
+GenericName[es]=Relaciones
+GenericName[et]=Sõltuvused
+GenericName[eu]=Erlazioak
+GenericName[fa]=روابط
+GenericName[fi]=Yhteyssuhteet
+GenericName[fr]=Relations
+GenericName[fy]=Relaasjes
+GenericName[ga]=Gaolta
+GenericName[gl]=Relacións
+GenericName[he]=יחסים
+GenericName[hi]=रिलेशनशिप
+GenericName[hr]=Poveznice
+GenericName[hu]=Kapcsolatok
+GenericName[is]=Tengsl
+GenericName[it]=Relazioni
+GenericName[ja]=リレーションシップ
+GenericName[km]=ទំនាក់ទំនង​
+GenericName[lv]=Relācijas
+GenericName[ms]=Hubungan
+GenericName[nb]=Relasjoner
+GenericName[nds]=Betöög
+GenericName[ne]=सम्बन्धहरू
+GenericName[nl]=Relaties
+GenericName[nn]=Relasjonar
+GenericName[pl]=Relacje
+GenericName[pt]=Relações
+GenericName[pt_BR]=Relacionamentos
+GenericName[ru]=Связи
+GenericName[se]=Relašuvnnat
+GenericName[sk]=Vzťahy
+GenericName[sl]=Razmerja
+GenericName[sr]=Односи
+GenericName[sr@Latn]=Odnosi
+GenericName[sv]=Förhållanden
+GenericName[ta]=உறவுமுறைகள்
+GenericName[tr]=İlişkiler
+GenericName[uk]=Взаємозвязки
+GenericName[uz]=Aloqalar
+GenericName[uz@cyrillic]=Алоқалар
+GenericName[zh_CN]=关系
+GenericName[zh_TW]=關係
+Name=Relationships
+Name[bg]=Релации
+Name[ca]=Relacions
+Name[cs]=Vztahy
+Name[cy]=Perthnasau
+Name[de]=Beziehungen
+Name[el]=Συσχετίσεις
+Name[eo]=Rilatoj
+Name[es]=Relaciones
+Name[et]=Sõltuvused
+Name[eu]=Erlazioak
+Name[fa]=روابط
+Name[fi]=Yhteydet
+Name[fr]=Relations
+Name[fy]=Relaasjes
+Name[ga]=Gaolta
+Name[gl]=Relacións
+Name[he]=יחסים
+Name[hi]=रिलेशनशिप
+Name[hr]=Poveznice
+Name[hu]=Kapcsolatok
+Name[is]=Tengsl
+Name[it]=Relazioni
+Name[ja]=リレーションシップ
+Name[km]=ទំនាក់ទំនង​
+Name[lv]=Relācijas
+Name[ms]=Hubungan
+Name[nb]=Relasjoner
+Name[nds]=Betöög
+Name[ne]=सम्बन्धहरू
+Name[nl]=Relaties
+Name[nn]=Relasjonar
+Name[pl]=Relacje
+Name[pt]=Relações
+Name[pt_BR]=Relações
+Name[ru]=Взаимосвязи
+Name[se]=Relašuvnnat
+Name[sk]=Vzťahy
+Name[sl]=Razmerja
+Name[sr]=Односи
+Name[sr@Latn]=Odnosi
+Name[sv]=Förhållanden
+Name[ta]=உறவுகள்
+Name[tg]=Муносибатҳо
+Name[tr]=İlişkiler
+Name[uk]=Взаємозвязки
+Name[uz]=Aloqalar
+Name[uz@cyrillic]=Алоқалар
+Name[zh_CN]=关系
+Name[zh_TW]=關係
+X-KDE-Library=kexihandler_relation
+X-KDE-ParentApp=kexi
+X-Kexi-PartVersion=2
+X-Kexi-TypeName=relation
+X-Kexi-TypeMime=kexi/relation
+X-Kexi-ItemIcon=relations
+X-Kexi-NoObject=true
diff --git a/kexi/plugins/relations/kexirelationmaindlg.cpp b/kexi/plugins/relations/kexirelationmaindlg.cpp
new file mode 100644
index 00000000..6b14fffa
--- /dev/null
+++ b/kexi/plugins/relations/kexirelationmaindlg.cpp
@@ -0,0 +1,81 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Lucijan Busch <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "kexirelationmaindlg.h"
+
+#include <klocale.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+
+#include <qlayout.h>
+
+#include <kexidb/connection.h>
+
+#include "keximainwindow.h"
+#include "kexiproject.h"
+#include "kexirelationwidget.h"
+#include "kexirelationview.h"
+
+KexiRelationMainDlg::KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *parent, const char *name)
+ : KexiViewBase(mainWin, parent, name)
+{
+ kdDebug() << "KexiRelationMainDlg()" << endl;
+// setIcon(SmallIcon("relation"));
+ m_defaultIconName = "relation";
+ setCaption( i18n("Relationships") );
+// setDocID( win->generatePrivateDocID() );
+
+ m_rel = new KexiRelationWidget(mainWin, this);
+ //the view can receive some our actions
+ addActionProxyChild( m_rel );
+// addActionProxyChild( m_view->relationView() );
+
+ QVBoxLayout *g = new QVBoxLayout(this);
+ g->addWidget(m_rel);
+
+ //show all tables
+ KexiDB::Connection *conn = mainWin->project()->dbConnection();
+ QStringList tables = conn->tableNames();
+ for (QStringList::ConstIterator it = tables.constBegin(); it!=tables.constEnd(); ++it) {
+ m_rel->addTable( *it );
+ }
+}
+
+KexiRelationMainDlg::~KexiRelationMainDlg()
+{
+}
+
+QSize KexiRelationMainDlg::sizeHint() const
+{
+ return QSize(600,300);
+}
+
+QWidget*
+KexiRelationMainDlg::mainWidget()
+{
+ return m_rel;
+}
+
+QString KexiRelationMainDlg::itemIcon()
+{
+ return "relation";
+}
+
+#include "kexirelationmaindlg.moc"
+
diff --git a/kexi/plugins/relations/kexirelationmaindlg.h b/kexi/plugins/relations/kexirelationmaindlg.h
new file mode 100644
index 00000000..791d6544
--- /dev/null
+++ b/kexi/plugins/relations/kexirelationmaindlg.h
@@ -0,0 +1,47 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Lucijan Busch <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KEXIRELATIONMAINDLG_H
+#define KEXIRELATIONMAINDLG_H
+
+#include <kexiviewbase.h>
+
+class KexiMainWindow;
+class KexiRelationWidget;
+
+class KexiRelationMainDlg : public KexiViewBase
+{
+ Q_OBJECT
+
+ public:
+ KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ ~KexiRelationMainDlg();
+
+ virtual QSize sizeHint() const;
+
+ virtual QWidget* mainWidget();
+
+ virtual QString itemIcon();
+
+ private:
+ KexiRelationWidget *m_rel;
+};
+
+#endif
+
diff --git a/kexi/plugins/relations/kexirelationpartimpl.cpp b/kexi/plugins/relations/kexirelationpartimpl.cpp
new file mode 100644
index 00000000..a2a7c213
--- /dev/null
+++ b/kexi/plugins/relations/kexirelationpartimpl.cpp
@@ -0,0 +1,85 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Lucijan Busch <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "kexirelationmaindlg.h"
+#include "kexirelationpartimpl.h"
+
+#include <kexirelationwidget.h>
+#include <kexidialogbase.h>
+#include <keximainwindow.h>
+
+#include <kgenericfactory.h>
+#include <kiconloader.h>
+#include <kdebug.h>
+
+KexiRelationPartImpl::KexiRelationPartImpl(QObject *parent, const char *name, const QStringList &args)
+ : KexiInternalPart(parent, name, args)
+{
+ kdDebug() << "KexiRelationPartImpl()" << endl;
+}
+
+KexiRelationPartImpl::~KexiRelationPartImpl()
+{
+}
+
+/*QWidget *
+KexiRelationPartImpl::createWidget(const char* , KexiMainWindow* mainWin,
+ QWidget *parent, const char *objName)
+{
+ return new KexiRelationWidget(mainWin, parent, objName);
+}*/
+
+/*KexiDialogBase *
+KexiRelationPartImpl::createDialog(KexiMainWindow* mainWin, const char *)
+{
+ kdDebug() << "KexiRelationPartImpl::createDialog()" << endl;
+ KexiDialogBase * dlg = new KexiDialogBase(mainWin, i18n("Relations"));
+ dlg->setIcon(SmallIcon("relation"));
+ dlg->setDocID( mainWin->generatePrivateDocID() );
+
+ KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, 0, "relations");
+ dlg->addView(view);
+// dlg->show();
+// dlg->registerDialog();
+
+ return dlg;
+}*/
+
+KexiViewBase *
+KexiRelationPartImpl::createView(KexiMainWindow* mainWin, QWidget *parent, const char *)
+{
+// kdDebug() << "KexiRelationPartImpl::createDialog()" << endl;
+// KexiDialogBase * dlg = new KexiDialogBase(mainWin, i18n("Relations"));
+// dlg->setIcon(SmallIcon("relation"));
+// dlg->setDocID( mainWin->generatePrivateDocID() );
+
+ KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, parent, "relations");
+// dlg->addView(view);
+// dlg->show();
+// dlg->registerDialog();
+
+ return view;
+}
+
+
+K_EXPORT_COMPONENT_FACTORY( kexihandler_relation,
+ KGenericFactory<KexiRelationPartImpl>("kexihandler_relation") )
+
+#include "kexirelationpartimpl.moc"
+
diff --git a/kexi/plugins/relations/kexirelationpartimpl.h b/kexi/plugins/relations/kexirelationpartimpl.h
new file mode 100644
index 00000000..b5b5438e
--- /dev/null
+++ b/kexi/plugins/relations/kexirelationpartimpl.h
@@ -0,0 +1,46 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Lucijan Busch <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#ifndef KEXIRELATIONPARTIMPL_H
+#define KEXIRELATIONPARTIMPL_H
+
+#include <kexiinternalpart.h>
+
+class KexiRelationPartImpl : public KexiInternalPart
+{
+ Q_OBJECT
+
+ public:
+ KexiRelationPartImpl(QObject *parent, const char *name, const QStringList &args);
+ virtual ~KexiRelationPartImpl();
+
+ protected:
+// virtual QWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+// QWidget *parent, const char *objName=0);
+
+ virtual KexiViewBase *createView(KexiMainWindow* mainWin, QWidget *parent,
+ const char *objName=0);
+
+ //virtual KexiDialogBase *createWindow(KexiMainWindow *parent);
+ //virtual QWidget *createWidget(QWidget *parent, KexiMainWindow *win);
+};
+
+#endif
+
+
diff --git a/kexi/plugins/relations/kexirelationpartinstui.rc b/kexi/plugins/relations/kexirelationpartinstui.rc
new file mode 100644
index 00000000..cad23d56
--- /dev/null
+++ b/kexi/plugins/relations/kexirelationpartinstui.rc
@@ -0,0 +1,6 @@
+<!DOCTYPE kpartgui>
+<kpartgui name="kexirelationpartinst" version="1">
+
+<!-- TODO -->
+
+</kpartgui>
diff --git a/kexi/plugins/relations/kexirelationpartui.rc b/kexi/plugins/relations/kexirelationpartui.rc
new file mode 100644
index 00000000..67002e71
--- /dev/null
+++ b/kexi/plugins/relations/kexirelationpartui.rc
@@ -0,0 +1,14 @@
+<!DOCTYPE kpartgui>
+<kpartgui name="kexirelationpart" version="2">
+<MenuBar>
+ <Menu name="project">
+ <text>&amp;Project</text>
+ <Action name="relations"/>
+ </Menu>
+</MenuBar>
+
+<ToolBar name="projectToolBar" fullWidth="false">
+ <text>Project</text>
+ <Action name="relations"/>
+</ToolBar>
+</kpartgui>