author | harlekin <harlekin> | 2002-07-01 20:10:07 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-01 20:10:07 (UTC) |
commit | 3c6fd2159f4ff609408a2b5c645ee5a454d01325 (patch) (unidiff) | |
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) (ignore 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 @@ | |||
1 | |||
2 | #include "bticonloader.h" | ||
3 | |||
4 | #include <qpixmap.h> | ||
5 | #include <qpe/resource.h> | ||
6 | |||
7 | namespace OpieTooth { | ||
8 | |||
9 | |||
10 | BTIconLoader::BTIconLoader() { | ||
11 | |||
12 | // still need to find out real ids | ||
13 | deviceIcons.insert( "100" , "computer_16" ); | ||
14 | deviceIcons.insert( "101" , "phone_16" ); | ||
15 | deviceIcons.insert( "102" , "brain_16" ); | ||
16 | deviceIcons.insert( "103" , "conduit_16" ); | ||
17 | |||
18 | |||
19 | serviceIcons.insert( "0x1105" , "obex_16" ); //OBEXObjectPush | ||
20 | serviceIcons.insert( "0x1106" , "obex_16" ); //OBEXFileTransfer | ||
21 | serviceIcons.insert( "0x1111" , "print_16" ); //Fax | ||
22 | serviceIcons.insert( "0x1101" , "serial_16" ); //SerialPort | ||
23 | serviceIcons.insert( "0x1104" , "sync_16" ); //IrMCSync | ||
24 | serviceIcons.insert( "0x1107" , "sync_16" ); //IrMCSyncCommand | ||
25 | serviceIcons.insert( "0x1102" , "network_16" ); //LANAccessUsingPPP | ||
26 | serviceIcons.insert( "0x1103" , "network_16"); //DialupNetworking | ||
27 | serviceIcons.insert( "0x1108" , "phone_16"); // Headset | ||
28 | serviceIcons.insert( "0x1112" , "audio_16"); //HeadsetAudioGateway | ||
29 | serviceIcons.insert( "0x1109" , "phone_16"); // CordlessTelephony | ||
30 | serviceIcons.insert( "0x110A" , "audio_16"); // AudioSource | ||
31 | serviceIcons.insert( "0x110B" , "audio_16"); // AudioSink | ||
32 | serviceIcons.insert( "0x1126" , "print_16" ); //HCR_Print | ||
33 | serviceIcons.insert( "0x1128" , "phone_16" ); //Common_ISDN_Access | ||
34 | |||
35 | serviceIcons.insert( "0x1201" , "network_16" ); //GenericNetworking | ||
36 | serviceIcons.insert( "0x1202" , "folder_16" ); //GenericFileTransfer | ||
37 | serviceIcons.insert( "0x1128" , "audio_16" ); //GenericAudio | ||
38 | serviceIcons.insert( "0x1128" , "phone_16" ); //GenericTelephony | ||
39 | |||
40 | //serviceIcons.insert( "106" , "link_16" ); | ||
41 | //serviceIcons.insert( "107" , "misc_16" ); | ||
42 | } | ||
43 | |||
44 | BTIconLoader::~BTIconLoader() { | ||
45 | } | ||
46 | |||
47 | QPixmap BTIconLoader::deviceIcon( const QString &deviceClass ) { | ||
48 | |||
49 | QString iconName; | ||
50 | |||
51 | QMap<QString, QString>::Iterator it; | ||
52 | |||
53 | it = deviceIcons.find( deviceClass ); | ||
54 | iconName = it.data(); | ||
55 | |||
56 | if ( iconName.isEmpty() ) { | ||
57 | iconName = "unknown_16"; | ||
58 | } | ||
59 | return( Resource::loadPixmap( "opietooth/icons/" + iconName ) ); | ||
60 | } | ||
61 | |||
62 | QPixmap BTIconLoader::serviceIcon( const QString &serviceClass ) { | ||
63 | |||
64 | QString iconName; | ||
65 | |||
66 | QMap<QString, QString>::Iterator it; | ||
67 | |||
68 | it = deviceIcons.find( serviceClass ); | ||
69 | iconName = it.data(); | ||
70 | |||
71 | if ( iconName.isEmpty() ) { | ||
72 | iconName = "unknown_16"; | ||
73 | } | ||
74 | return( Resource::loadPixmap( "opietooth/icons/" + iconName ) ); | ||
75 | } | ||
76 | |||
77 | } | ||