# shtimer.h

Go to the documentation of this file.

    00001 /*
    00002  * SmartHome server: Plug-in timer
    00003  *
    00004  * Copyright (C) 2010 Daniel Pisi <dan.pisi@gmail.com>
    00005  *
    00006  * This program is free software; you can redistribute it and/or modify it
    00007  * under the terms of version 2 of the GNU General Public License
    00008  * as published by the Free Software Foundation.
    00009  *
    00010  */
    00011
    00018 #ifndef SHTIMER_H
    00019 #define SHTIMER_H
    00020
    00021 #include <QtCore/QCoreApplication>
    00022 #include <QtPlugin>
    00023 #include <QObject>
    00024 #include <QTimer>
    00025 #include "shobjecthelper.h"
    00026
    00027 // -----------------------------------------------------------------------------
    00028
    00033 class ShTimer : public ShObjectHelper
    00034 {
    00035     Q_OBJECT
    00036     Q_INTERFACES(ShObject)
    00037
    00038 public:
    00039     ShTimer();
    00040     virtual ~ShTimer() {};
    00041     virtual bool init(QString param);
    00042     virtual void updatePins(const QList<ShPin> &pins) {};
    00043     virtual void processMessage(ShMessagePtr message);
    00044
    00045 private slots:
    00046     void onTimeout();
    00047
    00048 private:
    00049     QTimer *mTimer;
    00050     bool mOutput;
    00051 };
    00052 // -----------------------------------------------------------------------------
    00053
    00054 #endif // SHTIMER_H

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends