Source Code (Use browser search to find items of interest.)

Class Index

qt'QToolTipGroup (./qt-2.1.0/src/widgets/qtooltip.h:37)

class Q_EXPORT QToolTipGroup: public QObject
{
    Q_OBJECT
    Q_PROPERTY( bool delay READ delay WRITE setDelay )
    Q_PROPERTY( bool enabled READ enabled WRITE setEnabled )

public:
    QToolTipGroup( QObject *parent, const char *name = 0 );
   ~QToolTipGroup();

    bool delay() const;
    bool enabled() const;

public slots:
    void setDelay( bool );
    void setEnabled( bool );

signals:
    void showTip( const QString &);
    void removeTip();

private:
    uint del:1;
    uint ena:1;

    friend class QTipManager;

private:	// Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
    QToolTipGroup( const QToolTipGroup & );
    QToolTipGroup& operator=( const QToolTipGroup & );
#endif
};



qt'QToolTipGroup::QToolTipGroup() (./qt-2.1.0/src/widgets/qtooltip.cpp:934)

QToolTipGroup::QToolTipGroup( QObject *parent, const char *name )
    : QObject( parent, name )
{
    del = TRUE;
    ena = TRUE;
}


/*!
  Destroy this tool tip groups and all tool tips in it.
*/


qt'QToolTipGroup::~QToolTipGroup() (./qt-2.1.0/src/widgets/qtooltip.cpp:946)

QToolTipGroup::~QToolTipGroup()
{
    if ( tipManager )
	tipManager->removeFromGroup( this );
}


/*!  Returns TRUE if the group text is shown delayed (at the same time
as the tip) and FALSE if it is shown immediately.

\sa setDelay()
*/


qt'QToolTipGroup::delay() (./qt-2.1.0/src/widgets/qtooltip.cpp:959)

bool QToolTipGroup::delay() const
{
    return del;
}


/*!  Sets the group to show its text immediately if \a enable is
FALSE, and delayed (at the same time as the tip text) if \a enable is
TRUE.  The default is TRUE.

\sa delay()
*/


qt'QToolTipGroup::setDelay() (./qt-2.1.0/src/widgets/qtooltip.cpp:972)

void QToolTipGroup::setDelay( bool enable )
{
#if 0
    if ( enable && !del ) {
	// maybe we should show the text at once?
    }
#endif
    del = enable;
}

/*!
  Sets the group to be enabled (all tool tips in the group show
  when activated),
  or disabled (tool tips in the group are never shown).

  \sa QToolTip::setEnabled(), enabled()
*/


qt'QToolTipGroup::setEnabled() (./qt-2.1.0/src/widgets/qtooltip.cpp:990)

void QToolTipGroup::setEnabled( bool enable )
{
    ena = enable;
}

/*!
  Returns whether tooltips in the group are enabled.
  \sa setEnabled()
*/

qt'QToolTipGroup::enabled() (./qt-2.1.0/src/widgets/qtooltip.cpp:999)

bool QToolTipGroup::enabled() const
{
    return (bool)ena;
}

/*!
  Sets the all tool tips to be enabled (shown when needed)
  or disabled (never shown).

  By default, tool tips are enabled. Note that this function
  effects all tooltips in the entire application.

  \sa QToolTipGroup::setEnabled()
*/