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

void TabletWidget::showError ( const QString &  errMsg  )  [slot]

If an error occurs a widget with some additional text is shown instead of the config widget.

Happens if no tablet device can be found or the kded deamon is not working.

Parameters:
errMsg the message that describes the error in more detail

Definition at line 262 of file tabletwidget.cpp.

References m_deviceError, and m_ui.

Referenced by loadTabletInformation().

{
    if (m_deviceError) {
        delete m_deviceError;
    }

    m_deviceError = new QWidget();
    Ui::ErrorWidget ew;
    ew.setupUi(m_deviceError);
    ew.errorImage->setPixmap(KIconLoader::global()->loadIcon("dialog-warning", KIconLoader::NoGroup, 128));
    ew.errorText->setText(errMsg);
    m_ui->deviceTabWidget->setVisible(false);
    m_ui->verticalLayout->addWidget(m_deviceError);

    m_ui->profileSelector->setEnabled(false);
    m_ui->addProfileButton->setEnabled(false);
    m_ui->delProfileButton->setEnabled(false);
}


Generated by  Doxygen 1.6.0   Back to index