\endlist
- \section1 Notes for Mac OS X Users
-
- Mac OS X supports a separate find buffer that holds the current
- search string in Find operations. This find clipboard can be accessed
- by specifying the FindBuffer mode.
-
- \section1 Notes for Windows and Mac OS X Users
-
- \list
-
- \i Windows and Mac OS X do not support the global mouse
- selection; they only supports the global clipboard, i.e. they
- only add text to the clipboard when an explicit copy or cut is
- made.
-
- \i Windows and Mac OS X does not have the concept of ownership;
- the clipboard is a fully global resource so all applications are
- notified of changes.
-
- \endlist
-
\sa QApplication
*/
the global mouse selection. Support for \c Selection is provided only on
systems with a global mouse selection (e.g. X11).
- \value FindBuffer indicates that data should be stored and retrieved from
- the Find buffer. This mode is used for holding search strings on Mac OS X.
-
\omitvalue LastMode
\sa QClipboard::supportsSelection()
clipboard is used. If \a mode is QClipboard::Clipboard, the
text is retrieved from the global clipboard. If \a mode is
QClipboard::Selection, the text is retrieved from the global
- mouse selection. If \a mode is QClipboard::FindBuffer, the
- text is retrieved from the search string buffer.
+ mouse selection.
\sa setText(), mimeData()
*/
clipboard is used. If \a mode is QClipboard::Clipboard, the
text is stored in the global clipboard. If \a mode is
QClipboard::Selection, the text is stored in the global
- mouse selection. If \a mode is QClipboard::FindBuffer, the
- text is stored in the search string buffer.
+ mouse selection.
\sa text(), setMimeData()
*/
clipboard is used. If \a mode is QClipboard::Clipboard, the
data is retrieved from the global clipboard. If \a mode is
QClipboard::Selection, the data is retrieved from the global
- mouse selection. If \a mode is QClipboard::FindBuffer, the
- data is retrieved from the search string buffer.
+ mouse selection.
The text(), image(), and pixmap() functions are simpler
wrappers for retrieving text, image, and pixmap data.
clipboard is used. If \a mode is QClipboard::Clipboard, the
data is stored in the global clipboard. If \a mode is
QClipboard::Selection, the data is stored in the global
- mouse selection. If \a mode is QClipboard::FindBuffer, the
- data is stored in the search string buffer.
+ mouse selection.
The setText(), setImage() and setPixmap() functions are simpler
wrappers for setting text, image and pixmap data respectively.
clipboard is used. If \a mode is QClipboard::Clipboard, this
function clears the global clipboard contents. If \a mode is
QClipboard::Selection, this function clears the global mouse
- selection contents. If \a mode is QClipboard::FindBuffer, this
- function clears the search string buffer.
+ selection contents.
\sa QClipboard::Mode, supportsSelection()
*/
*/
bool QClipboard::supportsSelection() const
{
- return supportsMode(Selection);
-}
-
-/*!
- Returns true if the clipboard supports a separate search buffer; otherwise
- returns false.
-*/
-bool QClipboard::supportsFindBuffer() const
-{
- return supportsMode(FindBuffer);
+ // ### remove this method
+#ifdef Q_WS_X11
+ // X11 implementation supports both Clipboard and Selection modes
+ return true;
+#else
+ return false;
+#endif
}
/*!
return ownsMode(Selection);
}
-/*!
- \since 4.2
-
- Returns true if this clipboard object owns the find buffer data;
- otherwise returns false.
-*/
-bool QClipboard::ownsFindBuffer() const
-{
- return ownsMode(FindBuffer);
-}
-
/*!
\internal
\fn bool QClipboard::supportsMode(Mode mode) const;
switch (mode) {
case Clipboard:
emit dataChanged();
- break;
+ break;
case Selection:
emit selectionChanged();
- break;
- case FindBuffer:
- emit findBufferChanged();
- break;
- default:
- break;
+ break;
}
emit changed(mode);
}
~QClipboard();
public:
- enum Mode { Clipboard, Selection, FindBuffer, LastMode = FindBuffer };
+ enum Mode { Clipboard, Selection, LastMode = Selection };
void clear(Mode mode = Clipboard);
bool supportsSelection() const;
- bool supportsFindBuffer() const;
bool ownsSelection() const;
bool ownsClipboard() const;
- bool ownsFindBuffer() const;
QString text(Mode mode = Clipboard) const;
QString text(QString& subtype, Mode mode = Clipboard) const;
Q_SIGNALS:
void changed(QClipboard::Mode mode);
void selectionChanged();
- void findBufferChanged();
void dataChanged();
protected:
- void connectNotify(const char *);
bool event(QEvent *);
friend class QApplication;
private:
Q_DISABLE_COPY(QClipboard)
- bool supportsMode(Mode mode) const;
bool ownsMode(Mode mode) const;
void emitChanged(Mode mode);
};