~ubuntu-branches/ubuntu/gutsy/kde4libs/gutsy

« back to all changes in this revision

Viewing changes to kio/tests/kioobservertest.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-02-21 11:00:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070221110012-6kw8khr9knv6lmg1
Tags: 3.80.3-0ubuntu1
New upstream unstable release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
  * This file is part of the KDE libraries
 
3
  * Copyright (C) 2007 Rafael Fernández López <ereslibre@gmail.com>
 
4
  *
 
5
  * This library is free software; you can redistribute it and/or
 
6
  * modify it under the terms of the GNU Library General Public
 
7
  * License version 2 as published by the Free Software Foundation.
 
8
  *
 
9
  * This library is distributed in the hope that it will be useful,
 
10
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
  * Library General Public License for more details.
 
13
  *
 
14
  * You should have received a copy of the GNU Library General Public License
 
15
  * along with this library; see the file COPYING.LIB.  If not, write to
 
16
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
  * Boston, MA 02110-1301, USA.
 
18
  */
 
19
 
 
20
#ifndef __KJOBTEST_H__
 
21
#define __KJOBTEST_H__
 
22
 
 
23
#include <kjob.h>
 
24
#include <kjobuidelegate.h>
 
25
 
 
26
class QTimer;
 
27
 
 
28
class KJobDelegateTest
 
29
    : public KJobUiDelegate
 
30
{
 
31
    Q_OBJECT
 
32
 
 
33
public:
 
34
    KJobDelegateTest();
 
35
    ~KJobDelegateTest();
 
36
 
 
37
protected:
 
38
    void connectJob(KJob *job);
 
39
 
 
40
private Q_SLOTS:
 
41
    void slotFinished(KJob *job);
 
42
};
 
43
 
 
44
class KJobTest
 
45
    : public KJob
 
46
{
 
47
    Q_OBJECT
 
48
 
 
49
public:
 
50
    KJobTest(int numberOfSeconds = 5);
 
51
    ~KJobTest();
 
52
 
 
53
    void start();
 
54
 
 
55
private Q_SLOTS:
 
56
    void timerTimeout();
 
57
    void updateMessage();
 
58
 
 
59
private:
 
60
    QTimer *timer, *clockTimer;
 
61
    int seconds;
 
62
};
 
63
 
 
64
#endif // __KJOBTEST_H__