• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
src/main.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  -----------------------------------------------------------------------
4 
5  begin : Thu Mar 11 20:50:53 MET 1999
6 
7  copyright : (C) 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
8  (C) 2006 Peter Hedlund <peter.hedlund@kdemail.net>
9  (C) 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
10 
11  -----------------------------------------------------------------------
12 
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 
24 #include <kcmdlineargs.h>
25 #include <kaboutdata.h>
26 #include <klocale.h>
27 #include <kapplication.h>
28 
29 #include "parleymainwindow.h"
30 #include "version.h"
31 
32 
33 int main(int argc, char* argv[])
34 {
35  static const char description[] = I18N_NOOP("Vocabulary Trainer");
36  static const char version[] = PARLEY_VERSION_STRING;
37 
38  KAboutData aboutData("parley", 0,
39  ki18n("Parley"),
40  version,
41  ki18n(description),
42  KAboutData::License_GPL,
43  ki18n("© 1999-2002\tEwald Arnold\n"
44  "© 2001-2002\tThe KDE team\n"
45  "© 2004-2007\tPeter Hedlund\n"
46  "© 2007-2010\tFrederik Gladhorn\n"),
47  ki18n("Helps you train your vocabulary"),
48  "http://edu.kde.org/parley",
49  "submit@bugs.kde.org");
50 
51  aboutData.addAuthor(ki18n("Inge Wallin"),
52  ki18n("Developer and Co-maintainer"),
53  "inge@lysator.liu.se");
54 
55  aboutData.addAuthor(ki18n("Amarvir Singh"),
56  ki18n("Developer and Co-maintainer"),
57  "amarvir.ammu.93@gmail.com");
58 
59  aboutData.addAuthor(ki18n("Frederik Gladhorn"),
60  ki18n("Developer, former maintainer"),
61  "gladhorn@kde.org");
62 
63  aboutData.addAuthor(ki18n("Daniel Laidig"),
64  ki18n("Developer"),
65  "d.laidig@gmx.de");
66 
67  aboutData.addAuthor(ki18n("David Capel"),
68  ki18n("Practice Dialogs"),
69  "wot.narg@gmail.com");
70 
71  aboutData.addAuthor(ki18n("Avgoustinos Kadis"),
72  ki18n("Scripting"),
73  "avgoustinos.kadis@kdemail.net");
74 
75  aboutData.addAuthor(ki18n("Peter Hedlund"),
76  ki18n("Countless fixes, former maintainer, port to KDE4"),
77  "peter.hedlund@kdemail.net");
78 
79  aboutData.addAuthor(ki18n("Ewald Arnold"), ki18n("Original Author"),
80  "kvoctrain@ewald-arnold.de",
81  "http://www.ewald-arnold.de");
82 
83  aboutData.addCredit(ki18n("Lee Olson"),
84  ki18n("Artwork and Oxygen Icons"));
85 
86  aboutData.addCredit(ki18n("Anne-Marie Mahfouf"),
87  ki18n("Port to KConfig XT"));
88 
89  aboutData.addCredit(ki18n("Jeremy Whiting"),
90  ki18n("Rewriting the kvtml library for KDE4"));
91 
92  aboutData.addCredit(ki18n("Markus Büchele"),
93  ki18n("Bug reports and testing on the way to KDE4"));
94 
95  aboutData.addCredit(ki18n("Ramona Knapp"),
96  ki18n("Conceived the name Parley"));
97 
98  KCmdLineArgs::init(argc, argv, &aboutData);
99 
100  KCmdLineOptions options;
101  options.add(I18N_NOOP("+[file]"), ki18n("Document file to open"));
102 
103  KCmdLineArgs::addCmdLineOptions(options);
104 
105  KApplication app;
106  app.setQuitOnLastWindowClosed(false);
107 
108  // for i18n of the lib strings
109  KGlobal::locale()->insertCatalog("libkdeedu");
110 
111  if (app.isSessionRestored()) {
112  int n = 1;
113  while (KMainWindow::canBeRestored(n)) {
114  (new ParleyMainWindow())->restore(n);
115  n++;
116  }
117  return app.exec();
118  } else {
119  KMainWindow *parleyApp;
120 
121  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
122 
123  if (args && args->count() > 0) {
124  parleyApp = new ParleyMainWindow(args->url(0));
125  args->clear();
126  } else {
127  parleyApp = new ParleyMainWindow();
128 
129  }
130 
131  if (args) {
132  args->clear();
133  }
134  parleyApp->show();
135  return app.exec();
136  }
137 }
138 
PARLEY_VERSION_STRING
#define PARLEY_VERSION_STRING
Definition: version.h:3
ParleyMainWindow
Definition: parleymainwindow.h:41
main
int main(int argc, char *argv[])
Definition: src/main.cpp:33
version.h
parleymainwindow.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal