summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/lib/slavemaster.h
blob: 98c34030a129a70194390b0772e0c78ee890f460 (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
#ifndef OPIE_EYE_SLAVE_MASTER_H
#define OPIE_EYE_SLAVE_MASTER_H

#include <iface/dirlister.h>
#include <iface/slaveiface.h>

#include <qobject.h>
#include <qstring.h>
#include <qsize.h>

namespace SlaveHelper {
/**
 * Small Helper to create a SlaveMaster
 * and to connect its' signals to the
 * object. To use the object as a proxy
 */
void slaveConnectSignals( QObject* );
}


class SlaveMaster : public QObject {
    Q_OBJECT
    typedef QValueList<ImageInfo> ImageInfos;
    typedef QValueList<PixmapInfo> PixmapInfos;
public:
    static SlaveMaster *self();

    void thumbInfo( const QString& );
    void imageInfo( const QString& );
    void thumbNail( const QString&, int w, int h );
    QImage  image( const QString&, PDirLister::Factor, int );
signals:
    void sig_start();
    void sig_end();

    void sig_thumbInfo( const QString&, const QString& );
    void sig_fullInfo( const QString&, const QString& );
    void sig_thumbNail( const QString&, const QPixmap& );
private slots:
    void recieve( const QCString&, const QByteArray& );
    void slotTimerStart();
private:
    SlaveMaster();
    ~SlaveMaster();
    static SlaveMaster *m_master;
    bool m_started : 1;
    QStringList m_inThumbInfo;
    QStringList m_inImageInfo;
    PixmapInfos m_inThumbNail;
};


#endif