43 #include "../fb_base/fb_base.h" 44 #include <private/qapplication_p.h> 45 #include <QtGui/private/qpixmap_raster_p.h> 46 #include <QtCore/qdebug.h> 49 #include <QtGui/QPainter> 51 #include <QtCore/QTimer> 80 for (
int i = 0; i < rects.
size(); i++)
91 qWarning() <<
"VNC Platform Integration options:";
92 qWarning() <<
" size=<Width>x<Height> - set the display width and height";
94 qWarning() <<
" display=<ID> - set the VNC display port to ID + 5900";
96 qWarning() <<
" offset=<X>x<Y> - set the current screens offset";
97 qWarning() <<
" vnc - start configuration of a new screen";
98 qWarning() <<
" size and offset are inherited from the previous screen if not set";
99 qWarning() <<
" display id is incremented from the previous screen if not set";
100 qWarning() <<
" virtual - manage the set of screens as a virtual desktop";
111 bool showUsage =
false;
113 foreach(
QString confString, paramList) {
128 QRect screenRect(offsetX, offsetY, sizeX, sizeY);
139 qWarning() <<
"Unknown VNC option:" << confString;
147 QRect screenRect(offsetX, offsetY, sizeX, sizeY);
201 if (x==0 && y == 0 && width < 0 && height < 0) {
205 width = desktopImage->
width() - x;
207 height = desktopImage->
height() - y;
216 width = r.
width() - x;
240 oldScreen->
removeWindow(static_cast<QFbWindow *>(window->platformWindow()));
245 newScreen->
addWindow(static_cast<QFbWindow *>(window->platformWindow()));
T qobject_cast(QObject *object)
QString section(QChar sep, int start, int end=-1, SectionFlags flags=SectionDefault) const
This function returns a section of the string.
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
static int defaultWidth()
virtual QRegion doRedraw()
QPointer< QWidget > widget
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
void setCursor(QVNCCursor *c)
void setDirty(const QRect &rect, bool force=false)
QPixmap grabWindow(WId window, int x, int y, int width, int height) const
This function is called when Qt needs to be able to grab the content of a window. ...
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the list.
int left() const
Returns the x-coordinate of the rectangle's left edge.
static int bytesPerPixel(QImage::Format format)
int width() const
Returns the width of the rectangle.
The QList::const_iterator class provides an STL-style const iterator for QList and QQueue...
virtual void setFormat(QImage::Format format)
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int bytesPerLine() const
Returns the number of bytes per image scanline.
QPlatformWindow * createPlatformWindow(QWidget *widget, WId winId) const
Factory function for QPlatformWindow.
int height() const
Returns the height of the rectangle.
The QString class provides a Unicode character string.
int size
the number of bytes in the visible region of the frame buffer
Format format() const
Returns the format of the image.
void setObjectName(const QString &name)
friend class QVNCScreenPrivate
QPlatformFontDatabase * fontDatabase() const
Accessor for the platform integrations fontdatabase.
void append(const T &t)
Inserts value at the end of the list.
Q_GUI_EXPORT EGLDisplay display()
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
virtual void addWindow(QFbWindow *surface)
The QVNCScreen class implements a screen driver for VNC servers.
QPixmapData * createPixmapData(QPixmapData::PixelType type) const
Factory function for QPixmapData.
QPlatformFontDatabase * fontDb
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
static int defaultHeight()
The QRegion class specifies a clip region for a painter.
int depth() const
Returns the depth of the image.
QVNCDirtyMap * dirtyMap()
The QWindowSurface class provides the drawing area for top-level windows.
QPlatformSoftwareCursor * cursor
T & first()
Returns a reference to the first item in the list.
int top() const
Returns the y-coordinate of the rectangle's top edge.
int width() const
Returns the width of the image.
static int defaultDisplay()
virtual void removeWindow(QFbWindow *surface)
QList< QPlatformScreen * > mScreens
virtual void setPhysicalSize(QSize size)
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
int size() const
Returns the number of items in the list.
The QRect class defines a rectangle in the plane using integer precision.
int height() const
Returns the height of the image.
void setDirty(const QRect &)
Reimplemented Function
virtual void setDepth(int depth)
The QPixmap class is an off-screen image representation that can be used as a paint device...
QVNCIntegration(const QStringList ¶mList)
bool hasCapability(QPlatformIntegration::Capability cap) const
QVNCScreen * mPrimaryScreen
virtual QRect geometry() const
Reimplement in subclass to return the pixel geometry of the screen.
QList< QFbWindow * > windowStack
void moveToScreen(QWidget *window, int screen)
This function is called when a QWidget is displayed on screen, or the QWidget is to be displayed on a...
static const KeyPair *const end
int size() const
Returns the number of items in the vector.
QVNCScreenPrivate * d_ptr
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
virtual void setGeometry(QRect rect)
QWindowSurface * createWindowSurface(QWidget *widget, WId winId) const
Factory function for QWindowSurface.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the list...
QVNCScreen(int display_id)
Constructs a QVNCScreen object.