⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qcanvastext.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QCanvasText 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQCanvasText \- Text object on a QCanvas.SH SYNOPSIS\fC#include <qcanvas.h>\fR.PPInherits QCanvasItem..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQCanvasText\fR ( QCanvas * canvas )".br.ti -1c.BI "\fBQCanvasText\fR ( const QString & t, QCanvas * canvas )".br.ti -1c.BI "\fBQCanvasText\fR ( const QString & t, QFont f, QCanvas * canvas )".br.ti -1c.BI "virtual \fB~QCanvasText\fR ()".br.ti -1c.BI "void \fBsetText\fR ( const QString & t )".br.ti -1c.BI "void \fBsetFont\fR ( const QFont & f )".br.ti -1c.BI "void \fBsetColor\fR ( const QColor & c )".br.ti -1c.BI "QString \fBtext\fR () const".br.ti -1c.BI "QFont \fBfont\fR () const".br.ti -1c.BI "QColor \fBcolor\fR () const".br.ti -1c.BI "int \fBtextFlags\fR () const".br.ti -1c.BI "void \fBsetTextFlags\fR ( int f )".br.ti -1c.BI "virtual QRect \fBboundingRect\fR () const".br.ti -1c.BI "virtual int \fBrtti\fR () const".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBdraw\fR ( QPainter & painter )".br.in -1c.SH DESCRIPTIONThe QCanvasText class provides a text object on a QCanvas..PPA canvas text item has text with font, color and alignment attributes. The text and font can be set in the constructor or set or changed later with setText() and setFont(). The color is set with setColor() and the alignment with setTextFlags(). The text item's bounding rectangle is retrieved with boundingRect()..PPThe text can be drawn on a painter with draw()..PPLike any other canvas item text items can be moved with QCanvasItem::move() and QCanvasItem::moveBy(), or by setting coordinates with QCanvasItem::setX(), QCanvasItem::setY() and QCanvasItem::setZ()..PPSee also Graphics Classes and Image Processing Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QCanvasText::QCanvasText ( QCanvas * canvas )"Constructs a QCanvasText with the text "<text>", on \fIcanvas\fR..SH "QCanvasText::QCanvasText ( const QString & t, QCanvas * canvas )"Constructs a QCanvasText with the text \fIt\fR, on canvas \fIcanvas\fR..SH "QCanvasText::QCanvasText ( const QString & t, QFont f, QCanvas * canvas )"Constructs a QCanvasText with the text \fIt\fR and font \fIf\fR, on the canvas \fIcanvas\fR..SH "QCanvasText::~QCanvasText ()\fC [virtual]\fR"Destroys the canvas text item..SH "QRect QCanvasText::boundingRect () const\fC [virtual]\fR"Returns the bounding rectangle of the text..PPReimplemented from QCanvasItem..SH "QColor QCanvasText::color () const"Returns the color of the text..PPSee also setColor()..SH "void QCanvasText::draw ( QPainter & painter )\fC [virtual protected]\fR"Draws the text using the painter \fIpainter\fR..PPReimplemented from QCanvasItem..SH "QFont QCanvasText::font () const"Returns the font in which the text is drawn..PPSee also setFont()..SH "int QCanvasText::rtti () const\fC [virtual]\fR"Returns 3 (QCanvasItem::Rtti_Text)..PPSee also QCanvasItem::rtti()..PPReimplemented from QCanvasItem..SH "void QCanvasText::setColor ( const QColor & c )"Sets the color of the text to the color \fIc\fR..PPSee also color() and setFont()..PPExample: chart/chartform_canvas.cpp..SH "void QCanvasText::setFont ( const QFont & f )"Sets the font in which the text is drawn to font \fIf\fR..PPSee also font()..SH "void QCanvasText::setText ( const QString & t )"Sets the text item's text to \fIt\fR. The text may contain newlines..PPSee also text(), setFont(), setColor(), and setTextFlags()..PPExample: canvas/canvas.cpp..SH "void QCanvasText::setTextFlags ( int f )"Sets the alignment flags to \fIf\fR. These are a bitwise OR of the flags available to QPainter::drawText() -- see Qt::AlignmentFlags..PPSee also setFont() and setColor()..SH "QString QCanvasText::text () const"Returns the text item's text..PPSee also setText()..SH "int QCanvasText::textFlags () const"Returns the currently set alignment flags..PPSee also setTextFlags() and Qt::AlignmentFlags..SH "SEE ALSO".BR http://doc.trolltech.com/qcanvastext.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qcanvastext.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -