25 #include <tdelistview.h>
26 #include <tdelocale.h>
27 #include <tdemessagebox.h>
32 #include "providerdialog.h"
33 #include "providerdialog.moc"
37 class ProviderItem :
public TDEListViewItem
40 ProviderItem( TDEListView *parent,
Provider *provider ) :
41 TDEListViewItem( parent ), mProvider( provider )
43 setText( 0, provider->
name() );
46 Provider *provider() {
return mProvider; }
53 KDialogBase( Plain, i18n(
"Hot New Stuff Providers"), Ok | Cancel, Cancel,
54 parent, 0, false, true ),
57 TQFrame *topPage = plainPage();
59 TQBoxLayout *topLayout =
new TQVBoxLayout( topPage );
61 TQLabel *description =
new TQLabel( i18n(
"Please select one of the providers listed below:"), topPage );
62 topLayout->addWidget( description );
64 mListView =
new TDEListView( topPage );
65 mListView->addColumn( i18n(
"Name") );
66 topLayout->addWidget( mListView );
76 new ProviderItem( mListView, provider );
77 if ( mListView->childCount() == 1 ) {
78 mListView->setSelected(mListView->firstChild(),
true);
79 }
else if (mListView->childCount() > 1) {
80 mListView->setSelected(mListView->firstChild(),
false);
84 void ProviderDialog::slotOk()
86 ProviderItem *item =
static_cast<ProviderItem *
>( mListView->selectedItem() );
88 KMessageBox::error(
this, i18n(
"No provider selected.") );
Central class combining all possible TDENewStuff operations.
void requestMetaInformation(Provider *provider)
Asynchronous lookup of provider information such as upload and download locations,...
ProviderDialog(Engine *engine, TQWidget *parent)
Constructor.
void addProvider(Provider *)
Adds a Hotstuff provider to the list.
void clear()
Clears the list of providers.
TDENewStuff provider container.
TQString name() const
Retrieves the common name of the provider.
Handles security releated issues, like signing, verifying.