summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTIcons.h
blob: ee108316794817d86ddeb9f996a07dd8886dbb37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef OTICONLOADER_H
#define OTICONLOADER_H

#include <OTUUID.h>
#include <qpixmap.h>
#include <qmap.h>

namespace Opietooth2 {

class OTIcons {

public:

    OTIcons();
    ~OTIcons();

    /**
     * Returns an icon depending on device class
     * @param deviceClass the device class name
     * @return the pixmap
     */
    QPixmap deviceIcon( const QString & );

    /**
     * Returns an icon depending on service id
     * @param serviceClass the service id
     * @return the pixmap
     * @return true if found
     */
    QPixmap serviceIcon( int, bool & );

    // returns all UUID that represent channels with modem function
    const UUIDVector & modems()
      { return Modems; }

    // returns all UUID that represent channels with network
    const UUIDVector & network()
      { return Networks; }

    // set Sub to find icons in .../Icons dir
    QPixmap loadPixmap( const QString &, bool Sub = 0 );

private:

    // first ist id, second is icon name
    QMap<QString,QString> deviceIcons;
    QMap<int,QString> serviceIcons;
    UUIDVector Modems;
    UUIDVector Networks;

};
}

#endif