File: bubbles.h

package info (click to toggle)
kfish 2.01.dfsg.1-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 3,376 kB
  • ctags: 224
  • sloc: sh: 19,068; perl: 2,724; cpp: 1,032; makefile: 92
file content (58 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (5)
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
55
56
57
58
#ifndef __BUBBLES_H__
#define __BUBBLES_H__

#include <qcanvas.h>
#include <qobject.h>
#include <qptrlist.h>

class QTimer;

class kfishBubble : public QObject, public QCanvasSprite
{
    Q_OBJECT
public:
    kfishBubble( QCanvas *, QCanvasPixmapArray * );

public slots:
    void slotAdvance(); // QCanvasSprite
    void slotResized(); // if the QCanvas change its size, i recibe a signal

protected:    
    void advance( int phase ); // QCanvasSprite
    
private:
    void init(); // Set the posy and posx

    int posx;
    int posy;
    int subdiv;
};

class kfishBubbleManager : public QObject
{
    Q_OBJECT
public:
	kfishBubbleManager( QCanvas *, QObject * = 0, const char * = 0 );
    ~kfishBubbleManager();
    
signals:
    void signalResized();

public slots:
    void slotChangeNumberOfBubbles( int );
    void slotSettingsChanged();

private:
    bool addBubble();
    bool delBubble();
    
    int m_numOfBubbles;

    QPtrList<kfishBubble> m_listBubble;
    
    QTimer *m_timer;
    QCanvasPixmapArray *m_bubbles;
    QCanvas *m_canvas;
};

#endif