2007-04-12 16:12:37 +00:00
|
|
|
/* This file is part of the KDE project
|
|
|
|
|
Copyright (C) 2007 Alessandro Praduroux <pradu@pradu.it>
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public
|
2007-11-08 18:50:58 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-04-12 16:12:37 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef QTFRAMEBUFFER_H
|
|
|
|
|
#define QTFRAMEBUFFER_H
|
|
|
|
|
|
|
|
|
|
#include <QImage>
|
|
|
|
|
#include "framebuffer.h"
|
|
|
|
|
|
2007-04-15 15:53:18 +00:00
|
|
|
class QTimer;
|
2007-04-12 16:12:37 +00:00
|
|
|
/**
|
|
|
|
|
@author Alessandro Praduroux <pradu@pradu.it>
|
|
|
|
|
*/
|
|
|
|
|
class QtFrameBuffer : public FrameBuffer
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2007-07-24 19:31:30 +00:00
|
|
|
explicit QtFrameBuffer(WId id, QObject *parent = 0);
|
2007-04-12 16:12:37 +00:00
|
|
|
|
|
|
|
|
~QtFrameBuffer();
|
|
|
|
|
|
|
|
|
|
virtual int depth();
|
|
|
|
|
virtual int height();
|
|
|
|
|
virtual int width();
|
|
|
|
|
virtual int paddedWidth();
|
|
|
|
|
virtual void getServerFormat(rfbPixelFormat& format);
|
2007-04-15 15:53:18 +00:00
|
|
|
virtual void startMonitor();
|
|
|
|
|
virtual void stopMonitor();
|
2007-04-12 16:12:37 +00:00
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
|
void updateFrameBuffer();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QImage fbImage;
|
2007-04-15 15:53:18 +00:00
|
|
|
QTimer *t;
|
2007-04-12 16:12:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|