Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
KmPlot
Commits
c32418fb
Commit
c32418fb
authored
Apr 09, 2004
by
Anne-Marie Mahfouf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more de -> en and doxy comments fixes
svn path=/trunk/kdeedu/kmplot/; revision=302279
parent
f3012923
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
181 additions
and
87 deletions
+181
-87
kmplot/View.cpp
kmplot/View.cpp
+60
-19
kmplot/View.h
kmplot/View.h
+25
-0
kmplot/diagr.cpp
kmplot/diagr.cpp
+17
-12
kmplot/diagr.h
kmplot/diagr.h
+4
-4
kmplot/keditfunction.cpp
kmplot/keditfunction.cpp
+1
-16
kmplot/keditfunction.h
kmplot/keditfunction.h
+16
-2
kmplot/keditparametric.cpp
kmplot/keditparametric.cpp
+1
-22
kmplot/keditparametric.h
kmplot/keditparametric.h
+23
-2
kmplot/keditpolar.cpp
kmplot/keditpolar.cpp
+1
-1
kmplot/keditpolar.h
kmplot/keditpolar.h
+2
-2
kmplot/kmplotio.cpp
kmplot/kmplotio.cpp
+1
-1
kmplot/misc.cpp
kmplot/misc.cpp
+25
-1
kmplot/misc.h
kmplot/misc.h
+3
-3
kmplot/xparser.cpp
kmplot/xparser.cpp
+1
-1
kmplot/xparser.h
kmplot/xparser.h
+1
-1
No files found.
kmplot/View.cpp
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter Möller
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
* KmPlot is part of the KDE-EDU Project.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include "View.h"
#include "View.moc"
...
...
@@ -54,7 +79,7 @@ void View::draw(QPaintDevice *dev, int form)
lx
=
(
int
)((
xmax
-
xmin
)
*
100.
*
drskalx
/
tlgx
);
ly
=
(
int
)((
ymax
-
ymin
)
*
100.
*
drskaly
/
tlgy
);
dgr
.
Create
(
ref
,
lx
,
ly
,
xmin
,
xmax
,
ymin
,
ymax
,
mode
);
DC
.
translate
(
-
dgr
.
Get
Rah
me
n
().
left
(),
-
dgr
.
Get
Rah
me
n
().
top
());
DC
.
translate
(
-
dgr
.
Get
Fra
me
().
left
(),
-
dgr
.
Get
Fra
me
().
top
());
s
=
1.
;
}
else
if
(
form
==
3
)
// bmp, png
...
...
@@ -64,10 +89,10 @@ void View::draw(QPaintDevice *dev, int form)
ly
=
(
int
)((
ymax
-
ymin
)
*
100.
*
drskaly
/
tlgy
);
dgr
.
Create
(
ref
,
lx
,
ly
,
xmin
,
xmax
,
ymin
,
ymax
,
mode
);
DC
.
end
();
((
QPixmap
*
)
dev
)
->
resize
((
int
)(
dgr
.
Get
Rah
me
n
().
width
()
*
sf
),
(
int
)(
dgr
.
Get
Rah
me
n
().
height
()
*
sf
));
((
QPixmap
*
)
dev
)
->
resize
((
int
)(
dgr
.
Get
Fra
me
().
width
()
*
sf
),
(
int
)(
dgr
.
Get
Fra
me
().
height
()
*
sf
));
((
QPixmap
*
)
dev
)
->
fill
();
DC
.
begin
(
dev
);
DC
.
translate
(
-
dgr
.
Get
Rah
me
n
().
left
()
*
sf
,
-
dgr
.
Get
Rah
me
n
().
top
()
*
sf
);
DC
.
translate
(
-
dgr
.
Get
Fra
me
().
left
()
*
sf
,
-
dgr
.
Get
Fra
me
().
top
()
*
sf
);
DC
.
scale
(
sf
,
sf
);
s
=
1.
;
}
...
...
@@ -89,7 +114,8 @@ void View::draw(QPaintDevice *dev, int form)
sw
=
rsw
*
(
xmax
-
xmin
)
/
area
.
width
();
for
(
ix
=
0
;
ix
<
ps
.
ufanz
;
++
ix
)
{
if
(
ps
.
chkfix
(
ix
)
==-
1
)
continue
;
{
if
(
ps
.
chkfix
(
ix
)
==-
1
)
continue
;
plotfkt
(
ix
,
&
DC
);
}
...
...
@@ -100,7 +126,8 @@ void View::draw(QPaintDevice *dev, int form)
void
View
::
plotfkt
(
int
ix
,
QPainter
*
pDC
)
{
char
fktmode
,
p_mode
;
{
char
fktmode
,
p_mode
;
int
iy
,
k
,
ke
,
mflg
;
double
dx
,
x
,
y
,
dmin
,
dmax
;
QString
fname
,
fstr
;
...
...
@@ -115,12 +142,14 @@ void View::plotfkt(int ix, QPainter *pDC)
fktmode
=
ps
.
fktext
[
ix
].
extstr
[
0
].
latin1
();
if
(
fktmode
!=
'y'
)
{
dmin
=
ps
.
fktext
[
ix
].
dmin
;
{
dmin
=
ps
.
fktext
[
ix
].
dmin
;
dmax
=
ps
.
fktext
[
ix
].
dmax
;
}
if
(
dmin
==
dmax
)
{
if
(
fktmode
==
'r'
)
{
if
(
fktmode
==
'r'
)
{
dmin
=
0.
;
dmax
=
2
*
M_PI
;
}
...
...
@@ -132,7 +161,8 @@ void View::plotfkt(int ix, QPainter *pDC)
if
(
fktmode
==
'r'
)
dx
=
rsw
*
0.05
/
(
dmax
-
dmin
);
else
if
(
fktmode
==
'x'
)
{
ps
.
getfkt
(
ix
,
fname
,
fstr
);
{
ps
.
getfkt
(
ix
,
fname
,
fstr
);
fname
[
0
]
=
'y'
;
iy
=
ps
.
getfix
(
fname
);
if
(
iy
==-
1
)
return
;
...
...
@@ -142,13 +172,16 @@ void View::plotfkt(int ix, QPainter *pDC)
p_mode
=
0
;
pDC
->
setPen
(
pen
);
while
(
1
)
{
k
=
0
;
{
k
=
0
;
ke
=
ps
.
fktext
[
ix
].
k_anz
;
do
{
ps
.
setparameter
(
ix
,
ps
.
fktext
[
ix
].
k_liste
[
k
]);
{
ps
.
setparameter
(
ix
,
ps
.
fktext
[
ix
].
k_liste
[
k
]);
mflg
=
2
;
for
(
x
=
dmin
;
x
<
dmax
;
x
+=
dx
)
{
errno
=
0
;
{
errno
=
0
;
switch
(
p_mode
)
{
case
0
:
y
=
ps
.
fkt
(
ix
,
x
);
...
...
@@ -162,30 +195,37 @@ void View::plotfkt(int ix, QPainter *pDC)
if
(
errno
!=
0
)
continue
;
if
(
fktmode
==
'r'
)
{
p2
.
setX
(
dgr
.
Transx
(
y
*
cos
(
x
)));
{
p2
.
setX
(
dgr
.
Transx
(
y
*
cos
(
x
)));
p2
.
setY
(
dgr
.
Transy
(
y
*
sin
(
x
)));
}
else
if
(
fktmode
==
'x'
)
{
p2
.
setX
(
dgr
.
Transx
(
y
));
{
p2
.
setX
(
dgr
.
Transx
(
y
));
p2
.
setY
(
dgr
.
Transy
(
ps
.
fkt
(
iy
,
x
)));
}
else
{
p2
.
setX
(
dgr
.
Transx
(
x
));
{
p2
.
setX
(
dgr
.
Transx
(
x
));
p2
.
setY
(
dgr
.
Transy
(
y
));
}
if
(
dgr
.
xclipflg
||
dgr
.
yclipflg
)
{
if
(
mflg
>=
1
)
p1
=
p2
;
{
if
(
mflg
>=
1
)
p1
=
p2
;
else
{
pDC
->
drawLine
(
p1
,
p2
);
p1
=
p2
;
{
pDC
->
drawLine
(
p1
,
p2
);
p1
=
p2
;
mflg
=
1
;
}
}
else
{
if
(
mflg
>
1
)
p1
=
p2
;
{
if
(
mflg
>
1
)
p1
=
p2
;
else
{
pDC
->
drawLine
(
p1
,
p2
);
p1
=
p2
;
{
pDC
->
drawLine
(
p1
,
p2
);
p1
=
p2
;
}
mflg
=
0
;
}
...
...
@@ -250,7 +290,8 @@ void View::tabelle(QPainter *pDC)
pDC
->
drawText
(
0
,
300
,
i18n
(
"Functions:"
));
pDC
->
Lineh
(
0
,
320
,
700
);
for
(
ix
=
0
,
ypos
=
380
;
ix
<
ps
.
ufanz
;
++
ix
)
{
if
(
ps
.
chkfix
(
ix
)
==-
1
)
continue
;
{
if
(
ps
.
chkfix
(
ix
)
==-
1
)
continue
;
pDC
->
drawText
(
100
,
ypos
,
ps
.
fktext
[
ix
].
extstr
);
ypos
+=
60
;
...
...
kmplot/View.h
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter Möller
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
* KmPlot is part of the KDE-EDU Project.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef View_included
#define View_included
...
...
kmplot/diagr.cpp
View file @
c32418fb
...
...
@@ -39,7 +39,8 @@ int isinf(double x) { return !finite(x) && x==x; }
CDiagr
::
CDiagr
()
{
RahmenFarbe
=
qRgb
(
0
,
0
,
0
);
{
RahmenFarbe
=
qRgb
(
0
,
0
,
0
);
axesColor
=
qRgb
(
0
,
0
,
0
);
gridColor
=
qRgb
(
192
,
192
,
192
);
borderThickness
=
2
;
...
...
@@ -61,7 +62,7 @@ void CDiagr::Create(QPoint Ref, // Bezugspunkt links unten
int
lx
,
int
ly
,
// Achsenl�gen
double
xmin
,
double
xmax
,
// x-Wertebereich
double
ymin
,
double
ymax
,
// y-Wertebereich
char
mode
)
// Modus (Achsen,
Pfeile, Rahmen
)
char
mode
)
// Modus (Achsen,
ARROWS, FRAME
)
{
int
x
,
y
,
h
,
w
;
CDiagr
::
xmin
=
xmin
;
// globale Variablen setzen
...
...
@@ -78,7 +79,7 @@ void CDiagr::Create(QPoint Ref, // Bezugspunkt links unten
ox
=
Ref
.
x
()
-
skx
*
xmin
+
0.5
;
// Ursprungskoordinaten berechnen
oy
=
Ref
.
y
()
+
sky
*
ymax
+
0.5
;
PlotArea
.
setRect
(
x
=
Ref
.
x
(),
y
=
Ref
.
y
(),
w
=
lx
,
h
=
ly
);
if
(
mode
&
EXTRA
H
ME
N
)
if
(
mode
&
EXT
F
RAME
)
{
x
-=
20
;
y
-=
20
;
w
+=
40
;
...
...
@@ -99,7 +100,8 @@ void CDiagr::Create(QPoint Ref, // Bezugspunkt links unten
void
CDiagr
::
Skal
(
double
ex
,
double
ey
,
char
g_mode
)
{
CDiagr
::
ex
=
ex
;
{
CDiagr
::
ex
=
ex
;
CDiagr
::
ey
=
ey
;
CDiagr
::
g_mode
=
g_mode
;
tsx
=
ceil
(
xmin
/
ex
)
*
ex
;
...
...
@@ -108,13 +110,16 @@ void CDiagr::Skal(double ex, double ey, char g_mode)
void
CDiagr
::
Plot
(
QPainter
*
pDC
)
{
QPen
pen
(
RahmenFarbe
,
borderThickness
);
{
QPen
pen
(
RahmenFarbe
,
borderThickness
);
if
(
g_mode
)
Raster
(
pDC
);
// Raster zeichnen
Achsen
(
pDC
);
// Achsen zeichnen
if
(
mode
&
LABEL
)
Beschriftung
(
pDC
);
// Achsen beschriften
if
(
mode
&
(
RAHMEN
|
EXTRAHMEN
))
// Rahmen zeichnen
{
pDC
->
setPen
(
pen
);
if
(
mode
&
LABEL
)
Beschriftung
(
pDC
);
// Achsen beschriften
if
(
mode
&
(
FRAME
|
EXTFRAME
))
// FRAME zeichnen
{
pDC
->
setPen
(
pen
);
pDC
->
drawRect
(
Rahmen
);
}
}
...
...
@@ -179,7 +184,7 @@ void CDiagr::Achsen(QPainter* pDC) // Achsen zeichnen
pDC
->
setPen
(
QPen
(
axesColor
,
axesThickness
));
pDC
->
Lineh
(
PlotArea
.
left
(),
b
=
Transy
(
0.
),
a
=
PlotArea
.
right
());
// x-Achse
if
(
mode
&
PFEILE
&&
!
(
mode
&
RA
H
ME
N
)
&&
xmax
>
0.
)
//
Pfeile
if
(
mode
&
ARROWS
&&
!
(
mode
&
F
RAME
)
&&
xmax
>
0.
)
//
ARROWS
{
dx
=
40
;
dy
=
15
;
pDC
->
Line
(
a
,
b
,
a
-
dx
,
b
+
dy
);
...
...
@@ -187,7 +192,7 @@ void CDiagr::Achsen(QPainter* pDC) // Achsen zeichnen
}
pDC
->
Linev
(
a
=
Transx
(
0.
),
PlotArea
.
bottom
(),
b
=
PlotArea
.
top
());
// y-Achse
if
(
mode
&
PFEILE
&&
!
(
mode
&
RA
H
ME
N
)
&&
ymax
>
0.
)
//
Pfeile
if
(
mode
&
ARROWS
&&
!
(
mode
&
F
RAME
)
&&
ymax
>
0.
)
//
ARROWS
{
dx
=
15
;
dy
=
40
;
pDC
->
Line
(
a
,
b
,
a
-
dx
,
b
+
dy
);
...
...
@@ -199,7 +204,7 @@ void CDiagr::Achsen(QPainter* pDC) // Achsen zeichnen
if
(
mode
&
AXES
)
{
da
=
oy
-
gradLength
;
db
=
oy
+
gradLength
;
tl
=
(
mode
&
RA
H
ME
N
)
?
0
:
gradLength
;
tl
=
(
mode
&
F
RAME
)
?
0
:
gradLength
;
d
=
tsx
;
if
(
da
<
(
double
)
PlotArea
.
top
())
{
a
=
PlotArea
.
top
()
-
tl
;
...
...
@@ -240,7 +245,7 @@ void CDiagr::Achsen(QPainter* pDC) // Achsen zeichnen
d
+=
ey
;
}
}
else
if
(
mode
&
RA
H
ME
N
)
else
if
(
mode
&
F
RAME
)
{
a
=
PlotArea
.
bottom
()
+
gradLength
;
b
=
PlotArea
.
top
()
-
gradLength
;
d
=
tsx
;
...
...
kmplot/diagr.h
View file @
c32418fb
...
...
@@ -40,9 +40,9 @@
#define Linev(x, y1, y2) drawLine(x, y1, x, y2)
#define AXES 1
/**< visible axes */
#define
PFEILE
2
/**< axes with arrows */
#define RA
H
ME
N
4
/**< visible frame */
#define EXTRA
H
ME
N
8
/**< bigger frame */
#define
ARROWS
2
/**< axes with arrows */
#define
F
RAME 4
/**< visible frame */
#define EXT
F
RAME 8
/**< bigger frame */
#define LABEL 16
/**< visible labels */
#define LINIENRASTER 1
/**< line grid */
...
...
@@ -66,7 +66,7 @@ public:
void
Skal
(
double
ex
,
double
ey
,
char
g_mode
);
void
Plot
(
QPainter
*
pDC
);
QRect
GetPlotArea
()
{
return
PlotArea
;}
QRect
Get
Rah
me
n
()
{
return
Rahmen
;}
QRect
Get
Fra
me
()
{
return
Rahmen
;}
int
Transx
(
double
),
Transy
(
double
);
...
...
kmplot/keditfunction.cpp
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
�
ler
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
@@ -45,9 +45,6 @@ KEditFunction::KEditFunction( XParser* parser, QWidget* parent, const char* name
m_parser
=
parser
;
}
/**
* Fill the dialog's widgets with the properties of the parser function number index.
*/
void
KEditFunction
::
initDialog
(
int
index
)
{
m_index
=
index
;
...
...
@@ -55,9 +52,6 @@ void KEditFunction::initDialog( int index )
else
setWidgets
();
}
/**
* Clear alls widgets values
*/
void
KEditFunction
::
clearWidgets
()
{
kLineEditYFunction
->
clear
();
...
...
@@ -73,9 +67,6 @@ void KEditFunction::clearWidgets()
kColorButtonColor
->
setColor
(
m_parser
->
fktext
[
m_parser
->
getNextIndex
()
].
color
);
}
/**
* Fill the dialog's widgets with values from the parser
*/
void
KEditFunction
::
setWidgets
()
{
kLineEditYFunction
->
setText
(
m_parser
->
fktext
[
m_index
].
extstr
);
...
...
@@ -96,9 +87,6 @@ void KEditFunction::setWidgets()
kColorButtonColor
->
setColor
(
m_parser
->
fktext
[
m_index
].
color
);
}
/**
* Overwrites the dialog's accept() method to make sure, that the user's input is valid.
*/
void
KEditFunction
::
accept
()
{
// if we are editing an existing function, first delete the old one
...
...
@@ -155,9 +143,6 @@ void KEditFunction::accept()
QEditFunction
::
accept
();
}
/**
* return the well formed function equation for the listbox in FktDlg
*/
const
QString
KEditFunction
::
functionItem
()
{
return
kLineEditYFunction
->
text
();
...
...
kmplot/keditfunction.h
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
�
ler
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
@@ -36,17 +36,31 @@ class KEditFunction : public QEditFunction
public:
KEditFunction
(
XParser
*
parser
,
QWidget
*
parent
=
NULL
,
const
char
*
name
=
NULL
);
virtual
~
KEditFunction
()
{};
/**
* Fill the dialog's widgets with the properties of the parser function number index.
*/
void
initDialog
(
int
index
=
-
1
);
/**
* return the well formed function equation for the listbox in FktDlg
*/
const
QString
functionItem
();
private:
/**
* Clear alls widgets values
*/
void
clearWidgets
();
/**
* Fill the dialog's widgets with values from the parser
*/
void
setWidgets
();
XParser
*
m_parser
;
int
m_index
;
protected
slots
:
/**
* Overwrites the dialog's accept() method to make sure, that the user's input is valid.
*/
virtual
void
accept
();
void
slotHelp
();
};
...
...
kmplot/keditparametric.cpp
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
�
ler
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
@@ -46,9 +46,6 @@ KEditParametric::KEditParametric( XParser* parser, QWidget* parent, const char*
m_parser
=
parser
;
}
/**
* Fill the dialog's widgets with the properties of the parser function number index.
*/
void
KEditParametric
::
initDialog
(
int
x_index
,
int
y_index
)
{
m_x_index
=
x_index
;
...
...
@@ -57,9 +54,6 @@ void KEditParametric::initDialog( int x_index, int y_index )
else
setWidgets
();
}
/**
* Clear alls widgets values
*/
void
KEditParametric
::
clearWidgets
()
{
kLineEditName
->
clear
();
...
...
@@ -73,9 +67,6 @@ void KEditParametric::clearWidgets()
kColorButtonColor
->
setColor
(
m_parser
->
fktext
[
m_parser
->
getNextIndex
()
].
color
);
}
/**
* Fill the dialog's widgets with values from the parser
*/
void
KEditParametric
::
setWidgets
()
{
QString
name
,
expression
;
...
...
@@ -92,9 +83,6 @@ void KEditParametric::setWidgets()
kColorButtonColor
->
setColor
(
m_parser
->
fktext
[
m_x_index
].
color
);
}
/**
* Overwrites the dialog's accept() method to make sure, that the user's input is valid.
*/
void
KEditParametric
::
accept
()
{
// if we are editing an existing function, first delete the old one
...
...
@@ -173,17 +161,11 @@ QString KEditParametric::newName()
return
name
.
arg
(
i
);
}
/**
* return the well formed function equation
*/
QString
KEditParametric
::
xFunction
()
{
return
"x"
+
kLineEditName
->
text
()
+
"(t)="
+
kLineEditXFunction
->
text
();
}
/**
* extract function name and expression from a given expression
*/
void
KEditParametric
::
splitEquation
(
const
QString
equation
,
QString
&
name
,
QString
&
expression
)
{
int
start
=
0
;
...
...
@@ -194,9 +176,6 @@ void KEditParametric::splitEquation( const QString equation, QString &name, QStr
expression
=
equation
.
section
(
'='
,
1
,
1
);
}
/**
* return the well formed function equation
*/
QString
KEditParametric
::
yFunction
()
{
return
"y"
+
kLineEditName
->
text
()
+
"(t)="
+
kLineEditYFunction
->
text
();
...
...
kmplot/keditparametric.h
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
ö
ller
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
@@ -37,20 +37,41 @@ class KEditParametric : public QEditParametric
KEditParametric
(
XParser
*
parser
,
QWidget
*
parent
=
NULL
,
const
char
*
name
=
NULL
);
virtual
~
KEditParametric
()
{};
/**
* Fill the dialog's widgets with the properties of the parser function number index.
*/
void
initDialog
(
int
index
=
-
1
,
int
y_index
=
-
1
);
const
QString
functionItem
();
private:
/**
* Clear alls widgets values
*/
void
clearWidgets
();
/**
* Fill the dialog's widgets with values from the parser
*/
void
setWidgets
();
/**
* return the well formed function equation
*/
QString
xFunction
();
/**
* return the well formed function equation
*/
QString
yFunction
();
QString
newName
();
QString
newName
();
/**
* extract function name and expression from a given expression
*/
void
splitEquation
(
const
QString
equation
,
QString
&
name
,
QString
&
expression
);
XParser
*
m_parser
;
int
m_x_index
,
m_y_index
;
protected
slots
:
/**
* Overwrites the dialog's accept() method to make sure, that the user's input is valid.
*/
virtual
void
accept
();
void
slotHelp
();
};
...
...
kmplot/keditpolar.cpp
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
�
ler
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
kmplot/keditpolar.h
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
�
ler
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
@@ -38,7 +38,7 @@ class KEditPolar : public QEditPolar
virtual
~
KEditPolar
()
{};
/**
* Fill the dialog
's
widgets with the properties of the parser function number index.
* Fill the dialog widgets with the properties of the parser function number index.
*/
void
initDialog
(
int
index
=
-
1
);
// void setFunction( int index );
...
...
kmplot/kmplotio.cpp
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
�
ler
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
kmplot/misc.cpp
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter Möller
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
* KmPlot is part of the KDE-EDU Project.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
// KDE includes
#include <kmessagebox.h>
#include <kurl.h>
...
...
@@ -52,7 +76,7 @@ bool printtable; // header table printing option
void
getSettings
()
{
mode
=
AXES
|
PFEILE
|
EXTRA
H
ME
N
;
mode
=
AXES
|
ARROWS
|
EXT
F
RAME
;
rsw
=
1.
;
// axes settings
...
...
kmplot/misc.h
View file @
c32418fb
/*
* KmPlot - a math. function plotter for the KDE-Desktop
*
* Copyright (C) 1998, 1999 Klaus-Dieter M
�
ler
* Copyright (C) 1998, 1999 Klaus-Dieter M
öl
ler
* 2000, 2002 kd.moeller@t-online.de
*
* This file is part of the KDE Project.
...
...
@@ -106,7 +106,7 @@ extern QString xminstr,
//@}
extern
double
sw
,
/**< Precision for the functions. */
rsw
,
/**< Pr
i
cision for the grid. */
rsw
,
/**< Pr
e
cision for the grid. */
/** @name Axes Division
*
...
...
@@ -128,7 +128,7 @@ extern double sw, /**< Precision for the functions. */
//@}
/** Current filename */
extern
QString
date
i
,
extern
QString
//
dat
aFil
e,
/**
* Axes tic step - string representation.