QwwTipWidget Class

The QwwTipWidget class provides a widget that displays application tips. More...

Header: #include <QwwTipWidget>

Properties

Public Functions

QwwTipWidget(const QStringList & list, QWidget * parent = 0)
QFrame::Shape canvasFrameShape() const
bool checkIsVisible() const
const QPushButton * closeButton() const
bool closeIsVisible() const
int currentTip() const
QIcon defaultIcon() const
QWidget * headerWidget() const
Qt::Alignment iconAlignment() const
QSize iconSize() const
const QPushButton * nextButton() const
const QPushButton * prevButton() const
void setCanvasFrameShape(QFrame::Shape s)
void setHeaderWidget(QWidget * hw)
void setIconAlignment(Qt::Alignment)
const QTextBrowser * tipCanvas() const
const QStringList tips() const

Public Slots

void nextTip()
void prevTip()
void setCheckHidden(bool v)
void setCheckVisible(bool v)
void setCloseHidden(bool v)
void setCloseVisible(bool v)
void setCurrentTip(int v)
void setDefaultIcon(const QIcon &)
void setIconSize(const QSize &)
void setTips(const QStringList & slist)

Signals

void tipChanged(int index)

Detailed Description

The QwwTipWidget class provides a widget that displays application tips.

The widget can be embedded into a dialog and connected to its signals to provide a quick way to show startup tips for the user.

QwwTipWidget

Tips displayed are adjustable using the tips property. The widget can contain a checkbox that asks whether the user wants to see the tips again next time the application is started. This checkbox doesn't implement any logic, if you want to have that behavior in your application, you have to implement it yourself using some persistent data storage like QSettings.

Tips are displayed in rich text, so they can contain formatting, images and other elements that can be rendered using Scribe.

Property Documentation

checkVisible : bool

This property holds whether the "show tips on startup" checkbox is visible.

Access functions:

bool checkIsVisible() const
void setCheckVisible(bool v)

closeVisible : bool

This property holds whether the close button is visible.

Access functions:

bool closeIsVisible() const
void setCloseVisible(bool v)

currentTip : int

This property holds index of the currently shown tip.

Access functions:

int currentTip() const
void setCurrentTip(int v)

defaultIcon : QIcon

Access functions:

QIcon defaultIcon() const
void setDefaultIcon(const QIcon &)

iconAlignment : Qt::Alignment

Access functions:

Qt::Alignment iconAlignment() const
void setIconAlignment(Qt::Alignment)

iconSize : QSize

Access functions:

QSize iconSize() const
void setIconSize(const QSize &)

tips : QStringList

This property holds a list of tips associated with the widget.

Access functions:

const QStringList tips() const
void setTips(const QStringList & slist)

tipsEnabled : const bool

This property holds this property holds whether showing tips is enabled.

Member Function Documentation

QwwTipWidget::QwwTipWidget(const QStringList & list, QWidget * parent = 0)

Constructs a tip widget with list of tips and a given parent

QFrame::Shape QwwTipWidget::canvasFrameShape() const

See also setCanvasFrameShape().

const QPushButton * QwwTipWidget::closeButton() const

returns a pointer to the "close" button

QWidget * QwwTipWidget::headerWidget() const

returns a pointer to the header widget

See also setHeaderWidget().

const QPushButton * QwwTipWidget::nextButton() const

returns a pointer to the "next" button

void QwwTipWidget::nextTip() [slot]

This slot changes the current tip to the next one. In case the currently displayed tip is the last one, function will make the first tip current.

const QPushButton * QwwTipWidget::prevButton() const

returns a pointer to the "prev" button

void QwwTipWidget::prevTip() [slot]

This slot changes the current tip to the previous one. In case the currently displayed tip is the first one, function will make the last tip current.

void QwwTipWidget::setCanvasFrameShape(QFrame::Shape s)

See also canvasFrameShape().

void QwwTipWidget::setCheckHidden(bool v) [slot]

Convenience function. Equivalent to setCheckVisible(!v).

void QwwTipWidget::setCloseHidden(bool v) [slot]

Convenience function. Equivalent to setCloseVisible(!v).

void QwwTipWidget::setHeaderWidget(QWidget * hw)

sets hw as a header of the widget

See also headerWidget().

const QTextBrowser * QwwTipWidget::tipCanvas() const

returns a pointer to the tip canvas

void QwwTipWidget::tipChanged(int index) [signal]

This signal is emitted whenever the currently shown tip changes to index