KDevelop API Documentation

main.cpp

Go to the documentation of this file.
00001 #include <config.h>
00002 
00003 #include <kaboutdata.h>
00004 #include <kapplication.h>
00005 #include <kcmdlineargs.h>
00006 #include <klocale.h>
00007 #include <kmainwindow.h>
00008 #include <kstandarddirs.h>
00009 #include <kdebug.h>
00010 #include <dcopclient.h>
00011 
00012 #include <qfileinfo.h>
00013 
00014 #include "splashscreen.h"
00015 #include "toplevel.h"
00016 #include "plugincontroller.h"
00017 #include "partcontroller.h"
00018 #include "core.h"
00019 #include "projectmanager.h"
00020 
00021 static KCmdLineOptions options[] =
00022 {
00023     { "profile <profile>",  I18N_NOOP("Profile to load"), 0 },
00024     { "+file(s)",       I18N_NOOP("Files to load"), 0 },
00025     { 0,0,0 }
00026 };
00027 
00028 int main(int argc, char *argv[])
00029 {
00030   static const char description[] = I18N_NOOP("The KDevelop Integrated Development Environment");
00031   KAboutData aboutData("kdevelop", I18N_NOOP("KDevelop"),
00032                        VERSION, description, KAboutData::License_GPL,
00033                        I18N_NOOP("(c) 1999-2004, The KDevelop developers"), "", "http://www.kdevelop.org");
00034   aboutData.addAuthor("Alexander Dymo", I18N_NOOP("Release coordinator, Overall improvements, Pascal support, C++ support, New File and Documentation parts"), "adymo@mksat.net");
00035   aboutData.addAuthor("Amilcar do Carmo Lucas", I18N_NOOP("Release coordinator, API documentation, Doxygen and autoproject patches"), "amilcar@ida.ing.tu-bs.de");
00036   aboutData.addAuthor("Bernd Gehrmann", I18N_NOOP("Initial idea, basic architecture, much initial source code"), "bernd@kdevelop.org");
00037   aboutData.addAuthor("Caleb Tennis", I18N_NOOP("KTabBar, bugfixes"), "caleb@aei-tech.com");
00038   aboutData.addAuthor("Richard Dale", I18N_NOOP("Java & Objective C support"), "Richard_Dale@tipitina.demon.co.uk");
00039   aboutData.addAuthor("John Birch", I18N_NOOP("Debugger frontend"), "jbb@kdevelop.org");
00040   aboutData.addAuthor("Sandy Meier", I18N_NOOP("PHP support, context menu stuff"), "smeier@kdevelop.org");
00041   aboutData.addAuthor("Kurt Granroth", I18N_NOOP("KDE application templates"), "kurth@granroth.org");
00042   aboutData.addAuthor("Ian Reinhart Geiser", I18N_NOOP("Dist part, bash support, application templates"), "geiseri@yahoo.com");
00043   aboutData.addAuthor("Matthias Hoelzer-Kluepfel", I18N_NOOP("Several components, htdig indexing"), "hoelzer@kde.org");
00044   aboutData.addAuthor("Victor Roeder", I18N_NOOP("Help with Automake manager and persistant class store"), "victor_roeder@gmx.de");
00045   aboutData.addAuthor("Harald Fernengel", I18N_NOOP("Ported to Qt 3, patches, valgrind, diff and perforce support"), "harry@kdevelop.org");
00046   aboutData.addAuthor("Roberto Raggi", I18N_NOOP("QEditor component, code completion, Abbrev component, C++ support, Java support"), "roberto@kdevelop.org");
00047   aboutData.addAuthor("Simon Hausmann", I18N_NOOP("Help with KParts infrastructure"), "hausmann@kde.org");
00048   aboutData.addAuthor("Oliver Kellogg", I18N_NOOP("Ada support"), "okellogg@users.sourceforge.net");
00049   aboutData.addAuthor("Jakob Simon-Gaarde", I18N_NOOP("QMake projectmanager"), "jsgaarde@tdcspace.dk");
00050   aboutData.addAuthor("F@lk Brettschneider", I18N_NOOP("MDI modes, QEditor, bugfixes"), "falkbr@kdevelop.org");
00051   aboutData.addAuthor("Mario Scalas", I18N_NOOP("PartExplorer, redesign of CvsPart, patches, bugs(fixes)"), "mario.scalas@libero.it");
00052   aboutData.addAuthor("Jens Dagerbo", I18N_NOOP("Replace, Bookmarks, FileList and CTags2 plugins. Overall improvements and patches"), "jens.dagerbo@swipnet.se");
00053   aboutData.addAuthor("Julian Rockey", I18N_NOOP("Filecreate part and other bits and patches"), "linux@jrockey.com");
00054   aboutData.addCredit("Ajay Guleria", I18N_NOOP("ClearCase support"), "ajay_guleria@yahoo.com");
00055   aboutData.addCredit("Marek Janukowicz", I18N_NOOP("Ruby support"), "child@t17.ds.pwr.wroc.pl");
00056 
00057   aboutData.addCredit("The KWrite authors", I18N_NOOP("Kate editor component"), "kwrite-devel@kde.org");
00058   aboutData.addCredit("The KHTML authors", I18N_NOOP("HTML documentation component"), "kwrite-devel@kde.org");
00059   aboutData.addCredit("Robert Moniot", I18N_NOOP("Fortran documentation"), "moniot@fordham.edu");
00060   aboutData.addCredit("Ka-Ping Yee", I18N_NOOP("Python documentation utility"), "ping@lfw.org");
00061   aboutData.addCredit("Dimitri van Heesch", I18N_NOOP("Doxygen wizard"), "dimitri@stack.nl");
00062   aboutData.addCredit("Hugo Varotto", I18N_NOOP("Fileselector component"), "hugo@varotto-usa.com");
00063   aboutData.addCredit("Matt Newell", I18N_NOOP("Fileselector component"), "newellm@proaxis.com");
00064   aboutData.addCredit("Trolltech AS", I18N_NOOP("Designer code"), "info@trolltech.com");
00065   aboutData.addCredit("Daniel Engelschalt", I18N_NOOP("C++ code completion, persistant class store"), "daniel.engelschalt@gmx.net");
00066   aboutData.addCredit("Stephane ANCELOT", I18N_NOOP("Patches"), "sancelot@free.fr");
00067   aboutData.addCredit("Jens Zurheide", I18N_NOOP("Patches"), "jens.zurheide@gmx.de");
00068   aboutData.addCredit("Luc Willems", I18N_NOOP("Help with Perl support"), "Willems.luc@pandora.be");
00069   aboutData.addCredit("Marcel Turino", I18N_NOOP("Documentation index view"), "M.Turino@gmx.de");
00070   aboutData.addCredit("Yann Hodique", I18N_NOOP("Patches"), "Yann.Hodique@lifl.fr");
00071   aboutData.addCredit("Tobias Gl\303\244\303\237er" , I18N_NOOP("Documentation Finder,  qmake projectmanager patches, usability improvements, bugfixes ... "), "tobi.web@gmx.de");
00072   aboutData.addCredit("Andreas Koepfle" , I18N_NOOP("QMake project manager patches"), "koepfle@ti.uni-mannheim.de");
00073   aboutData.addCredit("Sascha Cunz" , I18N_NOOP("Cleanup and bugfixes for qEditor, AutoMake and much other stuff"), "mail@sacu.de");
00074   aboutData.addCredit("Robert Gruber" , I18N_NOOP("SnippetPart, debugger and usability patches"), "rgruber@users.sourceforge.net");
00075 
00076   KCmdLineArgs::init(argc, argv, &aboutData);
00077   KCmdLineArgs::addCmdLineOptions( options );
00078   KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
00079 
00080   KApplication app;
00081 
00082   TopLevel::mode = TopLevel::IDEMode;
00083  
00084   QPixmap pm;
00085   pm.load(locate("appdata", "pics/kdevelop-splash.png"));
00086   SplashScreen * splash = new SplashScreen( pm );
00087   
00088   app.processEvents();
00089 
00090   splash->message( i18n( "Loading Settings" ) );
00091   TopLevel::getInstance()->loadSettings();
00092 
00093   splash->message( i18n( "Starting GUI" ) );
00094   TopLevel::getInstance()->main()->show();
00095 
00096   QObject::connect(PluginController::getInstance(), SIGNAL(loadingPlugin(const QString &)), 
00097     splash, SLOT(message(const QString &)));
00098   splash->show();
00099   
00100   PluginController::getInstance()->loadInitialPlugins();
00101   
00102   Core::getInstance()->doEmitCoreInitialized();
00103 
00104   delete splash;
00105 
00106   for( int i=0; i<args->count(); ++i ){
00107       kdDebug(9000) << "------> arg " << args->arg(i) << endl;
00108   }
00109 
00110   bool openProject = false;
00111   if( args->count() == 0 ){
00112       ProjectManager::getInstance()->loadDefaultProject();
00113       openProject = true;
00114   } else if( args->count() > 0 ){
00115       KURL url = args->url( 0 );
00116       QString ext = QFileInfo( url.fileName() ).extension();
00117       if( ext == "kdevelop" ){
00118       ProjectManager::getInstance()->loadProject( url );
00119       openProject = true;
00120       }
00121   }
00122 
00123   if( !openProject ){
00124       for( int a=0; a<args->count(); ++a ){
00125       PartController::getInstance()->editDocument( KURL(args->url(a)) );
00126       }
00127   }
00128   TopLevel::getInstance()->guiRestoringFinished();
00129   
00130   kapp->dcopClient()->registerAs("kdevelop");
00131   
00132   return app.exec();
00133 }
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:58 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003