AbaKus – a complex calculator
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.

75 lines
2.6KB

  1. /*
  2. * abakus.cpp - part of abakus
  3. * Copyright (C) 2004, 2005 Michael Pyne <michael.pyne@kdemail.net>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. */
  19. #include <kaboutdata.h>
  20. #include <kapplication.h>
  21. #include <kcmdlineargs.h>
  22. #include <kdebug.h>
  23. #include <config.h>
  24. #if HAVE_MPFR
  25. #include <mpfr.h>
  26. #endif
  27. #include "mainwindow.h"
  28. const char *const version = "0.91";
  29. int main(int argc, char **argv)
  30. {
  31. TDEAboutData *about = new TDEAboutData("abakus", I18N_NOOP("abakus"), version,
  32. I18N_NOOP("A simple keyboard-driven calculator"), TDEAboutData::License_GPL,
  33. "(c) 2004, 2005 Michael Pyne", 0 /* text */, "http://grammarian.homelinux.net/abakus/",
  34. "michael.pyne@kdemail.net");
  35. about->addAuthor("Michael Pyne",
  36. I18N_NOOP("Developer"),
  37. "michael.pyne@kdemail.net",
  38. "http://grammarian.homelinux.net/");
  39. about->addCredit("Ariya Hidayat",
  40. I18N_NOOP("High precision math routines, and inspiration for the new design came from his C++ implementation (SpeedCrunch)"),
  41. "ariya@kde.org",
  42. "http://speedcrunch.berlios.de/");
  43. about->addCredit("Roberto Alsina",
  44. I18N_NOOP("Came up with the initial idea, along with a Python implementation."),
  45. "ralsina@netline.com.ar",
  46. "http://dot.kde.org/1096309744/");
  47. about->addCredit("Zack Rusin",
  48. I18N_NOOP("Inspiration/code for the initial design came from his Ruby implementation."),
  49. "zack@kde.org");
  50. #if HAVE_MPFR
  51. mpfr_set_default_prec(6 * 78); // 78 digits, figure about 6 bits needed.
  52. kdDebug() << "Using the MPFR high-precision library.\n";
  53. #else
  54. kdDebug() << "Using the internal high-precision library.\n";
  55. #endif
  56. TDECmdLineArgs::init(argc, argv, about);
  57. TDEApplication app;
  58. MainWindow *win = new MainWindow;
  59. app.setMainWidget(win);
  60. app.connect(&app, TQT_SIGNAL(lastWindowClosed()), TQT_SLOT(quit()));
  61. win->show();
  62. win->resize(500, 300);
  63. return app.exec();
  64. }