Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QScreenInformationProvider class provides the back end implementation of QScreenInformation. More...
#include <QScreenInformationProvider>
Inherits QObject.
The QScreenInformationProvider class provides the back end implementation of QScreenInformation.
The following class represents a screen of type Television which by default is a clone of the primary LCD screen:
class TvScreen : public QScreenInformationProvider { Q_OBJECT public: TvScreen(int screenNumber, QObject *parent=0); public slots: void videoCableInserted(); void videoCableRemoved(); protected: void changeClonedScreen(int value); void revertClonedScreen(); }; TvScreen::TvScreen(int screenNumber, QObject *parent) : QScreenInformationProvider(screenNumber, parent) { setType(QScreenInformation::Television); setVisible(false); setClonedScreen(QApplication::desktop()->primaryScreen()); } void TvScreen::videoCableInserted() { setVisible(true); } void TvScreen::videoCableRemoved() { setVisible(false); } void TvScreen::changeClonedScreen(int value) { // Tell the hardware to change the clone mode. ... // Update the clone state as seen by client applications. setClonedScreen(value); } void TvScreen::revertClonedScreen() { // Change back to cloning the primary screen. changeClonedScreen(QApplication::desktop()->primaryScreen()); }
See also QScreenInformation.
Constructs a screen information provider object for screenNumber and attaches it to parent. If screenNumber is -1, then the primary screen number is used.
Object construction should be followed by calls to setVisible(), setType(), and setClonedScreen() to populate the screen's initial properties.
See also setVisible(), setType(), and setClonedScreen().
Destroys this screen information provider object.
Changes the cloned screen number to value. The default implementation does nothing. Sub-classes should change the screen and then call setClonedScreen() to update the cloned screen number for clients.
See also setClonedScreen() and revertClonedScreen().
Changes the overlay layer number for this screen to value. The default implementation does nothing. Sub-classes should change the screen and then call setLayer() to update the value for clients.
Changing the layer on an overlay screen also makes it visible, so sub-classes should also call setVisible() to update that value for clients. The layer will be made invisible again when revertLayer() is called.
See also revertLayer().
Reverts the cloned screen number to its default value. The default implementation does nothing. Sub-classes should revert the screen and then call setClonedScreen() to update the cloned screen number for clients.
See also setClonedScreen() and changeClonedScreen().
Reverts the overlay layer number for this screen to its default value and makes the layer invisible because the application that requested a layer change is no longer running. The default implementation does nothing. Sub-classes should revert the screen and then call setLayer() to update the value for clients.
See also changeLayer().
Sets the state of QScreenInformation::clonedScreen() for this screen to value and cause QScreenInformation::changed() to be emitted.
The default value, as seen by QScreenInformation::clonedScreen(), will be -1.
See also QScreenInformation::clonedScreen() and QScreenInformation::changed().
Sets the state of QScreenInformation::layer() for this screen to value and cause QScreenInformation::changed() to be emitted.
The default value, as seen by QScreenInformation::layer(), will be 0.
See also QScreenInformation::layer() and QScreenInformation::changed().
Sets the state of QScreenInformation::supportedLayers() for this screen to value and cause QScreenInformation::changed() to be emitted.
The default value, as seen by QScreenInformation::supportedLayers(), will be an empty list.
See also QScreenInformation::supportedLayers() and QScreenInformation::changed().
Sets the state of QScreenInformation::transparencyColor() for this screen to value and cause QScreenInformation::changed() to be emitted.
The default value, as seen by QScreenInformation::transparencyColor(), will be a null QColor value.
See also QScreenInformation::transparencyColor() and QScreenInformation::changed().
Sets the state of QScreenInformation::type() for this screen to value and cause QScreenInformation::changed() to be emitted.
The default value, as seen by QScreenInformation::type(), will be QScreenInformation::Normal.
See also QScreenInformation::type() and QScreenInformation::changed().
Sets the state of QScreenInformation::isVisible() for this screen to value and cause QScreenInformation::changed() to be emitted.
The default value, as seen by QScreenInformation::isVisible(), will be true.
See also QScreenInformation::isVisible() and QScreenInformation::changed().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |