summaryrefslogtreecommitdiffstats
path: root/kmilo/kmilo_kvaio/kmilo_kvaio.cpp
blob: 1f4a886af7059a590e2a20df226b0a4cae74d278 (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
59
60
61
62
63
64
65
66
67
68
/* -*- C++ -*-

   This file implements the KVaio module for KMilo.

   $ Author: Mirko Boehm $
   $ Copyright: (C) 1996-2003, Mirko Boehm $
   $ Contact: mirko@kde.org
         http://www.kde.org
         http://www.hackerbuero.org $
   $ License: LGPL with the following explicit clarification:
         This code may be linked against any version of the Qt toolkit
         from Troll Tech, Norway. $

   $Id$

   * Portions of this code are
   * (C) 2001-2002 Stelian Pop <stelian@popies.net> and
   * (C) 2001-2002 Alcove <www.alcove.com>.
   * Thanks to Stelian for the implementation of the sonypi driver.
*/

#include <kgenericfactory.h>

#include "monitor.h"
#include "kmilo_kvaio.h"
#include "kvaio.h"
#include "kmilointerface.h"

KMiloKVaio::KMiloKVaio(TQObject *parent, const char *name,
		       const TQStringList& args)
    : Monitor(parent, name, args),
      m_kvaio(0)
{
    _poll = false;
    m_displayType = (Monitor::DisplayType)None ;
}


KMiloKVaio::~KMiloKVaio() {
}


bool KMiloKVaio::init()
{
    m_kvaio = new KVaio(this);

    return m_kvaio->driver()!=0;
}


KMilo::Monitor::DisplayType KMiloKVaio::poll() {
//    Monitor::DisplayType rc = (Monitor::DisplayType)None;
//    return rc;
    return m_displayType;
}


int KMiloKVaio::progress() const {
	return m_kvaio->progress();
}

void KMiloKVaio::reconfigure(KConfig* k)
{
    m_kvaio->loadConfiguration(k);
}

K_EXPORT_COMPONENT_FACTORY(kmilo_kvaio, KGenericFactory<KMiloKVaio>("kmilo_kvaio"))