main-config.cc
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 static const char *config_id =
00032 "$Id: main-config.cc,v 1.15 2003/10/13 21:33:27 goossens Exp $";
00033
00034
00035 #include "options.h"
00036
00037 #include <stdlib.h>
00038
00039 #include <qcombobox.h>
00040 #include <qvbox.h>
00041
00042
00043 #include <kapplication.h>
00044 #include <kcmdlineargs.h>
00045 #include <kaboutdata.h>
00046
00047 #include "kpilotConfigDialog.h"
00048 #include "conduitConfigDialog.h"
00049 #include "kpilotConfig.h"
00050
00051 static KCmdLineOptions kpilotoptions[] = {
00052 { "c",0,0 },
00053 { "conduits", I18N_NOOP("Configure conduits instead."), 0},
00054 #ifdef DEBUG
00055 {"debug <level>", I18N_NOOP("Set debugging level"), "0"},
00056 #endif
00057 KCmdLineLastOption
00058 } ;
00059
00060 int main(int argc, char **argv)
00061 {
00062 FUNCTIONSETUP;
00063
00064 KAboutData about("kpilotConfig", I18N_NOOP("KPilot Configurator"),
00065 KPILOT_VERSION,
00066 "KPilot Configurator",
00067 KAboutData::License_GPL, "(c) 2001, Dan Pilone");
00068 about.addAuthor("Dan Pilone",
00069 I18N_NOOP("Project Leader"),
00070 "pilone@slac.com", "http://www.slac.com/pilone/kpilot_home/");
00071 about.addAuthor("Adriaan de Groot",
00072 I18N_NOOP("Maintainer"),
00073 "groot@kde.org", "http://www.cs.kun.nl/~adridg/kpilot/");
00074
00075 KCmdLineArgs::init(argc, argv, &about);
00076 KCmdLineArgs::addCmdLineOptions(kpilotoptions,"kpilotconfig");
00077 KApplication::addCmdLineOptions();
00078 KCmdLineArgs *p = KCmdLineArgs::parsedArgs();
00079
00080 KApplication a;
00081
00082 #ifdef DEBUG
00083 KPilotConfig::getDebugLevel(p);
00084 #endif
00085
00086 int r = 0;
00087
00088 if (p->isSet("conduits"))
00089 {
00090 ConduitConfigDialog *d = new ConduitConfigDialog(0L,
00091 "conduitConfig",true);
00092 r = d->exec();
00093 }
00094 else
00095 {
00096 KDialogBase *d = new KPilotConfigDialog(0L, "configDialog", true);
00097 r = d->exec();
00098 }
00099
00100 if (r)
00101 {
00102 #ifdef DEBUG
00103 DEBUGKPILOT << fname << ": Configuration was okayed." << endl;
00104 #endif
00105 }
00106 else
00107 {
00108 #ifdef DEBUG
00109 DEBUGKPILOT << fname
00110 << ": Configuration was canceled." << endl;
00111 #endif
00112 }
00113
00114 return r;
00115
00116
00117 (void) config_id;
00118 }
This file is part of the documentation for kpilot Library Version 3.2.2.