diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-04-13 08:57:50 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-04-13 08:57:50 (GMT) |
commit | c8f86b525a6eabb91ad4da2dfdd423a32263359a (patch) | |
tree | ef8ac1485a66002147390f149cd92ffedc4f1fc0 /src/plugins/platforms/fb_base | |
parent | 3a8b3299d7c956e3a9f4733bc7d459757081bdc2 (diff) | |
download | Qt-c8f86b525a6eabb91ad4da2dfdd423a32263359a.zip Qt-c8f86b525a6eabb91ad4da2dfdd423a32263359a.tar.gz Qt-c8f86b525a6eabb91ad4da2dfdd423a32263359a.tar.bz2 |
Rename classes to get rid of "GraphicsSystem"
Diffstat (limited to 'src/plugins/platforms/fb_base')
-rw-r--r-- | src/plugins/platforms/fb_base/fb_base.cpp | 48 | ||||
-rw-r--r-- | src/plugins/platforms/fb_base/fb_base.h | 28 |
2 files changed, 38 insertions, 38 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 ®ion, const QPoint &offset) +void QFbWindowSurface::flush(QWidget *widget, const QRegion ®ion, 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 ®ion) 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 ®ion) +void QFbWindowSurface::beginPaint(const QRegion ®ion) { Q_UNUSED(region); } -void QGraphicsSystemFbWindowSurface::endPaint(const QRegion ®ion) +void QFbWindowSurface::endPaint(const QRegion ®ion) { 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 ®ion, 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; }; |