File: Jobs.h

package info (click to toggle)
kde4libs 4%3A4.14.26-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 83,084 kB
  • ctags: 99,791
  • sloc: cpp: 763,588; xml: 12,007; ansic: 5,224; java: 4,060; perl: 2,938; yacc: 2,484; python: 1,219; sh: 1,174; ruby: 337; lex: 278; makefile: 32
file content (74 lines) | stat: -rw-r--r-- 1,556 bytes parent folder | download | duplicates (8)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* -*- C++ -*-

This file declares the classes for the GUI Jobs example.

$ Author: Mirko Boehm $
$ Copyright: (C) 2005, Mirko Boehm $
$ Contact: mirko@kde.org
http://www.kde.org
http://www.hackerbuero.org $
$ License: LGPL with the following explicit clarification:
This code may be linked against any version of the Qt toolkit
from Trolltech, Norway. $

$Id: Jobs.h 30 2005-08-16 16:16:04Z mirko $
*/

#ifndef Jobs_H
#define Jobs_H

#include <QtGui/QWidget>

#include <Job.h>
#include <ThreadWeaver.h>

#include "ui_JobsBase.h"
#include "WeaverObserverTest.h"

namespace ThreadWeaver {

    class JobCollection;

    class DummyJob : public Job
    {
    public:
        DummyJob (QObject* parent = 0);
    protected:
        void run ();
    };

    class Jobs : public QWidget
    {
        Q_OBJECT
    public:
        enum State {
            Initial = 0,
            Stopped = Initial,
            Disable,
            Stopping = Disable,
            ShuttingDown = Disable,
            Started
        };
        Jobs (QWidget *parent = 0);
        virtual ~Jobs();
    protected Q_SLOTS:
        void slotStart();
        void slotStop();
        void slotQuit();
        void slotLogStateChanged (int);
    protected:
        void setState ( State s );
        State state();
        JobCollection* m_jobs;
        bool m_quit;
        State m_state;
        Ui::JobsBase ui;
        WeaverObserverTest *m_log;
    protected Q_SLOTS:
        void slotJobDone (ThreadWeaver::Job*);
        void slotStopped ();
    };

}

#endif // defined Jobs_H