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