• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kmessagebox.cpp

Go to the documentation of this file.
00001 /*  This file is part of the KDE libraries
00002     Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; version 2
00007     of the License.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #include "kmessagebox.h"
00021 
00022 #include <QtCore/QPointer>
00023 #include <QtGui/QCheckBox>
00024 #include <QtGui/QGroupBox>
00025 #include <QtGui/QLabel>
00026 #include <QtGui/QLayout>
00027 #include <QtGui/QListWidget>
00028 #include <QtGui/QScrollArea>
00029 #include <QtGui/QTextDocumentFragment>
00030 
00031 #include <kapplication.h>
00032 #include <kconfig.h>
00033 #include <kdialog.h>
00034 #include <kdialogqueue_p.h>
00035 #include <kglobalsettings.h>
00036 #include <klocale.h>
00037 #include <knotification.h>
00038 #include <kiconloader.h>
00039 #include <kconfiggroup.h>
00040 #include <ktextedit.h>
00041 #include <kwindowsystem.h>
00042 
00043 // Some i18n filters, that standard button texts are piped through
00044 // (the new KGuiItem object with filtered text is created from the old one).
00045 
00046 // i18n: Filter for the Yes-button text in standard message dialogs,
00047 // after the message caption/text have been translated.
00048 #define I18N_FILTER_BUTTON_YES(src, dst) \
00049     KGuiItem dst(src); \
00050     dst.setText( i18nc( "@action:button filter-yes", "%1", src.text() ) );
00051 
00052 // i18n: Filter for the No-button text in standard message dialogs,
00053 // after the message caption/text have been translated.
00054 #define I18N_FILTER_BUTTON_NO(src, dst) \
00055     KGuiItem dst(src); \
00056     dst.setText( i18nc( "@action:button filter-no", "%1", src.text() ) );
00057 
00058 // i18n: Filter for the Continue-button text in standard message dialogs,
00059 // after the message caption/text have been translated.
00060 #define I18N_FILTER_BUTTON_CONTINUE(src, dst) \
00061     KGuiItem dst(src); \
00062     dst.setText( i18nc( "@action:button filter-continue", "%1", src.text() ) );
00063 
00064 // i18n: Filter for the Cancel-button text in standard message dialogs,
00065 // after the message caption/text have been translated.
00066 #define I18N_FILTER_BUTTON_CANCEL(src, dst) \
00067     KGuiItem dst(src); \
00068     dst.setText( i18nc( "@action:button filter-cancel", "%1", src.text() ) );
00069 
00070 // i18n: Called after the button texts in standard message dialogs
00071 // have been filtered by the messages above. Not visible to user.
00072 #define I18N_POST_BUTTON_FILTER \
00073     i18nc( "@action:button post-filter", "." );
00074 
00075 static bool KMessageBox_queue = false;
00076 KConfig* KMessageBox_againConfig = 0;
00077 
00078 
00079 static QIcon themedMessageBoxIcon(QMessageBox::Icon icon)
00080 {
00081     QString icon_name;
00082 
00083     switch (icon) {
00084     case QMessageBox::NoIcon:
00085         return QIcon();
00086         break;
00087     case QMessageBox::Information:
00088         icon_name = "dialog-information";
00089         break;
00090     case QMessageBox::Warning:
00091         icon_name = "dialog-warning";
00092         break;
00093     case QMessageBox::Critical:
00094         icon_name = "dialog-error";
00095         break;
00096     default:
00097         break;
00098     }
00099 
00100    QIcon ret = KIconLoader::global()->loadIcon(icon_name, KIconLoader::NoGroup, KIconLoader::SizeHuge, KIconLoader::DefaultState, QStringList(), 0, true);
00101 
00102    if (ret.isNull()) {
00103        return QMessageBox::standardIcon(icon);
00104    } else {
00105        return ret;
00106    }
00107 }
00108 
00109 static void sendNotification( QString message, //krazy:exclude=passbyvalue
00110                               const QStringList& strlist,
00111                               QMessageBox::Icon icon,
00112                               WId parent_id )
00113 {
00114     // create the message for KNotify
00115     QString messageType;
00116     switch (icon) {
00117     case QMessageBox::Warning:
00118         messageType = "messageWarning";
00119         break;
00120     case QMessageBox::Critical:
00121         messageType = "messageCritical";
00122         break;
00123     case QMessageBox::Question:
00124         messageType = "messageQuestion";
00125         break;
00126     default:
00127         messageType = "messageInformation";
00128         break;
00129     }
00130 
00131     if ( !strlist.isEmpty() ) {
00132         for ( QStringList::ConstIterator it = strlist.begin(); it != strlist.end(); ++it ) {
00133             message += '\n' + *it;
00134         }
00135     }
00136 
00137     if ( !message.isEmpty() ) {
00138         KNotification::event( messageType, message , QPixmap() , QWidget::find( parent_id ) );
00139     }
00140 }
00141 
00142 
00143 int KMessageBox::createKMessageBox(KDialog *dialog, QMessageBox::Icon icon,
00144                              const QString &text, const QStringList &strlist,
00145                              const QString &ask, bool *checkboxReturn,
00146                              Options options, const QString &details)
00147 {
00148     return createKMessageBox(dialog, themedMessageBoxIcon(icon), text, strlist,
00149                       ask, checkboxReturn, options, details, icon);
00150 }
00151 
00152 static int longest_line( const QFontMetrics & fm, const QString & text ) {
00153     const QStringList lines = QTextDocumentFragment::fromHtml( text ).toPlainText().split( QLatin1String( "\n" ) );
00154     int len = 0;
00155     Q_FOREACH( const QString & line, lines )
00156         len = qMax( len, fm.width( line ) );
00157     return len;
00158 }
00159 
00160 int KMessageBox::createKMessageBox(KDialog *dialog, const QIcon &icon,
00161                              const QString &text, const QStringList &strlist,
00162                              const QString &ask, bool *checkboxReturn, Options options,
00163                              const QString &details, QMessageBox::Icon notifyType)
00164 {
00165     QWidget *mainWidget = new QWidget(dialog);
00166     QVBoxLayout *mainLayout = new QVBoxLayout(mainWidget);
00167     mainLayout->setSpacing(KDialog::spacingHint() * 2);
00168     mainLayout->setMargin(0);
00169 
00170     QHBoxLayout *hLayout = new QHBoxLayout();
00171     hLayout->setMargin(0);
00172     hLayout->setSpacing(KDialog::spacingHint());
00173     mainLayout->addLayout(hLayout);
00174     mainLayout->addStretch();
00175 
00176     QLabel *iconLabel = new QLabel(mainWidget);
00177 
00178     if (!icon.isNull()) {
00179        iconLabel->setPixmap(icon.pixmap(KIconLoader::SizeHuge));
00180     }
00181 
00182     QVBoxLayout *iconLayout = new QVBoxLayout();
00183     iconLayout->addStretch(1);
00184     iconLayout->addWidget(iconLabel);
00185     iconLayout->addStretch(5);
00186 
00187     hLayout->addLayout(iconLayout);
00188     hLayout->addSpacing(KDialog::spacingHint());
00189 
00190     QLabel *messageLabel = new QLabel(text, mainWidget);
00191     messageLabel->setOpenExternalLinks(options & KMessageBox::AllowLink );
00192     Qt::TextInteractionFlags flags = Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard;
00193     if ( options & KMessageBox::AllowLink )
00194         flags |= Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard;;
00195     messageLabel->setTextInteractionFlags(flags);
00196     QPalette messagePal(messageLabel->palette());
00197     messagePal.setColor(QPalette::Window, Qt::transparent);
00198     messageLabel->setPalette(messagePal);
00199 
00200     QRect desktop = KGlobalSettings::desktopGeometry(dialog);
00201     if (desktop.width() / 3 < longest_line(messageLabel->fontMetrics(), text)) {
00202         // do only enable automatic wrapping of messages which are longer than one third of the current screen
00203         messageLabel->setWordWrap(true);
00204     }
00205 
00206     QScrollArea* messageScrollArea = new QScrollArea(mainWidget);
00207     messageScrollArea->setWidget(messageLabel);
00208     messageScrollArea->setFrameShape(QFrame::NoFrame);
00209     messageScrollArea->setWidgetResizable(true);
00210     QPalette scrollPal(messageScrollArea->palette());
00211     scrollPal.setColor(QPalette::Window, Qt::transparent);
00212     messageScrollArea->setPalette(scrollPal);
00213 
00214     hLayout->addWidget(messageScrollArea);
00215 
00216     QListWidget *listWidget = 0;
00217     if (!strlist.isEmpty()) {
00218         // enable automatic wrapping since the listwidget has already a good initial width
00219         messageLabel->setWordWrap(true);
00220         listWidget = new QListWidget(mainWidget);
00221         mainLayout->addWidget(listWidget);
00222         listWidget->addItems(strlist);
00223         listWidget->setSelectionMode(QListWidget::NoSelection);
00224         mainLayout->setStretchFactor(listWidget, 1);
00225     }
00226 
00227     QPointer<QCheckBox> checkbox = 0;
00228     if (!ask.isEmpty()) {
00229         checkbox = new QCheckBox(ask, mainWidget);
00230         mainLayout->addWidget(checkbox);
00231         if (checkboxReturn) {
00232             checkbox->setChecked(*checkboxReturn);
00233         }
00234     }
00235 
00236     if (!details.isEmpty()) {
00237         QGroupBox *detailsGroup = new QGroupBox(i18n("Details"));
00238         QVBoxLayout *detailsLayout = new QVBoxLayout(detailsGroup);
00239         if (details.length() < 512) {
00240             QLabel *detailsLabel = new QLabel(details);
00241             detailsLabel->setOpenExternalLinks(options & KMessageBox::AllowLink);
00242             Qt::TextInteractionFlags flags = Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard;
00243             if ( options & KMessageBox::AllowLink )
00244                 flags |= Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard;;
00245             detailsLabel->setTextInteractionFlags(flags);
00246             detailsLabel->setWordWrap(true);
00247             detailsLayout->addWidget(detailsLabel);
00248         } else {
00249             KTextEdit *detailTextEdit = new KTextEdit(details);
00250             detailTextEdit->setReadOnly(true);
00251             detailTextEdit->setMinimumHeight(detailTextEdit->fontMetrics().lineSpacing() * 11);
00252             detailsLayout->addWidget(detailTextEdit);
00253         }
00254         dialog->setDetailsWidget(detailsGroup);
00255     }
00256 
00257     dialog->setMainWidget(mainWidget);
00258     dialog->showButtonSeparator(true);
00259     if (!listWidget) {
00260         int hfw = messageLabel->heightForWidth(messageScrollArea->sizeHint().width() - 2);
00261         if (hfw != messageScrollArea->sizeHint().height() && hfw < desktop.height() / 2) {
00262             messageScrollArea->setMinimumHeight(hfw);
00263         }
00264         if (details.isEmpty())
00265             dialog->setFixedSize(dialog->sizeHint() + QSize( 10, 10 ));
00266     }
00267 
00268     if ((options & KMessageBox::Dangerous)) {
00269         if (dialog->isButtonEnabled(KDialog::Cancel))
00270             dialog->setDefaultButton(KDialog::Cancel);
00271         else if (dialog->isButtonEnabled(KDialog::No))
00272             dialog->setDefaultButton(KDialog::No);
00273     }
00274 
00275     KDialog::ButtonCode defaultCode = dialog->defaultButton();
00276     if (defaultCode != KDialog::NoDefault) {
00277         dialog->setButtonFocus(defaultCode);
00278     }
00279 
00280 #ifndef Q_WS_WIN // FIXME problems with KNotify on Windows
00281     if ((options & KMessageBox::Notify)) {
00282         sendNotification(text, strlist, notifyType, dialog->topLevelWidget()->winId());
00283     }
00284 #endif
00285 
00286     if (KMessageBox_queue) {
00287         KDialogQueue::queueDialog(dialog);
00288         return KMessageBox::Cancel; // We have to return something.
00289     }
00290 
00291     if ((options & KMessageBox::NoExec)) {
00292         return KMessageBox::Cancel; // We have to return something.
00293     }
00294 
00295     // We use a QPointer because the dialog may get deleted
00296     // during exec() if the parent of the dialog gets deleted.
00297     // In that case the QPointer will reset to 0.
00298     QPointer<KDialog> guardedDialog = dialog;
00299 
00300     int result = guardedDialog->exec();
00301     if (checkbox && checkboxReturn) {
00302         *checkboxReturn = checkbox->isChecked();
00303     }
00304 
00305     delete (KDialog *) guardedDialog;
00306     return result;
00307 }
00308 
00309 int KMessageBox::questionYesNo(QWidget *parent, const QString &text,
00310                            const QString &caption,
00311                            const KGuiItem &buttonYes,
00312                            const KGuiItem &buttonNo,
00313                            const QString &dontAskAgainName,
00314                            Options options)
00315 {
00316     return questionYesNoList(parent, text, QStringList(), caption,
00317                             buttonYes, buttonNo, dontAskAgainName, options);
00318 }
00319 
00320 int KMessageBox::questionYesNoWId(WId parent_id, const QString &text,
00321                            const QString &caption,
00322                            const KGuiItem &buttonYes,
00323                            const KGuiItem &buttonNo,
00324                            const QString &dontAskAgainName,
00325                            Options options)
00326 {
00327     return questionYesNoListWId(parent_id, text, QStringList(), caption,
00328                             buttonYes, buttonNo, dontAskAgainName, options);
00329 }
00330 
00331 bool KMessageBox::shouldBeShownYesNo(const QString &dontShowAgainName,
00332                                 ButtonCode &result)
00333 {
00334     if ( dontShowAgainName.isEmpty() ) {
00335         return true;
00336     }
00337     KConfigGroup cg( KMessageBox_againConfig ? KMessageBox_againConfig : KGlobal::config().data(), "Notification Messages" );
00338     QString dontAsk = cg.readEntry(dontShowAgainName, QString()).toLower();
00339     if (dontAsk == "yes" || dontAsk == "true") {
00340         result = Yes;
00341         return false;
00342     }
00343     if (dontAsk == "no" || dontAsk == "false") {
00344         result = No;
00345         return false;
00346     }
00347     return true;
00348 }
00349 
00350 bool KMessageBox::shouldBeShownContinue(const QString &dontShowAgainName)
00351 {
00352     if ( dontShowAgainName.isEmpty() ) {
00353         return true;
00354     }
00355     KConfigGroup cg( KMessageBox_againConfig ? KMessageBox_againConfig : KGlobal::config().data(), "Notification Messages" );
00356     return cg.readEntry(dontShowAgainName, true);
00357 }
00358 
00359 void KMessageBox::saveDontShowAgainYesNo(const QString &dontShowAgainName,
00360                                     ButtonCode result)
00361 {
00362     if ( dontShowAgainName.isEmpty() ) {
00363         return;
00364     }
00365     KConfigGroup::WriteConfigFlags flags = KConfig::Persistent;
00366     if (dontShowAgainName[0] == ':') {
00367         flags |= KConfigGroup::Global;
00368     }
00369     KConfigGroup cg( KMessageBox_againConfig? KMessageBox_againConfig : KGlobal::config().data(), "Notification Messages" );
00370     cg.writeEntry( dontShowAgainName, result==Yes, flags );
00371     cg.sync();
00372 }
00373 
00374 void KMessageBox::saveDontShowAgainContinue(const QString &dontShowAgainName)
00375 {
00376     if ( dontShowAgainName.isEmpty() ) {
00377         return;
00378     }
00379     KConfigGroup::WriteConfigFlags flags = KConfigGroup::Persistent;
00380     if (dontShowAgainName[0] == ':') {
00381         flags |= KConfigGroup::Global;
00382     }
00383     KConfigGroup cg( KMessageBox_againConfig? KMessageBox_againConfig: KGlobal::config().data(), "Notification Messages" );
00384     cg.writeEntry( dontShowAgainName, false, flags );
00385     cg.sync();
00386 }
00387 
00388 void KMessageBox::setDontShowAskAgainConfig(KConfig* cfg)
00389 {
00390     KMessageBox_againConfig = cfg;
00391 }
00392 
00393 int KMessageBox::questionYesNoList(QWidget *parent, const QString &text,
00394                            const QStringList &strlist,
00395                            const QString &caption,
00396                            const KGuiItem &buttonYes,
00397                            const KGuiItem &buttonNo,
00398                            const QString &dontAskAgainName,
00399                            Options options)
00400 { // in order to avoid code duplication, convert to WId, it will be converted back
00401     return questionYesNoListWId( parent ? parent->effectiveWinId() : 0, text, strlist,
00402         caption, buttonYes, buttonNo, dontAskAgainName, options );
00403 }
00404 
00405 int KMessageBox::questionYesNoListWId(WId parent_id, const QString &text,
00406                            const QStringList &strlist,
00407                            const QString &caption,
00408                            const KGuiItem &buttonYes_,
00409                            const KGuiItem &buttonNo_,
00410                            const QString &dontAskAgainName,
00411                            Options options)
00412 {
00413     ButtonCode res;
00414     if ( !shouldBeShownYesNo(dontAskAgainName, res) ) {
00415         return res;
00416     }
00417 
00418     I18N_FILTER_BUTTON_YES(buttonYes_, buttonYes)
00419     I18N_FILTER_BUTTON_NO(buttonNo_, buttonNo)
00420     I18N_POST_BUTTON_FILTER
00421 
00422     QWidget* parent = QWidget::find( parent_id );
00423     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00424     dialog->setCaption( caption.isEmpty() ? i18n("Question") : caption );
00425     dialog->setButtons( KDialog::Yes | KDialog::No );
00426     dialog->setObjectName( "questionYesNo" );
00427     dialog->setModal( true );
00428     dialog->showButtonSeparator( true );
00429     dialog->setButtonGuiItem( KDialog::Yes, buttonYes );
00430     dialog->setButtonGuiItem( KDialog::No, buttonNo );
00431     dialog->setDefaultButton( KDialog::Yes );
00432     dialog->setEscapeButton( KDialog::No );
00433     if ( options & PlainCaption ) {
00434         dialog->setPlainCaption( caption );
00435     }
00436     if ( parent == NULL && parent_id ) {
00437         KWindowSystem::setMainWindow( dialog, parent_id );
00438     }
00439 
00440     bool checkboxResult = false;
00441     int result = createKMessageBox(dialog, QMessageBox::Information, text, strlist,
00442                        dontAskAgainName.isEmpty() ? QString() : i18n("Do not ask again"),
00443                        &checkboxResult, options);
00444     res = (result==KDialog::Yes ? Yes : No);
00445 
00446     if (checkboxResult) {
00447         saveDontShowAgainYesNo(dontAskAgainName, res);
00448     }
00449     return res;
00450 }
00451 
00452 int KMessageBox::questionYesNoCancel(QWidget *parent,
00453                           const QString &text,
00454                           const QString &caption,
00455                           const KGuiItem &buttonYes,
00456                           const KGuiItem &buttonNo,
00457                           const KGuiItem &buttonCancel,
00458                           const QString &dontAskAgainName,
00459                           Options options)
00460 {
00461     return questionYesNoCancelWId( parent ? parent->effectiveWinId() : 0, text, caption, buttonYes, buttonNo, buttonCancel,
00462         dontAskAgainName, options );
00463 }
00464 
00465 int KMessageBox::questionYesNoCancelWId(WId parent_id,
00466                           const QString &text,
00467                           const QString &caption,
00468                           const KGuiItem &buttonYes_,
00469                           const KGuiItem &buttonNo_,
00470                           const KGuiItem &buttonCancel_,
00471                           const QString &dontAskAgainName,
00472                           Options options)
00473 {
00474     ButtonCode res;
00475     if ( !shouldBeShownYesNo(dontAskAgainName, res) ) {
00476         return res;
00477     }
00478 
00479     I18N_FILTER_BUTTON_YES(buttonYes_, buttonYes)
00480     I18N_FILTER_BUTTON_NO(buttonNo_, buttonNo)
00481     I18N_FILTER_BUTTON_CANCEL(buttonCancel_, buttonCancel)
00482     I18N_POST_BUTTON_FILTER
00483 
00484     QWidget* parent = QWidget::find( parent_id );
00485     KDialog *dialog= new KDialog(parent, Qt::Dialog);
00486     dialog->setCaption( caption.isEmpty() ? i18n("Question") : caption );
00487     dialog->setButtons( KDialog::Yes | KDialog::No | KDialog::Cancel );
00488     dialog->setObjectName( "questionYesNoCancel" );
00489     dialog->setModal( true );
00490     dialog->showButtonSeparator( true );
00491     dialog->setButtonGuiItem( KDialog::Yes, buttonYes );
00492     dialog->setButtonGuiItem( KDialog::No, buttonNo );
00493     dialog->setButtonGuiItem( KDialog::Cancel, buttonCancel );
00494     dialog->setDefaultButton( KDialog::Yes );
00495     if ( options & PlainCaption ) {
00496         dialog->setPlainCaption( caption );
00497     }
00498     if ( parent == NULL && parent_id ) {
00499         KWindowSystem::setMainWindow( dialog, parent_id );
00500     }
00501 
00502     bool checkboxResult = false;
00503     int result = createKMessageBox(dialog, QMessageBox::Information,
00504                        text, QStringList(),
00505                        dontAskAgainName.isEmpty() ? QString() : i18n("Do not ask again"),
00506                        &checkboxResult, options);
00507 
00508     if ( result == KDialog::Yes ) {
00509         res = Yes;
00510     } else if ( result == KDialog::No ) {
00511         res = No;
00512     } else {
00513         return Cancel;
00514     }
00515 
00516     if (checkboxResult) {
00517         saveDontShowAgainYesNo(dontAskAgainName, res);
00518     }
00519     return res;
00520 }
00521 
00522 int KMessageBox::warningYesNo(QWidget *parent, const QString &text,
00523                           const QString &caption,
00524                           const KGuiItem &buttonYes,
00525                           const KGuiItem &buttonNo,
00526                           const QString &dontAskAgainName,
00527                           Options options)
00528 {
00529     return warningYesNoList(parent, text, QStringList(), caption,
00530                        buttonYes, buttonNo, dontAskAgainName, options);
00531 }
00532 
00533 int KMessageBox::warningYesNoWId(WId parent_id, const QString &text,
00534                           const QString &caption,
00535                           const KGuiItem &buttonYes,
00536                           const KGuiItem &buttonNo,
00537                           const QString &dontAskAgainName,
00538                           Options options)
00539 {
00540     return warningYesNoListWId(parent_id, text, QStringList(), caption,
00541                        buttonYes, buttonNo, dontAskAgainName, options);
00542 }
00543 
00544 int KMessageBox::warningYesNoList(QWidget *parent, const QString &text,
00545                               const QStringList &strlist,
00546                               const QString &caption,
00547                               const KGuiItem &buttonYes,
00548                               const KGuiItem &buttonNo,
00549                               const QString &dontAskAgainName,
00550                               Options options)
00551 {
00552     return warningYesNoListWId( parent ? parent->effectiveWinId() : 0, text, strlist, caption,
00553         buttonYes, buttonNo, dontAskAgainName, options );
00554 }
00555 
00556 int KMessageBox::warningYesNoListWId(WId parent_id, const QString &text,
00557                               const QStringList &strlist,
00558                               const QString &caption,
00559                               const KGuiItem &buttonYes_,
00560                               const KGuiItem &buttonNo_,
00561                               const QString &dontAskAgainName,
00562                               Options options)
00563 {
00564     ButtonCode res;
00565     if ( !shouldBeShownYesNo(dontAskAgainName, res) ) {
00566         return res;
00567     }
00568 
00569     I18N_FILTER_BUTTON_YES(buttonYes_, buttonYes)
00570     I18N_FILTER_BUTTON_NO(buttonNo_, buttonNo)
00571     I18N_POST_BUTTON_FILTER
00572 
00573     QWidget* parent = QWidget::find( parent_id );
00574     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00575     dialog->setCaption( caption.isEmpty() ? i18n("Warning") : caption );
00576     dialog->setButtons( KDialog::Yes | KDialog::No );
00577     dialog->setObjectName( "warningYesNoList" );
00578     dialog->setModal( true );
00579     dialog->showButtonSeparator( true );
00580     dialog->setButtonGuiItem( KDialog::Yes, buttonYes );
00581     dialog->setButtonGuiItem( KDialog::No, buttonNo );
00582     dialog->setDefaultButton( KDialog::No );
00583     dialog->setEscapeButton( KDialog::No );
00584     if ( options & PlainCaption ) {
00585         dialog->setPlainCaption( caption );
00586     }
00587     if ( parent == NULL && parent_id ) {
00588         KWindowSystem::setMainWindow( dialog, parent_id );
00589     }
00590 
00591     bool checkboxResult = false;
00592     int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
00593                        dontAskAgainName.isEmpty() ? QString() : i18n("Do not ask again"),
00594                        &checkboxResult, options);
00595     res = (result==KDialog::Yes ? Yes : No);
00596 
00597     if (checkboxResult) {
00598         saveDontShowAgainYesNo(dontAskAgainName, res);
00599     }
00600     return res;
00601 }
00602 
00603 int KMessageBox::warningContinueCancel(QWidget *parent,
00604                                    const QString &text,
00605                                    const QString &caption,
00606                                    const KGuiItem &buttonContinue,
00607                                    const KGuiItem &buttonCancel,
00608                                    const QString &dontAskAgainName,
00609                                    Options options)
00610 {
00611     return warningContinueCancelList(parent, text, QStringList(), caption,
00612                                 buttonContinue, buttonCancel, dontAskAgainName, options);
00613 }
00614 
00615 int KMessageBox::warningContinueCancelWId(WId parent_id,
00616                                    const QString &text,
00617                                    const QString &caption,
00618                                    const KGuiItem &buttonContinue,
00619                                    const KGuiItem &buttonCancel,
00620                                    const QString &dontAskAgainName,
00621                                    Options options)
00622 {
00623     return warningContinueCancelListWId(parent_id, text, QStringList(), caption,
00624                                 buttonContinue, buttonCancel, dontAskAgainName, options);
00625 }
00626 
00627 int KMessageBox::warningContinueCancelList(QWidget *parent, const QString &text,
00628                              const QStringList &strlist,
00629                              const QString &caption,
00630                              const KGuiItem &buttonContinue,
00631                              const KGuiItem &buttonCancel,
00632                              const QString &dontAskAgainName,
00633                              Options options)
00634 {
00635     return warningContinueCancelListWId( parent ? parent->effectiveWinId() : 0, text, strlist,
00636         caption, buttonContinue, buttonCancel, dontAskAgainName, options );
00637 }
00638 
00639 int KMessageBox::warningContinueCancelListWId(WId parent_id, const QString &text,
00640                              const QStringList &strlist,
00641                              const QString &caption,
00642                              const KGuiItem &buttonContinue_,
00643                              const KGuiItem &buttonCancel_,
00644                              const QString &dontAskAgainName,
00645                              Options options)
00646 {
00647     if ( !shouldBeShownContinue(dontAskAgainName) )
00648         return Continue;
00649 
00650     I18N_FILTER_BUTTON_CONTINUE(buttonContinue_, buttonContinue)
00651     I18N_FILTER_BUTTON_CANCEL(buttonCancel_, buttonCancel)
00652     I18N_POST_BUTTON_FILTER
00653 
00654     QWidget* parent = QWidget::find( parent_id );
00655     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00656     dialog->setCaption( caption.isEmpty() ? i18n("Warning") : caption );
00657     dialog->setButtons( KDialog::Yes | KDialog::No );
00658     dialog->setObjectName( "warningYesNo" );
00659     dialog->setModal( true );
00660     dialog->showButtonSeparator( true );
00661     dialog->setButtonGuiItem( KDialog::Yes, buttonContinue );
00662     dialog->setButtonGuiItem( KDialog::No, buttonCancel );
00663     dialog->setDefaultButton( KDialog::Yes );
00664     dialog->setEscapeButton( KDialog::No );
00665     if ( options & PlainCaption ) {
00666         dialog->setPlainCaption( caption );
00667     }
00668     if ( parent == NULL && parent_id ) {
00669         KWindowSystem::setMainWindow( dialog, parent_id );
00670     }
00671 
00672     bool checkboxResult = false;
00673     int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
00674                        dontAskAgainName.isEmpty() ? QString() : i18n("Do not ask again"),
00675                        &checkboxResult, options);
00676 
00677     if ( result != KDialog::Yes ) {
00678         return Cancel;
00679     }
00680     if (checkboxResult) {
00681         saveDontShowAgainContinue(dontAskAgainName);
00682     }
00683     return Continue;
00684 }
00685 
00686 int KMessageBox::warningYesNoCancel(QWidget *parent, const QString &text,
00687                                 const QString &caption,
00688                                 const KGuiItem &buttonYes,
00689                                 const KGuiItem &buttonNo,
00690                                 const KGuiItem &buttonCancel,
00691                                 const QString &dontAskAgainName,
00692                                 Options options)
00693 {
00694     return warningYesNoCancelList(parent, text, QStringList(), caption,
00695                       buttonYes, buttonNo, buttonCancel, dontAskAgainName, options);
00696 }
00697 
00698 int KMessageBox::warningYesNoCancelWId(WId parent_id, const QString &text,
00699                                 const QString &caption,
00700                                 const KGuiItem &buttonYes,
00701                                 const KGuiItem &buttonNo,
00702                                 const KGuiItem &buttonCancel,
00703                                 const QString &dontAskAgainName,
00704                                 Options options)
00705 {
00706     return warningYesNoCancelListWId(parent_id, text, QStringList(), caption,
00707                       buttonYes, buttonNo, buttonCancel, dontAskAgainName, options);
00708 }
00709 
00710 int KMessageBox::warningYesNoCancelList(QWidget *parent, const QString &text,
00711                                     const QStringList &strlist,
00712                                     const QString &caption,
00713                                     const KGuiItem &buttonYes,
00714                                     const KGuiItem &buttonNo,
00715                                     const KGuiItem &buttonCancel,
00716                                     const QString &dontAskAgainName,
00717                                     Options options)
00718 {
00719     return warningYesNoCancelListWId( parent ? parent->effectiveWinId() : 0, text, strlist,
00720         caption, buttonYes, buttonNo, buttonCancel, dontAskAgainName, options );
00721 }
00722 
00723 int KMessageBox::warningYesNoCancelListWId(WId parent_id, const QString &text,
00724                                     const QStringList &strlist,
00725                                     const QString &caption,
00726                                     const KGuiItem &buttonYes_,
00727                                     const KGuiItem &buttonNo_,
00728                                     const KGuiItem &buttonCancel_,
00729                                     const QString &dontAskAgainName,
00730                                     Options options)
00731 {
00732     ButtonCode res;
00733     if ( !shouldBeShownYesNo(dontAskAgainName, res) ) {
00734         return res;
00735     }
00736 
00737     I18N_FILTER_BUTTON_YES(buttonYes_, buttonYes)
00738     I18N_FILTER_BUTTON_NO(buttonNo_, buttonNo)
00739     I18N_FILTER_BUTTON_CANCEL(buttonCancel_, buttonCancel)
00740     I18N_POST_BUTTON_FILTER
00741 
00742     QWidget* parent = QWidget::find( parent_id );
00743     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00744     dialog->setCaption( caption.isEmpty() ? i18n("Warning") : caption );
00745     dialog->setButtons( KDialog::Yes | KDialog::No | KDialog::Cancel );
00746     dialog->setObjectName( "warningYesNoCancel" );
00747     dialog->setModal( true );
00748     dialog->showButtonSeparator( true );
00749     dialog->setButtonGuiItem( KDialog::Yes, buttonYes );
00750     dialog->setButtonGuiItem( KDialog::No, buttonNo );
00751     dialog->setButtonGuiItem( KDialog::Cancel, buttonCancel );
00752     dialog->setDefaultButton( KDialog::Yes );
00753     if ( options & PlainCaption ) {
00754         dialog->setPlainCaption( caption );
00755     }
00756     if ( parent == NULL && parent_id ) {
00757         KWindowSystem::setMainWindow( dialog, parent_id );
00758     }
00759 
00760     bool checkboxResult = false;
00761     int result = createKMessageBox(dialog, QMessageBox::Warning, text, strlist,
00762                        dontAskAgainName.isEmpty() ? QString() : i18n("Do not ask again"),
00763                        &checkboxResult, options);
00764 
00765     if ( result == KDialog::Yes ) {
00766         res = Yes;
00767     } else if ( result == KDialog::No ) {
00768         res = No;
00769     } else {
00770         return Cancel;
00771     }
00772 
00773     if (checkboxResult) {
00774         saveDontShowAgainYesNo(dontAskAgainName, res);
00775     }
00776     return res;
00777 }
00778 
00779 void KMessageBox::error(QWidget *parent,  const QString &text,
00780                    const QString &caption, Options options)
00781 {
00782     return errorListWId( parent ? parent->effectiveWinId() : 0, text, QStringList(), caption, options );
00783 }
00784 
00785 void KMessageBox::errorWId(WId parent_id, const QString &text,
00786                       const QString &caption, Options options)
00787 {
00788     errorListWId( parent_id, text, QStringList(), caption, options );
00789 }
00790 
00791 void KMessageBox::errorList(QWidget *parent, const QString &text, const QStringList &strlist,
00792                        const QString &caption, Options options)
00793 {
00794     return errorListWId( parent ? parent->effectiveWinId() : 0, text, strlist, caption, options );
00795 }
00796 
00797 void KMessageBox::errorListWId(WId parent_id,  const QString &text, const QStringList &strlist,
00798                    const QString &caption, Options options)
00799 {
00800     QWidget* parent = QWidget::find( parent_id );
00801     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00802     dialog->setCaption( caption.isEmpty() ? i18n("Error") : caption );
00803     dialog->setButtons( KDialog::Yes );
00804     dialog->setObjectName( "error" );
00805     dialog->setModal( true );
00806     dialog->showButtonSeparator( true );
00807     dialog->setButtonText( KDialog::Yes, KStandardGuiItem::ok().text() );
00808     dialog->setButtonToolTip( KDialog::Yes, QString() );
00809     dialog->setDefaultButton( KDialog::Yes );
00810     dialog->setEscapeButton( KDialog::Yes );
00811     if ( options & PlainCaption ) {
00812         dialog->setPlainCaption( caption );
00813     }
00814     if ( parent == NULL && parent_id ) {
00815         KWindowSystem::setMainWindow( dialog, parent_id );
00816     }
00817 
00818     createKMessageBox(dialog, QMessageBox::Critical, text, strlist, QString(), 0, options);
00819 }
00820 
00821 void
00822 KMessageBox::detailedError(QWidget *parent,  const QString &text,
00823                    const QString &details,
00824                    const QString &caption, Options options)
00825 {
00826     return detailedErrorWId( parent ? parent->effectiveWinId() : 0, text, details, caption, options );
00827 }
00828 
00829 void KMessageBox::detailedErrorWId(WId parent_id,  const QString &text,
00830                    const QString &details,
00831                    const QString &caption, Options options)
00832 {
00833     QWidget* parent = QWidget::find( parent_id );
00834     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00835     dialog->setCaption( caption.isEmpty() ? i18n("Error") : caption );
00836     dialog->setButtons( KDialog::Yes | KDialog::Details );
00837     dialog->setObjectName( "error" );
00838     dialog->setModal( true );
00839     dialog->showButtonSeparator( true );
00840     dialog->setButtonText( KDialog::Yes, KStandardGuiItem::ok().text() );
00841     dialog->setDefaultButton( KDialog::Yes );
00842     dialog->setEscapeButton( KDialog::Yes );
00843     if( options & PlainCaption ) {
00844         dialog->setPlainCaption( caption );
00845     }
00846     if ( parent == NULL && parent_id ) {
00847         KWindowSystem::setMainWindow( dialog, parent_id );
00848     }
00849 
00850     createKMessageBox(dialog, QMessageBox::Critical, text, QStringList(), QString(), 0, options, details);
00851 }
00852 
00853 void KMessageBox::queuedDetailedError(QWidget *parent,  const QString &text,
00854                    const QString &details,
00855                    const QString &caption)
00856 {
00857     return queuedDetailedErrorWId( parent ? parent->effectiveWinId() : 0, text, details, caption );
00858 }
00859 
00860 void KMessageBox::queuedDetailedErrorWId(WId parent_id,  const QString &text,
00861                    const QString &details,
00862                    const QString &caption)
00863 {
00864    KMessageBox_queue = true;
00865    (void) detailedErrorWId(parent_id, text, details, caption);
00866    KMessageBox_queue = false;
00867 }
00868 
00869 
00870 void KMessageBox::sorry(QWidget *parent, const QString &text,
00871                    const QString &caption, Options options)
00872 {
00873     return sorryWId( parent ? parent->effectiveWinId() : 0, text, caption, options );
00874 }
00875 
00876 void KMessageBox::sorryWId(WId parent_id, const QString &text,
00877                    const QString &caption, Options options)
00878 {
00879     QWidget* parent = QWidget::find( parent_id );
00880     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00881     dialog->setCaption( caption.isEmpty() ? i18n("Sorry") : caption );
00882     dialog->setButtons( KDialog::Yes );
00883     dialog->setObjectName( "sorry" );
00884     dialog->setModal( true );
00885     dialog->showButtonSeparator( true );
00886     dialog->setButtonText( KDialog::Yes, KStandardGuiItem::ok().text() );
00887     dialog->setDefaultButton( KDialog::Yes );
00888     dialog->setEscapeButton( KDialog::Yes );
00889     if ( options & PlainCaption ) {
00890         dialog->setPlainCaption( caption );
00891     }
00892     if ( parent == NULL && parent_id ) {
00893         KWindowSystem::setMainWindow( dialog, parent_id );
00894     }
00895 
00896     createKMessageBox(dialog, QMessageBox::Warning, text, QStringList(), QString(), 0, options);
00897 }
00898 
00899 void KMessageBox::detailedSorry(QWidget *parent, const QString &text,
00900                    const QString &details,
00901                    const QString &caption, Options options)
00902 {
00903     return detailedSorryWId( parent ? parent->effectiveWinId() : 0, text, details, caption, options );
00904 }
00905 
00906 void KMessageBox::detailedSorryWId(WId parent_id, const QString &text,
00907                    const QString &details,
00908                    const QString &caption, Options options)
00909 {
00910     QWidget* parent = QWidget::find( parent_id );
00911     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00912     dialog->setCaption( caption.isEmpty() ? i18n("Sorry") : caption );
00913     dialog->setButtons( KDialog::Yes | KDialog::Details );
00914     dialog->setObjectName( "sorry" );
00915     dialog->setModal( true );
00916     dialog->showButtonSeparator( true );
00917     dialog->setButtonText( KDialog::Yes, KStandardGuiItem::ok().text() );
00918     dialog->setDefaultButton( KDialog::Yes );
00919     dialog->setEscapeButton( KDialog::Yes );
00920     if ( options & PlainCaption ) {
00921         dialog->setPlainCaption( caption );
00922     }
00923     if ( parent == NULL && parent_id ) {
00924         KWindowSystem::setMainWindow( dialog, parent_id );
00925     }
00926 
00927     createKMessageBox(dialog, QMessageBox::Warning, text, QStringList(), QString(), 0, options, details);
00928 }
00929 
00930 void KMessageBox::information(QWidget *parent,const QString &text,
00931              const QString &caption, const QString &dontShowAgainName, Options options)
00932 {
00933     informationList(parent, text, QStringList(), caption, dontShowAgainName, options);
00934 }
00935 
00936 void KMessageBox::informationWId(WId parent_id,const QString &text,
00937              const QString &caption, const QString &dontShowAgainName, Options options)
00938 {
00939     informationListWId(parent_id, text, QStringList(), caption, dontShowAgainName, options);
00940 }
00941 
00942 void KMessageBox::informationList(QWidget *parent,const QString &text, const QStringList & strlist,
00943                          const QString &caption, const QString &dontShowAgainName, Options options)
00944 {
00945     return informationListWId( parent ? parent->effectiveWinId() : 0, text, strlist, caption,
00946         dontShowAgainName, options );
00947 }
00948 
00949 void KMessageBox::informationListWId(WId parent_id,const QString &text, const QStringList & strlist,
00950                          const QString &caption, const QString &dontShowAgainName, Options options)
00951 {
00952     if ( !shouldBeShownContinue(dontShowAgainName) ) {
00953         return;
00954     }
00955 
00956     QWidget* parent = QWidget::find( parent_id );
00957     KDialog *dialog = new KDialog(parent, Qt::Dialog);
00958     dialog->setCaption( caption.isEmpty() ? i18n("Information") : caption );
00959     dialog->setButtons( KDialog::Yes );
00960     dialog->setObjectName( "information" );
00961     dialog->setModal( true );
00962     dialog->showButtonSeparator( true );
00963     dialog->setButtonText( KDialog::Yes, KStandardGuiItem::ok().text() );
00964     dialog->setDefaultButton( KDialog::Yes );
00965     dialog->setEscapeButton( KDialog::Yes );
00966     if ( options & PlainCaption ) {
00967         dialog->setPlainCaption( caption );
00968     }
00969     if ( parent == NULL && parent_id ) {
00970         KWindowSystem::setMainWindow( dialog, parent_id );
00971     }
00972 
00973     bool checkboxResult = false;
00974 
00975     createKMessageBox(dialog, QMessageBox::Information, text, strlist,
00976         dontShowAgainName.isEmpty() ? QString() : i18n("Do not show this message again"),
00977                 &checkboxResult, options);
00978 
00979     if (checkboxResult) {
00980         saveDontShowAgainContinue(dontShowAgainName);
00981     }
00982 }
00983 
00984 void KMessageBox::enableAllMessages()
00985 {
00986    KConfig *config = KMessageBox_againConfig ? KMessageBox_againConfig : KGlobal::config().data();
00987    if (!config->hasGroup("Notification Messages")) {
00988       return;
00989    }
00990 
00991    KConfigGroup cg(config, "Notification Messages" );
00992 
00993    typedef QMap<QString, QString> configMap;
00994 
00995    const configMap map = cg.entryMap();
00996 
00997    configMap::ConstIterator it;
00998    for (it = map.begin(); it != map.end(); ++it) {
00999       cg.deleteEntry( it.key() );
01000    }
01001 }
01002 
01003 void KMessageBox::enableMessage(const QString &dontShowAgainName)
01004 {
01005    KConfig *config = KMessageBox_againConfig ? KMessageBox_againConfig : KGlobal::config().data();
01006    if (!config->hasGroup("Notification Messages")) {
01007       return;
01008    }
01009 
01010    KConfigGroup cg( config, "Notification Messages" );
01011 
01012    cg.deleteEntry(dontShowAgainName);
01013    config->sync();
01014 }
01015 
01016 void KMessageBox::about(QWidget *parent, const QString &text,
01017                    const QString &caption, Options options)
01018 {
01019     QString _caption = caption;
01020     if (_caption.isEmpty()) {
01021         _caption = i18n("About %1", KGlobal::caption());
01022     }
01023 
01024     KDialog *dialog = new KDialog(parent, Qt::Dialog);
01025     dialog->setCaption( caption );
01026     dialog->setButtons( KDialog::Yes );
01027     dialog->setObjectName( "about" );
01028     dialog->setModal( true );
01029     dialog->showButtonSeparator( true );
01030     dialog->setButtonText( KDialog::Yes, KStandardGuiItem::ok().text() );
01031     dialog->setDefaultButton( KDialog::Yes );
01032     dialog->setEscapeButton( KDialog::Yes );
01033     if (qApp->windowIcon().isNull()) {
01034         QPixmap ret = QMessageBox::standardIcon(QMessageBox::Information);
01035         dialog->setWindowIcon(ret);
01036     }
01037 
01038     createKMessageBox(dialog, qApp->windowIcon(), text, QStringList(), QString(), 0, options);
01039     return;
01040 }
01041 
01042 int KMessageBox::messageBox( QWidget *parent, DialogType type, const QString &text,
01043                              const QString &caption, const KGuiItem &buttonYes,
01044                              const KGuiItem &buttonNo, const KGuiItem &buttonCancel,
01045                              const QString &dontShowAskAgainName, Options options )
01046 {
01047     return messageBoxWId( parent ? parent->effectiveWinId() : 0, type, text, caption,
01048         buttonYes, buttonNo, buttonCancel, dontShowAskAgainName, options );
01049 }
01050 
01051 int KMessageBox::messageBoxWId( WId parent_id, DialogType type, const QString &text,
01052                              const QString &caption, const KGuiItem &buttonYes,
01053                              const KGuiItem &buttonNo, const KGuiItem &buttonCancel,
01054                              const QString &dontShow, Options options )
01055 {
01056     switch (type) {
01057     case QuestionYesNo:
01058         return KMessageBox::questionYesNoWId( parent_id,
01059                                             text, caption, buttonYes, buttonNo, dontShow, options );
01060     case QuestionYesNoCancel:
01061         return KMessageBox::questionYesNoCancelWId( parent_id,
01062                                             text, caption, buttonYes, buttonNo, buttonCancel, dontShow, options );
01063     case WarningYesNo:
01064         return KMessageBox::warningYesNoWId( parent_id,
01065                                             text, caption, buttonYes, buttonNo, dontShow, options );
01066     case WarningContinueCancel:
01067         return KMessageBox::warningContinueCancelWId( parent_id,
01068                                             text, caption, KGuiItem(buttonYes.text()), buttonCancel, dontShow, options );
01069     case WarningYesNoCancel:
01070         return KMessageBox::warningYesNoCancelWId( parent_id,
01071                                             text, caption, buttonYes, buttonNo, buttonCancel, dontShow, options );
01072     case Information:
01073         KMessageBox::informationWId( parent_id,
01074                                     text, caption, dontShow, options );
01075         return KMessageBox::Ok;
01076 
01077     case Error:
01078         KMessageBox::errorWId( parent_id, text, caption, options );
01079         return KMessageBox::Ok;
01080 
01081     case Sorry:
01082         KMessageBox::sorryWId( parent_id, text, caption, options );
01083         return KMessageBox::Ok;
01084     }
01085     return KMessageBox::Cancel;
01086 }
01087 
01088 void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption, Options options )
01089 {
01090     return queuedMessageBoxWId( parent ? parent->effectiveWinId() : 0, type, text, caption, options );
01091 }
01092 
01093 void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const QString &text, const QString &caption, Options options )
01094 {
01095     KMessageBox_queue = true;
01096     (void) messageBoxWId(parent_id, type, text, caption, KStandardGuiItem::yes(),
01097                      KStandardGuiItem::no(), KStandardGuiItem::cancel(), QString(), options);
01098     KMessageBox_queue = false;
01099 }
01100 
01101 void KMessageBox::queuedMessageBox( QWidget *parent, DialogType type, const QString &text, const QString &caption )
01102 {
01103     return queuedMessageBoxWId( parent ? parent->effectiveWinId() : 0, type, text, caption );
01104 }
01105 
01106 void KMessageBox::queuedMessageBoxWId( WId parent_id, DialogType type, const QString &text, const QString &caption )
01107 {
01108     KMessageBox_queue = true;
01109     (void) messageBoxWId(parent_id, type, text, caption);
01110     KMessageBox_queue = false;
01111 }

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal