// This file is generated by tdeconfig_compiler from motionawayconfig.kcfg.
// All changes you do to this file will be lost.
#ifndef MOTIONAWAYCONFIG_H
#define MOTIONAWAYCONFIG_H

#include <tdeconfigskeleton.h>
#include <kdebug.h>

class MotionAwayConfig : public TDEConfigSkeleton
{
  public:

    static MotionAwayConfig *self();
    ~MotionAwayConfig();

    /**
      Set Become available again when the plugin detects motion
    */
    static
    void setBecomeAvailableWithActivity( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "BecomeAvailableWithActivity" ) ))
        self()->mBecomeAvailableWithActivity = v;
    }

    /**
      Get Become available again when the plugin detects motion
    */
    static
    bool becomeAvailableWithActivity()
    {
      return self()->mBecomeAvailableWithActivity;
    }

    /**
      Get Item object corresponding to BecomeAvailableWithActivity()
    */
    ItemBool *becomeAvailableWithActivityItem()
    {
      return mBecomeAvailableWithActivityItem;
    }

    /**
      Set Video device to use for motion detection
    */
    static
    void setVideoDevice( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "VideoDevice" ) ))
        self()->mVideoDevice = v;
    }

    /**
      Get Video device to use for motion detection
    */
    static
    TQString videoDevice()
    {
      return self()->mVideoDevice;
    }

    /**
      Get Item object corresponding to VideoDevice()
    */
    ItemPath *videoDeviceItem()
    {
      return mVideoDeviceItem;
    }

    /**
      Set Become away after this many minutes of inactivity
    */
    static
    void setAwayTimeout( uint v )
    {
      if (v < 0)
      {
        kdDebug() << "setAwayTimeout: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "AwayTimeout" ) ))
        self()->mAwayTimeout = v;
    }

    /**
      Get Become away after this many minutes of inactivity
    */
    static
    uint awayTimeout()
    {
      return self()->mAwayTimeout;
    }

    /**
      Get Item object corresponding to AwayTimeout()
    */
    ItemUInt *awayTimeoutItem()
    {
      return mAwayTimeoutItem;
    }

    static
    void writeConfig()
    {
      static_cast<TDEConfigSkeleton*>(self())->writeConfig();
    }
  protected:
    MotionAwayConfig();
    static MotionAwayConfig *mSelf;


    // MotionAutoAway Plugin
    bool mBecomeAvailableWithActivity;
    TQString mVideoDevice;
    uint mAwayTimeout;

  private:
    ItemBool *mBecomeAvailableWithActivityItem;
    ItemPath *mVideoDeviceItem;
    ItemUInt *mAwayTimeoutItem;
};

#endif

