22 #include "configgui.h" 25 #include "configguiblank.h" 26 #include "configguifile.h" 27 #include "configguignokii.h" 28 #include "configguigpe.h" 29 #include "configguiirmc.h" 30 #include "configguildap.h" 31 #include "configguiopie.h" 32 #include "configguipalm.h" 33 #include "configguisyncmlhttp.h" 34 #include "configguisyncmlobex.h" 35 #include "configguigcalendar.h" 36 #include "configguijescs.h" 37 #include "configguievo2.h" 38 #include "configguimoto.h" 39 #include "configguisynce.h" 40 #include "configguisunbird.h" 42 #include "memberinfo.h" 45 #include <tdelocale.h> 46 #include <klineedit.h> 50 #include <tqtextedit.h> 52 ConfigGui::ConfigGui(
const QSync::Member &member, TQWidget *parent )
53 : TQWidget( parent ), mMember( member )
55 mTopLayout =
new TQVBoxLayout(
this );
56 mTopLayout->setSpacing( KDialog::spacingHint() );
57 mTopLayout->setMargin( KDialog::marginHint() );
59 TQBoxLayout *nameLayout =
new TQHBoxLayout( mTopLayout );
61 TQLabel *label =
new TQLabel( i18n(
"Name:"),
this );
62 nameLayout->addWidget( label );
64 mNameEdit =
new KLineEdit(
this );
65 nameLayout->addWidget( mNameEdit );
68 void ConfigGui::setInstanceName(
const TQString &t )
70 mNameEdit->setText( t );
73 TQString ConfigGui::instanceName()
const 75 return mNameEdit->text();
78 ConfigGui *ConfigGui::Factory::create(
const QSync::Member &member,
81 TQString name = member.pluginName();
82 if ( name ==
"file-sync" ) {
83 return new ConfigGuiFile( member, parent );
84 }
else if ( name ==
"palm-sync" ) {
85 return new ConfigGuiPalm( member, parent );
86 }
else if ( name ==
"irmc-sync" ) {
87 return new ConfigGuiIRMC( member, parent );
88 }
else if ( name ==
"syncml-obex-client" ) {
89 return new ConfigGuiSyncmlObex( member, parent );
90 }
else if ( name ==
"syncml-http-server" ) {
91 return new ConfigGuiSyncmlHttp( member, parent );
92 }
else if ( name ==
"opie-sync" ) {
93 return new ConfigGuiOpie( member, parent );
94 }
else if ( name ==
"gnokii-sync" ) {
95 return new ConfigGuiGnokii( member, parent );
96 }
else if ( name ==
"gpe-sync" ) {
97 return new ConfigGuiGpe( member, parent );
98 }
else if ( name ==
"google-calendar" ) {
99 return new ConfigGuiGoogleCalendar( member, parent );
100 }
else if ( name ==
"ldap-sync" ) {
101 return new ConfigGuiLdap( member, parent );
102 }
else if ( name ==
"tdepim-sync" ) {
103 return new ConfigGuiBlank( member, parent );
104 }
else if ( name ==
"jescs-sync" ) {
105 return new ConfigGuiJescs( member, parent );
106 }
else if ( name ==
"evo2-sync" ) {
107 return new ConfigGuiEvo2( member, parent );
108 }
else if ( name ==
"moto-sync" ) {
109 return new ConfigGuiMoto( member, parent );
110 }
else if ( name ==
"synce-plugin" ) {
111 return new ConfigGuiSynce( member, parent );
112 }
else if ( name ==
"sunbird-sync" ) {
113 return new ConfigGuiSunbird( member, parent );
115 return new ConfigGuiXml( member, parent );
120 ConfigGuiXml::ConfigGuiXml(
const QSync::Member &member, TQWidget *parent )
121 : ConfigGui( member, parent )
123 mTextEdit =
new TQTextEdit(
this );
124 topLayout()->addWidget( mTextEdit );
127 void ConfigGuiXml::load(
const TQString &xml )
129 mTextEdit->setText( xml );
132 TQString ConfigGuiXml::save()
const 134 return mTextEdit->text();