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

knewstuff

  • knewstuff
khotnewstuff.cpp
1 /*
2  This file is part of KOrganizer.
3  Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #include <kapplication.h>
22 #include <kdebug.h>
23 #include <klocale.h>
24 #include <kcmdlineargs.h>
25 #include <kaboutdata.h>
26 
27 #include "downloaddialog.h"
28 
29 static const KCmdLineOptions op[] =
30 {
31  {"type <type>", I18N_NOOP("Display only media of this type"), 0},
32  {"+[providerlist]", I18N_NOOP("Provider list to use"), 0},
33  KCmdLineLastOption
34 };
35 
36 int main(int argc, char **argv)
37 {
38  KAboutData about("khotnewstuff", "KHotNewStuff", "0.2");
39  KCmdLineArgs *args;
40 
41  KCmdLineArgs::init(argc, argv, &about);
42  KCmdLineArgs::addCmdLineOptions(op);
43  args = KCmdLineArgs::parsedArgs();
44 
45  KApplication i;
46 
47  KNS::DownloadDialog d;
48  if(args->isSet("type")) d.setType(args->getOption("type"));
49  if(args->count() == 1) d.setProviderList(args->arg(0));
50  d.load();
51  d.exec();
52 
53  return 0;
54 }
55 
KNS::DownloadDialog::load
void load()
Fetches descriptions of all available data, optionally considering a previously set type...
Definition: downloaddialog.cpp:165
KNS::DownloadDialog::setType
void setType(TQString type)
Restricts the display of available data to a certain data type.
Definition: downloaddialog.cpp:843
KNS::DownloadDialog::setProviderList
void setProviderList(const TQString &providerList)
Explicitly uses this provider list instead of the one read from the application configuration.
Definition: downloaddialog.cpp:848
KNS::DownloadDialog
Common download dialog for data browsing and installation.
Definition: downloaddialog.h:57

knewstuff

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

knewstuff

Skip menu "knewstuff"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for knewstuff by doxygen 1.8.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |