diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e9ae80694875f869892f13f4fcaf1170a00dea41 (patch) | |
tree | aa2f8d8a217e2d376224c8d46b7397b68d35de2d /kommander/editor/main.cpp | |
download | tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/main.cpp')
-rw-r--r-- | kommander/editor/main.cpp | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/kommander/editor/main.cpp b/kommander/editor/main.cpp new file mode 100644 index 00000000..7be1f31d --- /dev/null +++ b/kommander/editor/main.cpp @@ -0,0 +1,81 @@ +/*************************************************************************** + main.cpp - initialization + ------------------- + copyright : (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org> + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// KDE includes +#include <kaboutdata.h> +#include <kapplication.h> +#include <kcmdlineargs.h> +#include <kconfig.h> +#include <kiconloader.h> +#include <klocale.h> +#include <ksplashscreen.h> + +// Other includes +#include "mainwindow.h" +#include "kommanderwidget.h" +#include "kommanderversion.h" + +static const char *description = + I18N_NOOP("Kommander is a graphical editor of scripted dialogs."); +static const char *text = + I18N_NOOP("Based on Qt Designer, (C) 2000 Trolltech AS."); + +static KCmdLineOptions options[] = +{ + { "+file", I18N_NOOP("Dialog to open"), 0 }, + { 0, 0, 0 } +}; + +int main( int argc, char *argv[] ) +{ + KAboutData aboutData( "kommander", I18N_NOOP("Kommander"), + KOMMANDER_VERSION, description, KAboutData::License_GPL, + "(C) 2002-2005 Kommander authors", text); + aboutData.addAuthor("Eric Laffoon", I18N_NOOP("Project manager"), "eric@kdewebdev.org"); + aboutData.addAuthor("Andras Mantia", I18N_NOOP("Current maintainer"), "amantia@kdewebdev.org"); + aboutData.addAuthor("Michal Rudolf", I18N_NOOP("Previous maintainer"), "mrudolf@kdewebdev.org"); + aboutData.addAuthor("Marc Britton", I18N_NOOP("Original author"), "consume@optusnet.com.au"); + aboutData.setTranslator (I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"), + I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails")); + KCmdLineArgs::init(argc, argv, &aboutData); + KCmdLineArgs::addCmdLineOptions(options); + + KommanderWidget::inEditor = true; + + KLocale::setMainCatalogue("kommander"); + KApplication a(true, true); + + KConfig *config = kapp->config(); + config->setGroup("General"); + bool splashScreen = config->readBoolEntry("SplashScreen", true); + KSplashScreen* splash = 0; + if (splashScreen) { + splash = new KSplashScreen(UserIcon("kommandersplash")); + splash->show(); + } + + MainWindow *mw = new MainWindow(false); + a.setMainWidget(mw); + mw->setCaption(i18n("Kommander Dialog Editor")); + mw->show(); + + if (splashScreen) { + splash->finish(mw); + delete splash; + } + + return a.exec(); +} + |