Q3CanvasText Class ReferenceThe Q3CanvasText class provides a text object on a Q3Canvas. Далее... #include <Q3CanvasText> Данный класс является частью библиотеки поддержки Qt 3. Он предоставлен для поддержки ранее написанного кода. Мы настоятельно не рекомендуем использовать этот класс в новом коде. Для получения дополнительной информации смотрите Портирование на Qt 4. Inherits: Q3CanvasItem. Открытые функции
Переопределённые открытые функции
Переопределённые защищённые функции
Подробное описаниеThe Q3CanvasText class provides a text object on a Q3Canvas. A 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(). The text can be drawn on a painter with draw(). Like any other canvas item text items can be moved with Q3CanvasItem::move() and Q3CanvasItem::moveBy(), or by setting coordinates with Q3CanvasItem::setX(), Q3CanvasItem::setY() and Q3CanvasItem::setZ(). Смотрите также QtCanvas и Переход на графическое представление. Описание функций-членовQ3CanvasText::Q3CanvasText ( Q3Canvas * canvas )Constructs a Q3CanvasText with the text "<text>", on canvas. Q3CanvasText::Q3CanvasText ( const QString & t, Q3Canvas * canvas )Constructs a Q3CanvasText with the text t, on canvas canvas. Q3CanvasText::Q3CanvasText ( const QString & t, QFont f, Q3Canvas * canvas )Constructs a Q3CanvasText with the text t and font f, on the canvas canvas. Q3CanvasText::~Q3CanvasText () [virtual]Destroys the canvas text item. QRect Q3CanvasText::boundingRect () const [virtual]Reimplemented from Q3CanvasItem::boundingRect(). Returns the bounding rectangle of the text. bool Q3CanvasText::collidesWith ( const Q3CanvasItem * i ) const [virtual]Reimplemented from Q3CanvasItem::collidesWith(). QColor Q3CanvasText::color () constReturns the color of the text. Смотрите также setColor(). void Q3CanvasText::draw ( QPainter & painter ) [virtual protected]Reimplemented from Q3CanvasItem::draw(). Draws the text using the painter painter. QFont Q3CanvasText::font () constReturns the font in which the text is drawn. Смотрите также setFont(). void Q3CanvasText::moveBy ( double dx, double dy ) [virtual]Reimplemented from Q3CanvasItem::moveBy(). int Q3CanvasText::rtti () const [virtual]Reimplemented from Q3CanvasItem::rtti(). Returns 3 (Q3CanvasItem::Rtti_Text). Смотрите также Q3CanvasItem::rtti(). void Q3CanvasText::setColor ( const QColor & c )Sets the color of the text to the color c. See also color() and setFont(). void Q3CanvasText::setFont ( const QFont & f )Sets the font in which the text is drawn to font f. Смотрите также font(). void Q3CanvasText::setText ( const QString & t )Sets the text item's text to t. The text may contain newlines. See also text(), setFont(), setColor(), and setTextFlags(). void Q3CanvasText::setTextFlags ( int f )Sets the alignment flags to f. These are a bitwise OR of the flags available to QPainter::drawText() -- see the Qt::AlignmentFlags. See also textFlags(), setFont(), and setColor(). QString Q3CanvasText::text () constReturns the text item's text. Смотрите также setText(). int Q3CanvasText::textFlags () constReturns the currently set alignment flags. See also setTextFlags() and Qt::AlignmentFlag. |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |