summaryrefslogtreecommitdiffstats
path: root/kpat/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
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /kpat/main.cpp
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.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/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpat/main.cpp')
-rw-r--r--kpat/main.cpp73
1 files changed, 73 insertions, 0 deletions
diff --git a/kpat/main.cpp b/kpat/main.cpp
new file mode 100644
index 00000000..58ad8652
--- /dev/null
+++ b/kpat/main.cpp
@@ -0,0 +1,73 @@
+/*
+ patience -- main program
+ Copyright (C) 1995 Paul Olav Tvete
+
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind. The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof. In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+
+ */
+
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+
+#include "version.h"
+#include "pwidget.h"
+
+static const char description[] = I18N_NOOP("KDE Patience Game");
+
+static KCmdLineOptions options[] =
+{
+ { "+file", I18N_NOOP("File to load"), 0 },
+ KCmdLineLastOption
+};
+
+int main( int argc, char **argv )
+{
+ KAboutData aboutData( "kpat", I18N_NOOP("KPatience"),
+ KPAT_VERSION, description, KAboutData::License_GPL,
+ "(c) 1995, Paul Olav Tvete\n"
+ "(c) 2000 Stephan Kulow");
+ aboutData.addAuthor("Paul Olav Tvete");
+ aboutData.addAuthor("Mario Weilguni",0,"[email protected]");
+ aboutData.addAuthor("Matthias Ettrich",0,"[email protected]");
+ aboutData.addAuthor("Rodolfo Borges",I18N_NOOP("Some Game Types"),"[email protected]");
+ aboutData.addAuthor("Peter H. Ruegg",0,"[email protected]");
+ aboutData.addAuthor("Michael Koch", I18N_NOOP("Bug fixes"), "[email protected]");
+ aboutData.addAuthor("Marcus Meissner", I18N_NOOP("Shuffle algorithm for game numbers"),
+ aboutData.addAuthor("Shlomi Fish", I18N_NOOP("Freecell Solver"), "[email protected]");
+ aboutData.addAuthor("Stephan Kulow", I18N_NOOP("Rewrite and current maintainer"),
+ aboutData.addAuthor("Erik Sigra", I18N_NOOP("Improved Klondike"), "[email protected]");
+ aboutData.addAuthor("Josh Metzler", I18N_NOOP("Spider Implementation"), "[email protected]");
+ aboutData.addAuthor("Maren Pakura", I18N_NOOP("Documentation"), "[email protected]");
+ aboutData.addAuthor("Inge Wallin", I18N_NOOP("Bug fixes"), "[email protected]");
+
+ KCmdLineArgs::init( argc, argv, &aboutData );
+ KCmdLineArgs::addCmdLineOptions (options);
+ KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
+
+ KApplication a;
+ KGlobal::locale()->insertCatalogue("libkdegames");
+
+ if (a.isRestored())
+ RESTORE(pWidget)
+ else {
+ pWidget *w = new pWidget;
+ if (args->count())
+ w->openGame(args->url(0));
+ a.setMainWidget(w);
+ w->show();
+ }
+ return a.exec();
+}