src/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 "toplevel.h"
00015
#include "plugincontroller.h"
00016
#include "partcontroller.h"
00017
#include "core.h"
00018
#include "splashscreen.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"),
"cloudtemple@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 plugin, Bookmarks plugin, 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(
"QMake projectmanager patches"),
"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
00075 KCmdLineArgs::init(argc, argv, &aboutData);
00076 KCmdLineArgs::addCmdLineOptions(
options );
00077
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
00078
00079
KApplication app;
00080
00081
SplashScreen *splash =
new SplashScreen;
00082
00083 app.processEvents();
00084
00085 QObject::connect(PluginController::getInstance(), SIGNAL(loadingPlugin(
const QString &)),
00086 splash, SLOT(showMessage(
const QString &)));
00087
00088 splash->
showMessage( i18n(
"Loading Settings" ) );
00089
TopLevel::getInstance()->
loadSettings();
00090
00091
PluginController::getInstance()->
loadInitialPlugins();
00092
00093 splash->
showMessage( i18n(
"Starting GUI" ) );
00094
TopLevel::getInstance()->
main()->
show();
00095
00096
Core::getInstance()->
doEmitCoreInitialized();
00097
00098 splash->
showMessage( i18n(
"Loading Project" ) );
00099
00100
delete splash;
00101
00102
for(
int i=0; i<args->
count(); ++i ){
00103
kdDebug(9000) <<
"------> arg " << args->
arg(i) <<
endl;
00104 }
00105
00106
bool openProject =
false;
00107
if( args->
count() == 0 ){
00108
ProjectManager::getInstance()->
loadDefaultProject();
00109 openProject =
true;
00110 }
else if( args->
count() > 0 ){
00111
KURL url = args->
url( 0 );
00112
QString ext =
QFileInfo( url.
fileName() ).extension();
00113
if( ext ==
"kdevelop" ){
00114
ProjectManager::getInstance()->
loadProject( url );
00115 openProject =
true;
00116 }
00117 }
00118
00119
if( !openProject ){
00120
for(
int a=0; a<args->
count(); ++a ){
00121
PartController::getInstance()->
editDocument(
KURL(args->
url(a)) );
00122 }
00123 }
00124
TopLevel::getInstance()->
guiRestoringFinished();
00125
00126 kapp->dcopClient()->registerAs(
"kdevelop");
00127
00128
return app.exec();
00129 }
This file is part of the documentation for KDevelop Version 3.0.4.