Merge branch 'central-widget'
[krunner.git] / raptorslide.h
blob373a93f26bae9e55a367bef5e5dba4bb4fbedffb
1 //GPL2 cod : siraj@kde.org
3 #ifndef RAPTOR_SLIDE_H
4 #define RAPTOR_SLIDE_H
6 #include <QGraphicsItemGroup>
7 #include <QGraphicsItem>
8 #include <QListIterator>
9 #include <QHash>
10 #include "raptorclaw.h"
12 /**
13 * This takes keeps a pre-defined number of elements
14 * and it there per view
17 class RaptorSlide : public QObject,
18 public QGraphicsItemGroup
20 Q_OBJECT
22 public:
23 //typedef QMap <int,QGraphicsItem*> ItemList;
24 typedef enum {Verticle,Horizontal,Grid} Direction;
25 typedef QList<RaptorClaw*> CList;
26 typedef QListIterator<RaptorClaw> CListIter;
28 RaptorSlide(QGraphicsItem * parent = 0);
29 virtual ~RaptorSlide();
30 bool addItem(RaptorClaw *);
31 bool deleteItem(RaptorClaw *);
32 RaptorClaw* find(const QString &);
33 bool isFull();
34 void setItemLimit(int);
35 int itemLimit();
36 void show();
37 void hide();
38 void setDirection(Direction d);
39 Direction direction();
40 QString name();
41 void setName(const QString & name);
42 bool isVisible();
43 void move(float x, float y, float z = 0);
44 int height();
46 public slots:
47 void animate();
49 signals:
50 void hideComplete();
52 protected:
53 void doLayoutShift();
55 private:
56 class Private;
57 Private *d;
58 CList items;
60 // typedef QMap<RaptorClaw*,RaptorSlide*> GroupMap;
61 // static GroupMap& groupMap();
62 // GroupMap * map;
65 #endif