42 #ifndef QTEXTCONTROL_P_H 43 #define QTEXTCONTROL_P_H 56 #include <QtGui/qtextdocument.h> 57 #include <QtGui/qtextoption.h> 58 #include <QtGui/qtextcursor.h> 59 #include <QtGui/qtextformat.h> 60 #include <QtGui/qtextedit.h> 61 #include <QtGui/qmenu.h> 62 #include <QtCore/qrect.h> 63 #include <QtGui/qabstracttextdocumentlayout.h> 64 #include <QtGui/qtextdocumentfragment.h> 65 #include <QtGui/qclipboard.h> 68 #include <QtGui/qtextobject.h> 69 #include <QtGui/qtextlayout.h> 91 #ifndef QT_NO_TEXTHTMLPARSER 112 void setTextInteractionFlags(Qt::TextInteractionFlags flags);
113 Qt::TextInteractionFlags textInteractionFlags()
const;
120 bool find(
const QString &exp, QTextDocument::FindFlags options = 0);
123 {
return document()->toPlainText(); }
124 #ifndef QT_NO_TEXTHTMLPARSER 126 {
return document()->toHtml(); }
129 virtual void ensureCursorVisible();
132 #ifndef QT_NO_CONTEXTMENU 138 QRectF cursorRect()
const;
140 QRectF selectionRect()
const;
145 QString anchorAtCursor()
const;
147 bool overwriteMode()
const;
148 void setOverwriteMode(
bool overwrite);
150 int cursorWidth()
const;
151 void setCursorWidth(
int width);
153 bool acceptRichText()
const;
154 void setAcceptRichText(
bool accept);
156 #ifndef QT_NO_TEXTEDIT 161 void setTextWidth(
qreal width);
162 qreal textWidth()
const;
165 void setOpenExternalLinks(
bool open);
166 bool openExternalLinks()
const;
168 void setIgnoreUnusedNavigationEvents(
bool ignore);
169 bool ignoreUnusedNavigationEvents()
const;
173 bool canPaste()
const;
175 void setCursorIsFocusIndicator(
bool b);
176 bool cursorIsFocusIndicator()
const;
178 void setDragEnabled(
bool enabled);
179 bool isDragEnabled()
const;
181 bool isWordSelectionEnabled()
const;
182 void setWordSelectionEnabled(
bool enabled);
184 #ifndef QT_NO_PRINTER 185 void print(
QPrinter *printer)
const;
194 void setHtml(
const QString &text);
196 #ifndef QT_NO_CLIPBOARD 208 void insertPlainText(
const QString &text);
209 #ifndef QT_NO_TEXTHTMLPARSER 210 void insertHtml(
const QString &text);
213 void append(
const QString &text);
214 void appendHtml(
const QString &html);
215 void appendPlainText(
const QString &text);
221 void undoAvailable(
bool b);
222 void redoAvailable(
bool b);
224 void copyAvailable(
bool b);
225 void selectionChanged();
226 void cursorPositionChanged();
230 void documentSizeChanged(
const QSizeF &);
231 void blockCountChanged(
int newBlockCount);
232 void visibilityRequest(
const QRectF &rect);
233 void microFocusChanged();
234 void linkActivated(
const QString &link);
235 void linkHovered(
const QString &);
236 void modificationChanged(
bool m);
241 void setPalette(
const QPalette &pal);
253 virtual QMimeData *createMimeDataFromSelection()
const;
254 virtual bool canInsertFromMimeData(
const QMimeData *source)
const;
255 virtual void insertFromMimeData(
const QMimeData *source);
257 bool setFocusToAnchor(
const QTextCursor &newCursor);
258 bool setFocusToNextOrPreviousAnchor(
bool next);
268 Q_PRIVATE_SLOT(d_func(),
void _q_updateCurrentCharFormatAndSelection())
277 #ifndef QT_NO_CONTEXTMENU 285 void menuActionTriggered();
290 #endif // QT_NO_CONTEXTMENU 312 #endif // QTEXTCONTROL_H The QVariant class acts like a union for the most common Qt data types.
Mode
This enum type is used to control which part of the system clipboard is used by QClipboard::mimeData(...
The QPainter class performs low-level painting on widgets and other paint devices.
QTextDocumentFragment fragment
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
The QMatrix class specifies 2D transformations of a coordinate system.
The QPointF class defines a point in the plane using floating point precision.
virtual void timerEvent(QTimerEvent *)
This event handler can be reimplemented in a subclass to receive timer events for the object...
Qt::TextInteractionFlags textInteractionFlags
static void clear(QVariant::Private *d)
static bool ignore(const char *test, const char *const *table)
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
The QSizeF class defines the size of a two-dimensional object using floating point precision...
static QCursor * moveCursor
#define QT_BEGIN_NAMESPACE
This macro expands to.
MoveMode
If the anchor() is kept where it is and the position() is moved, the text in between will be selected...
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QTextCursor class offers an API to access and modify QTextDocuments.
bool ignoreUnusedNavigationEvents
The QPrinter class is a paint device that paints on a printer.
The QStringList class provides a list of strings.
The QTextBlock class provides a container for text fragments in a QTextDocument.
Type
This enum type defines the types of variable that a QVariant can contain.
The QMimeData class provides a container for data that records information about its MIME type...
QString toPlainText() const
The QTimerEvent class contains parameters that describe a timer event.
The QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters us...
The QTextDocument class holds formatted text that can be viewed and edited using a QTextEdit...
#define Q_DECLARE_PRIVATE(Class)
The QEvent class is the base class of all event classes.
The QTextDocumentFragment class represents a piece of formatted text from a QTextDocument.
int open(const char *, int,...)
QTextEditMimeData(const QTextDocumentFragment &aFragment)
The QList class is a template class that provides lists.
The QPalette class contains color groups for each widget state.