KNewStuff
Go to the documentation of this file.
23 #include <QTreeWidget>
34 class ProviderItem :
public QTreeWidgetItem
38 QTreeWidgetItem(parent), mProvider(provider) {
54 setCaption(
i18n(
"Hot New Stuff Providers"));
60 setMainWidget(topPage);
62 QBoxLayout *topLayout =
new QVBoxLayout(topPage);
64 QLabel *description =
new QLabel(
i18n(
"Please select one of the providers listed below:"), topPage);
65 topLayout->addWidget(description);
69 topLayout->addWidget(mListWidget);
70 connect(
this, SIGNAL(okClicked()),
this, SLOT(
slotOk()));
80 new ProviderItem(mListWidget, provider);
81 if (mListWidget->model()->rowCount() == 1) {
82 QModelIndex index = mListWidget->model()->index(0, 0);
83 mListWidget->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Select);
84 }
else if (mListWidget->model()->rowCount() > 1) {
85 QModelIndex index = mListWidget->model()->index(0, 0);
86 mListWidget->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Deselect);
93 ProviderItem *item =
static_cast<ProviderItem *
>(items.first());
101 m_provider = item->provider();
111 #include "providerdialog.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat May 18 2013 11:42:10 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.