summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/fb_base/fb_base.cpp48
-rw-r--r--src/plugins/platforms/fb_base/fb_base.h28
-rw-r--r--src/plugins/platforms/linuxfb/main.cpp10
-rw-r--r--src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp64
-rw-r--r--src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h16
-rw-r--r--src/plugins/platforms/vnc/main.cpp10
-rw-r--r--src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp32
-rw-r--r--src/plugins/platforms/vnc/qgraphicssystem_vnc.h16
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.cpp2
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.h4
-rw-r--r--src/plugins/platforms/vnc/qvncserver.cpp16
-rw-r--r--src/plugins/platforms/vnc/qvncserver.h26
12 files changed, 136 insertions, 136 deletions
diff --git a/src/plugins/platforms/fb_base/fb_base.cpp b/src/plugins/platforms/fb_base/fb_base.cpp
index 25426eb..1a6d04e 100644
--- a/src/plugins/platforms/fb_base/fb_base.cpp
+++ b/src/plugins/platforms/fb_base/fb_base.cpp
@@ -81,7 +81,7 @@ void QGraphicsSystemSoftwareCursor::changeCursor(QCursor * widgetCursor, QWidget
screen->setDirty(currentRect);
}
-QGraphicsSystemFbScreen::QGraphicsSystemFbScreen() : cursor(0), mGeometry(), mDepth(16), mFormat(QImage::Format_RGB16), mScreenImage(0), compositePainter(0), isUpToDate(false)
+QFbScreen::QFbScreen() : cursor(0), mGeometry(), mDepth(16), mFormat(QImage::Format_RGB16), mScreenImage(0), compositePainter(0), isUpToDate(false)
{
mScreenImage = new QImage(mGeometry.size(), mFormat);
redrawTimer.setSingleShot(true);
@@ -89,7 +89,7 @@ QGraphicsSystemFbScreen::QGraphicsSystemFbScreen() : cursor(0), mGeometry(), mDe
QObject::connect(&redrawTimer, SIGNAL(timeout()), this, SLOT(doRedraw()));
}
-void QGraphicsSystemFbScreen::setGeometry(QRect rect)
+void QFbScreen::setGeometry(QRect rect)
{
delete mScreenImage;
mGeometry = rect;
@@ -99,17 +99,17 @@ void QGraphicsSystemFbScreen::setGeometry(QRect rect)
invalidateRectCache();
}
-void QGraphicsSystemFbScreen::setDepth(int depth)
+void QFbScreen::setDepth(int depth)
{
mDepth = depth;
}
-void QGraphicsSystemFbScreen::setPhysicalSize(QSize size)
+void QFbScreen::setPhysicalSize(QSize size)
{
mPhysicalSize = size;
}
-void QGraphicsSystemFbScreen::setFormat(QImage::Format format)
+void QFbScreen::setFormat(QImage::Format format)
{
mFormat = format;
delete mScreenImage;
@@ -118,23 +118,23 @@ void QGraphicsSystemFbScreen::setFormat(QImage::Format format)
compositePainter = 0;
}
-QGraphicsSystemFbScreen::~QGraphicsSystemFbScreen()
+QFbScreen::~QFbScreen()
{
delete compositePainter;
delete mScreenImage;
}
-void QGraphicsSystemFbScreen::setDirty(const QRect &rect)
+void QFbScreen::setDirty(const QRect &rect)
{
-// qDebug() << "QGraphicsSystemFbScreen::setDirty" << rect;
+// qDebug() << "QFbScreen::setDirty" << rect;
repaintRegion += rect;
if (!redrawTimer.isActive()) {
redrawTimer.start();
}
}
-void QGraphicsSystemFbScreen::generateRects()
+void QFbScreen::generateRects()
{
cachedRects.clear();
QRegion remainingScreen(mGeometry);
@@ -162,7 +162,7 @@ void QGraphicsSystemFbScreen::generateRects()
-QRegion QGraphicsSystemFbScreen::doRedraw()
+QRegion QFbScreen::doRedraw()
{
QRegion touchedRegion;
if (cursor)
@@ -232,13 +232,13 @@ QRegion QGraphicsSystemFbScreen::doRedraw()
-// qDebug() << "QGraphicsSystemFbScreen::doRedraw" << windowStack.size() << mScreenImage->size() << touchedRegion;
+// qDebug() << "QFbScreen::doRedraw" << windowStack.size() << mScreenImage->size() << touchedRegion;
return touchedRegion;
}
-void QGraphicsSystemFbScreen::removeWindow(QFbWindow * surface)
+void QFbScreen::removeWindow(QFbWindow * surface)
{
windowStack.removeOne(surface);
invalidateRectCache();
@@ -250,7 +250,7 @@ void QFbWindow::raise()
mScreen->raise(this);
}
-void QGraphicsSystemFbScreen::raise(QPlatformWindow * surface)
+void QFbScreen::raise(QPlatformWindow * surface)
{
QFbWindow *s = static_cast<QFbWindow *>(surface);
int index = windowStack.indexOf(s);
@@ -266,7 +266,7 @@ void QFbWindow::lower()
mScreen->lower(this);
}
-void QGraphicsSystemFbScreen::lower(QPlatformWindow * surface)
+void QFbScreen::lower(QPlatformWindow * surface)
{
QFbWindow *s = static_cast<QFbWindow *>(surface);
int index = windowStack.indexOf(s);
@@ -277,7 +277,7 @@ void QGraphicsSystemFbScreen::lower(QPlatformWindow * surface)
setDirty(s->geometry());
}
-QWidget * QGraphicsSystemFbScreen::topLevelAt(const QPoint & p) const
+QWidget * QFbScreen::topLevelAt(const QPoint & p) const
{
for(int i = 0; i < windowStack.size(); i++) {
if (windowStack[i]->geometry().contains(p, false) &&
@@ -291,7 +291,7 @@ QWidget * QGraphicsSystemFbScreen::topLevelAt(const QPoint & p) const
-QFbWindow::QFbWindow(QGraphicsSystemFbScreen *screen, QWidget *window)
+QFbWindow::QFbWindow(QFbScreen *screen, QWidget *window)
:QPlatformWindow(window),
mScreen(screen),
visibleFlag(false)
@@ -307,7 +307,7 @@ QFbWindow::~QFbWindow()
}
-QGraphicsSystemFbWindowSurface::QGraphicsSystemFbWindowSurface(QGraphicsSystemFbScreen *screen, QWidget *window)
+QFbWindowSurface::QFbWindowSurface(QFbScreen *screen, QWidget *window)
: QWindowSurface(window),
mScreen(screen)
{
@@ -317,18 +317,18 @@ QGraphicsSystemFbWindowSurface::QGraphicsSystemFbWindowSurface(QGraphicsSystemFb
platformWindow->surface = this;
}
-QGraphicsSystemFbWindowSurface::~QGraphicsSystemFbWindowSurface()
+QFbWindowSurface::~QFbWindowSurface()
{
}
-void QGraphicsSystemFbWindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &offset)
+void QFbWindowSurface::flush(QWidget *widget, const QRegion &region, const QPoint &offset)
{
Q_UNUSED(widget);
Q_UNUSED(offset);
-// qDebug() << "QGraphicsSystemFbWindowSurface::flush" << region;
+// qDebug() << "QFbWindowSurface::flush" << region;
platformWindow->repaint(region);
@@ -352,7 +352,7 @@ void QFbWindow::repaint(const QRegion &region)
mScreen->setDirty(dirtyRegion);
}
-void QGraphicsSystemFbWindowSurface::resize(const QSize &size)
+void QFbWindowSurface::resize(const QSize &size)
{
// change the widget's QImage if this is a resize
if (mImage.size() != size)
@@ -376,17 +376,17 @@ void QFbWindow::setGeometry(const QRect &rect)
-bool QGraphicsSystemFbWindowSurface::scroll(const QRegion &area, int dx, int dy)
+bool QFbWindowSurface::scroll(const QRegion &area, int dx, int dy)
{
return QWindowSurface::scroll(area, dx, dy);
}
-void QGraphicsSystemFbWindowSurface::beginPaint(const QRegion &region)
+void QFbWindowSurface::beginPaint(const QRegion &region)
{
Q_UNUSED(region);
}
-void QGraphicsSystemFbWindowSurface::endPaint(const QRegion &region)
+void QFbWindowSurface::endPaint(const QRegion &region)
{
Q_UNUSED(region);
}
diff --git a/src/plugins/platforms/fb_base/fb_base.h b/src/plugins/platforms/fb_base/fb_base.h
index 8df6b8e..2738768 100644
--- a/src/plugins/platforms/fb_base/fb_base.h
+++ b/src/plugins/platforms/fb_base/fb_base.h
@@ -14,7 +14,7 @@ class QMouseEvent;
class QSize;
class QPainter;
-class QGraphicsSystemFbScreen;
+class QFbScreen;
class QGraphicsSystemSoftwareCursor : public QGraphicsSystemCursor
{
@@ -44,11 +44,11 @@ private:
class QFbWindow;
-class QGraphicsSystemFbWindowSurface : public QWindowSurface
+class QFbWindowSurface : public QWindowSurface
{
public:
- QGraphicsSystemFbWindowSurface(QGraphicsSystemFbScreen *screen, QWidget *window);
- ~QGraphicsSystemFbWindowSurface();
+ QFbWindowSurface(QFbScreen *screen, QWidget *window);
+ ~QFbWindowSurface();
virtual QPaintDevice *paintDevice() { return &mImage; }
virtual void flush(QWidget *widget, const QRegion &region, const QPoint &offset);
@@ -65,7 +65,7 @@ protected:
friend class QFbWindow;
QFbWindow *platformWindow;
- QGraphicsSystemFbScreen *mScreen;
+ QFbScreen *mScreen;
QImage mImage;
};
@@ -74,7 +74,7 @@ class QFbWindow : public QPlatformWindow
{
public:
- QFbWindow(QGraphicsSystemFbScreen *screen, QWidget *window);
+ QFbWindow(QFbScreen *screen, QWidget *window);
~QFbWindow();
@@ -94,10 +94,10 @@ public:
virtual void repaint(const QRegion&);
protected:
- friend class QGraphicsSystemFbWindowSurface;
- friend class QGraphicsSystemFbScreen;
- QGraphicsSystemFbWindowSurface *surface;
- QGraphicsSystemFbScreen *mScreen;
+ friend class QFbWindowSurface;
+ friend class QFbScreen;
+ QFbWindowSurface *surface;
+ QFbScreen *mScreen;
QRect oldGeometry;
bool visibleFlag;
Qt::WindowFlags flags;
@@ -107,12 +107,12 @@ protected:
};
-class QGraphicsSystemFbScreen : public QPlatformScreen
+class QFbScreen : public QPlatformScreen
{
Q_OBJECT
public:
- QGraphicsSystemFbScreen();
- ~QGraphicsSystemFbScreen();
+ QFbScreen();
+ ~QFbScreen();
virtual QRect geometry() const { return mGeometry; }
virtual int depth() const { return mDepth; }
@@ -158,7 +158,7 @@ private:
QList<QPair<QRect, int> > cachedRects;
void invalidateRectCache() { isUpToDate = false; }
- friend class QGraphicsSystemFbWindowSurface;
+ friend class QFbWindowSurface;
friend class QFbWindow;
bool isUpToDate;
};
diff --git a/src/plugins/platforms/linuxfb/main.cpp b/src/plugins/platforms/linuxfb/main.cpp
index 15305ed..1ee24b6 100644
--- a/src/plugins/platforms/linuxfb/main.cpp
+++ b/src/plugins/platforms/linuxfb/main.cpp
@@ -44,28 +44,28 @@
QT_BEGIN_NAMESPACE
-class QLinuxFbGraphicsSystemPlugin : public QPlatformIntegrationPlugin
+class QLinuxFbIntegrationPlugin : public QPlatformIntegrationPlugin
{
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&);
};
-QStringList QLinuxFbGraphicsSystemPlugin::keys() const
+QStringList QLinuxFbIntegrationPlugin::keys() const
{
QStringList list;
list << "LinuxFb";
return list;
}
-QPlatformIntegration* QLinuxFbGraphicsSystemPlugin::create(const QString& system)
+QPlatformIntegration* QLinuxFbIntegrationPlugin::create(const QString& system)
{
if (system.toLower() == "linuxfb")
- return new QLinuxFbGraphicsSystem;
+ return new QLinuxFbIntegration;
return 0;
}
-Q_EXPORT_PLUGIN2(linuxfb, QLinuxFbGraphicsSystemPlugin)
+Q_EXPORT_PLUGIN2(linuxfb, QLinuxFbIntegrationPlugin)
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp
index cca567c..25cdc7b 100644
--- a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp
+++ b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp
@@ -69,11 +69,11 @@
QT_BEGIN_NAMESPACE
-class QLinuxFbGraphicsSystemPrivate
+class QLinuxFbIntegrationPrivate
{
public:
- QLinuxFbGraphicsSystemPrivate();
- ~QLinuxFbGraphicsSystemPrivate();
+ QLinuxFbIntegrationPrivate();
+ ~QLinuxFbIntegrationPrivate();
void openTty();
void closeTty();
@@ -94,7 +94,7 @@ public:
QString displaySpec;
};
-QLinuxFbGraphicsSystemPrivate::QLinuxFbGraphicsSystemPrivate()
+QLinuxFbIntegrationPrivate::QLinuxFbIntegrationPrivate()
: fd(-1), blank(true), doGraphicsMode(true),
#ifdef QT_QWS_DEPTH_GENERIC
doGenericColors(false),
@@ -103,12 +103,12 @@ QLinuxFbGraphicsSystemPrivate::QLinuxFbGraphicsSystemPrivate()
{
}
-QLinuxFbGraphicsSystemPrivate::~QLinuxFbGraphicsSystemPrivate()
+QLinuxFbIntegrationPrivate::~QLinuxFbIntegrationPrivate()
{
closeTty();
}
-void QLinuxFbGraphicsSystemPrivate::openTty()
+void QLinuxFbIntegrationPrivate::openTty()
{
const char *const devs[] = {"/dev/tty0", "/dev/tty", "/dev/console", 0};
@@ -139,7 +139,7 @@ void QLinuxFbGraphicsSystemPrivate::openTty()
QT_WRITE(ttyfd, termctl, sizeof(termctl));
}
-void QLinuxFbGraphicsSystemPrivate::closeTty()
+void QLinuxFbIntegrationPrivate::closeTty()
{
if (ttyfd == -1)
return;
@@ -155,33 +155,33 @@ void QLinuxFbGraphicsSystemPrivate::closeTty()
ttyfd = -1;
}
-QLinuxFbGraphicsSystem::QLinuxFbGraphicsSystem()
+QLinuxFbIntegration::QLinuxFbIntegration()
{
- d_ptr = new QLinuxFbGraphicsSystemPrivate();
+ d_ptr = new QLinuxFbIntegrationPrivate();
// XXX
QString displaySpec = QString::fromLatin1(qgetenv("QWS_DISPLAY"));
if (!connect(displaySpec))
- qFatal("QLinuxFbGraphicsSystem: could not initialize screen");
+ qFatal("QLinuxFbIntegration: could not initialize screen");
initDevice();
// Create a QImage directly on the screen's framebuffer.
// This is the blit target for copying windows to the screen.
- mPrimaryScreen = new QLinuxFbGraphicsSystemScreen(data, w, h, lstep,
+ mPrimaryScreen = new QLinuxFbScreen(data, w, h, lstep,
screenFormat);
mPrimaryScreen->setPhysicalSize(QSize(physWidth, physHeight));
mScreens.append(mPrimaryScreen);
}
-QLinuxFbGraphicsSystem::~QLinuxFbGraphicsSystem()
+QLinuxFbIntegration::~QLinuxFbIntegration()
{
delete mPrimaryScreen;
delete d_ptr;
}
-bool QLinuxFbGraphicsSystem::connect(const QString &displaySpec)
+bool QLinuxFbIntegration::connect(const QString &displaySpec)
{
const QStringList args = displaySpec.split(QLatin1Char(':'));
@@ -237,7 +237,7 @@ bool QLinuxFbGraphicsSystem::connect(const QString &displaySpec)
/* Get fixed screen information */
if (d_ptr->fd != -1 && ioctl(d_ptr->fd, FBIOGET_FSCREENINFO, &finfo)) {
- perror("QLinuxFbGraphicsSystem::connect");
+ perror("QLinuxFbIntegration::connect");
qWarning("Error reading fixed information");
return false;
}
@@ -249,7 +249,7 @@ bool QLinuxFbGraphicsSystem::connect(const QString &displaySpec)
/* Get variable screen information */
if (d_ptr->fd != -1 && ioctl(d_ptr->fd, FBIOGET_VSCREENINFO, &vinfo)) {
- perror("QLinuxFbGraphicsSystem::connect");
+ perror("QLinuxFbIntegration::connect");
qWarning("Error reading variable information");
return false;
}
@@ -295,7 +295,7 @@ bool QLinuxFbGraphicsSystem::connect(const QString &displaySpec)
}
if (w == 0 || h == 0) {
- qWarning("QLinuxFbGraphicsSystem::connect(): Unable to find screen geometry, "
+ qWarning("QLinuxFbIntegration::connect(): Unable to find screen geometry, "
"will use 320x240.");
dw = w = 320;
dh = h = 240;
@@ -347,7 +347,7 @@ bool QLinuxFbGraphicsSystem::connect(const QString &displaySpec)
MAP_SHARED, d_ptr->fd, 0);
if ((long)data == -1) {
- perror("QLinuxFbGraphicsSystem::connect");
+ perror("QLinuxFbIntegration::connect");
qWarning("Error: failed to map framebuffer device to memory.");
return false;
} else {
@@ -377,7 +377,7 @@ bool QLinuxFbGraphicsSystem::connect(const QString &displaySpec)
startcmap.transp=(unsigned short int *)
malloc(sizeof(unsigned short int)*screencols);
if (d_ptr->fd == -1 || ioctl(d_ptr->fd, FBIOGETCMAP, &startcmap)) {
- perror("QLinuxFbGraphicsSystem::connect");
+ perror("QLinuxFbIntegration::connect");
qWarning("Error reading palette from framebuffer, using default palette");
createPalette(startcmap, vinfo, finfo);
}
@@ -411,7 +411,7 @@ bool QLinuxFbGraphicsSystem::connect(const QString &displaySpec)
return true;
}
-bool QLinuxFbGraphicsSystem::initDevice()
+bool QLinuxFbIntegration::initDevice()
{
d_ptr->openTty();
@@ -538,7 +538,7 @@ bool QLinuxFbGraphicsSystem::initDevice()
return true;
}
-void QLinuxFbGraphicsSystem::setPixelFormat(struct fb_var_screeninfo info)
+void QLinuxFbIntegration::setPixelFormat(struct fb_var_screeninfo info)
{
const fb_bitfield rgba[4] = { info.red, info.green,
info.blue, info.transp };
@@ -626,7 +626,7 @@ void QLinuxFbGraphicsSystem::setPixelFormat(struct fb_var_screeninfo info)
screenFormat = format;
}
-void QLinuxFbGraphicsSystem::createPalette(fb_cmap &cmap, fb_var_screeninfo &vinfo, fb_fix_screeninfo &finfo)
+void QLinuxFbIntegration::createPalette(fb_cmap &cmap, fb_var_screeninfo &vinfo, fb_fix_screeninfo &finfo)
{
if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) {
screencols= (vinfo.bits_per_pixel==8) ? 256 : 16;
@@ -756,7 +756,7 @@ void QLinuxFbGraphicsSystem::createPalette(fb_cmap &cmap, fb_var_screeninfo &vin
}
}
-void QLinuxFbGraphicsSystem::blank(bool on)
+void QLinuxFbIntegration::blank(bool on)
{
if (d_ptr->blank == on)
return;
@@ -781,23 +781,23 @@ void QLinuxFbGraphicsSystem::blank(bool on)
d_ptr->blank = on;
}
-QPixmapData *QLinuxFbGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
+QPixmapData *QLinuxFbIntegration::createPixmapData(QPixmapData::PixelType type) const
{
return new QRasterPixmapData(type);
}
-QWindowSurface *QLinuxFbGraphicsSystem::createWindowSurfaceForWindow(QWidget *widget, WId) const
+QWindowSurface *QLinuxFbIntegration::createWindowSurfaceForWindow(QWidget *widget, WId) const
{
if (widget->windowType() == Qt::Desktop)
return 0; // Don't create an explicit window surface for the destkop.
- QGraphicsSystemFbWindowSurface * surface =
- new QGraphicsSystemFbWindowSurface(mPrimaryScreen, widget);
+ QFbWindowSurface * surface =
+ new QFbWindowSurface(mPrimaryScreen, widget);
return surface;
}
-QPlatformWindow *QLinuxFbGraphicsSystem::createPlatformWindow(QWidget *widget, WId /*winId*/) const
+QPlatformWindow *QLinuxFbIntegration::createPlatformWindow(QWidget *widget, WId /*winId*/) const
{
QFbWindow *w = new QFbWindow(mPrimaryScreen, widget);
mPrimaryScreen->addWindow(w);
@@ -808,7 +808,7 @@ QPlatformWindow *QLinuxFbGraphicsSystem::createPlatformWindow(QWidget *widget, W
-QLinuxFbGraphicsSystemScreen::QLinuxFbGraphicsSystemScreen(uchar * d, int w,
+QLinuxFbScreen::QLinuxFbScreen(uchar * d, int w,
int h, int lstep, QImage::Format screenFormat) : compositePainter(0)
{
data = d;
@@ -823,7 +823,7 @@ QLinuxFbGraphicsSystemScreen::QLinuxFbGraphicsSystemScreen(uchar * d, int w,
cursor = new QGraphicsSystemSoftwareCursor(this);
}
-void QLinuxFbGraphicsSystemScreen::setGeometry(QRect rect)
+void QLinuxFbScreen::setGeometry(QRect rect)
{
mGeometry = rect;
delete mFbScreenImage;
@@ -837,7 +837,7 @@ void QLinuxFbGraphicsSystemScreen::setGeometry(QRect rect)
mFormat);
}
-void QLinuxFbGraphicsSystemScreen::setFormat(QImage::Format format)
+void QLinuxFbScreen::setFormat(QImage::Format format)
{
mFormat = format;
delete mFbScreenImage;
@@ -851,10 +851,10 @@ void QLinuxFbGraphicsSystemScreen::setFormat(QImage::Format format)
mFormat);
}
-QRegion QLinuxFbGraphicsSystemScreen::doRedraw()
+QRegion QLinuxFbScreen::doRedraw()
{
QRegion touched;
- touched = QGraphicsSystemFbScreen::doRedraw();
+ touched = QFbScreen::doRedraw();
if (!compositePainter) {
compositePainter = new QPainter(mFbScreenImage);
diff --git a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h
index 873b463..7d4c031 100644
--- a/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h
+++ b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h
@@ -47,10 +47,10 @@
QT_BEGIN_NAMESPACE
-class QLinuxFbGraphicsSystemScreen : public QGraphicsSystemFbScreen
+class QLinuxFbScreen : public QFbScreen
{
public:
- QLinuxFbGraphicsSystemScreen(uchar * d, int w, int h, int lstep, QImage::Format screenFormat);
+ QLinuxFbScreen(uchar * d, int w, int h, int lstep, QImage::Format screenFormat);
void setGeometry(QRect rect);
void setFormat(QImage::Format format);
@@ -65,16 +65,16 @@ private:
QPainter *compositePainter;
};
-class QLinuxFbGraphicsSystemPrivate;
+class QLinuxFbIntegrationPrivate;
struct fb_cmap;
struct fb_var_screeninfo;
struct fb_fix_screeninfo;
-class QLinuxFbGraphicsSystem : public QPlatformIntegration
+class QLinuxFbIntegration : public QPlatformIntegration
{
public:
- QLinuxFbGraphicsSystem();
- ~QLinuxFbGraphicsSystem();
+ QLinuxFbIntegration();
+ ~QLinuxFbIntegration();
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QPlatformWindow *createPlatformWindow(QWidget *widget, WId WinId) const;
@@ -83,9 +83,9 @@ public:
QList<QPlatformScreen *> screens() const { return mScreens; }
private:
- QLinuxFbGraphicsSystemScreen *mPrimaryScreen;
+ QLinuxFbScreen *mPrimaryScreen;
QList<QPlatformScreen *> mScreens;
- QLinuxFbGraphicsSystemPrivate *d_ptr;
+ QLinuxFbIntegrationPrivate *d_ptr;
enum PixelType { NormalPixel, BGRPixel };
diff --git a/src/plugins/platforms/vnc/main.cpp b/src/plugins/platforms/vnc/main.cpp
index 9de33eb..23d78c1 100644
--- a/src/plugins/platforms/vnc/main.cpp
+++ b/src/plugins/platforms/vnc/main.cpp
@@ -45,28 +45,28 @@
QT_BEGIN_NAMESPACE
-class QVNCGraphicsSystemPlugin : public QPlatformIntegrationPlugin
+class QVNCIntegrationPlugin : public QPlatformIntegrationPlugin
{
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&);
};
-QStringList QVNCGraphicsSystemPlugin::keys() const
+QStringList QVNCIntegrationPlugin::keys() const
{
QStringList list;
list << "VNC";
return list;
}
-QPlatformIntegration* QVNCGraphicsSystemPlugin::create(const QString& system)
+QPlatformIntegration* QVNCIntegrationPlugin::create(const QString& system)
{
if (system.toLower() == "vnc")
- return new QVNCGraphicsSystem;
+ return new QVNCIntegration;
return 0;
}
-Q_EXPORT_PLUGIN2(vnc, QVNCGraphicsSystemPlugin)
+Q_EXPORT_PLUGIN2(vnc, QVNCIntegrationPlugin)
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp b/src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp
index ef50230..cbc8bbd 100644
--- a/src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp
+++ b/src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp
@@ -51,8 +51,8 @@
#include <QtCore/QTimer>
-QVNCGraphicsSystemScreen::QVNCGraphicsSystemScreen()
- : QGraphicsSystemFbScreen::QGraphicsSystemFbScreen()
+QVNCScreen::QVNCScreen()
+ : QFbScreen::QFbScreen()
{
int w = 800;
int h = 600;
@@ -69,21 +69,21 @@ QVNCGraphicsSystemScreen::QVNCGraphicsSystemScreen()
setPhysicalSize((geometry().size()*254)/720);
- d_ptr = new QVNCGraphicsSystemScreenPrivate(this);
+ d_ptr = new QVNCScreenPrivate(this);
cursor = new QVNCCursor(d_ptr->vncServer, this);
d_ptr->vncServer->setCursor(static_cast<QVNCCursor *>(cursor));
}
-QVNCDirtyMap *QVNCGraphicsSystemScreen::dirtyMap()
+QVNCDirtyMap *QVNCScreen::dirtyMap()
{
return d_ptr->dirty;
}
-QRegion QVNCGraphicsSystemScreen::doRedraw()
+QRegion QVNCScreen::doRedraw()
{
QRegion touched;
- touched = QGraphicsSystemFbScreen::doRedraw();
+ touched = QFbScreen::doRedraw();
QVector<QRect> rects = touched.rects();
for (int i = 0; i < rects.size(); i++)
@@ -92,39 +92,39 @@ QRegion QVNCGraphicsSystemScreen::doRedraw()
}
-QVNCGraphicsSystem::QVNCGraphicsSystem()
+QVNCIntegration::QVNCIntegration()
{
- mPrimaryScreen = new QVNCGraphicsSystemScreen();
+ mPrimaryScreen = new QVNCScreen();
mScreens.append(mPrimaryScreen);
}
-QPixmapData *QVNCGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
+QPixmapData *QVNCIntegration::createPixmapData(QPixmapData::PixelType type) const
{
return new QRasterPixmapData(type);
}
-// QWindowSurface *QVNCGraphicsSystem::createWindowSurface(QWidget *widget) const
+// QWindowSurface *QVNCIntegration::createWindowSurface(QWidget *widget) const
// {
// if (widget->windowType() == Qt::Desktop)
// return 0; // Don't create an explicit window surface for the destkop.
-// QGraphicsSystemFbWindowSurface * surface;
-// surface = new QGraphicsSystemFbWindowSurface(mPrimaryScreen, widget);
+// QFbWindowSurface * surface;
+// surface = new QFbWindowSurface(mPrimaryScreen, widget);
// mPrimaryScreen->addWindowSurface(surface);
// return surface;
// }
-QWindowSurface *QVNCGraphicsSystem::createWindowSurfaceForWindow(QWidget *widget, WId) const
+QWindowSurface *QVNCIntegration::createWindowSurfaceForWindow(QWidget *widget, WId) const
{
if (widget->windowType() == Qt::Desktop)
return 0; // Don't create an explicit window surface for the destkop.
- QGraphicsSystemFbWindowSurface * surface;
- surface = new QGraphicsSystemFbWindowSurface(mPrimaryScreen, widget);
+ QFbWindowSurface * surface;
+ surface = new QFbWindowSurface(mPrimaryScreen, widget);
return surface;
}
-QPlatformWindow *QVNCGraphicsSystem::createPlatformWindow(QWidget *widget, WId /*winId*/) const
+QPlatformWindow *QVNCIntegration::createPlatformWindow(QWidget *widget, WId /*winId*/) const
{
QFbWindow *w = new QFbWindow(mPrimaryScreen, widget);
mPrimaryScreen->addWindow(w);
diff --git a/src/plugins/platforms/vnc/qgraphicssystem_vnc.h b/src/plugins/platforms/vnc/qgraphicssystem_vnc.h
index 3205872..887ccc3 100644
--- a/src/plugins/platforms/vnc/qgraphicssystem_vnc.h
+++ b/src/plugins/platforms/vnc/qgraphicssystem_vnc.h
@@ -51,32 +51,32 @@ QT_BEGIN_NAMESPACE
class QVNCServer;
class QVNCDirtyMap;
-class QVNCGraphicsSystemScreenPrivate;
+class QVNCScreenPrivate;
-class QVNCGraphicsSystemScreen : public QGraphicsSystemFbScreen
+class QVNCScreen : public QFbScreen
{
public:
- QVNCGraphicsSystemScreen();
+ QVNCScreen();
int linestep() const { return image() ? image()->bytesPerLine() : 0; }
uchar *base() const { return image() ? image()->bits() : 0; }
QVNCDirtyMap *dirtyMap();
public:
- QVNCGraphicsSystemScreenPrivate *d_ptr;
+ QVNCScreenPrivate *d_ptr;
private:
QVNCServer *server;
QRegion doRedraw();
};
-class QVNCGraphicsSystemPrivate;
+class QVNCIntegrationPrivate;
-class QVNCGraphicsSystem : public QPlatformIntegration
+class QVNCIntegration : public QPlatformIntegration
{
public:
- QVNCGraphicsSystem();
+ QVNCIntegration();
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
@@ -86,7 +86,7 @@ public:
private:
- QVNCGraphicsSystemScreen *mPrimaryScreen;
+ QVNCScreen *mPrimaryScreen;
QList<QPlatformScreen *> mScreens;
};
diff --git a/src/plugins/platforms/vnc/qvnccursor.cpp b/src/plugins/platforms/vnc/qvnccursor.cpp
index fb214d8..78da53b 100644
--- a/src/plugins/platforms/vnc/qvnccursor.cpp
+++ b/src/plugins/platforms/vnc/qvnccursor.cpp
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
-QVNCCursor::QVNCCursor(QVNCServer * srvr, QVNCGraphicsSystemScreen *scr )
+QVNCCursor::QVNCCursor(QVNCServer * srvr, QVNCScreen *scr )
:QGraphicsSystemSoftwareCursor(scr), useVncCursor(false), server(srvr)
{
}
diff --git a/src/plugins/platforms/vnc/qvnccursor.h b/src/plugins/platforms/vnc/qvnccursor.h
index 8ea0f45..2c6ff5b 100644
--- a/src/plugins/platforms/vnc/qvnccursor.h
+++ b/src/plugins/platforms/vnc/qvnccursor.h
@@ -48,12 +48,12 @@
QT_BEGIN_NAMESPACE
-class QVNCGraphicsSystemScreen;
+class QVNCScreen;
class QVNCServer;
class QVNCCursor : public QGraphicsSystemSoftwareCursor {
public:
- QVNCCursor(QVNCServer *, QVNCGraphicsSystemScreen *);
+ QVNCCursor(QVNCServer *, QVNCScreen *);
// input methods
void setCursorMode(bool vnc);
diff --git a/src/plugins/platforms/vnc/qvncserver.cpp b/src/plugins/platforms/vnc/qvncserver.cpp
index ea576d4..ab0a2f3 100644
--- a/src/plugins/platforms/vnc/qvncserver.cpp
+++ b/src/plugins/platforms/vnc/qvncserver.cpp
@@ -358,13 +358,13 @@ bool QRfbClientCutText::read(QTcpSocket *s)
//===========================================================================
-QVNCServer::QVNCServer(QVNCGraphicsSystemScreen *screen)
+QVNCServer::QVNCServer(QVNCScreen *screen)
: qvnc_screen(screen), cursor(0)
{
init(5900);
}
-QVNCServer::QVNCServer(QVNCGraphicsSystemScreen *screen, int id)
+QVNCServer::QVNCServer(QVNCScreen *screen, int id)
: qvnc_screen(screen), cursor(0)
{
init(5900 + id);
@@ -620,7 +620,7 @@ void QVNCServer::readClient()
}
#if 0//Q_BYTE_ORDER == Q_BIG_ENDIAN
-bool QVNCGraphicsSystemScreen::swapBytes() const
+bool QVNCScreen::swapBytes() const
{
if (depth() != 16)
return false;
@@ -1499,7 +1499,7 @@ static void blendCursor(QImage &image, const QRect &imageRect)
}
#endif // QT_NO_QWS_CURSOR
-QVNCDirtyMap::QVNCDirtyMap(QVNCGraphicsSystemScreen *s)
+QVNCDirtyMap::QVNCDirtyMap(QVNCScreen *s)
: bytesPerPixel(0), numDirty(0), screen(s)
{
bytesPerPixel = (screen->depth() + 7) / 8;
@@ -1885,7 +1885,7 @@ void QVNCServer::discardClient()
-QVNCGraphicsSystemScreenPrivate::QVNCGraphicsSystemScreenPrivate(QVNCGraphicsSystemScreen *parent)
+QVNCScreenPrivate::QVNCScreenPrivate(QVNCScreen *parent)
: dpiX(72), dpiY(72), doOnScreenSurface(false), refreshRate(25),
vncServer(0), q_ptr(parent)
{
@@ -1902,12 +1902,12 @@ QVNCGraphicsSystemScreenPrivate::QVNCGraphicsSystemScreenPrivate(QVNCGraphicsSys
dirty = new QVNCDirtyMapOptimized<quint32>(q_ptr);
}
-QVNCGraphicsSystemScreenPrivate::~QVNCGraphicsSystemScreenPrivate()
+QVNCScreenPrivate::~QVNCScreenPrivate()
{
}
-void QVNCGraphicsSystemScreenPrivate::setDirty(const QRect& rect, bool force)
+void QVNCScreenPrivate::setDirty(const QRect& rect, bool force)
{
if (rect.isEmpty())
return;
@@ -1916,7 +1916,7 @@ void QVNCGraphicsSystemScreenPrivate::setDirty(const QRect& rect, bool force)
// q_ptr->screen()->setDirty(rect);
if (!vncServer || !vncServer->isConnected()) {
-// qDebug() << "QVNCGraphicsSystemScreenPrivate::setDirty() - Not connected";
+// qDebug() << "QVNCScreenPrivate::setDirty() - Not connected";
return;
}
const QRect r = rect; // .translated(-q_ptr->offset());
diff --git a/src/plugins/platforms/vnc/qvncserver.h b/src/plugins/platforms/vnc/qvncserver.h
index 4fcdbae..41cadab 100644
--- a/src/plugins/platforms/vnc/qvncserver.h
+++ b/src/plugins/platforms/vnc/qvncserver.h
@@ -72,7 +72,7 @@ class QVNCServer;
class QVNCCursor : public QProxyScreenCursor
{
public:
- QVNCCursor(QVNCGraphicsSystemScreen *s);
+ QVNCCursor(QVNCScreen *s);
~QVNCCursor();
void hide();
@@ -82,7 +82,7 @@ public:
private:
void setDirty(const QRect &r) const;
- QVNCGraphicsSystemScreen *screen;
+ QVNCScreen *screen;
};
class QVNCClientCursor : public QProxyScreenCursor
@@ -106,7 +106,7 @@ private:
class QVNCDirtyMap
{
public:
- QVNCDirtyMap(QVNCGraphicsSystemScreen *screen);
+ QVNCDirtyMap(QVNCScreen *screen);
virtual ~QVNCDirtyMap();
void reset();
@@ -122,7 +122,7 @@ public:
protected:
uchar *map;
- QVNCGraphicsSystemScreen *screen;
+ QVNCScreen *screen;
uchar *buffer;
int bufferWidth;
int bufferHeight;
@@ -134,7 +134,7 @@ template <class T>
class QVNCDirtyMapOptimized : public QVNCDirtyMap
{
public:
- QVNCDirtyMapOptimized(QVNCGraphicsSystemScreen *screen) : QVNCDirtyMap(screen) {}
+ QVNCDirtyMapOptimized(QVNCScreen *screen) : QVNCDirtyMap(screen) {}
~QVNCDirtyMapOptimized() {}
void setDirty(int x, int y, bool force = false);
@@ -246,11 +246,11 @@ public:
quint32 length;
};
-class QVNCGraphicsSystemScreenPrivate : public QObject
+class QVNCScreenPrivate : public QObject
{
public:
- QVNCGraphicsSystemScreenPrivate(QVNCGraphicsSystemScreen *parent);
- ~QVNCGraphicsSystemScreenPrivate();
+ QVNCScreenPrivate(QVNCScreen *parent);
+ ~QVNCScreenPrivate();
void setDirty(const QRect &rect, bool force = false);
void configure();
@@ -266,7 +266,7 @@ public:
QSharedMemory shm;
#endif
- QVNCGraphicsSystemScreen *q_ptr;
+ QVNCScreen *q_ptr;
};
class QRfbEncoder
@@ -438,8 +438,8 @@ class QVNCServer : public QObject
{
Q_OBJECT
public:
- QVNCServer(QVNCGraphicsSystemScreen *screen);
- QVNCServer(QVNCGraphicsSystemScreen *screen, int id);
+ QVNCServer(QVNCScreen *screen);
+ QVNCServer(QVNCScreen *screen, int id);
~QVNCServer();
void setDirty();
@@ -464,7 +464,7 @@ public:
return pixelFormat.bitsPerPixel / 8;
}
- inline QVNCGraphicsSystemScreen* screen() const { return qvnc_screen; }
+ inline QVNCScreen* screen() const { return qvnc_screen; }
inline QVNCDirtyMap* dirtyMap() const { return qvnc_screen->dirtyMap(); }
inline QTcpSocket* clientSocket() const { return client; }
QImage *screenImage() const;
@@ -519,7 +519,7 @@ private:
#endif
bool dirtyCursor;
int refreshRate;
- QVNCGraphicsSystemScreen *qvnc_screen;
+ QVNCScreen *qvnc_screen;
#ifndef QT_NO_QWS_CURSOR
QVNCClientCursor *qvnc_cursor;
#endif