author | harlekin <harlekin> | 2002-07-01 20:10:07 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-01 20:10:07 (UTC) |
commit | 3c6fd2159f4ff609408a2b5c645ee5a454d01325 (patch) (side-by-side diff) | |
tree | 644ac4b759d2adaa3f233acf3e4913801a350625 /noncore/net/opietooth/manager/bticonloader.cpp | |
parent | fcdf02d10c738c95748f082eaf40cb47db6d2975 (diff) | |
download | opie-3c6fd2159f4ff609408a2b5c645ee5a454d01325.zip opie-3c6fd2159f4ff609408a2b5c645ee5a454d01325.tar.gz opie-3c6fd2159f4ff609408a2b5c645ee5a454d01325.tar.bz2 |
added ability to schon icons next to services
Diffstat (limited to 'noncore/net/opietooth/manager/bticonloader.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bticonloader.cpp | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/bticonloader.cpp b/noncore/net/opietooth/manager/bticonloader.cpp new file mode 100644 index 0000000..3fb0edd --- a/dev/null +++ b/noncore/net/opietooth/manager/bticonloader.cpp @@ -0,0 +1,77 @@ + +#include "bticonloader.h" + +#include <qpixmap.h> +#include <qpe/resource.h> + +namespace OpieTooth { + + + BTIconLoader::BTIconLoader() { + + // still need to find out real ids + deviceIcons.insert( "100" , "computer_16" ); + deviceIcons.insert( "101" , "phone_16" ); + deviceIcons.insert( "102" , "brain_16" ); + deviceIcons.insert( "103" , "conduit_16" ); + + + serviceIcons.insert( "0x1105" , "obex_16" ); //OBEXObjectPush + serviceIcons.insert( "0x1106" , "obex_16" ); //OBEXFileTransfer + serviceIcons.insert( "0x1111" , "print_16" ); //Fax + serviceIcons.insert( "0x1101" , "serial_16" ); //SerialPort + serviceIcons.insert( "0x1104" , "sync_16" ); //IrMCSync + serviceIcons.insert( "0x1107" , "sync_16" ); //IrMCSyncCommand + serviceIcons.insert( "0x1102" , "network_16" ); //LANAccessUsingPPP + serviceIcons.insert( "0x1103" , "network_16"); //DialupNetworking + serviceIcons.insert( "0x1108" , "phone_16"); // Headset + serviceIcons.insert( "0x1112" , "audio_16"); //HeadsetAudioGateway + serviceIcons.insert( "0x1109" , "phone_16"); // CordlessTelephony + serviceIcons.insert( "0x110A" , "audio_16"); // AudioSource + serviceIcons.insert( "0x110B" , "audio_16"); // AudioSink + serviceIcons.insert( "0x1126" , "print_16" ); //HCR_Print + serviceIcons.insert( "0x1128" , "phone_16" ); //Common_ISDN_Access + + serviceIcons.insert( "0x1201" , "network_16" ); //GenericNetworking + serviceIcons.insert( "0x1202" , "folder_16" ); //GenericFileTransfer + serviceIcons.insert( "0x1128" , "audio_16" ); //GenericAudio + serviceIcons.insert( "0x1128" , "phone_16" ); //GenericTelephony + + //serviceIcons.insert( "106" , "link_16" ); + //serviceIcons.insert( "107" , "misc_16" ); + } + + BTIconLoader::~BTIconLoader() { + } + + QPixmap BTIconLoader::deviceIcon( const QString &deviceClass ) { + + QString iconName; + + QMap<QString, QString>::Iterator it; + + it = deviceIcons.find( deviceClass ); + iconName = it.data(); + + if ( iconName.isEmpty() ) { + iconName = "unknown_16"; + } + return( Resource::loadPixmap( "opietooth/icons/" + iconName ) ); + } + + QPixmap BTIconLoader::serviceIcon( const QString &serviceClass ) { + + QString iconName; + + QMap<QString, QString>::Iterator it; + + it = deviceIcons.find( serviceClass ); + iconName = it.data(); + + if ( iconName.isEmpty() ) { + iconName = "unknown_16"; + } + return( Resource::loadPixmap( "opietooth/icons/" + iconName ) ); + } + +} |