abbrowser-factory.cc
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "options.h"
00030 #include "abbrowser-factory.moc"
00031
00032 #include <kinstance.h>
00033 #include <kaboutdata.h>
00034
00035 #include "abbrowser-conduit.h"
00036 #include "abbrowser-setup.h"
00037
00038
00039 extern "C"
00040 {
00041
00042 void *init_libaddressconduit()
00043 {
00044 return new AbbrowserConduitFactory;
00045 }
00046
00047 } ;
00048
00049
00050
00051
00052
00053
00054 KAboutData *AbbrowserConduitFactory::fAbout = 0L;
00055 const char *AbbrowserConduitFactory::fGroup = "Abbrowser-conduit";
00056
00057 const char *AbbrowserConduitFactory::fSmartMerge = "SmartMerge";
00058 const char *AbbrowserConduitFactory::fResolution = "ConflictResolve";
00059 const char *AbbrowserConduitFactory::fArchive = "ArchiveDeleted";
00060 const char *AbbrowserConduitFactory::fStreetType = "PilotStreet";
00061 const char *AbbrowserConduitFactory::fFaxType = "PilotFax";
00062 const char *AbbrowserConduitFactory::fSyncMode = "SyncMode";
00063 const char *AbbrowserConduitFactory::fFirstSync = "FirstSync";
00064 const char *AbbrowserConduitFactory::fFullSyncOnPCChange = "FullSyncOnPCChange";
00065 const char *AbbrowserConduitFactory::fOtherField = "PilotOther";
00066
00067
00068 AbbrowserConduitFactory::AbbrowserConduitFactory(QObject *p, const char *n) :
00069 KLibFactory(p,n)
00070 {
00071 FUNCTIONSETUP;
00072
00073 fInstance = new KInstance("abbrowserconduit");
00074 fAbout = new KAboutData("abbrowserconduit",
00075 I18N_NOOP("Abbrowser Conduit for KPilot"),
00076 KPILOT_VERSION,
00077 I18N_NOOP("Configures the Abbrowser Conduit for KPilot"),
00078 KAboutData::License_GPL,
00079 "(C) 2001, Dan Pilone");
00080 fAbout->addAuthor("Greg Stern",
00081 I18N_NOOP("Primary Author"));
00082 fAbout->addAuthor("Adriaan de Groot",
00083 I18N_NOOP("Maintainer"),
00084 "groot@kde.org",
00085 "http://www.cs.kun.nl/~adridg/kpilot");
00086 fAbout->addAuthor("Reinhold Kainhofer", I18N_NOOP("Maintainer"), "reinhold@kainhofer.com", "http://reinhold.kainhofer.com");
00087 fAbout->addCredit("David Bishop",
00088 I18N_NOOP("UI"));
00089 }
00090
00091 AbbrowserConduitFactory::~AbbrowserConduitFactory()
00092 {
00093 FUNCTIONSETUP;
00094
00095 KPILOT_DELETE(fInstance);
00096 KPILOT_DELETE(fAbout);
00097 }
00098
00099 QObject *AbbrowserConduitFactory::createObject( QObject *p,
00100 const char *n,
00101 const char *c,
00102 const QStringList &a)
00103 {
00104 FUNCTIONSETUP;
00105
00106 #ifdef DEBUG
00107 DEBUGCONDUIT << fname
00108 << ": Creating object of class "
00109 << c
00110 << endl;
00111 #endif
00112
00113 if (qstrcmp(c,"ConduitConfig")==0)
00114 {
00115 QWidget *w = dynamic_cast<QWidget *>(p);
00116
00117 if (w)
00118 {
00119 return new AbbrowserWidgetSetup(w,n,a);
00120 }
00121 else
00122 {
00123 kdError() << k_funcinfo
00124 << ": Couldn't cast parent to widget."
00125 << endl;
00126 return 0L;
00127 }
00128 }
00129
00130 if (qstrcmp(c,"SyncAction")==0)
00131 {
00132 KPilotDeviceLink *d = dynamic_cast<KPilotDeviceLink *>(p);
00133
00134 if (d)
00135 {
00136 return new AbbrowserConduit(d,n,a);
00137 }
00138 else
00139 {
00140 kdError() << k_funcinfo
00141 << ": Couldn't cast parent to KPilotDeviceLink"
00142 << endl;
00143 return 0L;
00144 }
00145 }
00146
00147 return 0L;
00148 }
00149
This file is part of the documentation for kdelibs Version 3.1.4.