# Source: klineakconfig/pcontrol.h |
Annotated List
Files
Globals
Hierarchy
Index

    /***************************************************************************
                              pcontrol.h  -  description
                                 -------------------
        begin                : Fri Jun 28 2002
        copyright            : (C) 2002 by Sheldon Lee Wen
        email                : leewsb@hotmail.com
     ***************************************************************************/

    /***************************************************************************
     *                                                                         *
     *   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 PCONTROL_H
    #define PCONTROL_H

    #include
    #include
    #include
    #include
    #include
    //#include
    #include
    #include
    //#include
    #include
    #include
    #include

    extern "C" {
    #include
    #include
    #include
    #include
    #include
    }

    using namespace std;

    /**This class is used to find out information about processes and manipulate them.
      *@author Sheldon Lee Wen
      */

    class PControl : public QWidget  {
       Q_OBJECT
    public:
    	virtual ~PControl();
      /** Get instance of PControl. It is made sure that there is only one instance. */
      static PControl *instance();
      /** Returns the pid of a klineakconfig process. Returns 0 if not found. Convienience method. */
      static int klineakconfigRunning();
      /** Returns the pid of a lineakd process. It returns 0 if one is not found. */
      static int lineakdRunning();
      /** Returns the PID of process "process" It will only return one pid. */
      static int processPID(const QString process);
    public slots: // Public slots
      /** Renice process pid. */
      void renice(int pid);
      /** Sends process PID pid., the SIGKILL signal. */
      void kill(int pid);
    signals: // Signals
      /** Signal nice emitted if a process is reniced. */
      void niced(int pid);
      void killed(int pid);
    private:
    	PControl(QWidget *parent=0, const char *name=0);
    	static PControl *mInstance;

    };

    #endif

Generated by: sheldonl on shugaru on Thu Oct 10 23:58:14 2002, using kdoc 2.0a53.