22 #include "memberinfo.h" 24 #include <tdeglobal.h> 25 #include <kiconloader.h> 26 #include <tdelocale.h> 28 MemberInfo::MemberInfo( const QSync::Member &member ) 33 TQPixmap MemberInfo::smallIcon() const 35 return TDEGlobal::iconLoader()->loadIcon( iconName(), TDEIcon::Small ); 38 TQPixmap MemberInfo::desktopIcon() const 40 return TDEGlobal::iconLoader()->loadIcon( iconName(), TDEIcon::Desktop ); 43 TQString MemberInfo::iconName() const 45 return pluginIconName( mMember.pluginName() ); 48 TQString MemberInfo::name() const 50 static TQMap<TQString, TQString> nameMap; 51 if ( nameMap.isEmpty() ) { 52 nameMap.insert( "file-sync", i18n( "File" ) ); 53 nameMap.insert( "palm-sync", i18n( "Palm" ) ); 54 nameMap.insert( "tdepim-sync", i18n( "TDE PIM" ) ); 55 nameMap.insert( "tdeio-sync", i18n( "Remote File" ) ); 56 nameMap.insert( "irmc-sync", i18n( "Mobile Phone" ) ); 57 nameMap.insert( "evo2-sync", i18n( "Evolution" ) ); 58 nameMap.insert( "opie-sync", i18n( "Handheld" ) ); 59 nameMap.insert( "ldap-sync", i18n( "LDAP" ) ); 60 nameMap.insert( "syncml-obex-client", i18n( "Mobile Phone" ) ); 61 nameMap.insert( "syncml-http-server", i18n( "Mobile Phone" ) ); 62 nameMap.insert( "moto-sync", i18n( "Mobile Phone" ) ); 63 nameMap.insert( "gnokii-sync", i18n( "Mobile Phone" ) ); 64 nameMap.insert( "google-calendar", i18n( "Google Calendar" ) ); 65 nameMap.insert( "gpe-sync", i18n( "Handheld" ) ); 66 nameMap.insert( "sunbird-sync", i18n( "Sunbird Calendar" ) ); 67 nameMap.insert( "jescs-sync", i18n( "Java Enterprise System Calendar" ) ); 68 nameMap.insert( "synce-plugin", i18n( "WinCE Devices" ) ); 71 if ( mMember.name().isEmpty() ) 72 return nameMap[ mMember.pluginName() ] + " (" + TQString::number( mMember.id() ) + ") "; 74 return mMember.name(); 77 TQString MemberInfo::pluginIconName( const TQString &pluginName ) 79 if ( pluginName == "file-sync" ) return "folder"; 80 if ( pluginName == "palm-sync" ) return "pda_black"; 81 if ( pluginName == "tdepim-sync" ) return "kontact"; 82 if ( pluginName == "tdeio-sync" ) return "network"; 83 if ( pluginName == "irmc-sync" ) return "mobile_phone"; 84 if ( pluginName == "evo2-sync" ) return "evolution"; 85 if ( pluginName == "opie-sync" ) return "pda_blue"; 86 if ( pluginName == "synce-plugin" ) return "pda_blue"; 87 if ( pluginName == "ldap-sync" ) return "contents2"; 88 if ( pluginName == "syncml-obex-client" ) return "mobile_phone"; 89 if ( pluginName == "syncml-http-server" ) return "pda_blue"; 90 if ( pluginName == "moto-sync" ) return "mobile_phone"; 91 if ( pluginName == "gnokii-sync" ) return "mobile_phone"; 92 if ( pluginName == "google-calendar" ) return "www"; 93 if ( pluginName == "gpe-sync" ) return "pda_blue"; 94 if ( pluginName == "sunbird-sync" ) return "www"; 95 if ( pluginName == "jescs-sync" ) return "www";
|