• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdenewstuff
 

tdenewstuff

  • tdenewstuff
ghns.cpp
1/*
2 This file is part of KDE.
3
4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21#include <iostream>
22
23#include <tqlayout.h>
24#include <tqfile.h>
25#include <tqtextstream.h>
26#include <tqlabel.h>
27
28#include <tdeaboutdata.h>
29#include <tdeapplication.h>
30#include <kdebug.h>
31#include <tdelocale.h>
32#include <tdecmdlineargs.h>
33#include <tdeprocess.h>
34#include <kdialog.h>
35
36#include "knewstuffgeneric.h"
37
38#include "ghns.h"
39
40using namespace std;
41
42GhnsWidget::GhnsWidget()
43{
44 mWallpapers = new TDENewStuffGeneric( "kdesktop/wallpaper", this );
45
46 TQBoxLayout *topLayout = new TQVBoxLayout( this );
47 topLayout->setMargin( KDialog::marginHint() );
48 topLayout->setSpacing( KDialog::spacingHint() );
49
50 topLayout->addWidget( new TQLabel( i18n("Get hot new stuff:"), this ) );
51
52 TQPushButton *button = new TQPushButton( "Wallpapers", this );
53 topLayout->addWidget( button );
54 connect( button, TQ_SIGNAL( clicked() ), TQ_SLOT( downloadWallpapers() ) );
55
56 topLayout->addSpacing( 5 );
57
58 TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
59
60 buttonLayout->addStretch();
61
62 TQPushButton *closeButton = new TQPushButton( "Close", this );
63 buttonLayout->addWidget( closeButton );
64 connect( closeButton, TQ_SIGNAL( clicked() ), tdeApp, TQ_SLOT( quit() ) );
65}
66
67GhnsWidget::~GhnsWidget()
68{
69 delete mWallpapers;
70}
71
72void GhnsWidget::downloadWallpapers()
73{
74 kdDebug() << "downloadWallpapers()" << endl;
75
76 mWallpapers->download();
77}
78
79int main(int argc,char **argv)
80{
81 TDEAboutData aboutData("ghns","Get Hot New Stuff","0.1");
82 TDECmdLineArgs::init(argc,argv,&aboutData);
83
84 TDEApplication app;
85
86 GhnsWidget wid;
87 app.setMainWidget( &wid );
88 wid.show();
89
90 app.exec();
91}
92
93#include "ghns.moc"
TDENewStuffGeneric
Basic TDENewStuff class with predefined actions.
Definition: knewstuffgeneric.h:43

tdenewstuff

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

tdenewstuff

Skip menu "tdenewstuff"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdenewstuff by doxygen 1.9.4
This website is maintained by Timothy Pearson.