summaryrefslogtreecommitdiffstats
path: root/kverbos/kverbos/kfeedercontrol.h
blob: 9617aa1807a2dc2b981cbdb11a50a3dafdf7e60f (plain)
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
/***************************************************************************
                          kfeedercontrol.h  -  description
                             -------------------
    begin                : Wed Apr 17 2002
    copyright            : (C) 2002 by Arnold Kraschinski
    email                : arnold.k67@gmx.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KFEEDERCONTROL_H
#define KFEEDERCONTROL_H

#include <kprocess.h>
#include <dcopclient.h>


/** This class is used to control the KFeeder.
  *@author Arnold Kraschinski
  */

class KFeederControl {
public: 
  KFeederControl(int ID, bool splash, bool automatic);
  ~KFeederControl();
  /** resets the KFeeder */
  bool reset();
  /** sets the type of food movement. 'true' the food is moved automatically.
    * 'false' it is necessary to trigger the food movement. */
  bool setAutomatic(bool a);
  /** sends one Point to the KFeeder */
  bool addOne();
  /** sends n points to the KFeeder */
  bool addN(int n);
  /** returns if the KProcess is still active. This is useful right after the start to
    * see if it was successful
    */
  bool isActive() { return active; }
  /** returns the last result of the latest dcop operation */
  bool getLastResult() { return lastResult; }
private:
  KProcess childFeeder;
  QCString feederID;
  bool active;
  bool lastResult;

  QCString appId;	
  DCOPClient* dcop;
};

#endif