~kubuntu-members/sweeper/4.11

« back to all changes in this revision

Viewing changes to main.cpp

  • Committer: Eike Krumbacher
  • Date: 2010-05-05 19:48:53 UTC
  • Revision ID: git-v1:f35681f229b96e179d95196e7516ea9431a39ea6
Tags: v4.4.85
This commit introduces modes to kcalc. Modes are groups of functionality, which one can select by menu.

FEATURE:
BUG: 229539
GUI:


svn path=/trunk/KDE/kdeutils/sweeper/; revision=1123284

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
   // command line
40
40
   KCmdLineArgs::init(argc, argv, &aboutData);
 
41
   KCmdLineOptions options;
 
42
   options.add("automatic", ki18n("Sweeps without user interaction"));
 
43
   KCmdLineArgs::addCmdLineOptions(options);
 
44
   KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
 
45
 
 
46
   // Application 
41
47
   KApplication a(true);
42
 
   Sweeper *app = new Sweeper();
43
 
 
44
 
   app->show();
 
48
   Sweeper *app;
 
49
   if(args->isSet("automatic")) {
 
50
      app = new Sweeper(true);
 
51
   } else {
 
52
      app = new Sweeper(false);
 
53
      app->show();
 
54
   }   
45
55
   return a.exec();
46
56
}
47
57