Use qobject_cast fix crash when we load KRegExpEditorInterface
[kdeaccessibility.git] / kmag / main.cpp
blobce4d507dd270e9e67137c0cd07c4acaeed9e9d4c
1 /***************************************************************************
2 main.cpp - description
3 -------------------
4 begin : Mon Feb 12 23:45:41 EST 2001
5 copyright : (C) 2001-2003 by Sarang Lakare
6 email : sarang#users.sf.net
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
19 #include <kcmdlineargs.h>
20 #include <kaboutdata.h>
21 #include <klocale.h>
22 #include <ktoggleaction.h>
23 #include <kselectaction.h>
24 #include <kapplication.h>
25 #include "kmag.h"
27 #include "version.h"
29 KmagApp *kmagapp;
31 // Not needed, not used.
32 //static const char description[] =
33 // I18N_NOOP("Kmag");
34 // INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
37 static KCmdLineOptions options[] =
39 { "+[File]", I18N_NOOP("File to open"), 0 },
40 KCmdLineLastOption
41 // INSERT YOUR COMMANDLINE OPTIONS HERE
44 int main(int argc, char *argv[])
46 // about the application
47 KAboutData *aboutData = new KAboutData("kmag", I18N_NOOP("KMagnifier"), KMAG_VERSION,
48 I18N_NOOP("Screen magnifier for the K Desktop Environment (KDE)"),
49 KAboutData::License_GPL,
50 "(C) 2001-2003, Sarang Lakare","",
51 "http://kmag.sourceforge.net");
53 // about the authors
54 aboutData->addAuthor("Sarang Lakare",
55 I18N_NOOP("Rewrite and current maintainer"),"sarang@users.sf.net",
56 "http://www.cs.sunysb.edu/~lsarang/linux");
57 aboutData->addAuthor("Michael Forster",
58 I18N_NOOP("Original idea and author (KDE1)"), "forster@fmi.uni-passau.de");
60 aboutData->addCredit("Olaf Schmidt", I18N_NOOP("Rework of the user interface, improved selection window, speed optimization, rotation, bug fixes"), "ojschmidt@kde.org");
61 aboutData->addCredit("Claudiu Costin", I18N_NOOP("Some tips"), "claudiuc@work.ro",
62 "http://www.ro.kde.org");
64 KCmdLineArgs::init( argc, argv, aboutData );
65 KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
67 KApplication app;
69 if (app.isSessionRestored())
71 RESTORE(KmagApp);
73 else
75 kmagapp = new KmagApp();
76 kmagapp->show();
78 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
80 args->clear();
83 return app.exec();