summaryrefslogtreecommitdiffstats
path: root/ksysv/RunlevelAuthIcon.h
blob: d33f24d44c5867ef222b88751e3f9595d34a9549 (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
#ifndef RUNLEVEL_AUTH_ICON_H
#define RUNLEVEL_AUTH_ICON_H

// (c) 2000 Peter Putzer <putzer@kde.org>
#include <kauthicon.h>

class QTimer;
class QFileInfo;

class RunlevelAuthIcon : public KAuthIcon
{
  Q_OBJECT
  Q_PROPERTY (int refreshInterval READ refreshInterval WRITE setRefreshInterval)
    
public:
  RunlevelAuthIcon (const QString& scriptPath, const QString& runlevelPath,
					QWidget* parent = 0L, const char* name = 0L);

  virtual ~RunlevelAuthIcon ();

  virtual bool status () const;

  inline int refreshInterval () const { return mInterval; }
  inline bool isCheckEnabled () const { return mCheckEnabled; }

public slots:
  virtual void updateStatus ();

  void setServicesPath (const QString& servicesPath);
  void setRunlevelPath (const QString& runlevelPath);

  void setRefreshInterval (int);

  void setCheckEnabled(bool);

private slots:
  void timerEvent ();

private:
  QTimer* mTimer;
  QFileInfo* mServicesInfo;
  QFileInfo** mRLInfo;
  bool mOld;
  int mInterval;
  
  bool mCheckEnabled;
};

#endif // RUNLEVEL_AUTH_ICON_H