karm

desktoptracker.h
1#ifndef KARM_DESKTOP_TRACKER_H
2#define KARM_DESKTOP_TRACKER_H
3
4#include <vector>
5
6#include <twinmodule.h>
7
8#include "desktoplist.h"
9
10class Task;
11class TQTimer;
12
13typedef std::vector<Task *> TaskVector;
14const int maxDesktops = 20;
15
21class DesktopTracker: public TQObject
22{
23 TQ_OBJECT
24
25
26 public:
28 void printTrackers();
29 TQString startTracking();
30 void registerForDesktops( Task* task, DesktopList dl );
31 int desktopCount() const { return _desktopCount; };
32
33 private: // member variables
34 KWinModule kWinModule;
35
36 // define vectors for at most 16 virtual desktops
37 // E.g.: desktopTrackerStop[3] contains a vector with
38 // all tasks to be notified, when switching to/from desk 3.
39 TaskVector desktopTracker[maxDesktops];
40 int _previousDesktop;
41 int _desktopCount;
42 int _desktop;
43 TQTimer *_timer;
44
45 signals:
46 void reachedtActiveDesktop( Task* task );
47 void leftActiveDesktop( Task* task );
48
49 public slots:
50 void handleDesktopChange( int desktop );
51
52 private slots:
53 void changeTimers();
54};
55
56#endif // KARM_DESKTOP_TRACKER_H
A utility to associate tasks with desktops As soon as a desktop is activated/left - an signal is emit...
A class representing a task.
Definition: task.h:42