25 #include <tqtextstream.h>
28 #include <tdeaboutdata.h>
29 #include <tdeapplication.h>
31 #include <tdelocale.h>
32 #include <tdecmdlineargs.h>
33 #include <tdeprocess.h>
36 #include "knewstuffgeneric.h"
42 GhnsWidget::GhnsWidget()
46 TQBoxLayout *topLayout =
new TQVBoxLayout(
this );
47 topLayout->setMargin( KDialog::marginHint() );
48 topLayout->setSpacing( KDialog::spacingHint() );
50 topLayout->addWidget(
new TQLabel( i18n(
"Get hot new stuff:"),
this ) );
52 TQPushButton *button =
new TQPushButton(
"Wallpapers",
this );
53 topLayout->addWidget( button );
54 connect( button, TQ_SIGNAL( clicked() ), TQ_SLOT( downloadWallpapers() ) );
56 topLayout->addSpacing( 5 );
58 TQBoxLayout *buttonLayout =
new TQHBoxLayout( topLayout );
60 buttonLayout->addStretch();
62 TQPushButton *closeButton =
new TQPushButton(
"Close",
this );
63 buttonLayout->addWidget( closeButton );
64 connect( closeButton, TQ_SIGNAL( clicked() ), kapp, TQ_SLOT( quit() ) );
67 GhnsWidget::~GhnsWidget()
72 void GhnsWidget::downloadWallpapers()
74 kdDebug() <<
"downloadWallpapers()" << endl;
76 mWallpapers->download();
79 int main(
int argc,
char **argv)
81 TDEAboutData aboutData(
"ghns",
"Get Hot New Stuff",
"0.1");
82 TDECmdLineArgs::init(argc,argv,&aboutData);
87 app.setMainWidget( &wid );
Basic TDENewStuff class with predefined actions.