Logo Search packages:      
Sourcecode: kcm-tablet version File versions  Download package

void TabletApplet::buildErrorDialog (  )  [private]

Creates the widget for the error message.

See also:
showError()

Definition at line 356 of file tabletapplet.cpp.

References m_errorMsg, and m_errorWidget.

Referenced by buildDialog().

{
    //container for the settings when the tablet is removed or an error occured
    m_errorWidget = new QGraphicsWidget();
    m_errorWidget->setFocusPolicy(Qt::ClickFocus);

    QGraphicsLinearLayout *layout_error = new QGraphicsLinearLayout(Qt::Horizontal, m_errorWidget);
    layout_error->setSpacing(10);
    layout_error->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);

    Plasma::IconWidget *errIcon = new Plasma::IconWidget(m_errorWidget);
    errIcon->setIcon(KIcon("dialog-warning"));
    errIcon->setMaximumHeight(KIconLoader::SizeMedium);
    errIcon->setMinimumHeight(KIconLoader::SizeMedium);
    errIcon->setAcceptHoverEvents(false);
    m_errorMsg = new Plasma::Label(m_errorWidget);
    m_errorMsg->nativeWidget()->setWordWrap(true);
    m_errorMsg->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);

    layout_error->addItem(errIcon);
    layout_error->addItem(m_errorMsg);
}


Generated by  Doxygen 1.6.0   Back to index