lyx_mirror/src/frontends/qt2/Timeout_pimpl.h
John Levon 0c5c06c8c4 The initial merge of the Qt frontend, and the necessary compile fixes.
All still VERY primitive, in fact even more primitive since some stuff
got re-horked after the meeting, and still needs working on. Won't actually
compile out of the box, but the tweaks should be pretty obvious for any
body sufficiently daring.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4427 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-19 03:38:44 +00:00

53 lines
778 B
C++

// -*- C++ -*-
/**
* \file qt2/Timeout_pimpl.h
* Copyright 2001 LyX Team
* Read COPYING
*
* \author John Levon
*/
#ifndef TIMEOUTPIMPL_H
#define TIMEOUTPIMPL_H
#include <config.h>
#ifdef __GNUG__
#pragma interface
#endif
#include "frontends/Timeout.h"
#include <qobject.h>
// stupid Qt
#undef emit
/**
* This class executes the callback when the timeout expires
* using Qt mechanisms
*/
struct Timeout::Pimpl : QObject {
public:
///
Pimpl(Timeout * owner_);
/// start the timer
void start();
/// stop the timer
void stop();
/// reset
void reset();
/// is the timer running ?
bool running() const;
protected:
/// slot
virtual void timerEvent(QTimerEvent *);
private:
/// the owning timer
Timeout * owner_;
/// xforms id
int timeout_id;
};
#endif