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

arts

  • arts
  • kde
kiotest.cpp
1 #include <stdio.h>
2 #include <kmedia2.h>
3 #include <tdecmdlineargs.h>
4 #include <connect.h>
5 #include <tdelocale.h>
6 #include <tdeapplication.h>
7 #include <tdeaboutdata.h>
8 #include "qiomanager.h"
9 #include "artskde.h"
10 
11 using namespace std;
12 using namespace Arts;
13 
14 
15 static TDECmdLineOptions options[] =
16 {
17  { "+[URL]", I18N_NOOP("URL to open"), 0 },
18  TDECmdLineLastOption
19 };
20 
21 int main(int argc, char **argv)
22 {
23  TDEAboutData aboutData( "kiotest", I18N_NOOP("KIOTest"), I18N_NOOP("0.1"), "", TDEAboutData::License_GPL, "");
24 
25  TDECmdLineArgs::init(argc,argv,&aboutData);
26  TDECmdLineArgs::addCmdLineOptions(options);
27  TDEApplication app;
28  QIOManager qiomanager;
29  Dispatcher dispatcher(&qiomanager);
30  TDEIOInputStream stream;
31  StdoutWriter writer;
32 
33  TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
34 
35  if(args->count())
36  {
37  if(!stream.openURL(args->arg(0)))
38  {
39  printf("can't open url");
40  exit(1);
41  }
42  }
43  else
44  exit(1);
45 
46  args->clear();
47 
48  connect(stream, writer);
49 
50  writer.start();
51  stream.start();
52 
53  app.exec();
54 }
TDECmdLineArgs
TDECmdLineArgs::clear
void clear()
TDEAboutData
TDECmdLineArgs::addCmdLineOptions
static void addCmdLineOptions(const TDECmdLineOptions *options, const char *name=0, const char *id=0, const char *afterId=0)
std
TDEApplication
I18N_NOOP
#define I18N_NOOP(x)
tdelocale.h
TDECmdLineArgs::parsedArgs
static TDECmdLineArgs * parsedArgs(const char *id=0)
Arts
Definition: kartsdispatcher.h:29
TDECmdLineArgs::init
static void init(int _argc, char **_argv, const char *_appname, const char *programName, const char *_description, const char *_version, bool noKApp=false)
TDECmdLineArgs::count
int count() const
TDECmdLineArgs::arg
const char * arg(int n) const
TDECmdLineOptions

arts

Skip menu "arts"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

arts

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