Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

bticonloader.cpp

Go to the documentation of this file.
00001 
00002 #include "bticonloader.h"
00003 
00004 #include <qpe/resource.h>
00005 
00006 namespace OpieTooth {
00007 
00008 
00009     BTIconLoader::BTIconLoader() {
00010 
00011         // still need to find out real ids
00012         deviceIcons.insert( 100 , "computer_16" );
00013         deviceIcons.insert( 101 , "phone_16" );
00014         deviceIcons.insert( 102 , "brain_16" );
00015         deviceIcons.insert( 103 , "conduit_16" );
00016 
00017 
00018         serviceIcons.insert( 4357 , "obex_16" ); //OBEXObjectPush
00019         serviceIcons.insert( 4358 , "obex_16" ); //OBEXFileTransfer
00020         serviceIcons.insert( 4369 , "print_16" ); //Fax
00021         serviceIcons.insert( 4353 , "serial_16" ); //SerialPort
00022         serviceIcons.insert( 4356 , "sync_16" ); //IrMCSync
00023         serviceIcons.insert( 4359 , "sync_16" ); //IrMCSyncCommand
00024         serviceIcons.insert( 4354 , "network_16" ); //LANAccessUsingPPP
00025         serviceIcons.insert( 4355 , "network_16"); //DialupNetworking
00026         serviceIcons.insert( 4360 , "phone_16"); // Headset
00027         serviceIcons.insert( 4370 , "audio_16");  //HeadsetAudioGateway
00028         serviceIcons.insert( 4374 , "network_16"); // Network Access Point
00029         serviceIcons.insert( 4361 , "phone_16"); // CordlessTelephony
00030         serviceIcons.insert( 4362 , "audio_16"); // AudioSource
00031         serviceIcons.insert( 4363 , "audio_16"); // AudioSink
00032         serviceIcons.insert( 4390 , "print_16" ); //HCR_Print
00033         serviceIcons.insert( 4392 , "phone_16" ); //Common_ISDN_Access
00034 
00035         serviceIcons.insert( 4609 , "network_16" );  //GenericNetworking
00036         serviceIcons.insert( 4610 , "folder_16" ); //GenericFileTransfer
00037         serviceIcons.insert( 4392 , "audio_16" ); //GenericAudio
00038         //  serviceIcons.insert( 4392 , "phone_16" ); //GenericTelephony
00039         // the above is duplicated? -zecke
00040 
00041         //serviceIcons.insert( "106" , "link_16" );
00042         //serviceIcons.insert( "107" , "misc_16" );
00043     }
00044 
00045     BTIconLoader::~BTIconLoader() {
00046     }
00047 
00048     QPixmap BTIconLoader::deviceIcon( int deviceClass ) {
00049 
00050         QString iconName;
00051 
00052         QMap<int, QString>::Iterator it;
00053 
00054         it = deviceIcons.find( deviceClass );
00055         iconName = it.data();
00056 
00057         if ( iconName.isEmpty() ) {
00058             iconName = "unknown_16";
00059         }
00060         return( Resource::loadPixmap( "opietooth/icons/" + iconName ) );
00061     }
00062 
00063     QPixmap BTIconLoader::serviceIcon( int serviceClass ) {
00064 
00065         QString iconName;
00066 
00067         QMap<int, QString>::Iterator it;
00068 
00069         it = serviceIcons.find( serviceClass );
00070         iconName = it.data();
00071 
00072         if ( iconName.isEmpty() ) {
00073             iconName = "unknown_16";
00074         }
00075         return( Resource::loadPixmap( "opietooth/icons/" + iconName ) );
00076     }
00077 
00078 }

Generated on Sat Nov 5 16:17:44 2005 for OPIE by  doxygen 1.4.2