Qt:Документация 4.3.2/q3whatsthis

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] Q3WhatsThis Class Reference
[ Qt3Support module]

 #include <Q3WhatsThis>

This class is part of the Qt 3 support library. It is provided to keep old source code working. Мы настоятельно не рекомендуем использовать этот класс в новом коде. See Porting to Qt 4 for more information.

Inherits QObject.

[править] Открытые функции

  • 29 открытых функций, унаследованных от QObject

[править] Статические открытые члены

  • 5 статических открытых членов, унаследованных от QObject

[править] Дополнительные унаследованные члены

  • 1 свойство, унаследованное от QObject
  • 1 открытый слот, унаследованный от QObject
  • 1 сигнал, унаследованный от QObject
  • 7 защищенных функций, унаследованных от QObject

[править] Подробное описание


[править] Описание функций-членов

[править]
Q3WhatsThis::Q3WhatsThis ( QWidget * widget )

Constructs a new "What's This?" object for widget.

[править]
Q3WhatsThis::~Q3WhatsThis ()

Destroys the "What's This?" object.

[править]
void Q3WhatsThis::add ( QWidget * widget, const QString & text ) [static]

Adds text as "What's This?" help for widget. If the text is rich text formatted (i.e. it contains markup) it will be rendered with the default stylesheet QStyleSheet::defaultSheet().

The text is destroyed if the widget is later destroyed, so it need not be explicitly removed.

See also remove().

[править]
bool Q3WhatsThis::clicked ( const QString & href ) [virtual]

This virtual function is called when the user clicks inside the "What's this?" window. href is the link the user clicked on, or an empty string if there was no link.

If the function returns true (the default), the "What's this?" window is closed, otherwise it remains visible.

The default implementation ignores href and returns true.

[править]
void Q3WhatsThis::display ( const QString & text, const QPoint & pos = QCursor::pos(), QWidget * widget = 0 ) [static]

Display text in a help window at the global screen position pos.

If widget widget is not 0 and has its own dedicated QWhatsThis object, this object will receive clicked() messages when the user clicks on hyperlinks inside the help text.

See also clicked().

[править]
void Q3WhatsThis::enterWhatsThisMode () [static]

Enters "What's This?" mode and returns immediately.

Qt will install a special cursor and take over mouse input until the user clicks somewhere. It then shows any help available and ends "What's This?" mode. Finally, Qt removes the special cursor and help window and then restores ordinary event processing, at which point the left mouse button is no longer pressed.

The user can also use the Esc key to leave "What's This?" mode.

See also inWhatsThisMode() and leaveWhatsThisMode().

[править]
bool Q3WhatsThis::inWhatsThisMode () [static]

Returns true if the application is in "What's This?" mode; otherwise returns false.

See also enterWhatsThisMode() and leaveWhatsThisMode().

[править]
void Q3WhatsThis::leaveWhatsThisMode ( const QString & text = QString(), const QPoint & pos = QCursor::pos(), QWidget * widget = 0 ) [static]

This function is used internally by widgets that support QWidget::customWhatsThis(); applications do not usually call it. An example of such a widget is Q3PopupMenu: menus still work normally in "What's This?" mode but also provide help texts for individual menu items.

If text is not empty, a "What's This?" help window is displayed at the global screen position pos. If widget widget is not 0 and has its own dedicated QWhatsThis object, this object will receive clicked() messages when the user clicks on hyperlinks inside the help text.

See also inWhatsThisMode(), enterWhatsThisMode(), and clicked().

[править]
void Q3WhatsThis::remove ( QWidget * widget ) [static]

Removes the "What's This?" help associated with the widget. This happens automatically if the widget is destroyed.

See also add().

[править]
QString Q3WhatsThis::text ( const QPoint & pos ) [virtual]

This virtual function returns the text for position pos in the widget that this "What's This?" object documents. If there is no "What's This?" text for the position, an empty string is returned.

The default implementation returns an empty string.

[править]
QToolButton * Q3WhatsThis::whatsThisButton ( QWidget * parent ) [static]

Creates a QToolButton preconfigured to enter "What's This?" mode when clicked. You will often use this with a tool bar as parent:

 (void)QWhatsThis::whatsThisButton( my_help_tool_bar );

Copyright © 2007 Trolltech Trademarks
Qt 4.3.2