TDE graphics utilities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kolourpaint.cpp 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. /*
  2. Copyright (c) 2003,2004,2005 Clarence Dang <dang@kde.org>
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions
  6. are met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  13. IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  14. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  16. INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  17. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  18. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  19. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  20. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  21. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. */
  23. #include <tqfile.h>
  24. #include <dcopclient.h>
  25. #include <tdeaboutdata.h>
  26. #include <tdeapplication.h>
  27. #include <tdecmdlineargs.h>
  28. #include <kdebug.h>
  29. #include <kimageio.h>
  30. #include <tdelocale.h>
  31. // for srand
  32. #include <stdlib.h>
  33. #include <sys/types.h>
  34. #include <unistd.h>
  35. #include <kpdefs.h>
  36. #include <kpmainwindow.h>
  37. #include <kolourpaintlicense.h>
  38. #include <kolourpaintversion.h>
  39. static const TDECmdLineOptions cmdLineOptions [] =
  40. {
  41. {"+[file]", I18N_NOOP ("Image file to open"), 0},
  42. TDECmdLineLastOption
  43. };
  44. int main (int argc, char *argv [])
  45. {
  46. TDEAboutData aboutData
  47. (
  48. "kolourpaint",
  49. I18N_NOOP ("KolourPaint"),
  50. kpVersionText,
  51. I18N_NOOP ("Paint Program for TDE"),
  52. TDEAboutData::License_Custom,
  53. 0/*copyright statement - see licence instead*/,
  54. 0/*no free text*/
  55. );
  56. // this is _not_ the same as TDEAboutData::License_BSD
  57. aboutData.setLicenseText (kpLicenseText);
  58. // SYNC: with AUTHORS
  59. aboutData.addAuthor ("Clarence Dang", I18N_NOOP ("Maintainer"), "dang@kde.org");
  60. aboutData.addAuthor ("Thurston Dang", I18N_NOOP ("Chief Investigator"),
  61. "thurston_dang@users.sourceforge.net");
  62. aboutData.addAuthor ("Kristof Borrey", I18N_NOOP ("Icons"), "borrey@kde.org");
  63. aboutData.addAuthor ("Kazuki Ohta", I18N_NOOP ("InputMethod Support"), "mover@hct.zaq.ne.jp");
  64. aboutData.addAuthor ("Nuno Pinheiro", I18N_NOOP ("Icons"), "nf.pinheiro@gmail.com");
  65. aboutData.addAuthor ("Danny Allen", I18N_NOOP ("Icons"), "dannya40uk@yahoo.co.uk");
  66. aboutData.addAuthor ("Martin Koller",
  67. 0/*STRING: string freeze prevents us from writing: Scanning Support*/,
  68. "m.koller@surfeu.at");
  69. aboutData.addCredit ("Rashid N. Achilov");
  70. aboutData.addCredit ("Toyohiro Asukai");
  71. aboutData.addCredit ("Bela-Andreas Bargel");
  72. aboutData.addCredit ("Waldo Bastian");
  73. aboutData.addCredit ("Ismail Belhachmi");
  74. aboutData.addCredit ("Sashmit Bhaduri");
  75. aboutData.addCredit ("Antonio Bianco");
  76. aboutData.addCredit ("Stephan Binner");
  77. aboutData.addCredit ("Markus Brueffer");
  78. aboutData.addCredit ("Rob Buis");
  79. aboutData.addCredit ("Lucijan Busch");
  80. aboutData.addCredit ("Mikhail Capone");
  81. aboutData.addCredit ("Enrico Ceppi");
  82. aboutData.addCredit ("Tom Chance");
  83. aboutData.addCredit ("Albert Astals Cid");
  84. aboutData.addCredit ("Jennifer Dang");
  85. aboutData.addCredit ("Lawrence Dang");
  86. aboutData.addCredit ("Christoph Eckert");
  87. aboutData.addCredit ("David Faure");
  88. aboutData.addCredit ("P. Fisher");
  89. aboutData.addCredit ("Nicolas Goutte");
  90. aboutData.addCredit ("Herbert Graeber");
  91. aboutData.addCredit ("Brad Grant");
  92. aboutData.addCredit ("David Greenaway");
  93. aboutData.addCredit ("Wilco Greven");
  94. aboutData.addCredit ("Hubert Grininger");
  95. aboutData.addCredit ("Adriaan de Groot");
  96. aboutData.addCredit ("Esben Mose Hansen");
  97. aboutData.addCredit ("Nadeem Hasan");
  98. aboutData.addCredit ("Simon Hausmann");
  99. aboutData.addCredit ("Michael Hoehne");
  100. aboutData.addCredit ("Andrew J");
  101. aboutData.addCredit ("Werner Joss");
  102. aboutData.addCredit ("Derek Kite");
  103. aboutData.addCredit ("Tobias Koenig");
  104. aboutData.addCredit ("Dmitry Kolesnikov");
  105. aboutData.addCredit ("Stephan Kulow");
  106. aboutData.addCredit ("Eric Laffoon");
  107. aboutData.addCredit ("Michael Lake");
  108. aboutData.addCredit ("Sebastien Laout");
  109. aboutData.addCredit ("David Ling");
  110. aboutData.addCredit ("Volker Lochte");
  111. aboutData.addCredit ("Anders Lund");
  112. aboutData.addCredit ("Jacek Masiulaniec");
  113. aboutData.addCredit ("Benjamin Meyer");
  114. aboutData.addCredit ("Amir Michail");
  115. aboutData.addCredit ("Robert Moszczynski");
  116. aboutData.addCredit ("Dirk Mueller");
  117. aboutData.addCredit ("Ruivaldo Neto");
  118. aboutData.addCredit ("Ralf Nolden");
  119. aboutData.addCredit ("Steven Pasternak");
  120. aboutData.addCredit ("Cédric Pasteur");
  121. aboutData.addCredit ("Erik K. Pedersen");
  122. aboutData.addCredit ("Dennis Pennekamp");
  123. aboutData.addCredit ("Jos Poortvliet");
  124. aboutData.addCredit ("Boudewijn Rempt");
  125. aboutData.addCredit ("Marcos Rodriguez");
  126. aboutData.addCredit ("Matt Rogers");
  127. aboutData.addCredit ("Francisco Jose Canizares Santofimia");
  128. aboutData.addCredit ("Bram Schoenmakers");
  129. aboutData.addCredit ("Dirk Schönberger");
  130. aboutData.addCredit ("Lutz Schweizer");
  131. aboutData.addCredit ("Emmeran Seehuber");
  132. aboutData.addCredit ("Peter Simonsson");
  133. aboutData.addCredit ("Andrew Simpson");
  134. aboutData.addCredit ("A T Somers");
  135. aboutData.addCredit ("Igor Stepin");
  136. aboutData.addCredit ("Stephen Sweeney");
  137. aboutData.addCredit ("Bart Symons");
  138. aboutData.addCredit ("Stefan Taferner");
  139. aboutData.addCredit ("Hogne Titlestad");
  140. aboutData.addCredit ("Brandon Mark Turner");
  141. aboutData.addCredit ("Jonathan Turner");
  142. aboutData.addCredit ("Stephan Unknown");
  143. aboutData.addCredit ("Dries Verachtert");
  144. aboutData.addCredit ("Simon Vermeersch");
  145. aboutData.addCredit ("Lauri Watts");
  146. aboutData.addCredit ("Mark Wege");
  147. aboutData.addCredit ("Christoph Wiesen");
  148. aboutData.addCredit ("Andre Wobbeking");
  149. aboutData.addCredit ("Luke-Jr");
  150. aboutData.addCredit ("Maxim_86ualb2");
  151. aboutData.addCredit ("Michele");
  152. TDECmdLineArgs::init (argc, argv, &aboutData);
  153. TDECmdLineArgs::addCmdLineOptions (cmdLineOptions);
  154. TDEApplication app;
  155. // mainly for changing wallpaper :)
  156. DCOPClient *client = app.dcopClient ();
  157. if (!client->attach ())
  158. kdError () << "Could not contact DCOP server" << endl;
  159. // mainly for the Spraycan Tool
  160. srand ((unsigned int) (getpid () + getppid ()));
  161. // access more formats
  162. KImageIO::registerFormats ();
  163. // TQt says this is necessary but I don't think it is...
  164. TQObject::connect (&app, TQT_SIGNAL (lastWindowClosed ()),
  165. &app, TQT_SLOT (quit ()));
  166. if (app.isRestored ())
  167. {
  168. // Creates a kpMainWindow using the default constructor and then
  169. // calls kpMainWindow::readProperties().
  170. RESTORE (kpMainWindow)
  171. }
  172. else
  173. {
  174. kpMainWindow *mainWindow;
  175. TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs ();
  176. if (args->count () >= 1)
  177. {
  178. for (int i = 0; i < args->count (); i++)
  179. {
  180. mainWindow = new kpMainWindow (args->url (i));
  181. mainWindow->show ();
  182. }
  183. }
  184. else
  185. {
  186. mainWindow = new kpMainWindow ();
  187. mainWindow->show ();
  188. }
  189. args->clear ();
  190. }
  191. return app.exec ();
  192. }