summaryrefslogtreecommitdiffstats
path: root/quanta/src/main.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/src/main.cpp
downloadtdewebdev-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 'quanta/src/main.cpp')
-rw-r--r--quanta/src/main.cpp217
1 files changed, 217 insertions, 0 deletions
diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp
new file mode 100644
index 00000000..39672048
--- /dev/null
+++ b/quanta/src/main.cpp
@@ -0,0 +1,217 @@
+/***************************************************************************
+ main.cpp - description
+ -------------------
+ begin : ���� 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <[email protected],[email protected],[email protected]>
+ (C) 2001-2002 Andras Mantia <[email protected]>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#include <stdlib.h>
+
+// kde includes
+#include <klocale.h>
+#include <kaboutdata.h>
+#include <kiconloader.h>
+#include <ksimpleconfig.h>
+#include <kdebug.h>
+#include <kcmdlineargs.h>
+#include <dcopclient.h>
+#include <dcopref.h>
+
+// qt includes
+#include <qpixmap.h>
+#include <qnetwork.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+
+// app includes
+#include "kqapp.h"
+#include "quanta.h"
+
+static const char *description =
+ I18N_NOOP("Quanta Plus Web Development Environment");
+// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
+
+static const char *othertext =
+ I18N_NOOP("Our goal is to be nothing less than the best possible tool for\n \
+working with tagging and scripting languages.\
+\n\nQuanta Plus is not in any way affiliated with any commercial\n \
+versions of Quanta. \
+\n\nWe hope you enjoy Quanta Plus.\n\n");
+
+static const char *developers = I18N_NOOP("The Quanta+ developers");
+
+static KCmdLineOptions options[] =
+{
+ { "+[File]", I18N_NOOP("File to open"), 0 },
+ { "unique", I18N_NOOP("Whether we start as a one-instance application"), 0 },
+ { "nologo", I18N_NOOP("Do not show the nice logo during startup"), 0 },
+ { "resetlayout", I18N_NOOP("Reset the layout of the user interface to the default"), 0},
+ KCmdLineLastOption
+ // INSERT YOUR COMMANDLINE OPTIONS HERE
+};
+
+int main(int argc, char *argv[])
+{
+ char *copyright = new char[200]; //this should be enough
+ strcpy(copyright, "(C) 2000-2006 - ");
+ strcat(copyright, developers);
+ KAboutData
+ aboutData( QUANTA_PACKAGE, I18N_NOOP("Quanta"),
+ QUANTA_VERSION, description, KAboutData::License_GPL_V2,
+ copyright,
+ othertext,
+ "http://kdewebdev.org"
+ );
+
+ //aboutData.otherText(&othertext);
+
+ aboutData.addAuthor("Eric Laffoon",I18N_NOOP("Project Lead - public liaison"), "[email protected]");
+ aboutData.addAuthor("Andras Mantia",I18N_NOOP("Program Lead - bug squisher"), "[email protected]");
+ aboutData.addAuthor("Dmitry Poplavsky",I18N_NOOP("Inactive - left for commercial version"), "[email protected]");
+ aboutData.addAuthor("Alexander Yakovlev",I18N_NOOP("Inactive - left for commercial version"), "[email protected]");
+
+ aboutData.addCredit("Michal Rudolf",
+ I18N_NOOP("Various fixes, table editor maintainer"),
+
+ aboutData.addCredit("Linus McCabe",
+ I18N_NOOP("Debugger interface and integration of the Gubed PHP debugger"),
+
+ aboutData.addCredit("Thiago Silva",
+ I18N_NOOP("Debugger interface"),
+
+ aboutData.addCredit("Chris Hornbaker",
+ I18N_NOOP("XML - compliance, tools & DTEPs"),
+
+ aboutData.addCredit("Dave Reddish",
+ I18N_NOOP("Template contributions"),
+
+ aboutData.addCredit("Doug Bezona",
+ I18N_NOOP("ColdFusion support"),
+
+ aboutData.addCredit("Mathieu Kooiman",
+ I18N_NOOP("Initial debugger work - advanced test"),
+
+ aboutData.addCredit("Richard Moore",
+ I18N_NOOP("Coding and tag dialog definition documentation and more"),
+
+ aboutData.addCredit("Marc Britton",
+ I18N_NOOP("Original plugin system, various fixes"),
+
+ aboutData.addCredit("Robert Nickel",
+ I18N_NOOP("Original documentation, many cool parsing scripts to automate \ndevelopment"),
+
+ aboutData.addCredit("Jason P. Hanley",
+ I18N_NOOP("Various fixes, foundational code for the old DTD parsing and other \nDTD related work"),
+
+ aboutData.addCredit("George Vilches",
+ I18N_NOOP("Tree based upload dialog"),
+
+ aboutData.addCredit("Ted Pibil",
+ I18N_NOOP("Addition and maintenance of DTDs"),
+
+ aboutData.addCredit("Nicolas Deschildre",
+ I18N_NOOP("Visual Page Layout part, new undo/redo system"),
+
+ aboutData.addCredit("Paulo Moura Guedes",
+ I18N_NOOP("VPL View"),
+
+ aboutData.addCredit("Luciano Gulmini",
+ I18N_NOOP("Frame wizard, CSS wizard"),
+
+ aboutData.addCredit("Emiliano Gulmini",
+ I18N_NOOP("Crash recovery"),
+
+ aboutData.addCredit("Jens Herden",
+ I18N_NOOP("Improvements to the treeview code; code review and cleanup"),
+
+ aboutData.addCredit("Andrea Bergia",
+ I18N_NOOP("Original CSS editor"),
+
+ aboutData.addCredit("Matthew Colton",
+ I18N_NOOP("Cool splash screen for many version releases of Quanta"),
+
+ aboutData.addCredit("Claus Hindsgaul",
+ I18N_NOOP("Danish translation"),
+
+ aboutData.addCredit("Dmitri Dmitrienko",
+ I18N_NOOP("Part of a code for the old PHP4 Debugger"),
+
+ aboutData.addCredit("Keith Isdale",
+ I18N_NOOP("XSLT tags"),
+
+ aboutData.addCredit("Lukas Masek",
+ I18N_NOOP("Splash screen and icon for 3.2"),
+
+ KCmdLineArgs::init( argc, argv, &aboutData);
+ KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
+
+ // this defeats the purpose of KCmdLineArgs, but there is no other
+ // way around, I'm afraid.
+ const char *uniq = "--unique";
+ bool isUnique = false;
+ for ( int i = 1; i < argc; i++ ) {
+ if ( strcmp(argv[i], uniq) == 0 ) {
+ isUnique = true;
+ KUniqueApplication::addCmdLineOptions(); // before calling parsedArgs!
+ break;
+ }
+ }
+
+ KApplication *app;
+ KApplication::disableAutoDcopRegistration();
+
+ if (isUnique) {
+ KUniqueApplication::dcopClient()->registerAs("quanta-foo");
+ if (KUniqueApplication::dcopClient()->isApplicationRegistered("quanta"))
+ {
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ for (int i = 0; i < args->count(); i++)
+ {
+ QString s = args->url(i).url();
+ DCOPRef("quanta", "WindowManagerIf").call("openFile(QString, int, int)", s, 1, 1); // Activate it
+ }
+ DCOPRef("quanta", QUANTA_PACKAGE).call("newInstance()");
+ exit(0);
+ }
+ app = new KQUniqueApplication;
+ } else {
+ app = new KQApplication;
+ }
+
+ return app->exec();
+}