summaryrefslogtreecommitdiffstats
path: root/ktuberling/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 /ktuberling/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 'ktuberling/main.cpp')
-rw-r--r--ktuberling/main.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/ktuberling/main.cpp b/ktuberling/main.cpp
new file mode 100644
index 00000000..5e508e66
--- /dev/null
+++ b/ktuberling/main.cpp
@@ -0,0 +1,60 @@
+/* -------------------------------------------------------------
+ KDE Tuberling
+ Main program
+ ------------------------------------------------------------- */
+
+#include <kapplication.h>
+#include <kimageio.h>
+#include <klocale.h>
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+
+#include "toplevel.h"
+
+static KCmdLineOptions options[] = {
+ { "+<tuberling-file>", I18N_NOOP("Potato to open"), 0 },
+ KCmdLineLastOption
+};
+
+
+
+static const char description[] = I18N_NOOP("Potato game for kids");
+static const char text[] = I18N_NOOP("A program by Eric Bischoff <[email protected]>\nand John Calhoun.\n\nThis program is dedicated to my daughter Sunniva.");
+
+static const char version[] = "0.4";
+
+// Main function
+int main(int argc, char *argv[])
+{
+
+ KAboutData aboutData( "ktuberling", I18N_NOOP("KTuberling"),
+ version, description, KAboutData::License_GPL,
+ "(c) 1999-2003, The KTuberling Developers", text);
+ aboutData.addAuthor("Eric Bischoff", I18N_NOOP("Developer"), "[email protected]");
+ aboutData.addAuthor("John Calhoun", I18N_NOOP("Original concept and artwork"));
+ aboutData.addCredit("Agnieszka Czajkowska", I18N_NOOP("New artwork"), "[email protected]");
+ aboutData.addCredit("Bas Willems", I18N_NOOP("New artwork"), "[email protected]");
+ aboutData.addCredit("Roger Larsson", I18N_NOOP("Sounds tuning"), "[email protected]");
+ KCmdLineArgs::init(argc, argv, &aboutData);
+ KCmdLineArgs::addCmdLineOptions(options);
+
+ KApplication app;
+ KGlobal::locale()->insertCatalogue("libkdegames");
+ KImageIO::registerFormats();
+
+ TopLevel *toplevel=0;
+
+ if (app.isRestored())
+ RESTORE(TopLevel)
+ else {
+ toplevel = new TopLevel();
+ toplevel->show();
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ if (args->count())
+ toplevel->open(args->url(0));
+ args->clear();
+ }
+
+ return app.exec();
+}