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.9.4.2 2003/03/12 23:31:14 adridg 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 { 0,0,0 }
00055 } ;
00056
00057 int main(int argc, char **argv)
00058 {
00059 FUNCTIONSETUP;
00060
00061 KAboutData about("kpilotConfig", I18N_NOOP("KPilot Configurator"),
00062 KPILOT_VERSION,
00063 "KPilot Configurator",
00064 KAboutData::License_GPL, "(c) 2001, Dan Pilone");
00065 about.addAuthor("Dan Pilone",
00066 I18N_NOOP("Project Leader"),
00067 "pilone@slac.com", "http://www.slac.com/pilone/kpilot_home/");
00068 about.addAuthor("Adriaan de Groot",
00069 I18N_NOOP("Maintainer"),
00070 "groot@kde.org", "http://www.cs.kun.nl/~adridg/kpilot/");
00071
00072 KCmdLineArgs::init(argc, argv, &about);
00073 #ifdef DEBUG
00074 KCmdLineArgs::addCmdLineOptions(debug_options, "debug", "debug");
00075 #endif
00076 KCmdLineArgs::addCmdLineOptions(kpilotoptions,"kpilotconfig",0L,"debug");
00077 KApplication::addCmdLineOptions();
00078 KCmdLineArgs *p = KCmdLineArgs::parsedArgs();
00079
00080 KApplication a;
00081
00082 KPilotConfig::getDebugLevel(true);
00083
00084 int r = 0;
00085
00086 if (p->isSet("conduits"))
00087 {
00088 ConduitConfigDialog *d = new ConduitConfigDialog(0L,
00089 "conduitConfig",true);
00090 r = d->exec();
00091 }
00092 else
00093 {
00094 KDialogBase *d = new KPilotConfigDialog(0L, "configDialog", true);
00095 r = d->exec();
00096 }
00097
00098 if (r)
00099 {
00100 #ifdef DEBUG
00101 DEBUGKPILOT << fname << ": Configuration was okayed." << endl;
00102 #endif
00103 }
00104 else
00105 {
00106 #ifdef DEBUG
00107 DEBUGKPILOT << fname
00108 << ": Configuration was cancelled." << endl;
00109 #endif
00110 }
00111
00112 return r;
00113
00114
00115 (void) config_id;
00116 }
This file is part of the documentation for kdelibs Version 3.1.4.