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
Kalzium
Commits
57713f8a
Commit
57713f8a
authored
Oct 30, 2014
by
Burkhard Lück
Browse files
Options
Browse Files
Download
Plain Diff
merge KDE/4.14 into master
parents
190c7c76
c855c344
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/calculator/titrationCalculator.cpp
src/calculator/titrationCalculator.cpp
+7
-7
No files found.
src/calculator/titrationCalculator.cpp
View file @
57713f8a
...
...
@@ -112,10 +112,10 @@ void titrationCalculator::plot()
QString
mreporto
;
int
iter
=
0
;
if
(
uid
.
xaxis
->
text
()
==
""
or
uid
.
xaxis
->
text
()
==
" "
)
{
uid
.
xaxis
->
setText
(
"nothing"
);
uid
.
xaxis
->
setText
(
i18n
(
"nothing"
)
)
;
}
if
(
tmpy
==
0
)
{
QMessageBox
::
critical
(
this
,
"Error"
,
"Unable to find an equation for Y-axis variable."
);
QMessageBox
::
critical
(
this
,
i18n
(
"Error"
),
i18n
(
"Unable to find an equation for Y-axis variable."
)
)
;
}
else
{
//now we have to solve the system of equations NOTE:yvalue contains the equation of Y-axis variable
//we iterates the process until you have an equation in one only unknown variable or a numeric expression
...
...
@@ -565,7 +565,7 @@ void titrationCalculator::on_actionSave_triggered()
}
tempyval
=
tempyval
+
QString
(
"
\n
note|
\n
"
)
+
uid
.
note
->
toPlainText
()
+
QChar
(
'|'
);
QString
file
=
QFileDialog
::
getSaveFileName
(
this
,
"Save work"
,
""
,
"Icee File (*.icee)"
);
QString
file
=
QFileDialog
::
getSaveFileName
(
this
,
i18n
(
"Save work"
)
,
""
,
i18n
(
"Icee File (*.icee)"
)
)
;
if
(
!
file
.
isEmpty
())
{
QByteArray
ba
=
tempyval
.
toLatin1
();
char
*
strsave
=
ba
.
data
();
...
...
@@ -577,7 +577,7 @@ void titrationCalculator::on_actionSave_triggered()
cout
<<
filec
;
cout
<<
"|"
;
if
(
!
out
)
{
QMessageBox
::
critical
(
this
,
"Error"
,
"Unable to create
"
+
file
);
QMessageBox
::
critical
(
this
,
i18n
(
"Error"
),
i18n
(
"Unable to create
%1"
,
file
)
)
;
}
out
<<
strsave
;
out
.
close
();
...
...
@@ -588,13 +588,13 @@ void titrationCalculator::on_actionSave_triggered()
void
titrationCalculator
::
on_actionOpen_triggered
()
{
//loads all the cells text from a file prevoiusly saved
QString
file
=
QFileDialog
::
getOpenFileName
(
this
,
"Open work"
,
""
,
"Icee File (*.icee)"
);
QString
file
=
QFileDialog
::
getOpenFileName
(
this
,
i18n
(
"Open work"
)
,
""
,
i18n
(
"Icee File (*.icee)"
)
)
;
if
(
!
file
.
isEmpty
())
{
QByteArray
bac
=
file
.
toLatin1
();
char
*
filec
=
bac
.
data
();
ifstream
texto
(
filec
);
if
(
!
texto
)
{
QMessageBox
::
critical
(
this
,
"Error"
,
"Unable to open
"
+
file
);
QMessageBox
::
critical
(
this
,
i18n
(
"Error"
),
i18n
(
"Unable to open
%1"
,
file
)
)
;
}
if
(
texto
)
{
on_actionNew_triggered
();
...
...
@@ -714,7 +714,7 @@ void titrationCalculator::on_actionSave_image_triggered()
cout
<<
filec
;
cout
<<
"|"
;
if
(
!
out
)
{
QMessageBox
::
critical
(
this
,
"Error"
,
"Unable to create
"
+
file
);
QMessageBox
::
critical
(
this
,
i18n
(
"Error"
),
i18n
(
"Unable to create
%1"
,
file
)
)
;
}
out
<<
strsave
;
out
.
close
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment