summaryrefslogtreecommitdiff
path: root/src/plugins/platforms/vnc
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-04-13 10:57:50 +0200
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-04-13 10:57:50 +0200
commitc8f86b525a6eabb91ad4da2dfdd423a32263359a (patch)
treeef8ac1485a66002147390f149cd92ffedc4f1fc0 /src/plugins/platforms/vnc
parent3a8b3299d7c956e3a9f4733bc7d459757081bdc2 (diff)
downloadqt4-tools-c8f86b525a6eabb91ad4da2dfdd423a32263359a.tar.gz
Rename classes to get rid of "GraphicsSystem"
Diffstat (limited to 'src/plugins/platforms/vnc')
-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
7 files changed, 53 insertions, 53 deletions
diff --git a/src/plugins/platforms/vnc/main.cpp b/src/plugins/platforms/vnc/main.cpp
index 9de33ebe38..23d78c1c84 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 ef50230fe1..cbc8bbd26d 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 320587279c..887ccc3372 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 fb214d80af..78da53ba47 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 8ea0f45e64..2c6ff5b791 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 ea576d457d..ab0a2f33c6 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 4fcdbae1ac..41cadab6a1 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