+// -*- C++ -*-
/**
* \file Timeout.h
* Copyright 2001 LyX Team
* \author Lars Gullik Bjønnes
* \author John Levon
*/
+
#ifndef TIMEOUT_H
#define TIMEOUT_H
-#include <config.h>
-
#ifdef __GNUG__
#pragma interface
#endif
-#include <sigc++/signal_system.h>
+#include <boost/signals/signal0.hpp>
/**
* This class executes the callback when the timeout expires.
*/
class Timeout {
public:
- ///
+ /// the timeout type
enum Type {
- /// one-shot timer
- ONETIME,
- /// repeating
- CONTINUOUS
+ ONETIME, //< one-shot timer
+ CONTINUOUS //< repeating
};
///
- Timeout();
- ///
Timeout(unsigned int msec, Type = ONETIME);
///
~Timeout();
+ /// Is the timer running?
+ bool running() const;
/// start the timer
void start();
/// stop the timer
/// restart the timer
void restart();
/// signal emitted on timer expiry
- SigC::Signal0<void> timeout;
+ boost::signal0<void> timeout;
/// emit the signal
void emit();
/// set the timer type
Timeout & setTimeout(unsigned int msec);
private:
+ ///
struct Pimpl;
+ ///
friend struct Pimpl;
/// implementation
Pimpl * pimpl_;
-
/// one-shot or repeating
Type type;
/// timeout value in milliseconds