diff -Nru cantor-4.7.3/cmake/FindQalculate.cmake cantor-4.7.90/cmake/FindQalculate.cmake --- cantor-4.7.3/cmake/FindQalculate.cmake 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/cmake/FindQalculate.cmake 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,52 @@ +# - Try to find libqalculate +# Input variables +# +# QALCULATE_MIN_VERSION - minimal version of libqalculate +# QALCULATE_FIND_REQUIRED - fail if can't find libqalculate +# +# Once done this will define +# +# QALCULATE_FOUND - system has libqalculate +# QALCULATE_CFLAGS - libqalculate cflags +# QALCULATE_LIBRARIES - libqalculate libraries +# +# Copyright (c) 2007, Vladimir Kuznetsov, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES) + + # in cache already + set(QALCULATE_FOUND TRUE) + +else(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES) + if(NOT WIN32) + include(UsePkgConfig) + + if(QALCULATE_MIN_VERSION) + exec_program(${PKGCONFIG_EXECUTABLE} ARGS libqalculate --atleast-version=${QALCULATE_MIN_VERSION} RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) + else(QALCULATE_MIN_VERSION) + exec_program(${PKGCONFIG_EXECUTABLE} ARGS libqalculate --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull) + endif(QALCULATE_MIN_VERSION) + + if(_return_VALUE STREQUAL "0") + exec_program(${PKGCONFIG_EXECUTABLE} ARGS libqalculate --libs OUTPUT_VARIABLE QALCULATE_LIBRARIES) + exec_program(${PKGCONFIG_EXECUTABLE} ARGS cln --libs OUTPUT_VARIABLE CLN_LIBRARIES) + exec_program(${PKGCONFIG_EXECUTABLE} ARGS libqalculate --cflags OUTPUT_VARIABLE QALCULATE_CFLAGS) + set(QALCULATE_FOUND TRUE) + endif(_return_VALUE STREQUAL "0") + + else(NOT WIN32) + # XXX: currently no libqalculate on windows + set(QALCULATE_FOUND FALSE) + + endif(NOT WIN32) + + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qalculate DEFAULT_MSG QALCULATE_LIBRARIES ) + + mark_as_advanced(QALCULATE_CFLAGS QALCULATE_LIBRARIES) + +endif(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES) + diff -Nru cantor-4.7.3/CMakeLists.txt cantor-4.7.90/CMakeLists.txt --- cantor-4.7.3/CMakeLists.txt 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/CMakeLists.txt 2011-11-04 14:33:51.000000000 +0000 @@ -6,7 +6,7 @@ set(CMAKE_MODULE_PATH ${cantor_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) macro_optional_find_package(Analitza) -macro_log_feature(ANALITZA_FOUND "libanalitza" "A library provided by KAlgebra" FALSE "" "Backend to use KAlgebra with Cantor.") +macro_log_feature(Analitza_FOUND "libanalitza" "A library provided by KAlgebra" FALSE "" "Backend to use KAlgebra with Cantor.") macro_optional_find_package(R) macro_log_feature(R_FOUND "R" "A free software environment for statistical computing and graphics" "http://www.r-project.org/" FALSE "" "Backend to use R with Cantor.") @@ -25,6 +25,8 @@ endif(NOT WIN32) include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} ) +add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) + add_subdirectory( doc ) add_subdirectory( src ) diff -Nru cantor-4.7.3/debian/cantor-backend-qalculate.install cantor-4.7.90/debian/cantor-backend-qalculate.install --- cantor-4.7.3/debian/cantor-backend-qalculate.install 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/debian/cantor-backend-qalculate.install 2011-12-15 15:20:23.000000000 +0000 @@ -0,0 +1,5 @@ +usr/share/icons/hicolor/48x48/apps/qalculatebackend.png +usr/share/kde4/services/cantor/qalculatebackend.desktop +usr/share/kde4/services/cantor/qalculateplotassistant.desktop +usr/share/kde4/config.kcfg/qalculatebackend.kcfg +usr/share/kde4/apps/cantor/cantor_qalculateplotassistant.rc diff -Nru cantor-4.7.3/debian/cantor-backend-scilab.install cantor-4.7.90/debian/cantor-backend-scilab.install --- cantor-4.7.3/debian/cantor-backend-scilab.install 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/debian/cantor-backend-scilab.install 2011-12-15 15:21:06.000000000 +0000 @@ -0,0 +1,4 @@ +usr/share/icons/hicolor/48x48/apps/scilabbackend.png +usr/share/kde4/services/cantor/scilabbackend.desktop +usr/share/kde4/config.kcfg/scilabbackend.kcfg +usr/share/kde4/apps/cantor/scilabbackend/keywords.xml diff -Nru cantor-4.7.3/debian/cantor.install cantor-4.7.90/debian/cantor.install --- cantor-4.7.3/debian/cantor.install 2011-11-23 23:46:41.000000000 +0000 +++ cantor-4.7.90/debian/cantor.install 2011-12-15 15:17:24.000000000 +0000 @@ -15,7 +15,7 @@ usr/lib/kde4/cantor_variablemanagerplugin.so usr/lib/kde4/libcantorpart.so usr/lib/libcantor_config.so -usr/lib/libcantorlibs.so.0.0.2 +usr/lib/libcantorlibs.so.0.0.3 usr/lib/libcantorlibs.so.1 usr/share/applications/kde4/cantor.desktop usr/share/doc/kde/HTML/en/cantor/common diff -Nru cantor-4.7.3/debian/changelog cantor-4.7.90/debian/changelog --- cantor-4.7.3/debian/changelog 2011-11-24 00:16:20.000000000 +0000 +++ cantor-4.7.90/debian/changelog 2011-12-20 23:52:44.000000000 +0000 @@ -1,3 +1,10 @@ +cantor (4:4.7.90-0ubuntu1) precise; urgency=low + + * new upstream beta release + * Add build-dep on libqalculate-dev + + -- Jonathan Riddell Thu, 15 Dec 2011 14:17:54 +0000 + cantor (4:4.7.3-0ubuntu1) precise; urgency=low [ Jonathan Riddell ] diff -Nru cantor-4.7.3/debian/control cantor-4.7.90/debian/control --- cantor-4.7.3/debian/control 2011-11-24 00:16:23.000000000 +0000 +++ cantor-4.7.90/debian/control 2011-12-15 15:23:23.000000000 +0000 @@ -9,10 +9,12 @@ kdelibs5-dev (>= 4:4.7), pkg-config, libspectre-dev, - kalgebra-dev, + analitza-dev, r-base-core, libblas3gf, - liblapack3gf + liblapack3gf, + libqalculate-dev, + libglib2.0-dev Standards-Version: 3.9.2 Homepage: http://edu.kde.org/ Vcs-Browser: http://git.debian.org/?p=pkg-kde/kde-sc/cantor.git @@ -24,7 +26,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: cantor-backend-kalgebra, texlive-latex-base, texlive-binaries Suggests: cantor-backend-maxima, cantor-backend-r, cantor-backend-sage, - cantor-backend-octave + cantor-backend-octave, cantor-backend-qalculate, cantor-backend-scilab Description: interface for mathematical applications Cantor is an application to allow you to you use your favorite mathematical applications from within an elegant KDE-integrated worksheet interface. It @@ -118,6 +120,35 @@ . This package is part of the KDE education module. +Package: cantor-backend-scilab +Architecture: any +Section: math +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: scilab +Description: Scilab backend for Cantor + Cantor is an application to allow you to you use your favorite mathematical + applications from within an elegant KDE-integrated worksheet interface. It + provides dialogs to assist with common tasks and allows you to share your + worksheets with others. + . + This package provides the backend for using Sci Lab in Cantor. + . + This package is part of the KDE education module. + +Package: cantor-backend-qalculate +Architecture: any +Section: math +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Qalculate backend for Cantor + Cantor is an application to allow you to you use your favorite mathematical + applications from within an elegant KDE-integrated worksheet interface. It + provides dialogs to assist with common tasks and allows you to share your + worksheets with others. + . + This package provides the backend for using Qalculate in Cantor. + . + This package is part of the KDE education module. + Package: cantor-dbg Architecture: any Section: debug Binary files /tmp/qpYNBAmSpc/cantor-4.7.3/doc/index.cache.bz2 and /tmp/rmueWRBXyT/cantor-4.7.90/doc/index.cache.bz2 differ diff -Nru cantor-4.7.3/doc/index.docbook cantor-4.7.90/doc/index.docbook --- cantor-4.7.3/doc/index.docbook 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/doc/index.docbook 2011-11-17 20:56:23.000000000 +0000 @@ -1,11 +1,11 @@ - - + ]> @@ -29,12 +29,12 @@ &FDLNotice; -2009-08-26 -0.1 +2011-11-08 +0.3 -&cantor; is an application, aimed at providing a +&cantor; is an application, aimed at providing a nice worksheet view to other Free Software Math packages. @@ -74,9 +74,6 @@ - - - Screenshot @@ -122,10 +119,10 @@ Maxima is a system for the manipulation of symbolic and numeric expressions, - including differentiation, integration, Taylor series, Laplace transforms, + including differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, sets, lists, vectors, matrices, and tensors. Maxima yields high-precision numeric results - by using exact fractions, arbitrary precision integers, and variable precision + by using exact fractions, arbitrary precision integers, and variable precision floating point numbers. Maxima can plot functions and data in two and three dimensions. See http://maxima.sourceforge.net for more information. @@ -138,8 +135,8 @@ R is a language and environment for statistical computing and graphics, similar to the S language and environment. It provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) - and graphical techniques, and is highly extensible. The S language is often the - vehicle of choice for research in statistical methodology, + and graphical techniques, and is highly extensible. The S language is often the + vehicle of choice for research in statistical methodology, and R provides an open-source route to this. See http://www.r-project.org for more information. @@ -154,6 +151,45 @@ + + Qalculate!: + + + Qalculate! is not your regular software replication of the cheapest + available calculator. Qalculate! aims to make full use of the superior + interface, power and flexibility of modern computers. The center of + attention in Qalculate! is the expression entry. Instead of entering each + number in a mathematical expression separately, you can directly write the + whole expression and later modify it. The interpretation of expressions is + flexible and fault tolerant, and if you nevertheless do something wrong, + Qalculate! will tell you so. Not fully solvable expressions are however not + errors. Qalculate! will simplify as far as it can and answer with an + expression. In addition to numbers and arithmetic operators, an expression + may contain any combination of variables, units, and functions. + See http://qalculate.sourceforge.net/ for more information. + + + + + Scilab: + + + Scilab is an free software, cross-platform numerical computational package + and a high-level, numerically oriented programming language. + + Scilab is distributed under CeCILL license (GPL compatible). + See http://www.scilab.org/ for more information. + + + + You need Scilab version 5.4 or higher to be installed in your system to make this backend usable. + + + Scilab version of the master branch of the Scilab's repository is compatible. + + + + @@ -167,9 +203,6 @@ - - - Screenshot of the &cantor; Workspace @@ -208,14 +241,11 @@ This setting changes the way results are presented to you. If enabled, it passes the result through - the LaTeX system, to produce visually appealing formulas. For example, 3*x^2*sqrt(2)*x+2/3 becomes + the LaTeX system, to produce visually appealing formulas. For example, 3*x^2*sqrt(2)*x+2/3 becomes - - - 3*x^2*sqrt(2)*x+2/3 @@ -244,7 +274,7 @@ Line Numbers - This setting controls whether the different expressions should have a number in front. This allows you + This setting controls whether the different expressions should have a number in front. This allows you to recall older results - in Maxima, for instance, this is done with the %O1 command. @@ -267,7 +297,7 @@ The main &cantor; window -The <guimenu>File</guimenu> Menu +The File Menu @@ -278,7 +308,41 @@ File New -Creates a new document +Creates a new worksheet with the default backend. + + + +File +New +Backend + +Creates a new worksheet with the chosen backend. + + + + +&Ctrl;O + +File +Open + +Opens the chosen worksheet that was saved earlier. + + + +File +Download Example Worksheets + +Opens the dialog to download examples uploaded by other &cantor; users with + GetHotNewStuff. + + + +File +Open Example + +Opens the dialog to choose an example to load. The examples should be downloaded with File +Download Example Worksheets beforehand. @@ -288,7 +352,56 @@ File Save -Saves the document +Saves the current worksheet. + + + +File +Save As... + +Allows saving the current worksheet with a new name. + + + +File +Export to LaTex + +Allows saving the current worksheet as a LaTeX document. + + + +File +Publish Worksheet + +Opens the dialog to publish your current worksheet and make it available to other &cantor; users through + GetHotNewStuff. + + + + +&Ctrl;P + +File +Print + +Opens the printing dialog for the current worksheet. + + + +File +Run Script + +Allows to load and run the batch scripts for the current backend. + + + + +&Ctrl;W + +File +Close + +Closes the current worksheet. @@ -305,8 +418,124 @@ + +The View Menu + + + + + +&Ctrl;+ + +View +Zoom In + +Zoom in the current worksheet by 10%. + + + + +&Ctrl;- + +View +Zoom Out + +Zoom out the current worksheet by 10%. + + + +View +Show Script Editor + +Opens the batch script editor window for the current backend. + + + +View +Panels +Help + +Toggles the visibility of the Help sidebar. + + + + + + +The Worksheet Menu + + + + +Worksheet +Evaluate Worksheet + +Triggers the evaluation of the whole worksheet. + + + + +&Shift;Return + +Worksheet +Evaluate Entry + +Triggers the current entry evaluation. + + + + +&Ctrl;Return + +Worksheet +Insert Command Entry + +Inserts a new command entry below the current cursor position. + + + +Worksheet +Insert Text Entry + +Inserts a new text entry below the current cursor position. + + + +Worksheet +Insert Image + +Inserts the image template below the current cursor position. You will need to click with &RMB; at the template to configure the image details. + + + +Worksheet +Insert Page Break + +Inserts the page break below the current cursor position. + + + + +&Shift;Del + +Worksheet +Remove current Entry + +Removes current entry from the worksheet. + + + + + + +The Settings Menu + +This menu contains standard &kde; Settings items, as well as the items described in Settings section. + + + -The <guimenu>Help</guimenu> Menu +The Help Menu &help.menu.documentation; @@ -381,11 +610,11 @@ &cantor; -Program copyright 2009 Alexander Rieder alexanderrieder@gmail.com +Program copyright 2009-2011 Alexander Rieder alexanderrieder@gmail.com -Documentation Copyright © 2009 Alexander Rieder alexanderrieder@gmail.com +Documentation Copyright © 2009-2011 Alexander Rieder alexanderrieder@gmail.com diff -Nru cantor-4.7.3/doc/latex_formula.eps cantor-4.7.90/doc/latex_formula.eps --- cantor-4.7.3/doc/latex_formula.eps 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/doc/latex_formula.eps 1970-01-01 00:00:00.000000000 +0000 @@ -1,1061 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.98 Copyright 2009 Radical Eye Software -%%Title: /tmp/alex-kde4/kde-alex/cantor/QBb321.dvi -%%CreationDate: Wed Aug 26 23:11:30 2009 -%%BoundingBox: 241 616 320 642 -%%DocumentFonts: CMR12 CMMI12 CMR8 CMSY10 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: /usr/bin/dvips -E -o -%+ /tmp/alex-kde4/kde-alex/cantor/QBb321.eps -%+ /tmp/alex-kde4/kde-alex/cantor/QBb321.dvi -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2009.08.26:2311 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} -B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ -p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: texps.pro 0 0 -%! -TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 -index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll -exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0 -ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{ -pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get -div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type -/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end -definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup -sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll -mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[ -exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if} -forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def -end - -%%EndProcSet -%%BeginFont: CMSY10 -%!PS-AdobeFont-1.0: CMSY10 003.002 -%%Title: CMSY10 -%Version: 003.002 -%%CreationDate: Mon Jul 13 16:17:00 2009 -%%Creator: David M. Jones -%Copyright: Copyright (c) 1997, 2009 American Mathematical Society -%Copyright: (), with Reserved Font Name CMSY10. -% This Font Software is licensed under the SIL Open Font License, Version 1.1. -% This license is in the accompanying file OFL.txt, and is also -% available with a FAQ at: http://scripts.sil.org/OFL. -%%EndComments -FontDirectory/CMSY10 known{/CMSY10 findfont dup/UniqueID known{dup -/UniqueID get 5096651 eq exch/FontType get 1 eq and}{pop false}ifelse -{save true}{false}ifelse}{false}ifelse -11 dict begin -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def -/FontName /CMSY10 def -/FontBBox {-29 -960 1116 775 }readonly def -/UniqueID 5096651 def -/PaintType 0 def -/FontInfo 9 dict dup begin -/version (003.002) readonly def -/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMSY10.) readonly def -/FullName (CMSY10) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle -14.04 def -/isFixedPitch false def -/UnderlinePosition -100 def -/UnderlineThickness 50 def -end readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 112 /radical put -readonly def -currentdict end -currentfile eexec -D9D66F633B846AB284BCF8B0411B772DE5CD06DFE1BE899059C588357426D7A0 -7B684C079A47D271426064AD18CB9750D8A986D1D67C1B2AEEF8CE785CC19C81 -DE96489F740045C5E342F02DA1C9F9F3C167651E646F1A67CF379789E311EF91 -511D0F605B045B279357D6FC8537C233E7AEE6A4FDBE73E75A39EB206D20A6F6 -1021961B748D419EBEEB028B592124E174CA595C108E12725B9875544955CFFD -028B698EF742BC8C19F979E35B8E99CADDDDC89CC6C59733F2A24BC3AF36AD86 -1319147A4A219ECB92D0D9F6228B51A97C29547000FCC8A581BE543D73F1FED4 -3D08C53693138003C01E1D216B185179E1856E2A05AA6C66AABB68B7E4409021 -91AA9D8E4C5FBBDA55F1BB6BC679EABA06BE9795DB920A6343CE934B04D75DF2 -E0C30B8FD2E475FE0D66D4AA65821864C7DD6AC9939A04094EEA832EAD33DB7A -11EE8D595FB0E543D0E80D31D584B97879B3C7B4A85CC6358A41342D70AD0B97 -C14123421FE8A7D131FB0D03900B392FDA0ABAFC25E946D2251F150EC595E857 -D17AE424DB76B431366086F377B2A0EEFD3909E3FA35E51886FC318989C1EF20 -B6F5990F1D39C22127F0A47BC8461F3AFDF87D9BDA4B6C1D1CFD7513F1E3C3D3 -93BEF764AA832316343F9FE869A720E4AA87AE76FA87A833BBC5892DE05B867F -10FA225E233BCFA9BB51F46A6DF22ADCEACC01C3CD1F54C9AEFA25E92EFAC00D -7E2BA427C25483BA42A199F4D2E43DFCE79A7156F7417ACF78E41FCA91E6C9EF -B933450D851B73A6AB6AEA7EE4C710CB5C14270D1674FA334686653793FCB31B -491E870D3C2BC654D2C1DE463EC9BA29D7371AA1078800EF93D3F66263A2EBBB -F5723697BF7448BD0D2E301544BECF497FD475B85DFEF52AF4F8F8BE445CABE6 -019318806D10C5952157FF8F8286C1EE701545C8F60EFA854EAE66835A2046A6 -915D395F1E0366EFE0C0391583FE001FF16D82A2E2DA5F57754A2C6F69306E36 -356ECF8EFC3F1188AD6FCD2427E0580C97A5B69B4E0E09B85EEDE142F5ADD2F0 -5DE51D6DB72B127412A0D57106C19CA493048A4F815129ABE767D51715B1515D -9C21067CB5BC88741B7298C83EAE36A866DFA87D8981F179B1C31292F56BBB64 -3C430779468AAF07C8A8B4934E1E775FE3F35186BD1FA6EE3689C1C750678AF1 -FBF9B23195A124C5C991FE670AC0C86FD39D2B07B9A319E74EFD498B45820252 -720ECDF7294F7B0B137CEB86D33BFCEB8606985A3260FD669E461C8BE94216C5 -D434FD8854F44EE66E5A289A9F9E32BC36AF645D53F96652602BAED418C8D726 -BD04A1B4617551FE4DEF54083D414F7DCE004E6BB2DC9C2EF7CE232B254BA2C5 -7DCBD36C2072ED46FF711F121A701E2284BF1B718B3164382B8F453D68FA0377 -DFE106503B8401D4DB87F5402A3AC9A442FA060B0610A9524D530C7157C26B56 -AC970FCC1D5655FFFFA39246E6420CF97D08ADFB7B05822679BD40C638DDF0E7 -A97BFE8918B611A145AC965C203F1428812F9D340AF499B3A915B22BE798594E -0F520109FC81E452180AE45B170FF999C5FC2761C6CECD8742A5A6FC97F16743 -AD4EFCC6572A6D3F3E4E330C5CB2FF6FEA48A5B64DD3DBE943BD9918D4A18E18 -CBCF598AEFBB6AB3CD2CBC9BFD6099272F6543F3E532E0E21E614BD2880B1023 -0AC234CB705827BF016DB84E00E8C255FDEFA0101A842929540B7B4AA8A089BD -5EFF05B72356B6BC3727817823B5CDBB1B963103000D7F2A4E2A1472FC3E614B -5CBCB6D6D784023173DEFEBFA8F9ED87EC1A0A9EE98CA59CFC964CF943DC683F -E9E00DA718C4425A705A69D99988EC6F152525C790912C2E46A2381A569424AB -54DF4798BC2D7E7A361E7991641D4B756CE2A7FF4A2848927092C59C2C4B8809 -E13AB84FB6B111E680D7FB9F2FFC2C5C66B0B501E4447C2E46C10E2F6124476F -A140C404CFE2DC9E0199BF61E035CEB481D438139A9630934E541D261FFD2906 -4CAD99E20655FA746AFB81EDBB5601F5FD6B1D6832A01D585E2C55053F6A7378 -4DAACCAC7608DBDADAAE732D66B3E7F87E79756337C1A961E53A4651BE7C77F4 -038B89C87F650C54A2A90EB7F1D525BB353F33318551EE8D84A6A83C718EA5A4 -B2AC0F7306B1E095819B87015A90CA3ED739B09061782C28CDB36BA4BD5E5308 -5CBB70414E4112193DAC4A1FA30996327230D1E021F3CD8115E12D239D93FFDC -B645910EB29E40D830E7BAF2DB255FD7C4E776557BB38157917D993EAC245837 -A3B515147043574157B8342D829C7228CCEA843ABC89D1785A9672A5923FC4CD -2F3FF27E6FCACF84E2D3136CA2C0FD3EF1EE7354CD04C38B5FB874553646ED2D -CEDF7E362EADD04B18051F20A8FB0DE18E152385B9D05F98A3A7EF177824E246 -455ABE69E2F700EB78185CCFC07E3B4C6FA301112528D977367D30D0D5D59EDE -FAEB706DDC970A9E296236C725B2B55B09B9C336B8E23CBA5FB8692D56F33B03 -16294E5FC7FAA42E96395A57CE51CA8DDD77442F142E2E576B778373FB31C81C -16840BB422CA827E30A81829648BDF1CA36700EA32AD888D097C1FE0A05B2D9F -483AEE40269DF09AF0D1AD3DF80C45DDC59C2A03FBB661C79B87853737C6D352 -67626B657321B16198DBD6DB98A092F17878AE4698121E1006E53D6F9B0A3BE2 -3FB68828EF854A0CDBAA68B37ABCA6AD4A3D809AAF0BAB1697A81FE59C98C472 -1E33CD70A75A22C249DD11D76C2575ED3370A25892A16D2FD569CDA70C130770 -93F493C7D47D6F9A5424A7A542BAD726BFC3AB225DCEBBE6AC4BE006F8C7C0EA -051424B08305BF2D951AB2986AAFEA04E078CA79B399585BFF0F1ADCED02E15B -8765EB6BF6A8E4D0901EFF2C3AA104924EAD9637A35D877E0C51A3C37DA78CD4 -8643C8CE6DCDDE3F116A6C2390F948E5371BEB5AD2E87B41C5F01FB5C196C436 -6E256A88D082E3F46E4EFFBF605B2EFF1E9D9AD5EE4DDC323A137CD9451EDEE0 -06F7D82898D71FAF2362C0FCF1F726F97F820305B7CE20728CA08C63575083A7 -84BA28B7DE2B916432475510E274C12FFD1660A717F51DACFDF0A102D85224E0 -D6DB607BB72569ABB8A7BC6A10354CBBC01732EFE35B72062DF269CB25EA3DE6 -DC603B04C90C5912D2C38D7A5ACDCDD3F6F116D884F0D8C528F69D5D47BA20DB -0A9E585C7D8CC3C324FE8A1DF150279F7E8FB43BDB720E624E5E9918032C02CD -8020636AE5C38DA2484B7F4B34163E0D0A561B43B80E97746DC05C871AB620EC -C5D47101ECED4A7E25F291184BEF8B80024AA7BB456C1B83A907652B331DEA34 -754226C39C6889EBEEFDAD081E01EF8FE47751987667836FDE4C8BB8A3FD4406 -1E643B4EA37BD370734D1A2DB17C2F4B74B4ED75098B433601F75A88C9A37A05 -CCB157EF6E32023BFA33973F3E655A4D58289136996FCFA61EEABD70791B6523 -1FF5DE71AB8A17038923118A5EED8D59C4C58D246FFA9BB26472346B40C8741F -153D19CAFF20DD2A86C6DB89154A630FB1761929FC3F0448EE2F089C1C953E02 -905BA8DE75D101A982A611056C4B237596C10951DD98BAB838B742D3CF7DE718 -617DB72E5268583223E37E029D1C8FD3F1D21690151F76B76C52C725CA135CA2 -8666553E863CE188BFC9B99AF56AC2DB5BFEBEB12FB563D00244EB89E478657A -98AF2E1223C1ABC25A4500E8119B86EB3C26B8A2F3505A3E5610F89B7C34E278 -53FA0A54A7F46D84A35EFEC36AE660A9E3C37EE3864106702DE5AF6C45ABF64B -888A4A51323138CE77DB935576FE6B4824B6942DF80625098CE1B5B32B234F1D -052A9D6039697118A9D793793775D8729D8574A2E74D7109C7B7E23BC5E2E87A -CA8E019203952A4892544E1AD3D4EDD22971611358AB230E9A2ABDF00A288501 -A01B67C42B33F6B78C39562DB50F4663B922D9BE0D8A150311AE44B83C1F129F -07337323E9A23211EE58E16043E127C6F9574019179F5635648A011266677B56 -B5D0201A4E1470B952A1579B57AB2329CD4C615395023C653F784D36B5EE3672 -10D191F29EA508CE84763CA4CE7C2C5229E38E241255A5CABCD6C7CBAED901A2 -CA53B5E24111921CDDF83578D33D463D70EDACA0E470D8F592303FB6BFD68B4D -3F3BE2D7C5EC8BBF10C90111A33E205F2649B56E8443F6FAA6C721C66575AE12 -D4C40F1F46CF9E9DA675AB5D5840D938780CD9E4AD6736ECBEB6A4397613586F -849B51048AC5F9405E03E14540A5E5582F61CDCDB57EDDF95A8C6705F433EE16 -648F098C03DED8A2AD94AE3DE202D629B9422ABB031318D48F2C85F9DBFA17BE -84708AA3B6C9F81F4508F7A5CB7B6646AB8722ECF817877B77D473F577556DAA -2BA0ABACFCF5DEA7498C47328E873019A956FBB250FD9D8885D21D368FA70CBD -2709D2DA44EE7A9869963EAB48789541906DE49FAE785ECE1F18A22C7E7ED204 -9768896B78E9EB7A2BD6EEC1B26083940656ECD689D92942CC8AF05CBF82AED0 -B45A7DF4DD7AA6526FB597322560B9ED3087A65B5EEF1371C328A021411BFE3B -D9B5088B2F1AAE381FFED52D2D1E02CD0DA78683E3B06171CBE94BE9760005D7 -135893D7CC2DB097F6AC664D9594CF1C650F84DA80D2EDE04802DBA33CE3DAFE -EB7A37E8AEFA4FDA6252FF21E8673DD98E67124D5DBC7BACF361E57077B71939 -C1D1FB923E4E35C075CD1BCBE0E80DAEA1320D55B43EAB45D9B26C366B278782 -7519FDC482D98839BF0DF2E7C3A56A1C1A3FC0E57A75CA414F6536C1FE8EB7A0 -4ADFEE3BEDA0F53BE8CF5F64230784A797133E8CD46BCCB3BF38BCE38A73CCE2 -9E073ADE792F7128231DDD1F63E6156ADB2609C200837C2E8A2D93D2A7BC9171 -050C709A71E44E32B1B03C92EB5CF1D3BAB1C38E027DC4ED9AED633D98CD7486 -3F773ACF8AE332631CF2ABE6D606607593FE862ADE31803964E3F4DC3CE3A271 -C76BDD95C87CDB3B87BC26FC7A16D567EEC62E6FF0D471B4853DB8A94D4CACF8 -843824F818083F10E88D52FC4253E8203292CB40F1414AE7E51DD7347007C342 -CD70E8E9F2D2A13D71213B841DDEAAB208AD9EA644591C15DEB084165F9DF24B -B91D3BBEEC2E34E38EF16A0C3F00700A7BDCBBFED2EC0D09601AD6538288DB50 -3478B051B5E16B604A0341FE621A58718D960D699D3FAD284310DCF54EB13175 -19A75A539EE98E804AEA24689D3540F0F12951A3C01FACCE9A7BAF4D0DAFA946 -FF65A4D2A4C39969607272C6886F44E90ABE27CA3A1F12A29D9B32E60E8E34F0 -17C5FE43D0E69A99A922D98909B2BBCD145E59A5E7F5426B3988F73B09A525F6 -8BD4915663C1301323180E760BE81CB874B020FDA3AE63340E4261E4F3E4949B -CC0966BDC4426190BE9F5D77F76A72AD925662E5FE1CEF9CCAB68F0BD33DA003 -F11EB91AC4502FBD6AE48DA0F9D07C35B96B103E379B8A83A05FE728F1716194 -1F650F75BEBADB2E3810388F3E2DC7B19F1BA9E32925F2FD9F19F4E8701F3E4E -4069125D7C401144740691E7A460021A47B1E27997FC1DDABEC5BD0EE0B20194 -2D579C7D6727AA124083242BDA46D8E116E2751C5F298851A62B60AEBE82A929 -9B9F2492BA35690D1EFD16215B8EF14E7A3803B93C28FA41D971B05B6AF3B593 -E74AD1E68A5FCE12A86E63B78BFEA87D3949FD164F12277A4688BE96356791CB -8671C49365608F3EDECC109321AF92B4C29CAF073DA3A7D73E913D0D83FAC5EB -BD884D4C686056404DAAAD6F82F94F803FA1FB0DD8908D1DF08FB87A8BB83027 -04DE0CBB1C6FEB6B517FBD7CF065120079E608CE41893C2BC96A347826CCDFD5 -C69E161217F2127A59F1A6F22037641613F191F22D5B4CDCBCC2EE5615623404 -ABA7BE6C5FE475481615B2AC1A2412E54688DD21E44CC9AF5F16E634AFCA389C -4D740B7B51BB141BFAD1080E7C726C1606A28ED492E6BDE9F800EFACD1513909 -84E98CEB6A0B7A2A6F3E1D1DCC3B2552795E0932673E59ECC56DDD37A1D52BA6 -C3F0E905978AB568941A163F4CE3AAB5C5B16F86016EC47BA6F3F7AAAA77C3B6 -09C8C3ABDB6D514A76ECD37C37AA88B5860630B3406B494F7725975596F84777 -D9CF48686EC9C5DBCC1D78513F591C7C10AB9D153B3D41426B7BF668B0D04503 -56BCB686258462C1DC61095724B9F3312316262FD7C1AEC6E54DE7E5A7BD8EFF -035299B8FD8A4A7B0F51404F4A760F4D8B4C0FB7A32FA4B2383AB6E9C78FDEDB -FE6A5788D38A6701B123630C2A6D820A684166FBBC83DB17069494FBD411B333 -CB37E2491C5BD035A33867A6D3A3D420CC31ACF43AA07182CAAE67E40EC63663 -B678F71D4C6E0EC3A0AAF904CD3AA66E0DE5E3CDE049E94249B39A1C06E3CE9A -F974B2484BB2CDA14282B9511E505B3C89F9C802218AE40D1A7541335C5736DD -CD565D4B9F4CC78F3A393737EDB4FBD0DA299E21CCFEBA5478EEF013F0552A8B -0BB11FF46CCDB784E8BDCF730A16363E66572049E42C695886EAB42A9AD9094C -B635DF4B5B9BD9B9AE8455DFA3EEFC77653190F9A8B1E93B7281C2A21EA7DDA9 -33484745BDF7E3DD63C7AC66C286C9A5A698A5E4D7A91710B7FF943FB23609B6 -4B442F83CB795788FAB5E9CF3F75D5487DA26170E4561C7941C910B088C3B86D -F844B0F340CF82786A3FCF347048463EBD2006281A816627065DDA6CD4D3AC5E -2024BC96C7D896381BBB567951E7A1F29D4E95351298B000D29E5F3D0448CB5A -CFDAE1BADE9403B90371C3A07D208948AFA022A69C519434B6813086ADF518D5 -88E0B92072A44BA1B3EBB630A13B7AB90992E85B6D67361C8D96F3E0D826FF37 -17B67E4B1EB7BADFD98D7F4FD17BECE740ADF13C141EBF0A91CB105DABB32FE0 -55086D56A0D358841D15FD349E6B95512E4EDF4C430216FF85C2ABE995E4B40A -A6044CC8820AD885C07E052B3F91C2E9A1D163BFFD210F7BE95B923E2500DB50 -2075106DB541C267BD450B25B670CE80BCD068D4DBFF2D82634175B61FBD3BC3 -406131F44C7D6F18D375D1F2270829DDF29DC14DBB58A30AC193245D18DE91F8 -AB88AB548D8138605BB5A50073295534E314366E26665AE70482B890E4101D6B -60E4F3B37ABCA1346DAAE8FDB8DD9C832EFF3E73BA470E2BACE7B8515CB43388 -C27AF99FF9322175CF8D4947E6B3846AFF5163E972156847F58A66660EC8A3A6 -5FB47C9F637B4CBB4C73B6A080B0CF6FD1E9665E92032540570FFCC747C67C50 -822811AADC404BC7ECD1673E8AA6C3A2F1D82F39430B58C29145E2F1B679C46E -94EDC711883F1E4EA84117A54757E8895A40401A26E1437B39A2F65CAADD6E02 -D71FA8AF7453668DC613F326A3344F74AD7AC67569AF399385500ABDA5EDD3BA -343CC5EDD4B558467626850E752B9959FEF1454E53E7A3DCBC2255AD8F6AB4FE -894455118A61C58840CB68A925ACCAD75CEACE863D806916228F0614191A1CD5 -DC9BAE256018615AA3725834519449B0A88B4F396654E74099C007930ADB1327 -DD119BF799FE3B0B223E1EDA04FE2DA7A1C879143E1C33B6C6344F4BA033AD6F -8E88C33DEF1977796B454BAB2494C930F492A518E8198C708A75FFEF8C49C324 -A718AB59B889DED521229E741FFE53F98EBE88B0405AD523254FD3FA4BBE96DA -DA1C27C1C979A0DD4E61C3B1F4C4DE01E42F1C4435EECFC02D97994BC8AF5270 -E7CB1458D76ED0229C5FFB4A23B8716018F9050970895D51722CDE8F2EA3D947 -DFF374D84915D5C5D16463A6FFCD079D1ED416C4347BF831FF0C4ADFB61295DC -4D5785BB0852BF472CFC97EC174491CAF961AB90629F055E75DAA6D9898E8653 -5BCF379816CAE46FEA62E7BE8E9B953466E51828172C4DBD0E1BBAD1CE28B5B1 -02B3E36403BE80B49A47446A6677FCED438F01D60EB10F478C89528FA337D0D8 -88D3FC123C076507ACDAF783A9A6E24ED73BF24B6E0F11C13E532DE5F70EB02A -60651FC2E263002D3986B7B20CC2AA08330B9FC2E26765CD52266969A86EE30E -71E0B41B6C1C6DA423D3A7E1553D2FAF26EF40DC183099322D362E4965695C52 -9FC3E5BD7ABD743CDCB717DB10372A722A39CE53FABB454EADE2179C4CBFC016 -A8E893C28EF549CA1692C8D8ADFC471DCCDE266FB4E97A1F3035801F3F034D44 -AE6ADA0192657E8078A1D27420093FEBA111333314658021B90DA4E7A8D4B829 -F1795501020D5FF0AD25584C1D568EB61E7A468B41B75891A32F6702E0FF3BAF -79A37867B3E10F6F0EFF20DF7D7829ED6B654CD4FBD5592E82A5EAE68B9E9DEA -A3B621EFDB9DDB9BFC5335B4D267D8411D91E7AF1E83A55024591A98ACDF3307 -F29891E6DD71C83FF87251BEBF638C493773407670A93B2E687C9BB9764EF06E -6BB743E9D6FD1C2ED638BF46B08CBEA45460AD155927F4089109E79A071F621F -0483122F72A4C8F0A1AA7F86A2826B08457592B7C6D170DAB85C0A169AEBAE83 -0904900C58F9062994FEC964697458FB0B1F6FCAA80640260715E80557944B91 -2054838E945F8E7D4D1DF87FA94F -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -cleartomark -{restore}if -%%EndFont -%%BeginFont: CMR8 -%!PS-AdobeFont-1.0: CMR8 003.002 -%%Title: CMR8 -%Version: 003.002 -%%CreationDate: Mon Jul 13 16:17:00 2009 -%%Creator: David M. Jones -%Copyright: Copyright (c) 1997, 2009 American Mathematical Society -%Copyright: (), with Reserved Font Name CMR8. -% This Font Software is licensed under the SIL Open Font License, Version 1.1. -% This license is in the accompanying file OFL.txt, and is also -% available with a FAQ at: http://scripts.sil.org/OFL. -%%EndComments -FontDirectory/CMR8 known{/CMR8 findfont dup/UniqueID known{dup -/UniqueID get 5000791 eq exch/FontType get 1 eq and}{pop false}ifelse -{save true}{false}ifelse}{false}ifelse -11 dict begin -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def -/FontName /CMR8 def -/FontBBox {-36 -250 1070 750 }readonly def -/UniqueID 5000791 def -/PaintType 0 def -/FontInfo 9 dict dup begin -/version (003.002) readonly def -/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR8.) readonly def -/FullName (CMR8) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle 0 def -/isFixedPitch false def -/UnderlinePosition -100 def -/UnderlineThickness 50 def -end readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 50 /two put -readonly def -currentdict end -currentfile eexec -D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA -0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 -51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 -7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 -E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 -0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 -C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9928A7C95D3A6E9B -8E92F84CA0AA44461D2F4FA0F8B81C6F5B7BE98C9712BE166610465CF689DFAF -27C875C029C0116DE61C21DA0092D029E7DBEDFDDEE3D67E6936623AB53FA2AF -18BEDDD7AC19A19CADB6ED6CA7A26E6044BE414FFF59C0B98D5819A6B881F9AB -7AD0D03BDD5CD309C67811D5CF0B93F6FDC9AE64F74ED4E81F2E18D880BD842A -DAFD0BDF06300201C6946087FC0B999447BC370200BFB8CA420B668B32EBC242 -6DB1546A7164CF55B332FE9D239B65F532B69EF9F4F93828A44C8F5C526126F8 -B7A369114CA68D4F98638121F4E17F351723D9F1A902FCF087F94AFD23876517 -2D15B482AF2D68C3F31FFA864E031596E597882578AC7FB0DAE2A713B065B374 -3E2E72519ED6D50CBCA40A7275A7109A4F3ED8A4566AD8832890D3D1F4899850 -9B757442B7EA355175CD5D6D8B4152ED2D7EEB4CE30F174FF672140354046A45 -7098EC45B9DF3DF5CF7B417E201DA88308CEF4CED8E8903AF24FB8DD0187352D -25738519ECBC70304F8F620CC45D2586619205DA3955696FAFFE2082402B3502 -CB682F410DE5FFE80A4DA3D3BCF02E35BD577D0DE55E7B8A33B7A2FD5136B5DD -A0BCB61F8E7F4363C21F890CF287304DDB8FCE7FE207C0D160B81E7EA662BED2 -DFF8C444E19C91E72254257CD87240A70F1A964FA54ED9ECF27E27A57DACC3DE -EABB92C085030870C6CF5C40B6E47F5C0AEB30E84A73ECDABB2D754EF6EA28BB -16EBD6636BC288E62F4A38BFB55F5F4DD20FDD77D767F6CB52F9513E8EB75413 -07F1877B2C01278675177499E4E8EB09F2657821613F5C7643FC064293EC6E9E -B519FFAEEA36B19C9D1302CF91FCBF87FCB57C5F995CB6712BB3D8681EB6F05B -B2A4195A3C73CB4ABCCFB958EAC533BD89560D2790CDE1444C0F2E4EF27A529C -F01052964E56F6D76A190E5FF45934BB711A3406284AF130D4DC0D8112BB3752 -762CA0200CA262359D4F54C0CCFA9A50DE18C7DB14419E2990ADDC4A54B94978 -D9174CA39434022FA77FB30179EF805E2189C35919F5EBE215EE2A00B4407826 -CE56329C5586D8B414770BA5D45513C3AF1931D632FCE69B4CA504944E03362C -74A1177C6398A61A12DAA0F156543E2A8E9969C4308B7ACC21A5ECAC8F172541 -1B1316A88C0C163E574FFD3CD22FF08488662FCF2F9344BC25D02146F36CA6F9 -E2D0130C654B7485EEA9A110A33AA0C769121F81821E9A2BD062FAC158359D44 -3F9D9947200EF1EDDD5860F10438B162A69683957300C75AF7546C70C97AB2EE -37EAAF0089E2623F787F252569B06C665FDB45EC9681C0774ACFBA76B98C4E89 -7EB12AA5F8798FFC110B49C25E3A483ABE83B0BCC6DF0578403ADC369E013762 -C9D08FC94D949BAE636ACA9F36F4E3F02296775A062077B011A705B6F1784D36 -A926622CB3847533D7ACB24A4EBABB14593B5D8E1DAE2BFEF8A51835C8D4E76D -7543C126A4271C59A5881A5AF89331694F84489CA66725995DC3070F306EA447 -CF30F63CD476A46D528EC1FFBFB8EACFA2BEEDCF54C92CE2BD26DEA5827186BD -3A4D1709415CEE7D51D671357B4A5D11E835F63521B9824EE5282E58F05A8ACC -FD249461181A38C2F47BAC4E79BE368D64F886AA493C61CBCB2ED401C8AFBA61 -59CA6F6216D941A92AC52ACB3D7ECC28D6A58EF4CC70BA6DE23E80937AB38E89 -6F05FDD15B954C0826636267EDAF9F2BB466BF79D2E10EED9B04297E6BC93069 -79581ADD1A9D9FAE9306F46AC95B98C60A2E53D60CF1AA4069BE301E17E25070 -F98DD67BD8642B1D07571A32766072E48BF27E1576FFEED300D7313A358A823B -49C8F135961B7E259095C9BB67F996CE0B90E95344F203922F47E11753F70D38 -2ECB615403490310CEE6C03AFA97DA2F47ED47125D110FA69725BA0018F6A40B -29A307FDB3E52322A77A0102E6F57654CF1E96A134D13860D83AFA0A41112D3F -2247A09ACF7D06713BE443FA27C7E7220E875965D53030FE7D2D62EFD2F1DB87 -5FB091FEAF599BA8C5167525899E578AB341BFE2BC4E53A047093168AE189237 -EA55F055514EFA939DAE9E859CB5FBCF37D99484F44FE5AA5FA386B28BB642F5 -5DBAF059A50FE96C7C6D834531D64F1F2E99AB2E96EE74D149178B1C0618495E -293973D9A03E1790654B67C0882376ABEC17D74785B3737D81644F28B3BC6FFF -F92FE29126995A07E0BC5EF3A4B93789A103C428943E045B8D1A5063AE71E806 -568D48072E53DEA85253B01DF0BB7367A6BE4DD7BE514AD74E3F77C825ABA405 -64DAFA25EAFF8F63344B5F6B523629776CEB090B546469F6A6008DE43072DD3C -DEF51F62731037D1FBD0C038A1E9B669849EB3BEBA281624F13D20B61917A109 -A0A7871A73F7BAA18077360B38A4625C5DB9AB9E43BDEEB856FD0E2D3AA2E075 -267B978B9EB47F2369302E87DBD5D5B422830BEC32411FE75D584C58650EFB1D -136FEB92B94BF8939FD63AFB7349C7511E5E46AA7324F8B1FFCA9C2A9E9720C0 -A720918E8E860F137567D386AC29870FD990BD69465B3A3D2A0ECF2753578AD7 -80DC87EBB319EB5AFE0B6F6FF8616EA30C51425FE3ECBC5F8D0B0BEFDEF32FA7 -D168B4E85C804B7326A0942CFDE732B1171C643452B7099B31649CA2C38B62FB -46EBDF7180004C549B53F88021D029452C2B37D8C565BCDB0B11541039A13C0A -E45D4B68C7907B8BF08C6F41F564B62BB554235D50330E78DD02795516D969C9 -66119D718798120442CB7EB9877FF84EC69DAE25F8559DCE3BD8042959F695F8 -2F99845B1B5680DDCF181D806CC4903E077D1FF5E60918EB34C0B1E028422B71 -CA63EFBF3F4F3CD813CE831EB54265A555BDD35AD7D723F9CFBDAB29C54F8AFF -2D35C6A3299E0A2DB470C7B141B1E3E10DABB7873AE302926BA8743278FAA8C0 -DC6174501D6A289CF980A3F55F2DD5C3A514E7E7F13133C35D2697D64C25130C -DB78FC997968D6B3BC929E8A31B6D212C5128E4412632BC52B3A1049F7F2F61B -C74AE9A6AD19B9E2E240617E2882F7D29ED3A4279439107AF9AEBEE47CE85DE5 -CE9595A96A118ACF1EB1F5929930321AF7732E351E18C6AD378508E37B4C327B -0E06AAE21278AFA9255AFE5C022034DA2968D260879B4B38E7EE2E11A593DC3F -CE71ABA050C004473324CAB6F3C50E85DEDA3E9A27388D8FD3A8F6E42A79670E -F7549CFAD4CCB337A6E0BAA4846ABCA059F1E1933CF11DC0FFBFF550CC4A1B47 -CF7BCE0875FA747AA854534960F757884505A5AEE0330179A9547A4AE3E68479 -7A457DE83326DC30B67F27CFD4AB697601CEE352F72F0966B3CEE3EA24683BEF -6D23AD51B8432C3F0DD0D0F80791E1091F38988B7A54E466A9AC7810DE8B7893 -6B0AA6356597891D56190A7660BC7F657BC559E0525D41EC228078F2FBF89C6C -72D666DAD838CBF0861FBF0A1D4ECC069AA49DFBAE5C56B781A1D5D79DAAC256 -13E3F9B928A2394FC71691E4355642764459714412D6F8EF803FC5F7353822DE -6CCBB8FBE5AA1F2C7F4D384039D85E7728527DF9FE0239E2CF8BCB7411C000B7 -1FE660AE6A2A19229E5E8776CC83EFF3C27403935756463EB4721C51FE0B1197 -86C2F17842A0FB639F28083DFD4F1E86D7D3BEFA922514ABF489C5CCE93D6F72 -D2EAAE14F6CBA2BE4BBE7D7EA8EA19DB3A87350D4A52064137C3D15A5B05B03B -70B1DA7328D10713B83974C390C3270AF5A9A47C0BFBFABB9F31063B0CCFBB10 -0F236C74446688198EFF039110F6FF42FA9F82D463AD3958B5FD205BDF85DE20 -FE3F0C7AEEF350AEE6DBC1DE2E2DA4F4599956F59D6F121F7086DC120416E180 -52DBBC4E56C09746938698860F30007091E1CC0351B43990E47208ED495310F5 -7BA9C6AB3CA10A3F1B318FD47C1CE3B9FF1304321F9623E32D315AA9CE64B35B -F841E6C62B5B2488A311C94937879E5E0E170FA77AF0AC75C5E6E9F3E8F825AA -09C1702682E14FDFA72D27901C5BDE009B1E52E8C4511C6F6336251BD45261F7 -401CA3DAE7C4B0CAEB91B9954BF4A97C48ECE7FAD401351D59DDAE9DA94E2335 -74A2B880E4749D3D7026CB5299F16C204B6E00A20A6619C34922C7D3FB50F127 -3157CFC08DCC5164C8023CD1B6C3556C73CB8E4ADA845339CA9BABA1457ECEE6 -ECB9849DF1F0FEBC89E5F97C92978A500196520839CEBA6C0FD2E3D27BB4B4F0 -93CB2BB565F4627C6DB62DD0E084E627D69B5DEF42EF094381B62C0D67EFD197 -301B132420F51A41561E6106870147E0D597078435BE3819ACF0DE28AD779847 -F3D2CF667DA06955D53E0204CEA2935E9E984E76963D3079EC092031E2A10E61 -1227E5EE6770DD4D745A52655369EBA06A19BD7D95BBA271E488241199D1008E -36EA99F8DFD2A9F87B06B070158B466AA4C6EA3BA77DB0F853F0BF9A304EA291 -34069714368E0B94DFCBA3BE5EDB6C8204DFA7EAF5C3406F60A7056407D1BF6C -CB85C1F432F97D821F5518BBA79AF8453A568FB2C2D025A70CEC75F46C545011 -ACE3A99B2582793BA1DC655230AE2EFD24DE20A01D4A441AFFAB7771F223FA6B -9169849E727E494247F67D6E1EA9DCA06A082FE2094BD548AD7F08B565145634 -E7ED832FEC1378306DDC796303392ADB0CBA130B63B38ED57B7828B47732853A -893E8836FE19CCF27002AE92C2B2CACFDF8A42F1B8066E033B965D2E9157FDF8 -E1264B40813C1A4CE424274AA3528A4F09B3B53DD4D23789A68B3D17BC1398AE -0ADA2C2168427A49846DE0216908C2FFFEF4F13C1ECA12AD341E238EE46E6DC2 -B71B54C52659632911F901660261E493AE2483D64E119D9924489779B62BC9FB -A052E822FD8D83178E09ADC825DF0DA07FCE7AD68EEB29FAA275A13691B4A5A5 -B0BC0499CD6307610CD6209583C1152C559A2760823F8DC0B9B990BFFE7B7E9F -3969B968AFEAADB9FC0F1410EBBAA0DB979CF153F0B8C978405F8E6F2B6406D7 -AAFBF4A655A15DD6D1E9A7EAE10EF89264659B09283F50B734236885FC09FBE5 -98D780012FA77FCB19F15BDC522CC7312546C0730EF5225DEA8C22A3BC6554EF -4FE73B9AEB5C2F7DBD474221760E5F539A064AC450591BCF3499E3968F2CBD6B -F15BA2B37080A4129B66D4C2188524F025414F14DB3F96049A8B0E5EB2BBE7A1 -AD64A988FE875FE4FE5186BB4F5DDA16983CB052D474B7D72F3E8965663EB50E -015C72407C3437142D3D7DBC055FA627139488DBC5A0F98D805C2143D99F491A -167E07AF60EC9F17C36289368D740B632CB919A0E74C412B76CE7A5906D5200F -9E79CEB9C65ADA3A0F23E8947E834AE7A329A9F0AA7A6BF545B1D7B4666C6522 -CFF268634EA06DB3A82D91A4C0A9B227E79961212881A54A6762C335DE7E0831 -130C45D94394D21C049B9D189ED955438C2151514F17BFC67E431DD9A8349202 -2F616AEC1C7B19F63D5000EB4771370924BD4B9053FE78B5E4A244B9A149D66D -A8BF3B398396D2233E92E4A5FDC70FAADEADAFD255193D688842DBA865CF6154 -C9348D590F3FEB135D4B7BD4D76A52CB140888247CAFAB25ED51F4D187041CA0 -ABD956F83A5661CEC171B52AF92F9ADE27973B560C802E1E0FF51C4003D1289A -CDD09F8EDA8AFDFF666D35418CEADF3B0BE298F0D1E5C8E024D6A2017A7E71F3 -3A9FEC9930F1118101E040339F9D41379170928DDF5B5875212B271DC843F612 -E0C21C67263186E3D6929160464D4D5C8928E14D0845762C36FFBDE548188E20 -3B6BAFE5EECA0385142F01216FB8A90C43A472C1D4447FE5C7C78CC088FC72E7 -3FAFA062C338BDE8A430FDF1951B107D8D73FF9376FACDE5900BA362C66F8C1D -947F9545C5C13A53E4479B1C1A50472C05E8F8C266C6D4F4EB08E97B3B1BA972 -26973B844545089C5732322BCC9A5A8FC972FA0D7DB8BD85D2F515ADE65DA479 -0224F7EA2276CFED0B75B2C23AE7377F86F1F6F205D6FE19377D87E782143697 -984E731F83CA888199CEB425643C259D4FB8B58DD69A96085198306494BB497E -FE7C9954EF35B679BBE3847A9C73507874F71FC97665E2A58BA41407A1745247 -44A79B588D969D11CE4B863CDA655DAA53CEA5C3C263B345E782006CE9831D49 -603D2D95DE9E370D617F5928BA416C362BB2B4DEF16A5D44BD24B34257765F3B -6223B3F9B54DAED69A90C7050AB97B06693D253C6894CBD7B497DA449F1D9B7C -D91B421891EC0724F59C82B9CB288DC42F2D2D7A7F22EE3D910E15953D7766AE -276DABED3820390BAF2700C4653E1C77FE63DB71A66D93ED293E25B8412A1EFF -809554BF04ED0DE83F7F190883ED793803CAD2C34A66524D3A580ACDF3C13B22 -08F18905E7A4A16DA9ED2A112462FB9FFE481EC2069E484E8BBFC19D594153B7 -3DED4C11762223B7586483B06BC164D824D1A6FCAE80A35DE0DB8B33396771DF -76DC5C05578EF1BE00A70BAF3D951A01C87328DB2B0DAD6E1B4C21F37D1BC0C5 -A929BDE5EADF20DA60C4DE2E3C151005814F24824D33B95F700E09A0207EB602 -3EF60DEB1622B91DB99A855A8F1DA96358F05CFCEDBDDDFC8446AE3391BEEC41 -966E594E28D052DD5ADA49DFF65E79540EBE5329DFD86C23CC800F95221B9C18 -CBBF941D2FA47EF1EF59A89DB5DD188E75EE94AD2A79E2221107E5992C00D531 -2E00B544895A9204656867E3DE9D4CDB64B920B5CCA9A73E6514B36CABAE01BF -94C15603B86780190595560F792E5EF01650074EA4A9BBC6ED284B9AC2020641 -DCBCEE0ED27FE58171DFE104EEE4202759E594159DF45113C00236127A46FB35 -9EC705F21C0E456C1F0F924594C09AC64D4377C5FEEF764BA4A09ABA8D09DEB1 -FC13B0CD202B2F04CF5D73DEAB65C36C2FA7C0DC236BEEF6D23BFFC9C493DC8E -1831F19EEF81EEDD976E43BAC6B5CED13F901DE59835FC75490EA528A72CEB77 -24C38B258EC38B9E6B97F85CA8C10D8809BBE55A6FAA12456FCAC786942E123C -06D1E55F7ED04400088BEC968BC5081DC7A1B1B65166E7821679F76694F235FC -6854C8776AF855B83445D9FF919B1D80E98DE0741D06D6C5EEDB3E3EA6392530 -F1BA817737D8162F7B3A36AC2A03190CDEC654383E31934C3E0A012B639532C6 -26FEBE9B412F1C92D1943B7C18CEF510729D501349644C97F087F2F840074AE6 -D8CD0FB2E620FFC908BFCD938B675A0A4A687F7FBE8F3DD06A62D7B6DE7DF3E2 -49D367D60B10061EA86CD512F5A1BE8950D83C62695E130128E0037B62552D17 -064319BBB9B1FAB9D79705E5D68AAE9B36EA14BF1A59A863BDB8DAD9AB5D7B8A -E30E2B499F952D65877C8E38EDD7DB29F9579D09E629AC188DB6A6403AB4BA3A -D358B3770D727A2B77D84B6C9EC17E29D88E3421F9B7D2D822EB78BB8BB50692 -8C46DD6F9BBEF2E848A2B5669B200019802AD19661537A84D3514AEC5AA47445 -2C791E01DCEDF18D9506367241255FFADEEA6183F51A9F42448A7DE413C08359 -52DAD2A60FD606AFE14702BD3B0EC448720FE63438D020DEDFCDE3582FC31DF1 -17B25FC152789D2F17FD60B8209D292D2152DCF8D28B5ADC04F6659BBB746CDF -145163361823CA343763AA951C640B5D4A99B7787105A1609EDD6A596EFC3F6F -2FC33D0D499DBE56C6668E137715D435D6B683E0113647B2765AB0F3D98AC717 -5B33C3EDDE18506E73B4E392B022F30480BD30F59B2E3A59D93017296C3156B4 -B5722E1955777716388AA987B2665669716F866FE6BDAD5E74A523CC03915F26 -9B7B231F5D9B1F61DF7CB01ED3F27070E36547B263855DF5B2E3ABD2ACC440B9 -0826E1DF4743FAE6668B61F72C8700992755522AB11C765981A9BEE0D040039D -6C2D64ABED527082C97CA606127AF5C0C98647BF46AB8149F215BB0F1087E62E -740D8676CE8A486096DFA164A37E97EE630B2A16FF4BCF31B9A630D93C278ED7 -6D6003D463C33B8AB5E8BFB9777F0B3D3243D650AC5641B91082A85801F907A1 -54CDCD22CDDFA0F5E255F1F7E04A621013F0F3841D824897E67DFC2F5AE51C4D -36411D26424AA9702018C26AE65120CE396C9B001DBE259A3638455C3F4949F2 -BB23F04E53097AC814F9DD04F0F26BE3F8C2118311C916D2FD21628BBC018A31 -021BC222B518F904ABE96333EB8A033D13E80033452B2F7C8F400CE65F0EAB91 -81EF6447CEE4BB024AC35075D24EF62ED3E393401BA04C01CA115E0231AB -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -cleartomark -{restore}if -%%EndFont -%%BeginFont: CMMI12 -%!PS-AdobeFont-1.0: CMMI12 003.002 -%%Title: CMMI12 -%Version: 003.002 -%%CreationDate: Mon Jul 13 16:17:00 2009 -%%Creator: David M. Jones -%Copyright: Copyright (c) 1997, 2009 American Mathematical Society -%Copyright: (), with Reserved Font Name CMMI12. -% This Font Software is licensed under the SIL Open Font License, Version 1.1. -% This license is in the accompanying file OFL.txt, and is also -% available with a FAQ at: http://scripts.sil.org/OFL. -%%EndComments -FontDirectory/CMMI12 known{/CMMI12 findfont dup/UniqueID known{dup -/UniqueID get 5087386 eq exch/FontType get 1 eq and}{pop false}ifelse -{save true}{false}ifelse}{false}ifelse -11 dict begin -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def -/FontName /CMMI12 def -/FontBBox {-31 -250 1026 750 }readonly def -/UniqueID 5087386 def -/PaintType 0 def -/FontInfo 10 dict dup begin -/version (003.002) readonly def -/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMMI12.) readonly def -/FullName (CMMI12) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle -14.04 def -/isFixedPitch false def -/UnderlinePosition -100 def -/UnderlineThickness 50 def -/ascent 750 def -end readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 120 /x put -readonly def -currentdict end -currentfile eexec -D9D66F633B846AB284BCF8B0411B772DE5CE3C05EF98F858322DCEA45E0874C5 -45D25FE192539D9CDA4BAA46D9C431465E6ABF4E4271F89EDED7F37BE4B31FB4 -7934F62D1F46E8671F6290D6FFF601D4937BF71C22D60FB800A15796421E3AA7 -72C500501D8B10C0093F6467C553250F7C27B2C3D893772614A846374A85BC4E -BEC0B0A89C4C161C3956ECE25274B962C854E535F418279FE26D8F83E38C5C89 -974E9A224B3CBEF90A9277AF10E0C7CAC8DC11C41DC18B814A7682E5F0248674 -11453BC81C443407AF41AF8A831A85A700CFC65E2181BCBFBFE3573BF464E2BE -882A715BE109B49A15C32F62CF5C10257E5EA12C24F72137EB63297C28625AC3 -2274038691582D6D75FE8F895A0813982793297E49CC9B54053BA2ABD429156A -7FFCD7B19DAA44E2107720921B74185AE507AC33141819511A6AC20BC20FB541 -0B5AAEC5743673E9E39C1976D5E6EB4E4D8E2B31BEA302E5AF1B2FBCEC6D9E69 -987970648B9276232093695D55A806D87648B1749CB537E78BB08AA83A5001F7 -609CD1D17FFA1043EB3807AF0B596AF38C91A9675E2A53196FEF45849C95F7DC -182A5EC0EC4435A8A4B6E1CDBF9A5AF457564EA72BF85228EB6FD244F2511F5A -CA9B71A65D53CC06EF5F7EC3A85106139A4D312378BC22183C09A229577B793A -1B7422611C03E84BF809F46C62CE52D3AE29CE01C32B202ACDAA5B72733EB0AE -C31D7EF7BA88D2D14F85313F7A8B9B7A5B124B03AB923744D336C969E5CE304D -3AD977A46664479EDEFB69F113024E761C05FA48A54072DF9E12C2F352ACB3E6 -D04F6EEFFDE209E7FA3DA22E5B1D1409461F4286B7F4F8251B44E5CB7805762E -E129FF4A06A7458F3191926B1CAF70E32C6571AD2DC07C34FF62840896F4D200 -761B1A7FA356526D1E3AB4C542AF13623BAEB9F61B1BEEF79A9205B1FEFDAE24 -8799D516A9ACC30BC0139C63C9A0523E9D5439213B67D490C96F902958779B8F -68BD8E9FDDCE8A3A2E35877DB6C94B7612382ED8F218EB1157D2ADD090A2448D -10B99FBC9211C5629ED1C61C74FE93041E5AA03EA4AC3FFDA00C2B6E719CFAA4 -262FE17F66804A6B54D3669836EE4367D2A2991580C5564463C973CA0DA38AC6 -922716E13B4A807B50304B8826CEFEAA47C305FC07EB2AF25FA7945797237B16 -56CDE17AB0834F5C97E0CC5741B061C6FF3A8DD1A79B9A173B66A6A750538E26 -32FBC92E75BA15CFFE22A7302F47908547007402569158F62C29BA2956534FEA -7DACF1E507AC309DAE8C325F2A6023D2FBD81EF42146BFCE6A16A6310A650460 -7B07BB7647C8760FADDF0DBBCD3DA6CC4645D1732DB3A22D8B76E1D2D48E4D4A -46F4BEB80CE65F3517283A1AE08391FD1C10ED452133706BC6725AABC80107FD -754A8BA47B0281D479F052CE26A723EFFACB79B213041A536542AB334769A2BF -88505D82C498ABDD5A73EB539530F47CAC52825D16A969C8BB56D4A7F2830B8F -CB63B92B576E7BD922A4B25E634751F8A3B7C4EBAFCB373EDC8B8281B1D1371A -7844E9AD990CFF09F0D7ED73A5CF873D2D5C9E8A9923CFA31E1A4B4CCCC40760 -8B3AC8FC3C88BC08BD7407725281BB879A1A822D94997826418F1B89D303F2C0 -BE7A0102E6F529630CBF1BC5BF3E4578C164A3DDE45E62A957EF3FB7F0FBBA6B -CA1E79A1ED195B6A11CFB345B663C5E72FA55D80476F604F6C4257B51686AE25 -8F7D159FE605DDA0AC74BAA5034F29FFFD403070013C6E2D8EF6A0990D91173B -D5A3AEB98B64E412991505C3CB7C2CDE13C091FEB3DFBCAF30C4C19511102300 -135BD5D444BB55692013F52056908DFAB2ABFACE81A58423ACEC59344CEF7D4A -C5A3EFFFFF70759BC3E593D878281225060B97D1BEE6B26EED90571FEAFA1812 -1115C0EEC892F5DE6FDD68321A0B3F10A2D771B79BD85476AF6018472A499A86 -07D64CFF4550866AFE590C471C80EB12CB3A989A60BC7BED39097C12D9286E39 -14C7952C4C64820B4DE44A1827B7B0B535244E93FDB80036D6332F90F95B472D -7031E7E3819E881BD0313CFA112EB3AAE943C99C47635CCA7E34DC0306C04E5D -2E9F60FF037EB11602BE74E8E6B711392E866E3E55D988F7C856417A2B9C186D -639819B4786D039B77F8578EF63C088FF28BD08D8353031445C8498A8F445BC3 -D08923D32AC04BF3CAFEFCCC1E77EA894F4E846F47EF62D6841B8D8576FEAE8F -90044626869D04D61D64D56E8C51AF8C18D6CC3FEF3B6C4F7D56FE3260354948 -10104F69B117FB8269292579A7D52FED688C663B643D8D99F13956612271073E -1A337AED059B7A93819A28CDF01569CBEB51069D22ADAE25C47355560F402B2E -8C9900DA82B79C64497C8494F42FABE5AC41791C2010D98FB7E593C744F250DC -D837DB0EAA4F75D0016970F3AE8359878A08CF9A697A06C5EA945819151265B9 -1A12122B98F79185DF852257BB4798E7DC03712EA6ED34F6E6AE1476788DBC33 -9229FADB8D581BE1A63F596698DBD6DB98A092F67197A4FD4A50B648F2691875 -EE2495D6BB310078F516785A0CEC7EB6E8305FDBAEB1D15690409FE32DD9CFAE -DBD3866FB63EBCAAB73E3E4BE5D7F3AA44793938AAF3F8341683F0790F1D46A3 -60CE083F9BEDDA22E0639A92393960F86602216FA51E2754BC2F4CD0BDECE3D8 -FFAB7E0E49613DD4956C9A10AEA798BDA1F756C755BEC12147ADECAB0FB73B7D -203A11D84DD2AB5AA98FD38C1C2573570FD49A4924A94A106D2A7D850E793608 -FB135853E8C4204441CDBE697FD0CB330B1C3596F32D2BCBF263237EAB362D09 -DA6F531B40384DC91F30674760CA7B64BA1968F6A7FC9EBEF431A1AFC5E76D7F -2D44DCB7F61C7F6B16196B3E8B47343F572DBA8B8B21B43E35BB6B2DD5C7982D -244FD4304D254D6CCB5E8CF70E77F50812F41A988EEB3B26BF0F6F69BBA18077 -31134B5A5823D10FEF6201D045AEE7A24E0F25376E9FC66340C56C05F6CD810B -724D85CC4BB8D789834A447CBBA159565D08BA5793D8599035BB5063271518E8 -F6C50E7DCE71B1D186270DDC860C6DC0CD506010EB5B1FDF6BE47A9A18CC15D7 -D657E58BED9EECAD5CE5D49F63139A39BC52C6584BB2C3264D51BD584B40F8EA -AFCD8B83F548594386EB2B05CE803105E84931DC6E7A1398073D48E130E0D907 -CD0F1ECC3254EDF5D4DDBF44415DC9BA66C673820CDB0FDF033D59BE2B5EFCEF -01FF9D33EDC88F8D522E07F1689D024DBCD09A16A63519E1764C8630FF36058D -CFC07027E0ECDA01E0E85B166C613B22F587B4D355EB018BA93E92A36007B4DA -287FF5A91F7D8A0EDF5554ACCF45AC8066E88865C5692E63EB99CAC81367B605 -8E6C19EB98EBFE0D2D161B447B9A70CDD1122C7B78A413369016E6D8481E2AE9 -9AA97B5DD0ACC9B0820F7742CEB2F46F89F3E2092621969A88DC0156B4F941A1 -6BF1546D4B136657C47B082A8A35FE96016BAF3D9679B8C32EDDD6AE6DF3BFB5 -7854074FA019707FC22BFA82299E72ADF9A980AE29A8E2434277E58B01F6B03C -192E1E25DADD49F6E3F69799AE62B56E00B60A031BF8721DB8B2CB6D4A4C15CA -AB1FDE010AB7DC0DDED977389B101B8E53A949222FAA126656E02817DD32B0D4 -A49516CEC2B97EA7C78FD66229B044EB92F502384BCC6CCDFFF995EABE3BB7A9 -50D5D1AED861E7D3BA8D333026C673C5762712E763E59261426044583D789C67 -A606B96F97663F92BF104CE02FBFDFC521EC0D6670B7D4F85A229F51426DE912 -3B729C4A535FB7C88D0A5E78074751B58885DD6BDD2DD9E9C83F105E8CF63DDF -CA7DB39D0319CA7CC2E73F42747F007574DE25AE1538B4D493D22D0D5F0F80C6 -5F6FA3937C8391DE2F0116F81DB2DB0EF751EC838A7F85F163A6F48804E84B96 -8D715EF25B7E2A5CAECC558D80F421052A1D698F3B8452AC27E30A4E6226E3CE -084C8A83ADA0818A110923CF7AC7AD4CB92AE4ABBE0A9EC1FF935FD02774C1F7 -92A278E513012AD17722A23C55EF82E18F8847B5CCE47F4FE3EC508BA563F7B2 -AE56C94285A18DED4D432FB0CEFC05A20BC17DDF9FF919C724810A8ED7358A27 -97EC93C1A13C443A91947FE1F6F528EA7B628917FA7E554A1D7B31ED46C5ABCF -92BA57961C8876DB4041305EBB029B03D8351D5E2819FF87E97ED214D8F1CEF5 -7F7668DDE223721C0B810F4A4AC81CA4EAC86EAE546E1B15D91E626FB9A31824 -5BFF17C4E79FD56ADBF6DBF01BAF6453A81EBDCB38A5FC0FD0FF0646B3B0D199 -13E2E59A1B5CAB6DE5329BE389BA0E2A2AB55CA40B711ED746C24F1E48892E76 -6DACF7DA163CDC90CF076763008E7A899870CDED5A80758E6177BE6B93B07EB1 -5800A3BF7B9AAC3FA825CE594EF5B7546B181375FA8F37608DF17856D2F8EBD5 -6030A9E6F6BEAF224AD2AEF76D03B023E2FCB922CB8E3C6816AABB61FE6E4F83 -F21B4935102C860ECA03DBEFCA461F0E5B93E5A8D18440BCF7D1D6252A24CB6E -A64FDAC8B67C4888519AA368D9C4A8C08C7155DF5BACD75C5196C571C3C456C4 -7CE8D90215FA6EE8CDD72C48740F7F5930EC3632DB63A9C8D2DA125088C0F05A -9FC83D16B7F53163F4EB6FF372C6C3115F1E68EB35967D11126EDEDF0BF80817 -E68A698183B3EB0A207DB43786E1B9D289359D75AD5E465328CAA90E712C2962 -AE2A466173F2FF30EB535A6054BB0B875DC8552C16B49DF17CF84D98D35497BD -F55E273FCBB0C735899529A69990E09149FBD2DDE64B7FA8D50AE83925DF03C8 -0B63EA158FBABB12A028803DA4B9DD6C48C0FEC469C4E730729F4BB420D5B003 -1918B4AE9CF35CFD31E8E62A44C0484E3D00143BF1D330235E821E5CFEAB4D31 -7CB4604DB1F310457FCF9075A3527279644D908DE847CCD00B6F50DBDEF91D3E -38238CAF550FDCABA2C3A46237218DCC5A09AFAF69997E1EBDA7EFE6FC99ECC8 -5D4AFD5EE35FE2346BE79B499EC8EC436868154A947D13BC02C780EBA4B9E64F -3026F1BF5DC1F8D64FEA1281EA40B4BC355638A3A59BD9055BCBB232FA45EA0B -B405131B64F105814019BC55466EE78E9E9ABB62DB30EA452F7EFD7196C76A85 -15B2CFCD89922CADC0F392B0C54A231F3999AEFB53C24EB0C63B0C8A1A1ABB6B -AAB2F93E5ECC7AB90EADA320E918106BAAFC1F8C425C617639984629018BA674 -6FF4F338AC43E23BC3740542911C058D43A49A11CB3A0CC8E3088BB5BA6048D6 -CC2AD250DE956BFBE83BB24C945C20D9C22E7105983F284EF478F9B68BFB0322 -EEB7D62802CBAAEFF1C2332159DCC7243EA40CE15C734EA905E04C476B178B82 -A08ABCB0B86A7330C75E62EE7844C9E22DDB013ADDF20AFE08122EE1B930A81D -806A0F8CC584CB7FF5F56F9B35E5FF78FD93E7E4A40C64537464EAA275FE88F4 -461FC6A467C8A69B9A9FBC10D44AC1B753D313A8E7D97F5FAEB60F82855658D1 -4DCEE043C8FCDFD8A29DD091F3BA55874A458B2B8989F35055C72FC411382361 -9AADC717E602B48D7C9521D3971A6F7EB19D539445DDE9EFBC5B58FA9E5E426C -172C45CDA24985FC4632287FC3B15849DEB56F5A061993AB10A6BC59868534E6 -69888175053108B77E4978D971B4EC57224C0F93EEA4C15AE92254140A94704E -ED5666FC06C5341F643F779CC88A9E81891565C63B6F7F6286E664F4E0A48690 -356DC96F1B98026C563700772485B83BFA06435D4E0793EF822F423C93FBACA0 -E5D889D2B76771C6F0EE997A5DB43C2F6921132890406E3C33F6F159B14C5D78 -7C151BDFFDD02B697315F191B5490073EB418A4FF2A398C68D44F0CD1B87CF9C -B52F12728B72F94D752D23151196A256908135C87991E508B8906CE2539DCA8A -31F86809C8C6C18A09F6129BD7CDC6B37E76B648788056851F22BD3E3B5772FF -EC01D822B57FFDB3BAE624F05531292641FD6A7E3666152D18F6C653048DD7D7 -98A942C840C4A0FA662F260B21C64214152BB86F03662A330109C5AC0A5EBA30 -C6201F558858130703DF76AF4FBBEE069BDE45C0D9467077D85FFED4F9BA9C61 -AED87D67CDCA453A6528AC5BA153E1039D9CCC556CEA5CBB542265FF54A1B208 -E0E13740E7E7C26AA00AEE909F8F3ADC2726081A744D8EF6BB711BF5F611A900 -76F91C26A338DA13A7160A9F42410CCEB3190000D963D036FDA05A29F598EF40 -8FAE6F8E7E6F50C99C3304A573501C13A00023085F057DF331E3354CBE65D573 -CAE73BF15B3B96B502E0AAF2B4A86237E98A997AAEFFF4227D5A26E8972C48E7 -761F430733E6EF8AB2D903C17FAFBFA21C25F8A0AC157D397BF3CC1AE7598F0A -2BE4FB46B29443CE57F41FD5F91122E9D86F903E94D5B55E2BB95949C156D138 -89883BEFD634311F9280C7F028DCA6408D3A682DF5B55B9F7ABF08F019190F60 -D39E4F0E80F0594235B09A5320109638B938633A2C196E4ED2B43DCD8643C3CF -C6123B076B7F73352F906D96FDE0FBF50CCCA432712C574D5857838BAC30B485 -D25024EB254A7EFE57D1DF0892C275CDB3DF77602F0FED0FAEBC644BCACA04B8 -B424DB125E487794CAB36E01B5E1A26F5E1E97A739AA36D77A12F5B45338EB39 -AF36CEBDED55DCBFCF497FD475FC6BAB5530AD6153C6BD982564EE8712185F1F -D5EA7ADF4104661168A01994C1FD773A50C8AD6A3E4D332E4D59521BB8BBC6C3 -866EB4AC3EA4532477E6CBF6BBF0860031C3B916AA25E3492670EA67F55CF4FD -207C684A0DDB6F4AD21B2909CBA71BCE2E762012B0927BA72367A6AE0AF87F73 -756C9BC85E4EDE35317E2CCCD138C02C7A8013AFDC1A48C3A4BB8EF257BDEEA7 -60E012F54D12D31D18DC59D5E526F12567B8688B4B67E16B56713870300016BD -A3B9DA87FDC865246AF8E94316799110D86B1DDADB8A673402D4226C519C058A -1D1E5A5778584FC28AF12819B1924060BC4F54B1054EA6AB0149E04B8C4302D4 -A56D8A347EB5D3D2A0E12CF7E35059BDB53D9FF6BD25F6D9619BC4669CFC1048 -C6C9978B8751B840F27D82A69075832BE59F55C1737CBB1220FB8FF691FDBDF3 -03BD7D225A9372AC221C38245E48320E1CCF898D9EEDD678E5B8C65B7F588321 -1A3953EEB9B39EA9A8CB72DB08C3E9234DFFF5FDF9DF804C021D57E97DA7622B -97F4CB6E0EB640E0DC9EA15C5193F92A3A7565F4C7A4C9CC327F7CD2C44900AE -D9E76FFE62FC37FA376E77131B566AE67C3E09DA80F198BBB995EE8FA47EEDB8 -4B467C6C7DB8AEA745CF8C56B8BE56534E9C56FCB2B7006426DFE93D728FA4CF -94F131C549814E54ECE7C914C5FE8E4961D3437CE7475D03534B62650F551D97 -201C794AA877445DBEB11C85ADF6119B05360700F8CEDE4766E3A1D7A35CDDC7 -9ABF7C619E3868A39D1852DBE1EEAF5D7898C78323873AC005542B68C43C5000 -CC58F675EB595F87C879694751494676465891E8A897158B481F11A171CCBBD7 -29603F00210CFD7FF31FE3D273933ECC34AFBCC4108D9B76D9ECE63EA06CF939 -4799092A54A749DACB82C1424E9879672C8BC084C360014C9C1B6D5D65C68AED -66CE329C3AD712C0A36BE7EF03FDF339CAA2E0336D387A693B1DFAB5D5164E31 -14755A158168962C9B399F8F1DF3FF5060D7464D5071058C30C572A2BC7DEE53 -84BD7614A4BEC4C84E18CF7EC81C811724463BD46CECA5FB57B0F55EAE20CC74 -6AD815D1897B037C197D2456797B992C20C70B663BF99FE28C513B4E221C8E12 -49779F8C0AE8517048ADDF7CDF0D698E3EFE60071C4997B7F5EF12B6CB65390C -224F13FBB99FFC034C0710F05019899689B6D3350BBA65C7CE7C2AB03D81B9A5 -5F3D65E4D462DAB189006669F7390A78A1B8908A4C913B15DB8827DFF15BB9A4 -A6037DDB643103B937257A7DAB025F09D53FBBC2BCB6B0BCD8D56B2B2784E498 -1F6CF8470DCC892AD0CFE11578718948BABF9C1427084643B66BB9181094E29D -5FBE37708E1D8A6B7518A96876844CB66954227A7A6AF28DD075A462526DD5D6 -40EECC56FA366106E55C7068997B54B7F0D03AC1AD45D28C67C7ECA99DBEDB1C -E18A79C353113E2E05B837E703278B202112B1C69E42A69D64B62F0E7D8F7E5B -C1F93F0F99EC20EF312046F4B0CD7DAB31E422070B629A7FA96583CF3F1519CD -CF08806F40ACD7BB5C960F21E9DA7FB3C72CBA0801ADE83DF738A4EC94F2977D -2B95A166BA42333CFE3149E19CFF0E0F07C9DEBC354164C08AD5200236653846 -B525868609C800A395690D74431F846FAFB603C3F7AB0634B99CF8AE20118AB9 -C2D4AA8F0E81A8EE0EAD7B9F7802BB173C9CA5A74B8478F34AEAA500AA356C3F -8616FF295656423D2D32DCFB54BBC3CC6F8E385E00230A2CD8D42AE06FFEB281 -F6F19030D0F95D8BB32B9820211F9C7531E688E069244B1A3253A10CC4FA150A -B4B521F3630AF02B416D88AD4EE64B4E55590FE7C4A98CD58F26712097CA7801 -4B935DC70098D07FE770A57EF1C158145102AA4A9CBF8925D19389A7FAE8465F -726023E85C07453A8576A4959BE95BA44C8ED6C444EB5EC491EFC8897D1A22E7 -3C555F5A17A045451588D7E48E4213D4F4FE1F3EE9023C3B4313C9AAB8F655D9 -012EF0324A222A44ADE79FE7CF4899D0245F2AB525B09AAFE856BE7444649002 -AFC0E222B23B -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -cleartomark -{restore}if -%%EndFont -%%BeginFont: CMR12 -%!PS-AdobeFont-1.0: CMR12 003.002 -%%Title: CMR12 -%Version: 003.002 -%%CreationDate: Mon Jul 13 16:17:00 2009 -%%Creator: David M. Jones -%Copyright: Copyright (c) 1997, 2009 American Mathematical Society -%Copyright: (), with Reserved Font Name CMR12. -% This Font Software is licensed under the SIL Open Font License, Version 1.1. -% This license is in the accompanying file OFL.txt, and is also -% available with a FAQ at: http://scripts.sil.org/OFL. -%%EndComments -FontDirectory/CMR12 known{/CMR12 findfont dup/UniqueID known{dup -/UniqueID get 5000794 eq exch/FontType get 1 eq and}{pop false}ifelse -{save true}{false}ifelse}{false}ifelse -11 dict begin -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def -/FontName /CMR12 def -/FontBBox {-34 -251 988 750 }readonly def -/UniqueID 5000794 def -/PaintType 0 def -/FontInfo 9 dict dup begin -/version (003.002) readonly def -/Notice (Copyright \050c\051 1997, 2009 American Mathematical Society \050\051, with Reserved Font Name CMR12.) readonly def -/FullName (CMR12) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle 0 def -/isFixedPitch false def -/UnderlinePosition -100 def -/UnderlineThickness 50 def -end readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 43 /plus put -dup 50 /two put -dup 51 /three put -readonly def -currentdict end -currentfile eexec -D9D66F633B846AB284BCF8B0411B772DE5CE3DD325E55798292D7BD972BD75FA -0E079529AF9C82DF72F64195C9C210DCE34528F540DA1FFD7BEBB9B40787BA93 -51BBFB7CFC5F9152D1E5BB0AD8D016C6CFA4EB41B3C51D091C2D5440E67CFD71 -7C56816B03B901BF4A25A07175380E50A213F877C44778B3C5AADBCC86D6E551 -E6AF364B0BFCAAD22D8D558C5C81A7D425A1629DD5182206742D1D082A12F078 -0FD4F5F6D3129FCFFF1F4A912B0A7DEC8D33A57B5AE0328EF9D57ADDAC543273 -C01924195A181D03F5054A93B71E5065F8D92FE23794D2DB9C535A5E57376651 -F6823308463DC4E0339C78699AC82C769542FD3B410E236AF8AF68CF124D9224 -FD6EE92A38075CAAF82447C7AF41EF96F3ADF62F76FB425BEDE4C4124E7B1E0B -8BF254D91912D3A99557F5427907A56514C5A3EB961B94112077FE9417B70DA0 -B2E1C1FA3E1D6F01D11F640CF848E45BE3E205258E64FE36AFBD4DF4E93F6B1A -966C8E7FBE2CC8FF43C1F67BF6C361678B5E90F4BA524FE8A4CAD6AB28183E6E -CA6C9636E884845105595A2E40CDBE8D4807A81AF4DB77B31873FEB221BCADD4 -2C4669459704CB58A7BC230FC59F867EEADE660E49AEEDEEB042BA9A7DD8193E -56C3A36A1F639F7EA512EE4BC6992F52C2FC82A890EFDA730105B0AF7B819295 -EE00B48F64C2B5BCB275B1DD62F289CDAD4AD9B7EF057684642FA6FA6322C277 -E779CAC36D78F7779CB6DE12638B3C65B70C6B5F8A8C6421A379719B8DD44973 -5F52856A4A29B2ED37F2B1FBE6EF4B79B7C0CD6395C756A00FACD763C235914F -847D1D99831023CE1FD89EFEC83AA7E313131C0C197248605EF5BA773D0A4000 -72F607551A8EA6F0FF19441ACA179177D1FF7B423FEBDF58B0C19CAE3C10EEF6 -3538D8FC4762B77C5AA023A8186C40D0365A4487DC3564265B3DF908572DEAA2 -57E29EC669DD72974F806EFF5ECAFA9ADF1F9D2A63087FB7BBD100F0F81C6FFB -B1EA1C9DD46548AEDD147EE64B1B4894972DAE1DC3E8569D6A3CEF9F9E46DEB7 -547E10BB2959D374A33E47C58F1B20419920AB485F166062FCCC08EB5CC9AC88 -F388F0C0155027B727729488E44CCABB7064A1432E179189C4627453C5231535 -47D1F2B8BA43069696830CBB6E5F9A135CF22D3D1FE490A3A63C088EA32FF444 -24A2427BBA63033DFE2E06DF8CE67949B6AB02F26335A376B57376814D2A7DE7 -64A4347577EBE9A6E33DD2FC214A09C6D889C8FFBF1D567032548851B8F97204 -49E215CC7D222F593E1EF1439ED60AD922D41E0E9EFB5CA48F2FEFF75AC5FEE7 -FB6676D8B8D4DB6885FBE8B61B586313E4DAFB09D94CEDC0507E93000104F3DD -F83865A2C6F6A7DA8562BF86F5DB233CC9B53391273A1462E40876A8AC2B098A -DBADD5A160DEAC061F86A5FCCAB495EF8A9D121AF07928EAFD56F618E4EAEA97 -CF89A3AFD406FC9DE1E9769C1E1EB83BB883786BC075EB5DA2692CD59C4DD7C1 -7FD2FF9B18AC740A390C1DB38670DEB18C67721A1DCD502FE7368F47DB4281D5 -459B3F020595FA3B10544AAE9EF786A0645FB7C9BB29D091E1432CD878A05918 -1665643005BFD9A4B0FFD347ADC84CE22D6F9AD4EDC05E8C7179DCB360AB57D1 -6ABCD200A4B4AD56825DC345984D9A3DE11CDA5E9EC1E5006EE4181E4EFE0846 -67D8C27BEE8F84A1E01947E945BBE988702DEB2240C4BED952E433E5305484E5 -71965D3DE95C4115FF78CE9EC18E323C599727C8B93CDFBCD1CCA780DB8C81ED -C4B5E596E1603624308972FFAE9A57B0EDB51FDDB6E23EDE2946F61BEB241345 -2A192D8CAD53E823D687F9C64A70A4B4B703291FA6317C051DC6A44BCCE0288E -3839D726A8F2E39BFF429865E95C726E808E02CD06F36C1CC9AC77999F8E28BF -CE9D74B699CA982479E9D0DD98EAB24D29C981EF0349721D6819549A39413801 -F80182D567EE316E2F0AB208068E15693E4C399A381BF9BBA625E597E6E109B8 -16F3A84C8EC92F2ADE288821092A421A8D3B907048FE947230810F0777EE2542 -29A3485223FEA079B359034F70464DAD2F0E420271A4E0CCF57A0ABBC20AB327 -0CA71B292126D395E0D083B19BEC6B48A9DE2BF470C3D01A8C3F52075BD4BE02 -A0C518355814478202FD4762EC542F8E7B9B1F7824F0554660CEB83E35635E1E -DF0D03C94C903ECB36B4948ED98B6324E0094EB1DF70863142D4ED3A932D7346 -39D69F8F044B6084482D7748C27328AFD24A3A70B99D1F7D32CB984488672254 -28B6A9E9DCA2C9FF6A1B311D72413404B3CE5428BDB7FF3C36357D7975184F56 -FA6B32AD54C37D0AF7576663AB1397B80D4E998F0B4C4F6D90B483029EF2EDA9 -D4C4204C1546EFF3100629453EAE01918D09FE104E626ABA38646F17B6A94CE8 -116BC7A8D9C319434CA5B830859B4164DFADF1D7C3ECA5C78D8DEA930EA4AC3F -59DBBF3148C91A2E807FB934E3439D4F67C6DBBA9972854E6E3688E1E0A34B74 -482217CFE031CD7B5DFEF727C3EF8DAEEEDA08F4C90289E62FB2AF2357EB2E45 -4BC547980FD479101FFEEE477AAC6268DD659E8DD9E244676FD3C6909713B71A -323B211E571BE711D103FA23B5B9AF077D84E2D20FEE805E81D20C03501F0F17 -C3B081946CD0FD577F00E50B76CC37CFA97A61B89C25DD43911B28857284BEBB -5BEC61FFE3A14C64BC5425A7A82326617F6F1FA4FEAE56071C9F559F91568179 -46369B394A5CE96FB7420FF8AB7C61CB83492FA5AE4A4B0799578594C9EA67E1 -E54498AA5CD6ABA34AD3417F04F5D8D664A7EB39D41E2D17643CAEBBCCD9C38C -C5C9541641A09335EFBCE0D276A54253EFD68141807A66F1DFEB4BEA5889FFA3 -4D20BD52012206A9F8D3E0F6AFC03FDBBDF3E51506EC6336E249CEFB571AB84C -BDF8E471E3795C04E38A5306BA6D450D72E50910D1AC385BB06CCD4B8E433A32 -5A4B7FACC976BB31FCAA1E62DB2C4FE06DDDE7367930E336B49F47DAD91C8735 -9A35D80CA2E117E86B52E41E9278046ED923454989E48610ACB3B1663F197117 -52659A9D7BFA561C7ACE0771794FC778675F83C5EDCB132AF124C7E6540A140B -E0A268836C73A3C746DC964E482E63C56C0D396515283970FBFF182F9F684FE2 -655FD8F5D057D22246DDC3FD11B77552DB4D90ADBAB77BBB1FB1592129DE0AEC -F822D7D36E52BCDABBD560B403A5C56C5E1BE789C3AC049318C7FAC5E5861E42 -FD66C3C0F46361078D7E036281682BCE9BBF77983C93ECBBEBA9B359769CA442 -87FCA1B98F4EEC4935CC93B08AAADDF355C99816453587310F08C50B9BA3D107 -5388A1F3AED2AE32BEFADF0285DA90436D1D7EA85D7B9B6DF2AC4B778CFADFF6 -6EEE54D1A1C5DEE3CCA7EFF57A7C2931933CEED90CA26DAAB45E4388EC4DC366 -B9E88518D6CF094861D2A59282044CC06E63EFB390A6DF4BA5EAC7CE39E1EE03 -3D84099F5BE96612789AF3EDED07266EF10A0FC23EA1EA97040B6BAA63138B1A -A9CB8F5DED781260962D7618EDB200C3ED976033E8967A8CC676E9C11F74BE34 -343A7ECE7EE97E8F76F7E95517A6D6163527406EF5A669535CB2BF4031F29046 -BB2D0FFFB47A576F5EAB1D00A582965C56F28C00B3BB7BE2CC8D8391F789070D -775EB775437F0CD53DA840BB3575104B63E4B0BF14E3F14B320EDEF65FD4CAF5 -8596DA491BBCF3153DED3B718F833D106432DF8DB8B8E6B34D5308C9010A5DD0 -7E0E53260BB84BAB3EA748E8D72F75901604F80F4416920D69B4B983DCDB72C5 -E9928F01A4A85954FD74578AE336C782CDF81D1EB7EBCEBFBAE7ED8AB4862584 -397928F502D65139CCD582CF0723C5262EE54B9D2B8C39614652A8A90E1C3B65 -7D26B99DA298FE4B9A7E98848F619C9BB4FF9FD215B72F99506F06355B332689 -37D80AFD9F9ACD8172CDC51FCD3A759ACA0F7D4EBB07840840EE42C2D5B8B257 -2C6DB3A7657B75F2F0B9730A20112745703E2D0FE709436CA6A5F36F59E64D9E -37C0A23D6D289E1AC1DA273872F5FC5C3DA2B127F078A4D7AB3FD7E124455817 -DDC796D54EF26A1FBFD539D3A21B86DD4477DA49213259ABB3FF241424F2BE5F -89151E02FF87E0BEE26E85C0E518D8BE7CC9214B8E9A9EA1DBB49C6C212CCF08 -90C0F23E9858947EE344062EBD9C574979087439975EAD4E85CD7BFAD3C91CF1 -EFF577843AF1427D06CB2F3BB519ED1591974218C43F0D2038665F9E2E3960B7 -FE68CD3CB2DB6B36C7997C6B21EC11CF1DE049541001FFF26D14C255E3AE862C -5A5701292FD2FB3D04523D6E2F3547923BB117718DFB6E6520F0D0B5450C695B -8C9242CC8671B7284CB2E1E9EB097A3DB1B4D5E8EEB93B4DC7E38C0A10474665 -54DDCBAF079B92EA494F6FA75A84C5AAFE280284D0823D7C22249A21044BB0E6 -4062074ECD17B62E03EDF4945A294BFEFB51F5FD870D9D7230FC91B83C1D85A8 -86CDDF326FC90E04362145D6E8630C50594484FB829DA18F5C078F2EE67D2F2B -08DFF39AE2E8C9741FA989AE494C7166F122D2C5F71B97C973B7CE8500E9F87E -D59C30F2E99CC4D34713DAB680598F41955FBDC26A14CF1E73D6BD6B9AAC8D3B -B998F2D0D647356CD236DEAD6561389ED3A6746221B0CF15D6648412B35A6B54 -6A0EF5BBB34AA376D9BAF025BFC650C1B74333CE85413D0EBB2F4D082A26A5BC -3C0A25D2B12CB159F140E00E262F1CFECCB2C802FF94CD34DA0CE9B4B3830FB1 -DA85B9B670D5169928990A2E9CC869891CA2FFAD9774E6B92549644DAA5FE00C -A5BE4F5FF91A0B6D2FD8F96121D766391EC4ED3E73DADD476B7DAE1A50AFCD98 -DB7E27E44D30416088D9BC07D4661D9ECEC0806830ABF14CE55AA3CA2DF66E8E -748B8ED46466F1EEB072AC0674FE6FED231E0DDA59ED7C42BC05EF00E176050A -C4834D893DE42474EA20DB1E25059E84BD137EF65A02CC295B0FFDE4CDE95879 -0FE88BDF2519ABAE7F8CC3E6386ED35E04A14F1E3861922645E3A3F43B48A5AA -1999A5EFE192515FCC625C829FF5A7B337AA422F5E920545F9BB269C869A821D -6C4C26DD2AE746EF0F0B4C1E7E9871ADB5270E1CA9BE28225F7A0370D4C52422 -E25263EE101C4EC1C7811B05AD42F364844A56BB91EE72FC8ED53CC6954D2BD6 -F945D739BE4C61E36143CE890FC0CBF2F610018D678ECF7CEAB18FF5A0E48F76 -FDE2463D40A99380D679B3B76D39C664F4992D23E5988B0D1AF33DFB04894016 -E852EFD1EFFE586153C0F31ADBDBDE3F73FB49C5EE64D0D02E1504248FAFAC3D -903FD44679BB09C30288139B41B1E90A10139CA3172677250B16535A1F3E5E4B -6F4264DE58896E66051FC677030A121C5A285C47B6129CB5A3998830CE070D21 -2F093FC1B44089F603A21F45F60960F134A47226874C737EF6C085634B0A4A66 -139420501351F737A73F39D960EC38420BE46E5B09D298E7C16B8E32F01507D4 -0141FC52DA1DE718D634AD9C8B00E46EEEF84356759324D2B9A3473C5DA38DE9 -E30182B87F91B6A7F7BACF29A93B44C879CCDEDB063F9D2E51E0F1FC9F018FE1 -2433D85AF24B55DE3A61C4D0A2DA4FDE933F5F6FDF17E9FA9932BFC46E2D71F6 -585EEF5B2E4E89E797A24B799D7F064DD1A817A53677FC9EB8CC3E7F93FE50E8 -D50E3191052943FD6C98B573BDD1F6D70349E1F8011599E3F8FDF1D6E80A710E -51E434E85801617C6FD8ACCF1B77B4BFCCDD35CB4C0367F4EB4D8D9DE8284D5E -B4F43E2F8320C2C5A9AE90ECBA7E65D377E91DB69FEF27069235366AD3E126C3 -A73CE97F4C90BA00D206FA012C327FD69EE59AF4470A315B1799CDC0539BF90E -512C8FC3BEFE4D1B01D969EA9E3FEF976CD6E0FA4C9ECEC955B265CFD58AB8E5 -F7371E479279EE14B689269205C5B506940606CF3E24A1E7EFF3CA96ED30AD6D -E243DE57690C3D69A401AB3315FA49E4BF4ACD4DD1CA39272533E82EFDD508E5 -1C2CD286CCC5DE1202C7C7F654521750632EB637F918667E2233A43DF75239EB -F28F3129EB5DEE2FC5BFC331FF709B0FE9B327CBBCE98BCA2C861C6547E50407 -1218CEBE6EB5F9BABA4F2E11BCC6FB553A544A567B459E06375102C69F8018DF -BA6A227CFB13E2D74E6A521E01B74F2963E9A0A1C9FD87A88EE6356E3BFABF55 -BABC751D2BF85E6712E8EF57914920775906662E4BA68FFA21AD422D34E15578 -43CA0568B431101A1194F8AB1EF25E886BFCDFC10F4A5EBD9530816548BC298E -AE4A0B6B52B8B59C644C409B4191B6F4203F52314F2675F02AEB65A72C66E92A -2AC703E15D8D381522C0AC30C165B822A9B8D18CAECC094EDE020756018DCF51 -D0701B507519C4270B70D8CE94B436F640C15872F9B5B77892AA3D110E4D6A65 -8F0815C61A5127BA25815378683F46E69E54A391A8675977E7DF9C2D4E6FA991 -9F029E50CC2F266B31EE9F9F24452D5838905F330CB7E416B8AF836C5AC26AB8 -BE2ECC6EA4BDAA08C30995709E225C21D35DB6369167602CBFA8DB2697635925 -969002CD1BEE745DA2E56C17EF3F0C05E3847147F86963C37A221C8827195A8A -3D38993E4939AC915BFD9A212F5FF3F826F742B952018986F9FBDDB69C3AC65A -845F7F33C55D4BE60A1817EBBCA7E1538E8087E1BD5C083A320D52953BE65F31 -E8339C612A510B59CE48D2EF7061560C4AD258E7DC59694493E3AC878246F37D -6DE89253EBC8830C6B209E818213C4AC4CF1F391AD91D57BE76FB0E2924A1407 -E4A949C905E44F54EAED6419F13D59942C8079336A172D4758BEB5D3E786FB93 -3CBE4FD2EB53E4E1DAC34E821EB30FD44BC6CB4298242C38F848FC23AEDC9733 -52BE6F32E31E25F18301370F8936810B0566B664B042C7AE0D78ACF0A87E5BF6 -F9B66E358168B2CEA30DCD940074F3ADB793CDB136161FE2522905E87B8E463F -95D4DAB7E14A3DF7BCCE8141C5A08FCFA2BCE9F2D1B05A7642E75877EB840149 -AAB007CD239AE47AD115929427717F219B0A8907F0EC79ADE1B901DAEE87A2F8 -39361DAB43DFFF69650F601B24061A9353CFD619FF9626F63275FD09A5B13BB4 -8B3379EC4D147C41197E8387FC04DA7BE409524CEF74EA91DC066808A7FD0EF3 -957A44E2503EDA67B1C61827479486134E922E560A673BF314D601C66003CD07 -55569085AFC8428389A140EB976CCFB8F29E27587E46C413ABE2EFB51AF5913F -53EEB74063162E0BA1E24CEDCA320377D3E11BD374F0B44E132A5C35835B6E2C -D32948EF9DC7931D104C1385709DA882DED6458319F21C2329938396BC074106 -CB9CFB9E0A915F8DBC8435F386917AC87A2BA45D857EC30ECA66FB4044F5439E -CDD556B82A0E43418D179AD883C85AC276E1190CEC242E3E1D86E725ADC39E46 -BB6C47FE9E17E29F8EA81E870302A00D91434F3B7A05F243176E6EF1082541A1 -B9052191EE5C2B8E94A2E02DB65FC769653CA8D1C07A13CB853544AEC7FC35C5 -218DE3128AA31952DCE19C55C23FD69BCEA2C661F57B11B8F9E86BFA718D1521 -3346E78C701A5E51923D6D937E62FDE3669B214D240538F069A100A542720A86 -31DE88116DE775F7ACC2A49EA6C02A24408271A846990669F2AF60AFAB4C16F9 -7F4E88E917F0FFDCE68F22998AC0AF2A60A73258C3A4BBC42A2F918123128195 -196D0E150D79AC3CF4628503D1F3FC528265ED8324E56849A47B3B07C29940B9 -1BC270071E221D355EA51E9942D3BD7F99816304FFFC8F5B036C953B38759341 -ED5D7B9C8E6B70C409DD8362FD291201CC385E4A98D73E8518A4C0E544152563 -82032FBD2FCB6E403D34B85ED4053A8CB619BDD4DE001F4C3007B1F317579651 -E6D6662189CC2D95AB85D7473F65C5D7B4AC63B0FE928F3400035D5A9D443D0D -F3532B99F3AC26CB25EA3CD64C341159061E02EFBC7C033C05CD919BBD827A6A -BFCF3BD739E32E7FE909AEE068D50FAC33605FFF98C7D0115FB860178FD03DB9 -7985B78E0AC21F2EA065FA841F5928FB85163B2E2D8F850DC7EE313912C45C28 -2783F6762C67882EFEDDC7E7567F91C16B16FD8D5A1ABF35B5586307701B91AD -54984598F2AD46FEE3D68A2731BEAA754C8E730FE0E84952EF77930E4118F8D7 -2F3AD753A1EF0D6F689C0BCC727FC6CE58C39D483D51C4403D3FC411AD237767 -1B303190744282C035029AE5A5FC4E3C8CC24928985786895FAFC35A80F855AE -6E03F3710563DBD2A5D0909B5925EB61D1FE992A2DA871223E0E0A6CF877D20F -92623411B3024EB89ED33BC4CFFEE9CE389FC1B2358F4016A8BAB3D85D7A0443 -B58C214F2C455765836EC2F7FF58C260A3F73E47E3B854C11BCBCA161967884F -56AE7B42D80716F3F34B6818D7BD013097B08C1D91A542CA44CE068792C5AE6A -49269B6C28B34112C0977E2A0A2D9033EBBEB8A1D4409B09BD151EB7ECD58554 -A07A1D54EE490923B679376D404331E28A9D58C999E45FEEFFC0034858791242 -8FCF174110B096A29923C0296D322D8298DAD0F1C428911F4F11D04E28F4066C -6D3234574741FFB3B661FCA81D930A30C22CAEE12BEE59F507A56FEF98CE57D3 -124362512E2AF313D63DEA383549A6D202910CDF8F1AD3096A1B590C54B94E15 -140B76AE2368BE3483C46AD6FA0033593FBFCBD0F21F1140ED60C457CE926C12 -DAE64484D332B210AB78106364B53443725FDBF8CD9709797E636ACC97EF1C4C -79851908285DD15FD5F91E5B79B8DBA98D0ADCE574EDCC1814F2DCBF6AFF8B0F -D9AD77759CFC2F39B077B37FEBB24DA06BB2B090FB9A6A78F1DBC52643F95FDB -C64D91566D7EB910C1287462C0729E64591DFC5C3B0A0E6A35E935CB05B5E378 -6766502B9624D8678248323E343393E9C4AC0765A1EA3F54D9375A5088DB1FFE -FA4E12238813386C29EB1CDDEFA88B8C7F9EB8747C99DB1FFC66BC12E3B276E4 -DBC1FABA04 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -cleartomark -{restore}if -%%EndFont -TeXDict begin 40258437 52099154 1000 600 600 -(/tmp/alex-kde4/kde-alex/cantor/QBb321.dvi) @start -/Fa 143[83 112[{}1 99.6264 /CMSY10 rf /Fb 205[35 50[{}1 -66.4176 /CMR8 rf /Fc 135[55 120[{}1 99.6264 /CMMI12 rf -/Fd 204[49 49 6[76 43[{}3 99.6264 /CMR12 rf end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 1413 787 a Fd(3)17 b Fc(x)1534 -746 y Fb(2)1595 787 y Fd(+)1693 700 y Fa(p)p 1776 700 -49 4 v 87 x Fd(2)p Fc(x)22 b Fd(+)2010 720 y(2)p 2010 -765 V 2010 856 a(3)p eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF Binary files /tmp/qpYNBAmSpc/cantor-4.7.3/doc/screenshot.eps and /tmp/rmueWRBXyT/cantor-4.7.90/doc/screenshot.eps differ Binary files /tmp/qpYNBAmSpc/cantor-4.7.3/doc/screenshot.png and /tmp/rmueWRBXyT/cantor-4.7.90/doc/screenshot.png differ diff -Nru cantor-4.7.3/.gitignore cantor-4.7.90/.gitignore --- cantor-4.7.3/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/.gitignore 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,14 @@ +# Author: Filipe Saraiva (filip.saraiva at gmail.com) +# Date: 2011.27.04 + +# Personal configurarion files +*.user +cantor.kdev4 +.kdev4/* + +# Temporary files +*~ + +# Folder to compile source code +build/ +build/* Binary files /tmp/qpYNBAmSpc/cantor-4.7.3/icons/hi48-app-qalculatebackend.png and /tmp/rmueWRBXyT/cantor-4.7.90/icons/hi48-app-qalculatebackend.png differ Binary files /tmp/qpYNBAmSpc/cantor-4.7.3/icons/hi48-app-scilabbackend.png and /tmp/rmueWRBXyT/cantor-4.7.90/icons/hi48-app-scilabbackend.png differ diff -Nru cantor-4.7.3/src/assistants/advancedplot/advancedplotassistant.desktop cantor-4.7.90/src/assistants/advancedplot/advancedplotassistant.desktop --- cantor-4.7.3/src/assistants/advancedplot/advancedplotassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/advancedplot/advancedplotassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -11,9 +11,9 @@ Name[et]=Täiustatud joonis Name[fr]=Graphe avancé Name[gl]=AdvancedPlot +Name[hu]=Speciális ábrázolás Name[it]=Grafico avanzato Name[km]=AdvancedPlot -Name[lv]=Papildu grafiki Name[nb]=Avansert plott Name[nds]=Verwiedert Bagenschrieven Name[nl]=AdvancedPlot @@ -23,9 +23,9 @@ Name[ru]=Настраиваемый график Name[sl]=Napreden Graf Name[sv]=Avancerat diagram -Name[ug]=AdvancedPlot Name[uk]=Складне креслення Name[x-test]=xxAdvancedPlotxx +Name[zh_CN]=高级绘图 Name[zh_TW]=進階繪製 RequiredExtensions=AdvancedPlotExtension X-KDE-ServiceTypes=Cantor/Assistant diff -Nru cantor-4.7.3/src/assistants/differentiate/differentiateassistant.desktop cantor-4.7.90/src/assistants/differentiate/differentiateassistant.desktop --- cantor-4.7.3/src/assistants/differentiate/differentiateassistant.desktop 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/assistants/differentiate/differentiateassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -16,6 +16,7 @@ Name[fr]=Calcul de dérivées Name[gl]=Diferenciar Name[hr]=Deriviraj +Name[hu]=Deriválás Name[it]=Funzione differenziabile Name[ja]=微分 Name[km]=ឌីផេរ៉ង់សែល @@ -54,6 +55,7 @@ Comment[et]=Avaldiste tuletiste arvutamist lihtsustav abiline Comment[fr]=Une boîte de dialogue d'assistant simplifiant le calcul de dérivées d'expressions Comment[gl]=Un diálogo auxiliar para simplificar o cálculo das derivadas de expresións +Comment[hu]=Segédablak kifejezések deriváltjának kiszámításának egyszerűsítésére Comment[it]=Un assistente per semplificare il calcolo di derivate di espressioni Comment[ja]=数式の微分計算を手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ក្នុង​ការ​គណ​នា​កន្សោម​សមីការ​ដេរីវេ diff -Nru cantor-4.7.3/src/assistants/integrate/integrateassistant.desktop cantor-4.7.90/src/assistants/integrate/integrateassistant.desktop --- cantor-4.7.3/src/assistants/integrate/integrateassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/integrate/integrateassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon=office-chart-area Name=Integrate +Name[bg]=Интеграли Name[bs]=Integriši Name[ca]=Integra Name[ca@valencia]=Integra @@ -16,6 +17,7 @@ Name[fr]=Calcul d'intégrales Name[gl]=Integrar Name[hr]=Integriraj +Name[hu]=Integrálás Name[it]=Integrazione Name[ja]=積分 Name[km]=​អាំង​តេក្រាល @@ -43,6 +45,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=An Assistant dialog to simplify calculation of integrals +Comment[bg]=Помощен прозорец за улесняване изчисляването на интеграли Comment[ca]=Un diàleg assistent per simplificar els càlculs d'integrals Comment[ca@valencia]=Un diàleg assistent per simplificar els càlculs d'integrals Comment[cs]=Pomocný dialog pro zjednodušení výpočtu integrálů @@ -55,6 +58,7 @@ Comment[eu]=Integralen kalkulua errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant le calcul d'intégrales Comment[gl]=Un diálogo auxiliar para simplificar o cálculo de integrais +Comment[hu]=Segédablak integrálok számolásának egyszerűsítésére Comment[it]=Un assistente per semplificare il calcolo di integrali Comment[ja]=積分計算を手助けするウィザード Comment[km]=ប្រអប់​​ជំនួយ​ដែល​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ដល់​ការ​គណនា​អាំង​តេក្រាល diff -Nru cantor-4.7.3/src/assistants/linearalgebra/creatematrix/creatematrixassistant.desktop cantor-4.7.90/src/assistants/linearalgebra/creatematrix/creatematrixassistant.desktop --- cantor-4.7.3/src/assistants/linearalgebra/creatematrix/creatematrixassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/linearalgebra/creatematrix/creatematrixassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -1,8 +1,9 @@ [Desktop Entry] Type=Service Name=Create Matrix +Name[bg]=Създаване на матрица Name[bs]=Kreiraj matricu -Name[ca]=Crea matriu +Name[ca]=Crea una matriu Name[ca@valencia]=Crea matriu Name[cs]=Vytvořit matici Name[da]=Opret matrix @@ -16,6 +17,7 @@ Name[fr]=Création de matrices Name[gl]=Crear unha matriz Name[hr]=Stvori matricu +Name[hu]=Mátrix létrehozása Name[it]=Crea matrice Name[ja]=行列を作成 Name[km]=បង្កើត​ម៉ាទ្រីស @@ -44,6 +46,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=An Assistant dialog to simplify entering of matrices +Comment[bg]=Помощен прозорец за улесняване въвеждането на матрици Comment[ca]=Un diàleg assistent per simplificar la introducció de matrius Comment[ca@valencia]=Un diàleg assistent per simplificar la introducció de matrius Comment[cs]=Pomocný dialog pro zjednodušení zadávání matic @@ -56,6 +59,7 @@ Comment[eu]=Matrizeen sarrera errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant la saisie de matrices Comment[gl]=Un diálogo auxiliar para simplificar a introdución de matrices +Comment[hu]=Segédablak mátrixok bevitelének egyszerűsítésére Comment[it]=Un assistente per semplificare l'inserimento di matrici Comment[ja]=行列の入力を手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ដល់​ការ​បញ្ចូល​ម៉ាទ្រីស diff -Nru cantor-4.7.3/src/assistants/linearalgebra/eigenvalues/eigenvaluesassistant.desktop cantor-4.7.90/src/assistants/linearalgebra/eigenvalues/eigenvaluesassistant.desktop --- cantor-4.7.3/src/assistants/linearalgebra/eigenvalues/eigenvaluesassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/linearalgebra/eigenvalues/eigenvaluesassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -16,6 +16,7 @@ Name[fr]=Valeurs propres Name[gl]=Valores de Eigen Name[hr]=Svojstvene vrijednosti +Name[hu]=Sajátértékek Name[it]=Autovalori Name[ja]=固有値 Name[km]=តម្លៃ​ផ្ទាល់​ខ្លួន​ @@ -32,7 +33,6 @@ Name[sv]=Egenvärden Name[th]=ค่าลักษณะเฉพาะ Name[tr]=Eigen değerleri -Name[ug]=Eigenvalues Name[uk]=Власні значення Name[x-test]=xxEigenvaluesxx Name[zh_CN]=特征值 @@ -55,6 +55,7 @@ Comment[eu]=Autobalioen kalkulua errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant le calcul de valeurs propres Comment[gl]=Un diálogo auxiliar para simplificar o cálculo de valores de Eigen +Comment[hu]=Segédablak sajátértékek kiszámításának egyszerűsítésére Comment[it]=Un assistente per semplificare il calcolo di autovalori Comment[ja]=固有値の計算を手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ដល់​ការ​គណនា​តម្លៃ​ផ្ទាល់​ខ្លួន​ diff -Nru cantor-4.7.3/src/assistants/linearalgebra/eigenvectors/eigenvectorsassistant.desktop cantor-4.7.90/src/assistants/linearalgebra/eigenvectors/eigenvectorsassistant.desktop --- cantor-4.7.3/src/assistants/linearalgebra/eigenvectors/eigenvectorsassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/linearalgebra/eigenvectors/eigenvectorsassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -16,6 +16,7 @@ Name[fr]=Vecteurs propres Name[gl]=Vectores de Eigen Name[hr]=Svojstveni vektori +Name[hu]=Sajátvektorok Name[it]=Autovettori Name[ja]=固有ベクトル Name[km]=វ៉ិចទ័រ​ផ្ទាល់​ខ្លួន​ @@ -32,7 +33,6 @@ Name[sv]=Egenvektorer Name[th]=เวกเตอร์ลักษณะเฉพาะ Name[tr]=Eigen Vektörleri -Name[ug]=Eigenvectors Name[uk]=Власні вектори Name[x-test]=xxEigenvectorsxx Name[zh_CN]=特征向量 @@ -55,6 +55,7 @@ Comment[eu]=Autobektoreen kalkulua errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant le calcul de vecteurs propres Comment[gl]=Un diálogo auxiliar para simplificar o cálculo de vectores de Eigen +Comment[hu]=Segédablak sajátvektorok kiszámításának egyszerűsítésére Comment[it]=Un assistente per semplificare il calcolo di autovettori Comment[ja]=固有ベクトルの計算を手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ដល់​ការ​គណនា​វ៉ិចទ័រ​​ផ្ទាល់​ខ្លួន​ diff -Nru cantor-4.7.3/src/assistants/linearalgebra/invertmatrix/invertmatrixassistant.desktop cantor-4.7.90/src/assistants/linearalgebra/invertmatrix/invertmatrixassistant.desktop --- cantor-4.7.3/src/assistants/linearalgebra/invertmatrix/invertmatrixassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/linearalgebra/invertmatrix/invertmatrixassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,7 +2,7 @@ Type=Service Name=Invert Matrix Name[bs]=Invertuj matricu -Name[ca]=Inverteix matriu +Name[ca]=Inverteix una matriu Name[ca@valencia]=Inverteix matriu Name[cs]=Invertovat matici Name[da]=Invertér matrix @@ -16,6 +16,7 @@ Name[fr]=Inversion de matrices Name[gl]=Inverter matriz Name[hr]=Invertiraj matricu +Name[hu]=Mátrix invertálása Name[it]=Matrice inversa Name[ja]=逆行列 Name[km]=ម៉ាទ្រីស​ច្រាស @@ -54,6 +55,7 @@ Comment[eu]=Matrizeen alderantzikatzea errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant l'inversion de matrices Comment[gl]=Un diálogo auxiliar para simplificar a inversión de matrices +Comment[hu]=Segédablak mátrixok invertálásának egyszerűsítésére Comment[it]=Un assistente per semplificare l'inversione di matrici Comment[ja]=逆行列の計算を手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ក្នុង​ការ​ដាក់​​ម៉ាទ្រីស​បញ្ច្រាស diff -Nru cantor-4.7.3/src/assistants/plot2d/plot2dassistant.desktop cantor-4.7.90/src/assistants/plot2d/plot2dassistant.desktop --- cantor-4.7.3/src/assistants/plot2d/plot2dassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/plot2d/plot2dassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -1,6 +1,7 @@ [Desktop Entry] Type=Service Name=Plot2d +Name[bg]=Plot2d Name[ca]=Plot2d Name[ca@valencia]=Plot2d Name[cs]=Graf2d @@ -31,7 +32,6 @@ Name[sv]=Rita i två dimensioner Name[th]=ลงจุด 2 มิติ Name[tr]=2B Çizim -Name[ug]=Plot2d Name[uk]=Plot2d Name[x-test]=xxPlot2dxx Name[zh_CN]=Plot2d @@ -42,6 +42,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=An Assistant dialog to simplify plotting of 2D functions +Comment[bg]=Помощен прозорец за улесняване чертаенето на двуизмерни функции Comment[ca]=Un diàleg assistent per simplificar la representació gràfica de funcions 2D Comment[ca@valencia]=Un diàleg assistent per simplificar la representació gràfica de funcions 2D Comment[cs]=Pomocný dialog pro zjednodušení vytvoření grafu dvourozměrných funkcí @@ -54,6 +55,7 @@ Comment[eu]=2D funtzioen marrazketa errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant le tracé de fonctions 2D Comment[gl]=Un diálogo auxiliar para simplificar a representación de funcións 2D +Comment[hu]=Segédablak 2D-s függvények ábrázolásának egyszerűsítésére Comment[it]=Un assistente per semplificare il disegno di funzioni 2D Comment[ja]=二次曲線をグラフ化を手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ដល់​ការ​គូស​ក្រាហ្វិក​អនុគមន៍​ទ្វេ​មាឌ diff -Nru cantor-4.7.3/src/assistants/plot3d/plot3dassistant.desktop cantor-4.7.90/src/assistants/plot3d/plot3dassistant.desktop --- cantor-4.7.3/src/assistants/plot3d/plot3dassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/plot3d/plot3dassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -1,6 +1,7 @@ [Desktop Entry] Type=Service Name=Plot3d +Name[bg]=Plot3d Name[bs]=Plot3d Name[ca]=Plot3d Name[ca@valencia]=Plot3d @@ -32,7 +33,6 @@ Name[sv]=Rita i tre dimensioner Name[th]=ลงจุด 3 มิติ Name[tr]=3B Çizim -Name[ug]=Plot3d Name[uk]=Plot3d Name[x-test]=xxPlot3dxx Name[zh_CN]=Plot3d @@ -43,6 +43,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=An Assistant dialog to simplify plotting of 3D functions +Comment[bg]=Помощен прозорец за улесняване чертаенето на триизмерни функции Comment[ca]=Un diàleg assistent per simplificar la representació gràfica de funcions 3D Comment[ca@valencia]=Un diàleg assistent per simplificar la representació gràfica de funcions 3D Comment[cs]=Pomocný dialog pro zjednodušení vytvoření grafu trojrozměrných funkcí @@ -55,6 +56,7 @@ Comment[eu]=3D funtzioen marrazketa errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant le tracé de fonctions 3D Comment[gl]=Un diálogo auxiliar para simplificar a representación de funcións 3D +Comment[hu]=Segédablak 3D-s függvények ábrázolásának egyszerűsítésére Comment[it]=Un assistente per semplificare il disegno di funzioni 3D Comment[ja]=三次曲線のグラフ化を手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ដល់​ការ​គូស​ក្រាហ្វិក​អនុគមន៍ត្រី​មាឌ diff -Nru cantor-4.7.3/src/assistants/runscript/runscriptassistant.desktop cantor-4.7.90/src/assistants/runscript/runscriptassistant.desktop --- cantor-4.7.3/src/assistants/runscript/runscriptassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/runscript/runscriptassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon=system-run Name=RunScript +Name[bg]=Изпълнение на скрипт Name[bs]=PokreniSkriptu Name[ca]=ExecutaScript Name[ca@valencia]=ExecutaScript @@ -34,7 +35,6 @@ Name[sv]=Kör skript Name[th]=ให้สคริปต์ทำงาน Name[tr]=Betiği Çalıştır -Name[ug]=RunScript Name[uk]=Виконати скрипт Name[x-test]=xxRunScriptxx Name[zh_CN]=运行脚本 @@ -45,6 +45,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=An Assistant for running an external Script file +Comment[bg]=Помощник за изпълнение на външни скриптове Comment[ca]=Un assistent per executar un fitxer d'script extern Comment[ca@valencia]=Un assistent per executar un fitxer d'script extern Comment[cs]=Pomocník pro spouštění externího skriptu @@ -57,6 +58,7 @@ Comment[eu]=Kanpoko script fitxategi bat exekutatzeko laguntzaile bat Comment[fr]=Un assistant permettant de lancer un fichier de script externe Comment[gl]=Un asistente para executar un ficheiro de script externo +Comment[hu]=Segéd külső szkriptfájlok futtatásához Comment[it]=Un assistente che esegue file con script Comment[ja]=外部のスクリプトファイルを実行するウィザード Comment[km]=ប្រអប់​ជំនួយ​សម្រាប់​រត់​ឯកសារ​ស្គ្រីប​ខាង​ក្រៅ diff -Nru cantor-4.7.3/src/assistants/solve/solveassistant.desktop cantor-4.7.90/src/assistants/solve/solveassistant.desktop --- cantor-4.7.3/src/assistants/solve/solveassistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/assistants/solve/solveassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon=dialog-ok Name=Solve +Name[bg]=Решаване Name[bs]=Riješi Name[ca]=Resol Name[ca@valencia]=Resol @@ -46,6 +47,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=An Assistant dialog to simplify solving of equations +Comment[bg]=Помощен прозорец за решаване на уравнения Comment[ca]=Un diàleg assistent per simplificar la resolució d'equacions Comment[ca@valencia]=Un diàleg assistent per simplificar la resolució d'equacions Comment[cs]=Pomocný dialog pro zjednodušení řešení rovnic @@ -58,6 +60,7 @@ Comment[eu]=Ekuazioen ebazpena errazteko elkarrizketa laguntzaile bat Comment[fr]=Une boîte de dialogue d'assistant simplifiant la résolution d'équations Comment[gl]=Un diálogo auxiliar para simplificar a resolución de ecuacións +Comment[hu]=Segédablak egyenletek megoldásának egyszerűsítésére Comment[it]=Un assistente che semplifica la risoluzione di equazioni Comment[ja]=方程式を解くのを手助けするウィザード Comment[km]=ប្រអប់​ជំនួយ​ដែល​ធ្វើ​ឲ្យ​ងាយ​ស្រួល​ដល់​ការ​ដោះ​ស្រាយ​សមីការ diff -Nru cantor-4.7.3/src/backends/CMakeLists.txt cantor-4.7.90/src/backends/CMakeLists.txt --- cantor-4.7.3/src/backends/CMakeLists.txt 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/backends/CMakeLists.txt 2011-11-17 20:56:23.000000000 +0000 @@ -1,10 +1,11 @@ add_subdirectory(null) add_subdirectory(maxima) add_subdirectory(octave) +add_subdirectory(scilab) -if(ANALITZA_FOUND) +if(Analitza_FOUND) add_subdirectory(kalgebra) -endif(ANALITZA_FOUND) +endif(Analitza_FOUND) if(NOT WIN32) add_subdirectory(sage) @@ -13,3 +14,9 @@ if(R_FOUND) macro_optional_add_subdirectory(R) endif(R_FOUND) + +macro_optional_find_package(Qalculate) +macro_log_feature(QALCULATE_FOUND "Qalculate" "A multi-purpose desktop calculator with support for customizable functions, units and arbitrary precision." "http://qalculate.sourceforge.net/" FALSE "" "Backend to use Qalculate with Cantor.") +if(QALCULATE_FOUND) + macro_optional_add_subdirectory(qalculate) +endif(QALCULATE_FOUND) diff -Nru cantor-4.7.3/src/backends/kalgebra/kalgebrabackend.desktop cantor-4.7.90/src/backends/kalgebra/kalgebrabackend.desktop --- cantor-4.7.3/src/backends/kalgebra/kalgebrabackend.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/backends/kalgebra/kalgebrabackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -50,7 +50,7 @@ Name[sv]=Kalgebra Name[tr]=KAlgebra Name[ug]=KAlgebra -Name[uk]=KАлгебра +Name[uk]=KAlgebra Name[x-test]=xxKAlgebraxx Name[zh_CN]=KAlgebra Name[zh_TW]=數學_KAlgebra @@ -75,6 +75,7 @@ Comment[fr]=Moteur KAlgebra pour Cantor permettant d'utiliser le même langage que dans l'application KAlgebra pour les feuilles de calcul de Cantor. Comment[gl]=Infraestrutura de KAlgebra para Cantor. Permite empregar a mesma linguaxe que na aplicación KAlgebra nas fichas de Cantor. Comment[hr]=Pozadinski servis KAlgebra za Cantor. Omogućava korištenje istog jezika kojeg koristite u KAlgebri unutar Cantorovih radnih tabli. +Comment[hu]=KAlgebra modul a Cantorhoz. Lehetővé teszi a KAlgebra nyelvének használatát a Cantor munkalapokon. Comment[it]=Motore KAlgebra per Cantor. Permette di usare in Cantor lo stesso linguaggio usato in KAlgebra. Comment[km]=កម្មវិធី​ខាង​ក្រោយ​របស់​ KAlgebra សម្រាប់​ Cantor ។ អនុញ្ញាត​ឲ្យ​អ្នក​ប្រើ​ភាសា​តែ​មួយ​ ដូច​ដែល​​​អ្នក​បាន​​ប្រើ​នៅ​ក្នុង​កម្មវិធី​ KAlgebra ក្នុង​សន្លឹក​កិច្ច​ការ​របស់​​ Cantor ។ Comment[lv]=KAlgebra aizmugure priekš Cantor. Ļauj Cantor darblapās izmantot to pašu valodu, ko lietojat programmā KAlgebra. diff -Nru cantor-4.7.3/src/backends/maxima/maximabackend.desktop cantor-4.7.90/src/backends/maxima/maximabackend.desktop --- cantor-4.7.3/src/backends/maxima/maximabackend.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/backends/maxima/maximabackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon=maximabackend Name=Maxima +Name[bg]=Maxima Name[bs]=Maxima Name[ca]=Maxima Name[ca@valencia]=Maxima @@ -46,6 +47,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=Backend for the Maxima Computer Algebra System +Comment[bg]=Ядро за компютърната система за алгебра Maxima Comment[ca]=Dorsal per al Maxima: un sistema d'àlgebra per ordinador Comment[ca@valencia]=Dorsal per al Maxima: un sistema d'àlgebra per ordinador Comment[cs]=Podpůrná vrstva pro počítačový systém algebry Maxima @@ -59,6 +61,7 @@ Comment[fr]=Moteur pour le système de calcul formel Maxima Comment[gl]=Infraestrutura do Sistema de álxebra computerizada Maxima Comment[hr]=Pozadinski servis za Maximu +Comment[hu]=Modul a Maxima számítógépes algebrai rendszerhez Comment[it]=Backend per il sistema di calcolo algebrico Maxima Comment[ja]=Maxima のためのバックエンド Comment[km]=កម្មវិធី​ខាង​ក្រោយ​សម្រាប់​ប្រព័ន្ធ​ពិជ​​​គណិត​​អតិបរមា​របស់​កុំព្យូទ័រ diff -Nru cantor-4.7.3/src/backends/maxima/maximacompletionobject.cpp cantor-4.7.90/src/backends/maxima/maximacompletionobject.cpp --- cantor-4.7.3/src/backends/maxima/maximacompletionobject.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/backends/maxima/maximacompletionobject.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -18,6 +18,8 @@ Copyright (C) 2009 Alexander Rieder */ +#include + #include "maximacompletionobject.h" #include "maximasession.h" @@ -25,6 +27,8 @@ MaximaCompletionObject::MaximaCompletionObject(const QString& command, MaximaSession* session) : Cantor::CompletionObject(command, session) { + kDebug() << "MaximaCompletionObject construtor"; + //Only use the completion for the last command part between end and opening bracket or ; or space QString cmd=command; int brIndex=cmd.lastIndexOf('(')+1; diff -Nru cantor-4.7.3/src/backends/maxima/maximaexpression.cpp cantor-4.7.90/src/backends/maxima/maximaexpression.cpp --- cantor-4.7.3/src/backends/maxima/maximaexpression.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/backends/maxima/maximaexpression.cpp 2011-12-02 21:17:55.000000000 +0000 @@ -103,7 +103,7 @@ connect(&m_fileWatch, SIGNAL(dirty(const QString&)), this, SLOT(imageChanged())); } - //if the whole command consists of a command, drop it + //if the whole command consists of a comment, drop it static const QRegExp commentRegExp("^/\\*.*\\*/$"); if(commentRegExp.exactMatch(command())) return; diff -Nru cantor-4.7.3/src/backends/null/nullbackend.desktop cantor-4.7.90/src/backends/null/nullbackend.desktop --- cantor-4.7.3/src/backends/null/nullbackend.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/backends/null/nullbackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -1,6 +1,7 @@ [Desktop Entry] Type=Service Name=nullbackend +Name[bg]=празно ядро Name[ca]=DorsalNul Name[ca@valencia]=DorsalNul Name[cs]=žádná podpůrná vrstva @@ -29,7 +30,6 @@ Name[sl]=nullbackend Name[sv]=Nollbakgrundsprogram Name[tr]=belirsiz arka uç -Name[ug]=nullbackend Name[uk]=nullbackend Name[x-test]=xxnullbackendxx Name[zh_CN]=空后端 @@ -40,6 +40,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=Backend for Cantor for testing purposes +Comment[bg]=Ядро на Cantor за проби Comment[ca]=Dorsal per al Cantor, per a fer proves Comment[ca@valencia]=Dorsal per al Cantor, per a fer proves Comment[cs]=Podpůrná vrstva pro Cantor pro účely testování @@ -53,6 +54,7 @@ Comment[fr]=Moteur pour Cantor permettant d'effectuer des tests Comment[gl]=Infraestrutura de Cantor para probas Comment[hr]=Pozadinski servis za Cantor radi testiranja +Comment[hu]=Tesztmodul a Cantorhoz Comment[it]=Motore di test per Cantor Comment[ja]=テストのための Cantor のバックエンド Comment[km]=កម្មវិធី​ខាង​ក្រោយ​របស់​​ Cantor សម្រាប់​សាក​ល្បង​គោល​បំណង diff -Nru cantor-4.7.3/src/backends/octave/octavebackend.desktop cantor-4.7.90/src/backends/octave/octavebackend.desktop --- cantor-4.7.3/src/backends/octave/octavebackend.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/backends/octave/octavebackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon=octavebackend Name=Octave +Name[bg]=Octave Name[ca]=Octave Name[ca@valencia]=Octave Name[cs]=Octave @@ -17,7 +18,6 @@ Name[hu]=Octave Name[it]=Octave Name[km]=Octave -Name[lv]=Octave Name[nb]=Octave Name[nds]=Octave Name[nl]=Octave @@ -39,6 +39,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=Backend for GNU Octave +Comment[bg]=Ядро за GNU Octave Comment[ca]=Un dorsal per al GNU Octave Comment[ca@valencia]=Un dorsal per al GNU Octave Comment[cs]=Podpůrná vrstva pro GNU Octave @@ -50,10 +51,10 @@ Comment[eu]=GNU Octave-rentzako 'backend' Comment[fr]=Moteur GNU Octave Comment[gl]=Infraestrutura para GNU Octave +Comment[hu]=Modul a GNU Octave-hoz Comment[it]=Backend per GNU Octave Comment[ja]=GNU Cantor のバックエンド Comment[km]=កម្មវិធី​ខាង​ក្រោយ​សម្រាប់​ GNU Octave -Comment[lv]=GNU Octave aizmugure Comment[nb]=En bakgrunnsmotor for GNU Octave Comment[nds]=Hülpprogramm för GNU Octave Comment[nl]=Een backend voor GNU Octave diff -Nru cantor-4.7.3/src/backends/octave/octaveexpression.cpp cantor-4.7.90/src/backends/octave/octaveexpression.cpp --- cantor-4.7.3/src/backends/octave/octaveexpression.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/backends/octave/octaveexpression.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -41,6 +41,7 @@ OctaveExpression::OctaveExpression(Cantor::Session* session): Expression(session) { + kDebug() << "OctaveExpression construtor"; m_plotCommands << "plot" << "semilogx" << "semilogy" << "loglog" << "polar" << "mesh" << "contour" << "bar" << "stairs" << "errorbar" << "surf" << "sombrero"; @@ -59,11 +60,13 @@ void OctaveExpression::interrupt() { + kDebug() << "interrupt"; setStatus(Interrupted); } void OctaveExpression::evaluate() { + kDebug() << "evaluate"; QString cmd = command(); QStringList cmdWords = cmd.split(QRegExp("\\b"), QString::SkipEmptyParts); if (!cmdWords.contains("help") && !cmdWords.contains("completion_matches")) @@ -100,6 +103,7 @@ void OctaveExpression::parseOutput ( QString output ) { + kDebug() << "parseOutput: " << output; m_resultString += output; if (!m_resultString.trimmed().isEmpty()) { @@ -131,10 +135,14 @@ void OctaveExpression::parsePlotFile(QString file) { + kDebug() << "parsePlotFile"; if (QFile::exists(file)) { + kDebug() << "OctaveExpression::parsePlotFile: " << file; + setResult(new OctavePlotResult(file)); setPlotPending(false); + if (m_finished) { setStatus(Done); @@ -144,7 +152,7 @@ void OctaveExpression::finalize() { - kDebug() << m_resultString; + kDebug() << "finalize: " << m_resultString; foreach ( const QString& line, m_resultString.split('\n', QString::SkipEmptyParts) ) { if (m_resultString.contains('=')) diff -Nru cantor-4.7.3/src/backends/octave/octavesession.cpp cantor-4.7.90/src/backends/octave/octavesession.cpp --- cantor-4.7.3/src/backends/octave/octavesession.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/backends/octave/octavesession.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -53,7 +53,7 @@ void OctaveSession::login() { - kDebug(); + kDebug() << "login"; m_process = new KProcess ( this ); QStringList args; @@ -103,6 +103,7 @@ void OctaveSession::logout() { + kDebug() << "logout"; m_process->write("exit\n"); if (!m_process->waitForFinished(1000)) { @@ -112,6 +113,7 @@ void OctaveSession::interrupt() { + kDebug() << "interrupt"; if (m_currentExpression) { m_currentExpression->interrupt(); @@ -124,12 +126,13 @@ void OctaveSession::processError() { + kDebug() << "processError"; emit error(m_process->errorString()); } Cantor::Expression* OctaveSession::evaluateExpression ( const QString& command, Cantor::Expression::FinishingBehavior finishingBehavior ) { - kDebug() << command; + kDebug() << "evaluateExpression: " << command; OctaveExpression* expression = new OctaveExpression ( this ); expression->setCommand ( command ); expression->setFinishingBehavior ( finishingBehavior ); @@ -140,6 +143,7 @@ void OctaveSession::runExpression ( OctaveExpression* expression ) { + kDebug() << "runExpression"; if ( status() != Done ) { m_expressionQueue.enqueue ( expression ); kDebug() << m_expressionQueue.size(); @@ -156,6 +160,7 @@ void OctaveSession::readError() { + kDebug() << "readError"; QString error = QString::fromLocal8Bit(m_process->readAllStandardError()); if (!m_currentExpression || error.isEmpty()) { @@ -166,6 +171,7 @@ void OctaveSession::readOutput() { + kDebug() << "readOutput"; while (m_process->bytesAvailable() > 0) { if (m_tempDir.isEmpty() && !m_process->canReadLine()) @@ -228,6 +234,7 @@ void OctaveSession::currentExpressionStatusChanged(Cantor::Expression::Status status) { + kDebug() << "currentExpressionStatusChanged"; if (!m_currentExpression) { return; diff -Nru cantor-4.7.3/src/backends/qalculate/CMakeLists.txt cantor-4.7.90/src/backends/qalculate/CMakeLists.txt --- cantor-4.7.3/src/backends/qalculate/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/CMakeLists.txt 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,29 @@ +add_subdirectory(plotassistant) +project(cantor-qalculate-backend) + +set(CMAKE_CXX_FLAGS "${KDE4_ENABLE_EXCEPTIONS} -Wno-deprecated") +add_definitions(${QALCULATE_CFLAGS}) + +set( QalculateBackend_SRCS +qalculatesyntaxhelpobject.cpp +qalculatebackend.cpp +qalculatesession.cpp +qalculatehighlighter.cpp +qalculateexpression.cpp +qalculateextensions.cpp +qalculatecompletionobject.cpp +qalculateextensions.cpp +settingswidget.cpp +) + +kde4_add_kcfg_files(QalculateBackend_SRCS settings.kcfgc) +install(FILES qalculatebackend.kcfg DESTINATION ${KCFG_INSTALL_DIR}) + +kde4_add_ui_files(QalculateBackend_SRCS settings.ui) + +kde4_add_plugin( cantor_qalculatebackend ${QalculateBackend_SRCS} ) +message(STATUS ${CLN_LIBRARIES}) +target_link_libraries( cantor_qalculatebackend ${KDE4_KDEUI_LIBS} cantorlibs ${QALCULATE_LIBRARIES} ${CLN_LIBRARIES}) + +install( FILES qalculatebackend.desktop DESTINATION ${SERVICES_INSTALL_DIR}/cantor) +install(TARGETS cantor_qalculatebackend DESTINATION ${PLUGIN_INSTALL_DIR}) diff -Nru cantor-4.7.3/src/backends/qalculate/plotassistant/cantor_qalculateplotassistant.rc cantor-4.7.90/src/backends/qalculate/plotassistant/cantor_qalculateplotassistant.rc --- cantor-4.7.3/src/backends/qalculate/plotassistant/cantor_qalculateplotassistant.rc 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/plotassistant/cantor_qalculateplotassistant.rc 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,8 @@ + + + + &Plot + + + + diff -Nru cantor-4.7.3/src/backends/qalculate/plotassistant/CMakeLists.txt cantor-4.7.90/src/backends/qalculate/plotassistant/CMakeLists.txt --- cantor-4.7.3/src/backends/qalculate/plotassistant/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/plotassistant/CMakeLists.txt 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,13 @@ +set( QalculatePlotAssistant_SRCS + qalculateplotassistant.cpp +) + +kde4_add_kcfg_files(QalculatePlotAssistant_SRCS ../settings.kcfgc) +kde4_add_ui_files(QalculatePlotAssistant_SRCS qalculateplotdialog.ui) + +kde4_add_plugin( cantor_qalculateplotassistant ${QalculatePlotAssistant_SRCS} ) +target_link_libraries( cantor_qalculateplotassistant ${KDE4_KDEUI_LIBS} cantorlibs) + +install( FILES qalculateplotassistant.desktop DESTINATION ${SERVICES_INSTALL_DIR}/cantor) +install( FILES cantor_qalculateplotassistant.rc DESTINATION ${DATA_INSTALL_DIR}/cantor ) +install(TARGETS cantor_qalculateplotassistant DESTINATION ${PLUGIN_INSTALL_DIR}) diff -Nru cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotassistant.cpp cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotassistant.cpp --- cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotassistant.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotassistant.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,299 @@ +/* + 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. + + --- + Copyright (C) 2011 Martin Kuettler + */ + +#include "qalculateplotassistant.h" + +#include +#include +#include "cantor_macros.h" + +QalculatePlotAssistant::QalculatePlotAssistant(QObject* parent, QList args) : Assistant(parent) +{ + Q_UNUSED(args); + + m_dlg = 0; +} + +QalculatePlotAssistant::~QalculatePlotAssistant() +{ +} + +void QalculatePlotAssistant::initActions() +{ + setXMLFile("cantor_qalculateplotassistant.rc"); + KAction* plot = new KAction(i18n("Plot"), actionCollection()); + actionCollection()->addAction("qalculateplotassistant", plot); + connect(plot, SIGNAL(triggered()), this, SIGNAL(requested())); +} + +void QalculatePlotAssistant::initDialog(QWidget* parent) +{ + m_dlg = new KDialog(parent); + QWidget *widget = new QWidget(m_dlg); + m_base.setupUi(widget); + m_dlg->setMainWidget(widget); + + connect(m_base.addButton, SIGNAL(clicked()), this, SLOT(addFunction())); + connect(m_base.removeButton, SIGNAL(clicked()), this, SLOT(removeSelection())); + connect(m_base.clearButton, SIGNAL(clicked()), this, SLOT(clearFunctions())); + connect(m_base.functionTable, SIGNAL(currentCellChanged(int, int, int, int)), this, SLOT(currentItemChanged(int, int, int, int))); + connect(m_base.stepsButton, SIGNAL(toggled(bool)), this, SLOT(toggleStep())); + connect(m_base.stepButton, SIGNAL(toggled(bool)), this, SLOT(toggleSteps())); + m_base.inlineCheckBox->setChecked(QalculateSettings::inlinePlot()); + m_base.colorCheckBox->setChecked(QalculateSettings::coloredPlot()); + m_base.gridCheckBox->setChecked(QalculateSettings::plotGrid()); + m_base.borderCheckBox->setChecked(QalculateSettings::plotBorder()); + m_base.smoothingBox->setCurrentIndex(QalculateSettings::plotSmoothing()); + m_base.styleBox->setCurrentIndex(QalculateSettings::plotStyle()); + m_base.legendBox->setCurrentIndex(QalculateSettings::plotLegend()); + m_base.stepsEdit->setText(QString::number(QalculateSettings::plotSteps())); + m_base.stepEdit->setDisabled(true); +} + +QStringList QalculatePlotAssistant::run(QWidget* parent) +{ + if (!m_dlg) + initDialog(parent); + + QStringList result; + if (m_dlg->exec()) { + if (m_base.functionTable->currentRow() >= 0) + saveRowInformation(m_base.functionTable->currentRow()); + result << plotCommand(); + } + + return result; +} + + +void QalculatePlotAssistant::addFunction() +{ + m_base.functionTable->insertRow(m_base.functionTable->rowCount()); + m_xVarList << ""; + m_styleList << QalculateSettings::STYLE_LINES; + m_smoothingList << QalculateSettings::SMOOTHING_NONE; + saveRowInformation(m_xVarList.size()-1); +} + +void QalculatePlotAssistant::removeSelection() +{ + int r = m_base.functionTable->currentRow(); + if (r < 0) + return; + m_base.functionTable->removeRow(r); + if (m_xVarList.size() > r) { + m_xVarList.removeAt(r); + m_styleList.removeAt(r); + m_smoothingList.removeAt(r); + } +} + +void QalculatePlotAssistant::clearFunctions() +{ + m_xVarList.clear(); + m_styleList.clear(); + m_smoothingList.clear(); + while (m_base.functionTable->rowCount()) + m_base.functionTable->removeRow(0); +} + +void QalculatePlotAssistant::toggleSteps() +{ + m_base.stepsButton->setChecked(!m_base.stepButton->isChecked()); +} + +void QalculatePlotAssistant::toggleStep() +{ + m_base.stepButton->setChecked(!m_base.stepsButton->isChecked()); +} + +void QalculatePlotAssistant::currentItemChanged(int newRow, int newColumn, int oldRow, int oldColumn) +{ + Q_UNUSED(newColumn); + Q_UNUSED(oldColumn); + + if (oldRow >= 0) + saveRowInformation(oldRow); + if (newRow >= 0) + loadRowInformation(newRow); +} + +void QalculatePlotAssistant::saveRowInformation(int row) +{ + m_xVarList[row] = m_base.xVarEdit->text(); + switch(m_base.styleBox->currentIndex()) { + case 0: + m_styleList[row] = QalculateSettings::STYLE_LINES; break; + case 1: + m_styleList[row] = QalculateSettings::STYLE_POINTS; break; + case 2: + m_styleList[row] = QalculateSettings::STYLE_LINES_POINTS; break; + case 3: + m_styleList[row] = QalculateSettings::STYLE_BOXES; break; + case 4: + m_styleList[row] = QalculateSettings::STYLE_HISTOGRAM; break; + case 5: + m_styleList[row] = QalculateSettings::STYLE_STEPS; break; + case 6: + m_styleList[row] = QalculateSettings::STYLE_CANDLESTICKS; break; + case 7: + m_styleList[row] = QalculateSettings::STYLE_DOTS; break; + } + switch(m_base.smoothingBox->currentIndex()) { + case 0: + m_smoothingList[row] = QalculateSettings::SMOOTHING_NONE; break; + case 1: + m_smoothingList[row] = QalculateSettings::SMOOTHING_UNIQUE; break; + case 2: + m_smoothingList[row] = QalculateSettings::SMOOTHING_CSPLINES; break; + case 3: + m_smoothingList[row] = QalculateSettings::SMOOTHING_BEZIER; break; + case 4: + m_smoothingList[row] = QalculateSettings::SMOOTHING_SBEZIER; break; + } +} + +void QalculatePlotAssistant::loadRowInformation(int row) +{ + m_base.xVarEdit->setText(m_xVarList[row]); + m_base.styleBox->setCurrentIndex(m_styleList[row]); + m_base.smoothingBox->setCurrentIndex(m_smoothingList[row]); +} + +QString QalculatePlotAssistant::plotCommand() +{ + QStringList boolList; + boolList << "false" << "true"; + QString command = "plot"; + if (!m_base.plotTitleEdit->text().isEmpty()) + command += QString(" plottitle='%1'").arg(m_base.plotTitleEdit->text()); + if (!m_base.xLabelEdit->text().isEmpty()) + command += QString(" xlabel='%1'").arg(m_base.xLabelEdit->text()); + if (!m_base.yLabelEdit->text().isEmpty()) + command += QString(" ylabel='%1'").arg(m_base.yLabelEdit->text()); + if (m_base.legendBox->currentIndex() != QalculateSettings::plotLegend()) { + QString legend; + switch(m_base.legendBox->currentIndex()) { + case QalculateSettings::LEGEND_NONE: + legend="none"; break; + case QalculateSettings::LEGEND_TOP_LEFT: + legend="top_left"; break; + case QalculateSettings::LEGEND_TOP_RIGHT: + legend="top_right"; break; + case QalculateSettings::LEGEND_BOTTOM_LEFT: + legend="bottom_left"; break; + case QalculateSettings::LEGEND_BOTTOM_RIGHT: + legend="bottom_right"; break; + case QalculateSettings::LEGEND_BELOW: + legend="below"; break; + case QalculateSettings::LEGEND_OUTSIDE: + legend="outside"; break; + } + command += QString(" legend=%1").arg(legend); + } + if (m_base.gridCheckBox->isChecked() != QalculateSettings::plotGrid()) + command += QString(" grid=%1").arg(boolList[m_base.gridCheckBox->isChecked()]); + if (m_base.borderCheckBox->isChecked() != QalculateSettings::plotBorder()) + command += QString(" border=%1").arg(boolList[m_base.borderCheckBox->isChecked()]); + if (m_base.colorCheckBox->isChecked() != QalculateSettings::coloredPlot()) + command += QString(" color=%1").arg(boolList[m_base.colorCheckBox->isChecked()]); + if (m_base.inlineCheckBox->isChecked() != QalculateSettings::inlinePlot()) + command += QString(" inline=%1").arg(boolList[m_base.inlineCheckBox->isChecked()]); + if (m_base.xLogCheckBox->isChecked()) + command += QString(" xlog=true xlogbase='%1'").arg(m_base.xLogEdit->text()); + if (m_base.yLogCheckBox->isChecked()) + command += QString(" ylog=true ylogbase='%1'").arg(m_base.yLogEdit->text()); + if (m_base.saveCheckBox->isChecked()) { + QString filetype; + switch (m_base.saveFileBox->currentIndex()) { + case 0: + filetype = "auto"; break; + case 1: + filetype = "png"; break; + case 2: + filetype = "ps"; break; + case 3: + filetype = "eps"; break; + case 4: + filetype = "latex"; break; + case 5: + filetype = "svg"; break; + case 6: + filetype = "fig"; break; + } + command += QString(" filename='%1' filetype=%2").arg + (m_base.saveFileEdit->text(), filetype); + } + command += QString(" xmin='%1' xmax='%2'").arg + (m_base.xMinEdit->text(), m_base.xMaxEdit->text()); + if (m_base.stepsButton->isChecked()) + command += QString(" steps='%1'").arg(m_base.stepsEdit->text()); + else + command += QString(" step='%1'").arg(m_base.stepEdit->text()); + for (int i = 0; i < m_xVarList.size(); ++i) { + if (i>0) + command += ','; + command += QString(" title='%1' '%2' xvar='%3'").arg + (m_base.functionTable->item(i,0)->text(), + m_base.functionTable->item(i,1)->text(), + m_xVarList[i]); + if (m_styleList[i] != QalculateSettings::plotStyle()) { + QString style; + switch(m_styleList[i]) { + case QalculateSettings::STYLE_LINES: + style="lines"; break; + case QalculateSettings::STYLE_POINTS: + style="points"; break; + case QalculateSettings::STYLE_LINES_POINTS: + style="points_lines"; break; + case QalculateSettings::STYLE_BOXES: + style="boxes"; break; + case QalculateSettings::STYLE_HISTOGRAM: + style="histogram"; break; + case QalculateSettings::STYLE_STEPS: + style="steps"; break; + case QalculateSettings::STYLE_CANDLESTICKS: + style="candlesticks"; break; + case QalculateSettings::STYLE_DOTS: + style="dots"; break; + } + command += QString(" style=%1").arg(style); + } + if (m_smoothingList[i] != QalculateSettings::plotSmoothing()) { + QString smoothing; + switch(m_smoothingList[i]) { + case QalculateSettings::SMOOTHING_NONE: + smoothing="none"; break; + case QalculateSettings::SMOOTHING_UNIQUE: + smoothing="monotonic"; break; + case QalculateSettings::SMOOTHING_CSPLINES: + smoothing="csplines"; break; + case QalculateSettings::SMOOTHING_BEZIER: + smoothing="bezier"; break; + case QalculateSettings::SMOOTHING_SBEZIER: + smoothing="sbezier"; break; + } + command += QString(" smoothing=%1").arg(smoothing); + } + } + return command; +} + +K_EXPORT_CANTOR_PLUGIN(qalculateplotassistant, QalculatePlotAssistant) diff -Nru cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotassistant.desktop cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotassistant.desktop --- cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotassistant.desktop 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotassistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,34 @@ +[Desktop Entry] +Type=Service +Name=QalculatePlot +Name[ca]=Gràfic de Qalculate +Name[de]=QalculatePlot +Name[es]=QalculatePlot +Name[hu]=QalculatePlot +Name[nl]=QalculatePlot +Name[pt]=Gráfico do Qalculate +Name[pt_BR]=Gráfico do Qalculate +Name[sv]=Rita med Qalculate +Name[uk]=QalculatePlot +Name[x-test]=xxQalculatePlotxx +Name[zh_CN]=QalculatePlot +Name[zh_TW]=QalculatePlot +X-KDE-ServiceTypes=Cantor/Assistant +X-KDE-Library=cantor_qalculateplotassistant +X-KDE-PluginInfo-Name=Plot2d +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL +Comment=An Assistant for plotting with the Qalculate backend. +Comment[ca]=Un assistent per graficar amb el dorsal de Qalculate. +Comment[de]=Ein Assistent für das Plotten mit dem Qalculate-Modul. +Comment[es]=Un asistente para gráficos con el motor Qalculate. +Comment[hu]=Segéd a Qalculate modullal való ábrázoláshoz. +Comment[nl]=Een assistent voor het plotten met de Qalculate-backend. +Comment[pt]=Um Assistente de gráficos com a infra-estrutura do Qalculate. +Comment[pt_BR]=Um assistente de geração de gráficos com a infraestrutura do Qalculate. +Comment[sv]=En guide för att rita med bakgrundsprogrammet Qalculate. +Comment[uk]=Допоміжна програма для креслення за допомогою сервера Qalculate. +Comment[x-test]=xxAn Assistant for plotting with the Qalculate backend.xx +Comment[zh_CN]=用 Qalculate 后端画图的助手。 +Comment[zh_TW]=使用 Qalculate 後端介面的繪圖助手。 +RequiredExtensions=QalculatePlotExtension diff -Nru cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotassistant.h cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotassistant.h --- cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotassistant.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotassistant.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,61 @@ +/* + 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. + + --- + Copyright (C) 2011 Martin Kuettler + */ + +#ifndef QALCULATE_PLOT_ASSISTANT_H +#define QALCULATE_PLOT_ASSISTANT_H + +#include "assistant.h" +#include "../settings.h" +#include "ui_qalculateplotdialog.h" +#include +#include + +class QalculatePlotAssistant : public Cantor::Assistant +{ + Q_OBJECT +private: + KDialog* m_dlg; + Ui::QalculatePlotAssistantBase m_base; + QStringList m_xVarList; + QList m_styleList; + QList m_smoothingList; + + QString plotCommand(); + void initDialog(QWidget* parent); + void saveRowInformation(int); + void loadRowInformation(int); +public slots: + void addFunction(); + void removeSelection(); + void clearFunctions(); + void currentItemChanged(int, int, int, int); + void toggleSteps(); + void toggleStep(); + +public: + QalculatePlotAssistant(QObject* parent, QList args); + ~QalculatePlotAssistant(); + + void initActions(); + + QStringList run(QWidget* parent); +}; + +#endif //QALCULATE_PLOT_ASSISTANT_H diff -Nru cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotdialog.ui cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotdialog.ui --- cantor-4.7.3/src/backends/qalculate/plotassistant/qalculateplotdialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/plotassistant/qalculateplotdialog.ui 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,781 @@ + + + QalculatePlotAssistantBase + + + + 0 + 0 + 470 + 489 + + + + Cantor - Plot Dialog + + + + + + 0 + + + + Functions + + + + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + + Title + + + + + Expression + + + + + + + + false + + + false + + + + + + Qt::Horizontal + + + + 220 + 20 + + + + + + + + Add + + + + + + + Remove + + + + + + + Clear List + + + + + + + + + + + + X variable + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + x + + + + + + + + + + + Style + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + Lines + + + + + Points + + + + + Points and Lines + + + + + Boxes + + + + + Histogram + + + + + Steps + + + + + Candlesticks + + + + + Dots + + + + + + + + + + + + Smoothing + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + None + + + + + Monotonic + + + + + Natural Cubic Splines + + + + + Bezier + + + + + Bezier (monotonic) + + + + + + + + + + Function Range + + + + + + X range + + + + + + + + + + 0 + 0 + + + + 0 + + + + + + + - + + + + + + + + 0 + 0 + + + + 10 + + + + + + + + + Sampling rate + + + true + + + + + + + Step size + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + + + + Options + + + + + + + + Plot title + + + + + + + + 0 + 0 + + + + + + + + + + + + X-axis label + + + + + + + + 0 + 0 + + + + + + + + + + + + Y-axis label + + + + + + + + 0 + 0 + + + + + + + + + + + + Legend position + + + + + + + + Hide legend + + + + + Top-left + + + + + Top-right + + + + + Bottom-left + + + + + Bottom-right + + + + + Below + + + + + Outside + + + + + + + + + + + + Display Grid + + + + + + + Display full border + + + + + + + + + + + Use Colors + + + + + + + Display inline + + + + + + + + + + + Logarithmic x scale + + + + + + + + 0 + 0 + + + + + + + + + + + + Logarithmic y scale + + + + + + + + 0 + 0 + + + + + + + + + + File Options + + + + + + Save plot to file + + + + + + + + 0 + 0 + + + + false + + + + + + + File type + + + + + + + + Detect from filename + + + + + PNG + + + + + PS + + + + + EPS + + + + + LaTeX + + + + + SVG + + + + + FIG + + + + + + + + + + + Qt::Vertical + + + + 20 + 119 + + + + + + + + + + + + + KButtonGroup + QGroupBox +
kbuttongroup.h
+ 1 +
+ + KPushButton + QPushButton +
kpushbutton.h
+
+ + KLineEdit + QLineEdit +
klineedit.h
+
+ + KComboBox + QComboBox +
kcombobox.h
+
+ + KTabWidget + QTabWidget +
ktabwidget.h
+ 1 +
+
+ + ktabwidget + functionTable + addButton + removeButton + clearButton + xVarEdit + styleBox + smoothingBox + xMinEdit + xMaxEdit + stepsButton + stepsEdit + stepButton + stepEdit + plotTitleEdit + xLabelEdit + yLabelEdit + legendBox + gridCheckBox + borderCheckBox + colorCheckBox + inlineCheckBox + xLogCheckBox + xLogEdit + yLogCheckBox + yLogEdit + saveCheckBox + saveFileEdit + saveFileBox + + + + + stepButton + toggled(bool) + stepEdit + setEnabled(bool) + + + 168 + 460 + + + 235 + 462 + + + + + xLogCheckBox + toggled(bool) + xLogEdit + setEnabled(bool) + + + 111 + 79 + + + 111 + 79 + + + + + yLogCheckBox + toggled(bool) + yLogEdit + setEnabled(bool) + + + 111 + 82 + + + 111 + 82 + + + + + saveCheckBox + toggled(bool) + saveFileEdit + setEnabled(bool) + + + 111 + 84 + + + 111 + 84 + + + + + saveCheckBox + toggled(bool) + saveFileBox + setEnabled(bool) + + + 111 + 84 + + + 111 + 84 + + + + + saveCheckBox + toggled(bool) + label_23 + setEnabled(bool) + + + 69 + 84 + + + 67 + 84 + + + + + stepsButton + toggled(bool) + stepsEdit + setEnabled(bool) + + + 165 + 427 + + + 254 + 436 + + + + +
diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatebackend.cpp cantor-4.7.90/src/backends/qalculate/qalculatebackend.cpp --- cantor-4.7.3/src/backends/qalculate/qalculatebackend.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatebackend.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,90 @@ +/************************************************************************************ +* Copyright (C) 2009 by Milian Wolff * +* Copyright (C) 2011 by Matteo Agostinelli * +* * +* 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 "settings.h" +#include "qalculatebackend.h" +#include "qalculatesession.h" +#include "qalculateextensions.h" + +#include "settingswidget.h" + +#include "cantor_macros.h" + +#include + + +QalculateBackend::QalculateBackend( QObject* parent,const QList args ) + : Cantor::Backend( parent, args ) +{ + setObjectName("qalculatebackend"); + + new QalculateHistoryExtension(this); + new QalculateVariableManagementExtension(this); + new QalculateCalculusExtension(this); + new QalculateCASExtension(this); + new QalculateLinearAlgebraExtension(this); + new QalculatePlotExtension(this); +} + +QalculateBackend::~QalculateBackend() +{ + +} + +QString QalculateBackend::id() const +{ + return "qalculate"; +} + +Cantor::Session* QalculateBackend::createSession() +{ + return new QalculateSession(this); +} + +Cantor::Backend::Capabilities QalculateBackend::capabilities() const +{ + return Cantor::Backend::Completion | Cantor::Backend::SyntaxHighlighting | Cantor::Backend::SyntaxHelp | Cantor::Backend::VariableManagement; +// return Cantor::Backend::Completion | Cantor::Backend::SyntaxHelp; +} + +QString QalculateBackend::description() const +{ + return i18n("Qalculate! is not your regular software replication of the cheapest available calculator. Qalculate! aims to make full use of the superior interface, power and flexibility of modern computers. "\ + "The center of attention in Qalculate! is the expression entry. Instead of entering each number in a mathematical expression separately, you can directly write the whole expression and later modify it. "\ + "The interpretation of expressions is flexible and fault tolerant, and if you nevertheless do something wrong, Qalculate! will tell you so. Not fully solvable expressions are however not errors. Qalculate! will simplify as far as it can and answer with an expression. "\ + "In addition to numbers and arithmetic operators, an expression may contain any combination of variables, units, and functions."); +} + +KUrl QalculateBackend::helpUrl() const +{ + // A sub-optimal solution but still this manual is fairly complete + return KUrl("http://qalculate.sourceforge.net/gtk-manual/index.html"); +} + +KConfigSkeleton* QalculateBackend::config() const +{ + return QalculateSettings::self(); +} + +QWidget* QalculateBackend::settingsWidget(QWidget* parent) const +{ + return new QalculateSettingsWidget(parent); +} + +K_EXPORT_CANTOR_PLUGIN(qalculatebackend, QalculateBackend) diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatebackend.desktop cantor-4.7.90/src/backends/qalculate/qalculatebackend.desktop --- cantor-4.7.3/src/backends/qalculate/qalculatebackend.desktop 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatebackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,37 @@ +[Desktop Entry] +Type=Service +Name=Qalculate +Name[ca]=Qalculate +Name[de]=Qalculate +Name[es]=Qalculate +Name[hu]=Qalculate +Name[nds]=Qalculate +Name[nl]=Qalculate +Name[pt]=Qalculate +Name[pt_BR]=Qalculate +Name[sv]=Qalculate +Name[uk]=Qalculate +Name[x-test]=xxQalculatexx +Name[zh_CN]=Qalculate +Name[zh_TW]=Qalculate +Icon=qalculatebackend +X-KDE-ServiceTypes=Cantor/Backend +X-KDE-Library=cantor_qalculatebackend +X-KDE-PluginInfo-Name=qalculatebackend +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-Website=http://qalculate.sourceforge.net/ +Comment=Qalculate backend for Cantor. Gives you the advanced features of Qalculate +Comment[ca]=Dorsal de Qalculate per al Cantor. Us ofereix les característiques avançades de Qalculate +Comment[de]=Qalculate-Modul für Cantor. Ermöglicht die Nutzung der weiterführenden Funktionen von Qalculate +Comment[es]=Motor Qalculate para Cantor. Le proporciona las características avanzadas de Qalculate +Comment[hu]=Qalculate modul a Cantorhoz. +Comment[nds]=Qalculate-Hülpprogramm för Cantor. Stellt verwiedert Funkschonen vun Qalculate praat. +Comment[nl]=Qalculate-backend voor Cantor. Geeft u de geavanceerde features van Qalculate +Comment[pt]=Infra-estrutura do Qalculate para o Cantor. Dá-lhe as funcionalidades avançadas do Qalculate +Comment[pt_BR]=Infraestrutura do Qalculate para o Cantor. Fornece-lhe as funcionalidades avançadas do Qalculate +Comment[sv]=Bakgrundsprogrammet Qalculate förr Cantor. Ger tillgång till de avancerade funktionerna i Qalculate. +Comment[uk]=Сервер Qalculate для Cantor. Надає до ваших послуг додаткові можливості Qalculate +Comment[x-test]=xxQalculate backend for Cantor. Gives you the advanced features of Qalculatexx +Comment[zh_CN]=Qalculate 的 Cantor 后端,可以使用 Qalculate 的高级功能 +Comment[zh_TW]=Cantor 的 Qalculate 後端介面。讓您使用 Qalculate 的進階功能 diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatebackend.h cantor-4.7.90/src/backends/qalculate/qalculatebackend.h --- cantor-4.7.3/src/backends/qalculate/qalculatebackend.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatebackend.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,45 @@ +/************************************************************************************ +* Copyright (C) 2009 by Milian Wolff * +* Copyright (C) 2011 by Matteo Agostinelli * +* * +* 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 * +*************************************************************************************/ + +#ifndef QALCULATE_BACKEND_H +#define QALCULATE_BACKEND_H + +#include "backend.h" + +class QalculateBackend : public Cantor::Backend +{ + Q_OBJECT + +public: + explicit QalculateBackend( QObject* parent = 0,const QList args = QList()); + ~QalculateBackend(); + + QString id() const; + + virtual Cantor::Session *createSession(); + virtual Cantor::Backend::Capabilities capabilities() const; + virtual QString description() const; + virtual KUrl helpUrl() const; + + QWidget* settingsWidget(QWidget* parent) const; + KConfigSkeleton* config() const; +}; + + +#endif /* QALCULATE_BACKEND_H */ diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatebackend.kcfg cantor-4.7.90/src/backends/qalculate/qalculatebackend.kcfg --- cantor-4.7.3/src/backends/qalculate/qalculatebackend.kcfg 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatebackend.kcfg 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,129 @@ + + + + + + + true + + + + + + + + + + + + + 10 + + + + + + + + + 0 + + + + + + + + + + 0 + + + + false + + + + false + + + + false + + + + + + + + + + 3 + + + + true + + + + true + + + + false + + + + false + + + + 2 + + + + 100 + + + + + + + + + + + 0 + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 2 + + + diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatecompletionobject.cpp cantor-4.7.90/src/backends/qalculate/qalculatecompletionobject.cpp --- cantor-4.7.3/src/backends/qalculate/qalculatecompletionobject.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatecompletionobject.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,68 @@ +/************************************************************************************* +* Copyright (C) 2009 by Milian Wolff * +* * +* 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 "qalculatecompletionobject.h" + +#include + +#include +#include +#include + +#include "qalculatesession.h" + +#include + +QalculateCompletionObject::QalculateCompletionObject(const QString& command, QalculateSession* session) + : Cantor::CompletionObject(command, session) +{ + //We only want identifiers + int i; + for ( i = command.size()-1; i >= 0 && command[i].isLetter(); i--) { + } + + if (i >= 0) { + setCommand( command.mid(i+1) ); + } +} + +QalculateCompletionObject::~QalculateCompletionObject() +{ +} + +void QalculateCompletionObject::fetchCompletions() +{ + QStringList comp; + foreach ( ExpressionItem* item, CALCULATOR->variables ) { + //TODO: this is fugly... + QString str(item->name(true).c_str()); + if ( str.startsWith(command(), Qt::CaseInsensitive) ) { + comp << str; + } + } + foreach ( ExpressionItem* item, CALCULATOR->functions ) { + //TODO: this is fugly... + QString str(item->name(true).c_str()); + if ( str.startsWith(command(), Qt::CaseInsensitive) ) { + comp << str; + } + } + + setCompletions(comp); + emit done(); +} diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatecompletionobject.h cantor-4.7.90/src/backends/qalculate/qalculatecompletionobject.h --- cantor-4.7.3/src/backends/qalculate/qalculatecompletionobject.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatecompletionobject.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,36 @@ +/************************************************************************************* +* Copyright (C) 2009 by Milian Wolff * +* * +* 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 * +*************************************************************************************/ + +#ifndef QALCULATE_COMPLETIONOBJECT_H +#define QALCULATE_COMPLETIONOBJECT_H + +#include "completionobject.h" + +class QalculateSession; + +class QalculateCompletionObject : public Cantor::CompletionObject +{ + public: + QalculateCompletionObject( const QString& command, QalculateSession* session); + ~QalculateCompletionObject(); + + protected slots: + void fetchCompletions(); +}; + +#endif /* _NULLCOMPLETIONOBJECT_H */ diff -Nru cantor-4.7.3/src/backends/qalculate/qalculateexpression.cpp cantor-4.7.90/src/backends/qalculate/qalculateexpression.cpp --- cantor-4.7.3/src/backends/qalculate/qalculateexpression.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculateexpression.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,1000 @@ +/************************************************************************************* +* Copyright (C) 2009 by Milian Wolff * +* Copyright (C) 2011 by Matteo Agostinelli * +* * +* 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 + +#include "textresult.h" +#include "helpresult.h" +#include "imageresult.h" +#include "epsresult.h" +#include "settings.h" +#include "defaultvariablemodel.h" + +#include "qalculateexpression.h" +#include "qalculatesession.h" +#include "qalculatesyntaxhelpobject.h" + +#include +#include +#include +#include +#include +#include + +#include +// required for the plotting interface of Qalculator +#include + +#include +#include +#include +#include +#include + +#include +#include + +QalculateExpression::QalculateExpression( QalculateSession* session ) + : Cantor::Expression(session) +{ + m_tempFile = 0; +} + +QalculateExpression::~QalculateExpression() +{ + if (m_tempFile) + delete m_tempFile; +} + +void QalculateExpression::evaluate() +{ + setStatus(Cantor::Expression::Computing); + m_message = ""; + + if (command().isEmpty()) { + return; + } + + if (command().contains("help")) { + QalculateSyntaxHelpObject* helper = new QalculateSyntaxHelpObject(command(), (QalculateSession*) session()); + setResult(new Cantor::HelpResult(helper->answer())); + setStatus(Cantor::Expression::Done); + return; + } + else if (command().trimmed().startsWith("plot") && + (command().indexOf("plot")+4 == command().size() || + command()[command().indexOf("plot")+4].isSpace())) { + evaluatePlotCommand(); + return; + } + else if (command().trimmed().startsWith("saveVariables") && + (command().indexOf("saveVariables")+13 == command().size() || + command()[command().indexOf("saveVariables")+13].isSpace())) { + evaluateSaveVariablesCommand(); + return; + } + else if (command().trimmed().startsWith("loadVariables") && + (command().indexOf("loadVariables")+13 == command().size() || + command()[command().indexOf("loadVariables")+13].isSpace())) { + evaluateLoadVariablesCommand(); + return; + } + + string expression = unlocalizeExpression(command()); + + kDebug() << "EXPR: " << QString(expression.c_str()); + + EvaluationOptions eo = evaluationOptions(); + + MathStructure result = CALCULATOR->calculate(expression, eo); + + // update the answer variables + static_cast(session())->setLastResult(result); + + // error handling + if (checkForCalculatorMessages() & (MSG_WARN | MSG_WARN)) + return; + + updateVariables(CALCULATOR->parse(expression, eo.parse_options)); + + QSharedPointer po = printOptions(); + + result.format(*po); + + setResult(new Cantor::TextResult(result.print(*po).c_str())); + setStatus(Done); +} + +void QalculateExpression::evaluateSaveVariablesCommand() +{ + QString argString = command().mid(command().indexOf("saveVariables")+13); + argString = argString.trimmed(); + + QString usage = i18n("Usage: saveVariables file"); + + QString fileName = parseForFilename(argString, usage); + if (fileName.isNull()) + return; + + // We want to save Temporary variables, but Qalculate does not. + std::vector variables = CALCULATOR->variables; + // If somebody saves his variables in Cantor_Internal_Temporary + // he deserves unexpected behavior. + std::string tmpCategory = "Temporary"; + std::string newCategory = "Cantor_Internal_Temporary"; + for (int i = 0; i < variables.size(); ++i) { + if (variables[i]->category() == tmpCategory) + variables[i]->setCategory(newCategory); + } + + int res = CALCULATOR->saveVariables(fileName.toLatin1().data()); + + for (int i = 0; i < variables.size(); ++i) { + if (variables[i]->category() == newCategory) + variables[i]->setCategory(tmpCategory); + } + + + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + return; + } + if (res < 0) { + showMessage(i18n("Saving failed."), MESSAGE_ERROR); + return; + } + + setStatus(Done); +} + +void QalculateExpression::evaluateLoadVariablesCommand() +{ + QString argString = command().mid(command().indexOf("loadVariables")+13); + argString = argString.trimmed(); + + QString usage = i18n("Usage: loadVariables file"); + + QString fileName = parseForFilename(argString, usage); + if (fileName.isNull()) + return; + + int res = CALCULATOR->loadDefinitions(fileName.toLatin1().data()); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + return; + } + if (res < 0) { + showMessage(i18n("Loading failed."), MESSAGE_ERROR); + return; + } + + // We have to store temporary variables in a different category + // (see parseSaveVariablesCommand()) + std::vector variables = CALCULATOR->variables; + std::string tmpCategory = "Temporary"; + std::string newCategory = "Cantor_Internal_Temporary"; + + for (int i = 0; i < variables.size(); ++i) { + if (variables[i]->category() == newCategory) + variables[i]->setCategory(tmpCategory); + } + + setStatus(Done); +} + +QString QalculateExpression::parseForFilename(QString argument, QString usage) +{ + if (argument.isEmpty()) { + showMessage(usage, MESSAGE_ERROR); + return QString(); + } + + QString fileName = ""; + QChar sep = '\0'; + int i = 0; + if (argument[0] == '\'' || argument[0] == '"') { + sep = argument[0]; + i = 1; + } + while (i < argument.size() && !argument[i].isSpace() && + argument[i] != sep) { + if (argument[i] == '\\' && i < argument.size()-1) + ++i; + fileName += argument[i]; + ++i; + } + + if (sep != '\0' && i == argument.size()) { + showMessage(i18n("missing %1", sep), MESSAGE_ERROR); + return QString(); + } + + if (i < argument.size() - 1) { + showMessage(usage, MESSAGE_ERROR); + return QString(); + } + + return fileName; +} + +void QalculateExpression::evaluatePlotCommand() +{ + QString argString = command().mid(command().indexOf("plot")+4); + argString = unlocalizeExpression(argString).c_str(); + argString = argString.trimmed(); + + QList argumentsList; + QStringList arguments; + + // For error handling + KColorScheme scheme(QApplication::palette().currentColorGroup()); + const QString errorColor = scheme.foreground(KColorScheme::NegativeText).color().name(); + const QString warningColor = scheme.foreground(KColorScheme::NeutralText).color().name(); + const QString msgFormat("%2: %3
\n"); + + if (!CALCULATOR->canPlot()) { + showMessage(i18n("Qalculate reports it cannot print. Is gnuplot installed?"), MESSAGE_ERROR); + return; + } + + // Split argString into the arguments + int i=0; + int j=0; + QString arg = ""; + while (i < argString.size()) { + if (argString[i] == '"' || argString[i] == '\'') { + ++j; + while(j < argString.size() && argString[j] != argString[i]) { + if (argString[j] == '\\') { + ++j; + if (j == argString.size()) + continue; // just ignore trailing backslashes + } + arg += argString[j]; + ++j; + } + if (j == argString.size()) { + showMessage(i18n("missing %1", argString[i]), MESSAGE_ERROR); + return; + } + ++j; + } else if (argString[i] == ',') { + argumentsList.append(arguments); + arguments.clear(); + ++j; + } else { + while(j < argString.size() && !argString[j].isSpace() && + argString[j] != '=' && argString[j] != ',') { + if (argString[j] == '\\') { + ++j; + if (j == argString.size()) + continue; // just ignore trailing backslashes + } + arg += argString[j]; + ++j; + } + } + if (argString[j] == '=') { + // Parse things like title="..." as one argument + arg += '='; + i = ++j; + continue; + } + if (!arg.isEmpty()) { + arguments << arg; + arg = ""; + } + while (j < argString.size() && argString[j].isSpace()) + ++j; + i = j; + } + argumentsList.append(arguments); + + // Parse the arguments and compute the points to be plotted + std::vector y_vectors; + std::vector x_vectors; + std::vector plotDataParameterList; + PlotParameters plotParameters; + EvaluationOptions eo = evaluationOptions(); + /// temporary + plotParameters.title = ""; + plotParameters.y_label = ""; + plotParameters.x_label = ""; + plotParameters.filename = ""; + plotParameters.filetype = PLOT_FILETYPE_AUTO; + plotParameters.color = QalculateSettings::coloredPlot(); + plotParameters.auto_y_min = true; + plotParameters.auto_x_min = true; + plotParameters.auto_x_max = true; + plotParameters.auto_y_max = true; + plotParameters.y_log = false; + plotParameters.x_log = false; + plotParameters.grid = QalculateSettings::plotGrid(); + plotParameters.linewidth = QalculateSettings::plotLineWidth(); + plotParameters.show_all_borders = QalculateSettings::plotBorder(); + switch (QalculateSettings::plotLegend()) { + case QalculateSettings::LEGEND_NONE: + plotParameters.legend_placement = PLOT_LEGEND_NONE; + break; + case QalculateSettings::LEGEND_TOP_LEFT: + plotParameters.legend_placement = PLOT_LEGEND_TOP_LEFT; + break; + case QalculateSettings::LEGEND_TOP_RIGHT: + plotParameters.legend_placement = PLOT_LEGEND_TOP_RIGHT; + break; + case QalculateSettings::LEGEND_BOTTOM_LEFT: + plotParameters.legend_placement = PLOT_LEGEND_BOTTOM_LEFT; + break; + case QalculateSettings::LEGEND_BOTTOM_RIGHT: + plotParameters.legend_placement = PLOT_LEGEND_BOTTOM_RIGHT; + break; + case QalculateSettings::LEGEND_BELOW: + plotParameters.legend_placement = PLOT_LEGEND_BELOW; + break; + case QalculateSettings::LEGEND_OUTSIDE: + plotParameters.legend_placement = PLOT_LEGEND_OUTSIDE; + break; + } + bool plotInline = QalculateSettings::inlinePlot(); + MathStructure xMin; + MathStructure xMax; + xMin.setUndefined(); + xMax.setUndefined(); + MathStructure stepLength; + stepLength.setUndefined(); + int steps = QalculateSettings::plotSteps(); + + QString mustBeNumber = i18n("%1 must be a number."); + QString mustBeInteger = i18n("%1 must be a integer."); + QString mustBeBoolean = i18n("%1 must be a boolean."); + QString invalidOption = i18n("invalid option for %1: %2"); + + for (int i = 0; i < argumentsList.size(); ++i) { + std::string xVariable = "x"; + PlotDataParameters* plotDataParams = new PlotDataParameters; + plotDataParameterList.push_back(plotDataParams); + plotDataParams->title = ""; + switch(QalculateSettings::plotSmoothing()) { + case QalculateSettings::SMOOTHING_NONE: + plotDataParams->smoothing = PLOT_SMOOTHING_NONE; + break; + case QalculateSettings::SMOOTHING_UNIQUE: + plotDataParams->smoothing = PLOT_SMOOTHING_UNIQUE; + break; + case QalculateSettings::SMOOTHING_CSPLINES: + plotDataParams->smoothing = PLOT_SMOOTHING_CSPLINES; + break; + case QalculateSettings::SMOOTHING_BEZIER: + plotDataParams->smoothing = PLOT_SMOOTHING_BEZIER; + break; + case QalculateSettings::SMOOTHING_SBEZIER: + plotDataParams->smoothing = PLOT_SMOOTHING_SBEZIER; + break; + } + switch(QalculateSettings::plotStyle()) { + case QalculateSettings::STYLE_LINES: + plotDataParams->style = PLOT_STYLE_LINES; + break; + case QalculateSettings::STYLE_POINTS: + plotDataParams->style = PLOT_STYLE_POINTS; + break; + case QalculateSettings::STYLE_LINES_POINTS: + plotDataParams->style = PLOT_STYLE_POINTS_LINES; + break; + case QalculateSettings::STYLE_BOXES: + plotDataParams->style = PLOT_STYLE_BOXES; + break; + case QalculateSettings::STYLE_HISTOGRAM: + plotDataParams->style = PLOT_STYLE_HISTOGRAM; + break; + case QalculateSettings::STYLE_STEPS: + plotDataParams->style = PLOT_STYLE_STEPS; + break; + case QalculateSettings::STYLE_CANDLESTICKS: + plotDataParams->style = PLOT_STYLE_CANDLESTICKS; + break; + case QalculateSettings::STYLE_DOTS: + plotDataParams->style = PLOT_STYLE_DOTS; + break; + } + plotDataParams->yaxis2 = false; + plotDataParams->xaxis2 = false; + arguments = argumentsList[i]; + std::string expression; + int lastExpressionEntry = -1; + for (int j = 0; j < arguments.size(); ++j) { + QString argument = arguments[j]; + // PlotParameters + if (argument.startsWith("plottitle=")) + plotParameters.title = argument.mid(10).toLatin1().data(); + else if (argument.startsWith("ylabel=")) + plotParameters.y_label = argument.mid(7).toLatin1().data(); + else if (argument.startsWith("xlabel=")) + plotParameters.x_label = argument.mid(7).toLatin1().data(); + else if (argument.startsWith("filename=")) + plotParameters.filename = argument.mid(9).toLatin1().data(); + else if (argument.startsWith("filetype=")) { + QString option = argument.mid(9); + if (option == "auto") + plotParameters.filetype = PLOT_FILETYPE_AUTO; + else if (option == "png") + plotParameters.filetype = PLOT_FILETYPE_PNG; + else if (option == "ps") + plotParameters.filetype = PLOT_FILETYPE_PS; + else if (option == "eps") + plotParameters.filetype = PLOT_FILETYPE_EPS; + else if (option == "latex") + plotParameters.filetype = PLOT_FILETYPE_LATEX; + else if (option == "svg") + plotParameters.filetype = PLOT_FILETYPE_SVG; + else if (option == "fig") + plotParameters.filetype = PLOT_FILETYPE_FIG; + else { + QString msg = invalidOption.arg("filetype", option); + showMessage(msg, MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("font=")) + plotParameters.font = argument.mid(5).toLatin1().data(); + else if (argument.startsWith("color=")) { + bool ok; + plotParameters.color = stringToBool(argument.mid(6), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("color"), + MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("ylog=")) { + bool ok; + plotParameters.y_log = stringToBool(argument.mid(5), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("ylog"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("xlog=")) { + bool ok; + plotParameters.x_log = stringToBool(argument.mid(5), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("xlog"), MESSAGE_ERROR); + return; + } + } + else if (argument.startsWith("ylogbase=")) { + MathStructure ylogStr = CALCULATOR->calculate(argument.mid(9).toLatin1().data(), eo); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + if (ylogStr.isNumber()) { + Number ylogNum = ylogStr.number(); + plotParameters.y_log_base = ylogNum.floatValue(); + } else { + showMessage(mustBeNumber.arg("ylogbase"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("xlogbase=")) { + MathStructure xlogStr = CALCULATOR->calculate(argument.mid(9).toLatin1().data(), eo); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + if (xlogStr.isNumber()) { + Number xlogNum = xlogStr.number(); + plotParameters.x_log_base = xlogNum.floatValue(); + } else { + showMessage(mustBeNumber.arg("xlogbase"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("grid=")) { + bool ok; + plotParameters.grid = stringToBool(argument.mid(5), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("grid"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("linewidth=")) { + MathStructure lineWidthStr = CALCULATOR->calculate(argument.mid(10).toLatin1().data(), eo); + Number lineWidthNum; + if (lineWidthStr.isNumber() && lineWidthStr.number().isInteger()) { + lineWidthNum = lineWidthStr.number(); + plotParameters.linewidth = lineWidthNum.intValue(); + } else { + showMessage(mustBeInteger.arg("linewidth"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("border=")) { + bool ok; + plotParameters.show_all_borders = stringToBool(argument.mid(7), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("border"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("legend=")) { + QString option = argument.mid(7); + if (option == "none") + plotParameters.legend_placement = PLOT_LEGEND_NONE; + else if (option == "top_left") + plotParameters.legend_placement = PLOT_LEGEND_TOP_LEFT; + else if (option == "top_right") + plotParameters.legend_placement = PLOT_LEGEND_TOP_RIGHT; + else if (option == "bottom_left") + plotParameters.legend_placement = PLOT_LEGEND_BOTTOM_LEFT; + else if (option == "bottom_right") + plotParameters.legend_placement = PLOT_LEGEND_BOTTOM_RIGHT; + else if (option == "below") + plotParameters.legend_placement = PLOT_LEGEND_BELOW; + else if (option == "outside") + plotParameters.legend_placement = PLOT_LEGEND_OUTSIDE; + else { + QString msg = invalidOption.arg("legend", option); + showMessage(msg, MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + // PlotDataParameters + else if (argument.startsWith("title=")) { + plotDataParams->title = argument.mid(6).toLatin1().data(); + } + else if (argument.startsWith("smoothing=")) { + QString option = argument.mid(10); + if (option == "none") + plotDataParams->smoothing = PLOT_SMOOTHING_NONE; + else if (option == "monotonic") + plotDataParams->smoothing = PLOT_SMOOTHING_UNIQUE; + else if (option == "csplines") + plotDataParams->smoothing = PLOT_SMOOTHING_CSPLINES; + else if (option == "bezier") + plotDataParams->smoothing = PLOT_SMOOTHING_BEZIER; + else if (option == "sbezier") + plotDataParams->smoothing = PLOT_SMOOTHING_SBEZIER; + else { + QString msg = invalidOption.arg("smoothing", option); + showMessage(msg, MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } else if (argument.startsWith("style=")) { + QString option = argument.mid(6); + if (option == "lines") + plotDataParams->style = PLOT_STYLE_LINES; + else if (option == "points") + plotDataParams->style = PLOT_STYLE_POINTS; + else if (option == "points_lines") + plotDataParams->style = PLOT_STYLE_POINTS_LINES; + else if (option == "boxes") + plotDataParams->style = PLOT_STYLE_BOXES; + else if (option == "histogram") + plotDataParams->style = PLOT_STYLE_HISTOGRAM; + else if (option == "steps") + plotDataParams->style = PLOT_STYLE_STEPS; + else if (option == "candlesticks") + plotDataParams->style = PLOT_STYLE_CANDLESTICKS; + else if (option == "dots") + plotDataParams->style = PLOT_STYLE_DOTS; + else { + QString msg = invalidOption.arg("style", option); + showMessage(msg, MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } else if (argument.startsWith("xaxis2=")) { + bool ok; + plotDataParams->xaxis2 = stringToBool(argument.mid(7), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("xaxis2"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } else if (argument.startsWith("yaxis2=")) { + bool ok; + plotDataParams->yaxis2 = stringToBool(argument.mid(7), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("yaxis2"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + // inline, xmin, xmax, step, steps, xvar + // Custom options + else if (argument.startsWith("inline=")) { + bool ok; + plotInline = stringToBool(argument.mid(7), &ok); + if (!ok) { + showMessage(mustBeBoolean.arg("inline"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("xmin=")) { + xMin = CALCULATOR->calculate(argument.mid(5).toLatin1().data(), eo); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("xmax=")) { + xMax = CALCULATOR->calculate(argument.mid(5).toLatin1().data(), eo); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("step=")) { + stepLength = CALCULATOR->calculate(argument.mid(5).toLatin1().data(), eo); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + steps = -1; + } + else if (argument.startsWith("steps=")) { + MathStructure stepsStr = CALCULATOR->calculate(argument.mid(6).toLatin1().data(), eo); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + Number stepsNum; + if (stepsStr.isNumber() && stepsStr.number().isInteger()) { + stepsNum = stepsStr.number(); + steps = stepsNum.intValue(); + stepLength.setUndefined(); + } else { + showMessage(mustBeInteger.arg("steps"), MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + else if (argument.startsWith("xvar=")) { + xVariable = argument.mid(5).toLatin1().data(); + } + else if (expression.empty()) { + expression = argument.toLatin1().data(); + lastExpressionEntry = j; + } + else if (lastExpressionEntry == j-1) { + expression += " "; + expression += argument.toLatin1().data(); + lastExpressionEntry = j; + } + else { + QString msg = i18n("found multiple expressions in one plot command (%1 and %2).", QString(expression.c_str()), argument); + showMessage(msg, MESSAGE_ERROR); + deletePlotDataParameters(plotDataParameterList); + return; + } + } + if (expression.empty()) + continue; + if (xMin.isUndefined()) { + if (!plotParameters.auto_x_min) + xMin = plotParameters.x_min; + else + xMin = 0.0; + } + if (xMax.isUndefined()) { + if (!plotParameters.auto_x_max) + xMax = plotParameters.x_max; + else + xMax = 10.0; + } + if (plotDataParams->title.empty()) + plotDataParams->title = expression; + MathStructure x_vec, y_vec; + x_vec.clearVector(); + if (!stepLength.isUndefined()) + y_vec = CALCULATOR->expressionToPlotVector(expression, xMin, xMax, stepLength, &x_vec, xVariable, eo.parse_options); + else + y_vec = CALCULATOR->expressionToPlotVector(expression, xMin, xMax, steps, &x_vec, xVariable, eo.parse_options); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + + x_vectors.push_back(x_vec); + y_vectors.push_back(y_vec); + + //PrintOptions po; + //y_vec.format(po); + + //setResult(new Cantor::TextResult(y_vec.print(po).c_str())); + //setStatus(Done); + //deletePlotDataParameters(plotDataParameterList); + //return; + } + + if (plotInline && plotParameters.filename.empty()) { + // TODO: get a temporary file name here + if (!m_tempFile) { + m_tempFile = new KTemporaryFile(); +#ifdef WITH_EPS + m_tempFile->setSuffix(".eps"); +#else + m_tempFile->setSuffix(".png"); +#endif + m_tempFile->open(); + } + plotParameters.filename = m_tempFile->fileName().toLatin1().data(); + plotParameters.filetype = PLOT_FILETYPE_AUTO; + } + + CALCULATOR->plotVectors(&plotParameters, y_vectors, x_vectors, + plotDataParameterList); + if (checkForCalculatorMessages() & (MSG_WARN|MSG_ERR)) { + deletePlotDataParameters(plotDataParameterList); + return; + } + + deletePlotDataParameters(plotDataParameterList); + + if (plotInline) { +#ifdef WITH_EPS + size_t p = plotParameters.filename.size(); + if (plotParameters.filetype == PLOT_FILETYPE_EPS || + plotParameters.filetype == PLOT_FILETYPE_PS || + (plotParameters.filetype == PLOT_FILETYPE_AUTO && p >= 4 && + plotParameters.filename.substr(p-4,4) == ".eps") || + (plotParameters.filetype == PLOT_FILETYPE_AUTO && p >= 3 && + plotParameters.filename.substr(p-3,3) == ".ps")) + setResult(new Cantor::EpsResult(KUrl(plotParameters.filename.c_str()))); + else + setResult(new Cantor::ImageResult(KUrl(plotParameters.filename.c_str()))); +#else + setResult(new Cantor::ImageResult(KUrl(plotParameters.filename.c_str()))); +#endif + setStatus(Cantor::Expression::Done); + } + +} + +void QalculateExpression::showMessage(QString msg, MessageType mtype) +{ + KColorScheme scheme(QApplication::palette().currentColorGroup()); + const QString errorColor = scheme.foreground(KColorScheme::NegativeText).color().name(); + const QString warningColor = scheme.foreground(KColorScheme::NeutralText).color().name(); + const QString msgFormat("%2: %3
\n"); + if(mtype == MESSAGE_ERROR || mtype == MESSAGE_WARNING) { + msg.replace("&", "&"); + msg.replace(">", ">"); + msg.replace("<", "<"); + + if (mtype == MESSAGE_ERROR) { + msg = msgFormat.arg(errorColor, i18n("ERROR"), msg.toLatin1().data()); + } else { + msg = msgFormat.arg(errorColor, i18n("WARNING"), msg.toLatin1().data()); + } + setErrorMessage(msg); + setStatus(Error); + } else { + KMessageBox::information(QApplication::activeWindow(), msg); + } +} + +EvaluationOptions QalculateExpression::evaluationOptions() +{ + EvaluationOptions eo; + + eo.auto_post_conversion = QalculateSettings::postConversion() ? POST_CONVERSION_BEST : POST_CONVERSION_NONE; + eo.keep_zero_units = false; + + eo.parse_options = parseOptions(); + + switch (QalculateSettings::structuring()) { + case 0: + eo.structuring = STRUCTURING_NONE; + break; + case 1: + eo.structuring = STRUCTURING_SIMPLIFY; + break; + case 2: + eo.structuring = STRUCTURING_FACTORIZE; + break; + } + + return eo; +} + +ParseOptions QalculateExpression::parseOptions() +{ + ParseOptions po; + switch (QalculateSettings::angleUnit()) { + case 0: + po.angle_unit = ANGLE_UNIT_NONE; + break; + case 1: + po.angle_unit = ANGLE_UNIT_RADIANS; + break; + case 2: + po.angle_unit = ANGLE_UNIT_DEGREES; + break; + case 3: + po.angle_unit = ANGLE_UNIT_GRADIANS; + break; + } + + po.base = QalculateSettings::base(); + + return po; +} + +void QalculateExpression::deletePlotDataParameters + (const std::vector& plotDataParameterList) +{ + for(int i = 0; i < plotDataParameterList.size(); ++i) + delete plotDataParameterList[i]; +} + +bool QalculateExpression::stringToBool(const QString &string, bool *ok) +{ + if (string == "true" || string == "1") { + *ok = true; + return true; + } else if (string == "false" || string == "0") { + *ok = true; + return false; + } else { + *ok = false; + return false; + } +} + +int QalculateExpression::checkForCalculatorMessages() +{ + // error handling, most of it copied from qalculate-kde + int msgType = MSG_NONE; + if ( CALCULATOR->message() ) { + QString msg; + KColorScheme scheme(QApplication::palette().currentColorGroup()); + const QString errorColor = scheme.foreground(KColorScheme::NegativeText).color().name(); + const QString warningColor = scheme.foreground(KColorScheme::NeutralText).color().name(); + const QString msgFormat("%2: %3
\n"); + MessageType mtype; + while(true) { + mtype = CALCULATOR->message()->type(); + switch(mtype) { + case MESSAGE_INFORMATION: + msgType |= MSG_INFO; break; + case MESSAGE_WARNING: + msgType |= MSG_WARN; break; + case MESSAGE_ERROR: + msgType |= MSG_ERR; break; + } + if(mtype == MESSAGE_ERROR || mtype == MESSAGE_WARNING) { + QString text = CALCULATOR->message()->message().c_str(); + text.replace("&", "&"); + text.replace(">", ">"); + text.replace("<", "<"); + + if (mtype == MESSAGE_ERROR) { + msg.append(msgFormat.arg(errorColor, i18n("ERROR"), text)); + } else { + msg.append(msgFormat.arg(errorColor, i18n("WARNING"), text)); + } + } else { + KMessageBox::information(QApplication::activeWindow(), CALCULATOR->message()->message().c_str()); + } + if(!CALCULATOR->nextMessage()) break; + } + if ( !msg.isEmpty() ) { + m_message += msg; + setErrorMessage(m_message); + setStatus(Error); + } + } + return msgType; +} + +std::string QalculateExpression::unlocalizeExpression(QString expr) +{ + // copy'n'pasted from qalculate plasma applet + + return CALCULATOR->unlocalizeExpression( + expr.replace(QChar(0xA3), "GBP") + .replace(QChar(0xA5), "JPY") + .replace("$", "USD") + .replace(QChar(0x20AC), "EUR") + .toLatin1().data() + ); +} + +void QalculateExpression::updateVariables(MathStructure command) +{ + Cantor::DefaultVariableModel* model = + static_cast(session()->variableModel()); + QStack stack; + stack.push(&command); + QSharedPointer po = printOptions(); + while (!stack.isEmpty()) { + MathStructure* current = stack.pop(); + if (current->isFunction() && current->function()->name() == "save" && + current->countChildren() >= 2 && current->getChild(2)->isSymbolic()) + { + // I'd like to use CALCULATOR->getVariable and KnownVariable::get, + // but that doesn't work for built in variables, as it keeps + // returning the old value + std::string name = current->getChild(2)->symbol(); + MathStructure m = CALCULATOR->calculate(name, evaluationOptions()); + m.format(*po); + model->addVariable(name.c_str(), m.print(*po).c_str()); + } + for (int i = 0; i < current->countChildren(); ++i) { + stack.push(current->getChild(i+1)); + } + } +} + +QSharedPointer QalculateExpression::printOptions() +{ + QSharedPointer po(new PrintOptions); + + switch (QalculateSettings::fractionFormat()) { + case 0: + po->number_fraction_format = FRACTION_DECIMAL; + break; + case 1: + po->number_fraction_format = FRACTION_DECIMAL_EXACT; + break; + case 2: + po->number_fraction_format = FRACTION_FRACTIONAL; + break; + case 3: + po->number_fraction_format = FRACTION_COMBINED; + break; + } + po->indicate_infinite_series = QalculateSettings::indicateInfiniteSeries(); + po->use_all_prefixes = QalculateSettings::useAllPrefixes(); + po->negative_exponents = QalculateSettings::negativeExponents(); + + po->lower_case_e = true; + po->base = QalculateSettings::base(); + po->decimalpoint_sign = KGlobal::locale()->decimalSymbol().toLocal8Bit().data(); + + switch (QalculateSettings::minExp()) { + case 0: + po->min_exp = EXP_NONE; + break; + case 1: + po->min_exp = EXP_PURE; + break; + case 2: + po->min_exp = EXP_SCIENTIFIC; + break; + case 3: + po->min_exp = EXP_PRECISION; + break; + case 4: + po->min_exp = EXP_BASE_3; + break; + } + return po; +} diff -Nru cantor-4.7.3/src/backends/qalculate/qalculateexpression.h cantor-4.7.90/src/backends/qalculate/qalculateexpression.h --- cantor-4.7.3/src/backends/qalculate/qalculateexpression.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculateexpression.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,65 @@ +/************************************************************************************* +* Copyright (C) 2009 by Milian Wolff * +* * +* 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 * +*************************************************************************************/ + +#ifndef QALCULATE_EXPRESSION_H +#define QALCULATE_EXPRESSION_H + +#include "expression.h" +#include +#include +#include + +#include +#include + +class QalculateSession; + +class QalculateExpression : public Cantor::Expression +{ + Q_OBJECT + +private: + KTemporaryFile *m_tempFile; + + QString m_message; + enum MsgType { MSG_NONE=0, MSG_INFO=1, MSG_WARN=2, MSG_ERR=4 }; + + void evaluatePlotCommand(); + void evaluateLoadVariablesCommand(); + void evaluateSaveVariablesCommand(); + + QString parseForFilename(QString argument, QString usage); + bool stringToBool(const QString&, bool*); + void deletePlotDataParameters(const std::vector&); + void showMessage(QString msg, MessageType mtype); + int checkForCalculatorMessages(); + void updateVariables(MathStructure); + QSharedPointer printOptions(); + EvaluationOptions evaluationOptions(); + ParseOptions parseOptions(); + std::string unlocalizeExpression(QString expr); + +public: + QalculateExpression( QalculateSession* session); + ~QalculateExpression(); + + void evaluate(); + void interrupt() {} +}; + +#endif diff -Nru cantor-4.7.3/src/backends/qalculate/qalculateextensions.cpp cantor-4.7.90/src/backends/qalculate/qalculateextensions.cpp --- cantor-4.7.3/src/backends/qalculate/qalculateextensions.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculateextensions.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,199 @@ +/************************************************************************************ +* Copyright (C) 2011 by Matteo Agostinelli * +* * +* 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 "qalculateextensions.h" + +#include +#include +#include + +#include +#include + +#define QALCULATE_EXT_CDTOR(name) Qalculate##name##Extension::Qalculate##name##Extension(QObject* parent) : name##Extension(parent) {} \ + Qalculate##name##Extension::~Qalculate##name##Extension() {} + +QALCULATE_EXT_CDTOR(History) +QALCULATE_EXT_CDTOR(VariableManagement) +QALCULATE_EXT_CDTOR(CAS) +QALCULATE_EXT_CDTOR(Calculus) +QALCULATE_EXT_CDTOR(LinearAlgebra) + +QString QalculateHistoryExtension::lastResult() +{ + return "ans"; +} + +QString QalculateVariableManagementExtension::addVariable(const QString& name, const QString& value) +{ + return setValue(name,value); +} + +QString QalculateVariableManagementExtension::setValue(const QString& name, const QString& value) +{ + return QString("%1 := %2").arg(name).arg(value); +} + +QString QalculateVariableManagementExtension::removeVariable(const QString& name) +{ + //CALCULATOR->getVariable(name.toStdString())->setActive(false); + return QString(); +} + +QString QalculateVariableManagementExtension::clearVariables() +{ + //CALCULATOR->resetVariables(); + return QString(); +} + +QString QalculateVariableManagementExtension::saveVariables(const QString& fileName) +{ + QString escapedFileName = fileName; + escapedFileName.replace(' ', "\\ "); + return QString("saveVariables %1").arg(escapedFileName); +} + +QString QalculateVariableManagementExtension::loadVariables(const QString& fileName) +{ + QString escapedFileName = fileName; + escapedFileName.replace(' ', "\\ "); + return QString("loadVariables %1").arg(escapedFileName); +} + +// Custom Plot Extension. This extension does not fit into the normal pattern, +// because it inherts Cantor::Extension directly. +// Also it does not do anything at all, because all the work is done by the +// QalculatePlotAssistant +QalculatePlotExtension::QalculatePlotExtension(QObject* parent) : + Cantor::Extension("QalculatePlotExtension", parent) +{ +} + +QalculatePlotExtension::~QalculatePlotExtension() +{ +} + +QString QalculateCASExtension::solve(const QStringList& equations, const QStringList& variables) +{ + QString eqstr=QString("[%1]").arg(equations.join(",")); + + QString variablestr=QString("[%1]").arg(variables.join(",")); + + return QString("multisolve(%1,%2)").arg(eqstr, variablestr); +} + +QString QalculateCASExtension::simplify(const QString& expression) +{ + // There is (currently) no way to do this + return QString("").arg(expression); +} + +QString QalculateCASExtension::expand(const QString& expression) +{ + // There is (currently) no way to do this + return QString("").arg(expression); +} + +QString QalculateCalculusExtension::limit(const QString& expression, const QString& variable, const QString& limit) +{ + // There is no limit function in Qalculate (at least none I know of), + // but fortunately this function seems not to be used anyway. + return ""; + //return QString("limit(%1, %2=%3);").arg(expression, variable, limit); +} + +QString QalculateCalculusExtension::differentiate(const QString& function,const QString& variable, int times) +{ + return QString("diff(%1, %2, %3)").arg(function, variable, QString::number(times)); +} + +QString QalculateCalculusExtension::integrate(const QString& function, const QString& variable) +{ + return QString("integrate(%1, %2)").arg(function, variable); +} + +QString QalculateCalculusExtension::integrate(const QString& function,const QString& variable, const QString& left, const QString& right) +{ + return QString("integrate(%1, %2, %3, %4)").arg(function, variable, left, right); +} + +//Commands to create Vectors/Matrices +QString QalculateLinearAlgebraExtension::createVector(const QStringList& entries, VectorType type) +{ + // Neither of these does create a normal vector, but a n-times-1 or + // an 1-times-n matrix. + if(type==Cantor::LinearAlgebraExtension::ColumnVector) { + QString list=entries.join("], ["); + return QString("[[%1]]").arg(list); + } + else { + QString list=entries.join(","); + return QString("[[%1]]").arg(list); + } +} + +QString QalculateLinearAlgebraExtension::createMatrix(const Matrix& matrix) +{ + QString cmd="["; + foreach(const QStringList& row, matrix) + { + cmd+='['; + foreach(const QString& entry, row) + cmd+=entry+','; + cmd.chop(1); + cmd+="],"; + } + cmd.chop(1); + cmd+="]"; + + return cmd; +} + +QString QalculateLinearAlgebraExtension::identityMatrix(int size) +{ + return QString("identity(%1)").arg(size); +} + +//basic functions +QString QalculateLinearAlgebraExtension::rank(const QString& matrix) +{ + // This feature seems to be missing in Qalculate + return QString("").arg(matrix); +} + +QString QalculateLinearAlgebraExtension::invertMatrix(const QString& matrix) +{ + return QString("inverse(%1)").arg(matrix); +} + +QString QalculateLinearAlgebraExtension::charPoly(const QString& matrix) +{ + return QString("det(x*identity(%1)-%2)").arg(matrix, matrix); +} + +QString QalculateLinearAlgebraExtension::eigenVectors(const QString& matrix) +{ + // No such function + return QString("").arg(matrix); +} + +QString QalculateLinearAlgebraExtension::eigenValues(const QString& matrix) +{ + // No such function + return QString("").arg(matrix); +} diff -Nru cantor-4.7.3/src/backends/qalculate/qalculateextensions.h cantor-4.7.90/src/backends/qalculate/qalculateextensions.h --- cantor-4.7.3/src/backends/qalculate/qalculateextensions.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculateextensions.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,96 @@ +/************************************************************************************ +* Copyright (C) 2011 by Matteo Agostinelli * +* * +* 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 * +*************************************************************************************/ + +#ifndef QALCULATEEXTENSIONS_H +#define QALCULATEEXTENSIONS_H + +#include + +#define QALCULATE_EXT_CDTOR_DECL(name) Qalculate##name##Extension(QObject* parent); \ + ~Qalculate##name##Extension(); + +class QalculateHistoryExtension : public Cantor::HistoryExtension +{ +public: + QALCULATE_EXT_CDTOR_DECL(History) + virtual QString lastResult(); +}; + +class QalculateVariableManagementExtension : public Cantor::VariableManagementExtension +{ + public: + QALCULATE_EXT_CDTOR_DECL(VariableManagement) + virtual QString addVariable(const QString& name, const QString& value); + virtual QString setValue(const QString& name, const QString& value); + virtual QString removeVariable(const QString& name); + virtual QString saveVariables(const QString& fileName); + virtual QString loadVariables(const QString& fileName); + virtual QString clearVariables(); +}; + +class QalculatePlotExtension : public Cantor::Extension +{ +public: + QALCULATE_EXT_CDTOR_DECL(Plot) +}; + +class QalculateCASExtension : public Cantor::CASExtension +{ + public: + QALCULATE_EXT_CDTOR_DECL(CAS) + + public slots: + virtual QString solve(const QStringList& equations, const QStringList& variables); + virtual QString simplify(const QString& expression); + virtual QString expand(const QString& expression); + +}; + +class QalculateCalculusExtension : public Cantor::CalculusExtension +{ + public: + QALCULATE_EXT_CDTOR_DECL(Calculus) + + public slots: + QString limit(const QString& expression, const QString& variable, const QString& limit); + QString differentiate(const QString& function,const QString& variable, int times); + QString integrate(const QString& function, const QString& variable); + QString integrate(const QString& function,const QString& variable, const QString& left, const QString& right); +}; + +class QalculateLinearAlgebraExtension : public Cantor::LinearAlgebraExtension +{ + public: + QALCULATE_EXT_CDTOR_DECL(LinearAlgebra) + + public slots: + //Commands to create Vectors/Matrices + virtual QString createVector(const QStringList& entries, VectorType type); + virtual QString createMatrix(const Matrix& matrix); + virtual QString identityMatrix(int size); + + //basic functions + virtual QString rank(const QString& matrix); + virtual QString invertMatrix(const QString& matrix); + virtual QString charPoly(const QString& matrix); + virtual QString eigenVectors(const QString& matrix); + virtual QString eigenValues(const QString& matrix); + +}; + +#endif /* QALCULATEEXTENSIONS_H */ diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatehighlighter.cpp cantor-4.7.90/src/backends/qalculate/qalculatehighlighter.cpp --- cantor-4.7.3/src/backends/qalculate/qalculatehighlighter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatehighlighter.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,135 @@ +/************************************************************************************ +* Copyright (C) 2009 by Milian Wolff * +* * +* 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 "qalculatehighlighter.h" + +#include +#include +#include +#include + +#include +#include +#include +#include + +QalculateHighlighter::QalculateHighlighter(QTextEdit* parent) + : Cantor::DefaultHighlighter(parent) +{ +} + +QalculateHighlighter::~QalculateHighlighter() +{ +} + +void QalculateHighlighter::highlightBlock(const QString& text) +{ + if ( text.isEmpty() || text.trimmed().isEmpty() || text.startsWith(QLatin1String(">>> ")) + // filter error messages, they get highlighted via html + || text.startsWith(i18n("ERROR")+':') || text.startsWith(i18n("WARNING")+':') ) { + return; + } + + int pos = 0; + int count; + ///TODO: Can't we use CALCULATOR->parse() or similar? + /// Question is how to get the connection between + /// MathStructur and position+length in @p text + const QStringList& words = text.split(QRegExp("\\b"), QString::SkipEmptyParts); + + kDebug() << "highlight block:" << text; + + CALCULATOR->beginTemporaryStopMessages(); + + const QString decimalSymbol = KGlobal::locale()->decimalSymbol(); + + for ( int i = 0; i < words.size(); ++i, pos += count ) { + count = words[i].size(); + if ( words[i].trimmed().isEmpty() ) { + continue; + } + + kDebug() << "highlight word:" << words[i]; + + QTextCharFormat format = errorFormat(); + + if ( i < words.size() - 1 && words[i+1].trimmed() == "(" && CALCULATOR->getFunction(words[i].toUtf8().constData()) ) { + // should be a function + kDebug() << "function"; + format = functionFormat(); + } else if ( isOperatorAndWhitespace(words[i]) ) { + // stuff like ") * (" is an invalid expression, but acutally OK + + // check if last number is actually a float + bool isFloat = false; + if ( words[i].trimmed() == decimalSymbol ) { + if ( i > 0 ) { + // lookbehind + QString lastWord = words[i-1].trimmed(); + if ( !lastWord.isEmpty() && lastWord.at(lastWord.size()-1).isNumber() ) { + kDebug() << "actually float"; + isFloat = true; + } + } + if ( !isFloat && i < words.size() - 1 ) { + // lookahead + QString nextWord = words[i+1].trimmed(); + if ( !nextWord.isEmpty() && nextWord.at(0).isNumber() ) { + kDebug() << "float coming"; + isFloat = true; + } + } + } + if ( !isFloat ) { + kDebug() << "operator / whitespace"; + format = operatorFormat(); + } else { + format = numberFormat(); + } + } else { + MathStructure expr = CALCULATOR->parse(words[i].toAscii().constData()); + if ( expr.isNumber() || expr.isNumber_exp() ) { + kDebug() << "number"; + format = numberFormat(); + } else if ( expr.isVariable() ) { + kDebug() << "variable"; + format = variableFormat(); + } else if ( expr.isUndefined() ) { + kDebug() << "undefined"; + } else if ( expr.isUnit() || expr.isUnit_exp() ) { + kDebug() << "unit"; + format = keywordFormat(); + } + } + + setFormat(pos, count, format); + } + + CALCULATOR->endTemporaryStopMessages(); + +} + +bool QalculateHighlighter::isOperatorAndWhitespace(const QString& word) const +{ + foreach ( const QChar& c, word ) { + if ( c.isLetterOrNumber() ) { + return false; + } + } + return true; +} diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatehighlighter.h cantor-4.7.90/src/backends/qalculate/qalculatehighlighter.h --- cantor-4.7.3/src/backends/qalculate/qalculatehighlighter.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatehighlighter.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,37 @@ +/************************************************************************************ +* Copyright (C) 2009 by Milian Wolff * +* * +* 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 * +*************************************************************************************/ + +#ifndef QALCULATEHIGHLIGHTER_H +#define QALCULATEHIGHLIGHTER_H + +#include "defaulthighlighter.h" + +class QalculateHighlighter : public Cantor::DefaultHighlighter +{ +public: + QalculateHighlighter(QTextEdit* parent); + ~QalculateHighlighter(); + +protected: + virtual void highlightBlock(const QString& text); + +private: + bool isOperatorAndWhitespace(const QString &word) const; +}; + +#endif // QALCULATEHIGHLIGHTER_H diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatesession.cpp cantor-4.7.90/src/backends/qalculate/qalculatesession.cpp --- cantor-4.7.3/src/backends/qalculate/qalculatesession.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatesession.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,121 @@ +/************************************************************************************ +* Copyright (C) 2009 by Milian Wolff * +* Copyright (C) 2011 by Matteo Agostinelli * +* * +* 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 "qalculatesession.h" +#include "qalculateexpression.h" +#include "qalculatecompletionobject.h" +#include "qalculatehighlighter.h" +#include "defaultvariablemodel.h" + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "qalculatesyntaxhelpobject.h" + +QalculateSession::QalculateSession( Cantor::Backend* backend) + : Session(backend), + m_variableModel(new Cantor::DefaultVariableModel(this)) +{ + if ( !CALCULATOR ) { + new Calculator(); + CALCULATOR->loadGlobalDefinitions(); + CALCULATOR->loadLocalDefinitions(); + CALCULATOR->loadExchangeRates(); + } + // from qalc.cc in libqalculate + std::string ansName = "ans"; + // m_undefined is not a variable in this class, but is defined in + // libqalculate/includes.h + m_ansVariables.append(static_cast(CALCULATOR->addVariable(new KnownVariable("Temporary", ansName, m_undefined, "Last Answer", false)))); + m_ansVariables[0]->addName("answer"); + m_ansVariables[0]->addName(ansName + "1"); + m_ansVariables.append(static_cast(CALCULATOR->addVariable(new KnownVariable("Temporary", ansName+"2", m_undefined, "Answer 2", false)))); + m_ansVariables.append(static_cast(CALCULATOR->addVariable(new KnownVariable("Temporary", ansName+"3", m_undefined, "Answer 3", false)))); + m_ansVariables.append(static_cast(CALCULATOR->addVariable(new KnownVariable("Temporary", ansName+"4", m_undefined, "Answer 4", false)))); + m_ansVariables.append(static_cast(CALCULATOR->addVariable(new KnownVariable("Temporary", ansName+"5", m_undefined, "Answer 5", false)))); +} + +QalculateSession::~QalculateSession() +{ + CALCULATOR->abort(); +} + +void QalculateSession::login() +{ + changeStatus(Cantor::Session::Done); + emit ready(); +} + +void QalculateSession::logout() +{ +} + +void QalculateSession::interrupt() +{ + changeStatus(Cantor::Session::Done); +} + +Cantor::Expression* QalculateSession::evaluateExpression(const QString& cmd, Cantor::Expression::FinishingBehavior behave) +{ + QalculateExpression* expr = new QalculateExpression(this); + expr->setFinishingBehavior(behave); + + changeStatus(Cantor::Session::Running); + expr->setCommand(cmd); + expr->evaluate(); + changeStatus(Cantor::Session::Done); + + return expr; +} + +Cantor::CompletionObject* QalculateSession::completionFor(const QString& command) +{ + return new QalculateCompletionObject(command, this); +} + +Cantor::SyntaxHelpObject* QalculateSession::syntaxHelpFor(const QString& cmd) +{ + return new QalculateSyntaxHelpObject(cmd, this); +} + +QSyntaxHighlighter* QalculateSession::syntaxHighlighter(QTextEdit* parent) +{ + return new QalculateHighlighter(parent); +} + +void QalculateSession::setLastResult(MathStructure result) +{ + for (int i = m_ansVariables.size()-1; i >0 ; --i) { + m_ansVariables[i]->set(m_ansVariables[i-1]->get()); + } + m_ansVariables[0]->set(result); +} + +QAbstractItemModel* QalculateSession::variableModel() +{ + return m_variableModel; +} diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatesession.h cantor-4.7.90/src/backends/qalculate/qalculatesession.h --- cantor-4.7.3/src/backends/qalculate/qalculatesession.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatesession.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,61 @@ +/************************************************************************************* +* Copyright (C) 2009 by Milian Wolff * +* * +* 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 * +*************************************************************************************/ + +#ifndef QALCULATE_SESSION_H +#define QALCULATE_SESSION_H + +#include "session.h" + +#include + +#include +#include + +namespace Cantor { +class DefaultVariableModel; +} + +class QalculateEngine; + +class QalculateSession : public Cantor::Session +{ + Q_OBJECT + +private: + QList m_ansVariables; + Cantor::DefaultVariableModel* m_variableModel; + +public: + QalculateSession( Cantor::Backend* backend); + ~QalculateSession(); + + virtual void login(); + virtual void logout(); + + virtual void interrupt(); + + virtual Cantor::Expression* evaluateExpression(const QString& command, Cantor::Expression::FinishingBehavior behave); + virtual Cantor::CompletionObject* completionFor(const QString& cmd); + virtual Cantor::SyntaxHelpObject* syntaxHelpFor(const QString& cmd); + virtual QSyntaxHighlighter* syntaxHighlighter(QTextEdit* parent); + + void setLastResult(MathStructure); + QAbstractItemModel* variableModel(); +}; + +#endif diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatesyntaxhelpobject.cpp cantor-4.7.90/src/backends/qalculate/qalculatesyntaxhelpobject.cpp --- cantor-4.7.3/src/backends/qalculate/qalculatesyntaxhelpobject.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatesyntaxhelpobject.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,277 @@ +/************************************************************************************* + * Copyright (C) 2009 by Milian Wolff * + * * + * 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 "settings.h" +#include "qalculatesyntaxhelpobject.h" +#include "qalculatesession.h" +#include "settings.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +QalculateSyntaxHelpObject::QalculateSyntaxHelpObject(const QString& command, QalculateSession* session) + : SyntaxHelpObject(command, session), m_answer(QString()) +{ +} + +void QalculateSyntaxHelpObject::fetchInformation() +{ + std::string cmd = command().remove("help").simplified().toLatin1().data(); + kDebug() << "HELP CALLED FOR:" << QString(cmd.c_str()); + + if (cmd == "plot") { + setPlotInformation(); + return; + } + if (cmd == "saveVariables") { + setSaveVariablesInformation(); + return; + } + if (cmd == "loadVariables") { + setLoadVariablesInformation(); + return; + } + + ExpressionItem *item = CALCULATOR->getActiveExpressionItem(cmd); + + if (!item) { + m_answer = i18n("No function, variable or unit with specified name exist."); + return; + } + + switch(item->type()) { + case TYPE_FUNCTION: + MathFunction *f = (MathFunction*) item; + QString title = i18n("Function: %1", item->title().c_str()); + const ExpressionName *ename = &f->preferredName(false); + int iargs = f->maxargs(); + if(iargs < 0) { + iargs = f->minargs() + 1; + } + QString str,str2,syntax; + str += ename->name.c_str(); + str += "("; + if(iargs != 0) { + Argument *arg; + Argument default_arg; + for(int i2 = 1; i2 <= iargs; i2++) { + if(i2 > f->minargs()) { + str += "["; + } + if(i2 > 1) { + str += QString(CALCULATOR->getComma().c_str()); + str += " "; + } + arg = f->getArgumentDefinition(i2); + if(arg && !arg->name().empty()) { + str2 = arg->name().c_str(); + } else { + str2 = "argument"; + str2 += " "; + str2 += QString::number(i2); + } + str += str2; + if(i2 > f->minargs()) { + str += "]"; + } + } + if(f->maxargs() < 0) { + str += CALCULATOR->getComma().c_str(); + str += " ..."; + } + } + str += ")"; + syntax = QString("

%1

").arg(str); + + QString arguments = ""; + if(iargs != 0) { + Argument *arg; + Argument default_arg; + for(int i2 = 1; i2 <= iargs; i2++) { + arg = f->getArgumentDefinition(i2); + if(arg && !arg->name().empty()) { + str = arg->name().c_str(); + } else { + str = QString::number(i2); + } + str += ": "; + if(arg) { + str2 = arg->printlong().c_str(); + } else { + str2 = default_arg.printlong().c_str(); + } + if(i2 > f->minargs()) { + str2 += " ("; + //optional argument, in description + str2 += "optional"; + if(!f->getDefaultValue(i2).empty()) { + str2 += ", "; + //argument default, in description + str2 += "default: "; + str2 += f->getDefaultValue(i2).c_str(); + } + str2 += ")"; + } + str += str2; + arguments += QString("

%1

").arg(str); + } + } + + QString desc = QString("

%1

").arg(item->description().c_str()); + + m_answer = title + desc + syntax + arguments; + } +} + +void QalculateSyntaxHelpObject::setPlotInformation() +{ + QString title = "

" + i18n("Plotting interface") + "

"; + QString desc = "

" + i18n("Plots one or more functions either inline or in a separate window.") + "

"; + QString expression = i18n("expression"); + QString option = i18n("option"); + QString value = i18n("value"); + QString syntax = QString("

plot %1 [%2=%3 ...] [, %4 [%5=%6 ...]] ...

"); + syntax = syntax.arg(expression, option, value, expression, option, value); + + QString integer = i18n("integer"); + QString boolean = i18n("boolean"); + QString number = i18n("number"); + QString defaultValue = i18n("default: %1"); + QString noDefault = ""; + QString optionFormat2 = "

%1: %2

"; + QString optionFormat3 = "

%1: %2 (%3)

"; + QString optionFormat4 = "

%1: %2 (%3, %4)

"; + + QStringList boolList; + boolList << "false" << "true"; + + QString legendDefault; + QString styleDefault; + QString smoothingDefault; + switch (QalculateSettings::plotLegend()) { + case QalculateSettings::LEGEND_NONE: + legendDefault = "none"; break; + case QalculateSettings::LEGEND_TOP_LEFT: + legendDefault = "top_left"; break; + case QalculateSettings::LEGEND_TOP_RIGHT: + legendDefault = "top_right"; break; + case QalculateSettings::LEGEND_BOTTOM_LEFT: + legendDefault = "bottom_left"; break; + case QalculateSettings::LEGEND_BOTTOM_RIGHT: + legendDefault = "bottom_right"; break; + case QalculateSettings::LEGEND_BELOW: + legendDefault = "below"; break; + case QalculateSettings::LEGEND_OUTSIDE: + legendDefault = "outside"; break; + } + switch(QalculateSettings::plotSmoothing()) { + case QalculateSettings::SMOOTHING_NONE: + smoothingDefault = "none"; break; + case QalculateSettings::SMOOTHING_UNIQUE: + smoothingDefault = "monotonic"; break; + case QalculateSettings::SMOOTHING_CSPLINES: + smoothingDefault = "csplines"; break; + case QalculateSettings::SMOOTHING_BEZIER: + smoothingDefault = "bezier"; break; + case QalculateSettings::SMOOTHING_SBEZIER: + smoothingDefault = "sbezier"; break; + } + switch(QalculateSettings::plotStyle()) { + case QalculateSettings::STYLE_LINES: + styleDefault = "lines"; break; + case QalculateSettings::STYLE_POINTS: + styleDefault = "points"; break; + case QalculateSettings::STYLE_LINES_POINTS: + styleDefault = "points_lines"; break; + case QalculateSettings::STYLE_BOXES: + styleDefault = "boxes"; break; + case QalculateSettings::STYLE_HISTOGRAM: + styleDefault = "histogram"; break; + case QalculateSettings::STYLE_STEPS: + styleDefault = "steps"; break; + case QalculateSettings::STYLE_CANDLESTICKS: + styleDefault = "candlesticks"; break; + case QalculateSettings::STYLE_DOTS: + styleDefault = "dots"; break; + } + + QString arguments = ""; + arguments += optionFormat3.arg("title", i18n("The function's name"), + defaultValue.arg("expression")); + arguments += optionFormat2.arg("plottitle", i18n("Title label")); + arguments += optionFormat2.arg("xlabel", i18n("x-axis label")); + arguments += optionFormat2.arg("ylabel", i18n("y-axis label")); + arguments += optionFormat2.arg("filename", i18n("Image to save plot to. If empty shows plot in a window on the screen. If inline=true the image is shown regardless of this option.")); + arguments += optionFormat3.arg("filetype", i18n("The image type to save as. One of auto, png, ps, eps, latex, svg, fig."), defaultValue.arg("auto")); + arguments += optionFormat4.arg("color", i18n("Set to true for colored plot, false for monochrome."), boolean, defaultValue.arg(boolList[QalculateSettings::coloredPlot()])); + arguments += optionFormat3.arg("xmin", i18n("Minimum x-axis value."), number); + arguments += optionFormat3.arg("xmax", i18n("Maximum x-axis value."), number); + arguments += optionFormat4.arg("xlog", i18n("If a logarithmic scale shall be used for the x-axis."), boolean, defaultValue.arg("false")); + arguments += optionFormat4.arg("ylog", i18n("If a logarithmic scale shall be used for the y-axis."), boolean, defaultValue.arg("false")); + arguments += optionFormat4.arg("xlogbase", i18n("Logarithmic base for the x-axis."), number, defaultValue.arg("10")); + arguments += optionFormat4.arg("ylogbase", i18n("Logarithmic base for the y-axis."), boolean, defaultValue.arg("10")); + arguments += optionFormat4.arg("grid", i18n("If a grid shall be shown in the plot."), boolean, defaultValue.arg(boolList[QalculateSettings::plotGrid()])); + arguments += optionFormat4.arg("border", i18n("If the plot shall be surrounded by borders on all sides (not just axis)."), boolean, defaultValue.arg(boolList[QalculateSettings::plotBorder()])); + arguments += optionFormat4.arg("linewidth", i18n("Width of lines."), integer, defaultValue.arg(QString::number(QalculateSettings::plotLineWidth()))); + arguments += optionFormat3.arg("legend", i18n("Where the plot legend shall be placed. One of none, top_left, top_right, bottom_left, bottom_right, below, outside"), defaultValue.arg(legendDefault)); + arguments += optionFormat3.arg("smoothing", i18n("Plot smoothing. One of none, unique, csplines, bezier, sbezier"), defaultValue.arg(smoothingDefault)); + arguments += optionFormat3.arg("style", i18n("Plot style. One of lines, points, points_lines, boxes, histogram, steps, candlesticks, dots"), defaultValue.arg(styleDefault)); + arguments += optionFormat4.arg("xaxis2", i18n("Use scale on second x-axis."), boolean, defaultValue.arg("false")); + arguments += optionFormat4.arg("yaxis2", i18n("Use scale on second y-axis."), boolean, defaultValue.arg("false")); + arguments += optionFormat4.arg("inline", i18n("If the plot is to be drawn inline, instead of in a new window."), boolean, defaultValue.arg(boolList[QalculateSettings::inlinePlot()])); + arguments += optionFormat3.arg("step", i18n("Distance between two interpolation points. See also steps."), number); + arguments += optionFormat4.arg("steps", i18n("Number of interpolation points. See also step."), integer, defaultValue.arg(QString::number(QalculateSettings::plotSteps()))); + arguments += optionFormat3.arg("xvar", i18n("The name of the x variable. This must be an unknown variable"), defaultValue.arg("x")); + + m_answer = title + desc + syntax + arguments; + + +} + +void QalculateSyntaxHelpObject::setSaveVariablesInformation() +{ + QString title = "

" + i18n("Save variables to a file") + "

"; + QString desc = "

" + i18n("Save all currently defined variables to a file. They can be reloaded with %1.", QLatin1String("loadVariables")) + "

"; + QString syntax = "

saveVariables " + i18n("file") + "

"; + QString arguments = "

" + i18n("file: the file to save to") + "

"; + m_answer = title + desc + syntax + arguments; +} + +void QalculateSyntaxHelpObject::setLoadVariablesInformation() +{ + QString title = "

" + i18n("Load variables from a file") + "

"; + QString desc = "

" + i18n("Load variables from a file that has previously been created by %1.", QLatin1String("saveVariables")) + "

"; + QString syntax = "

loadVariables " + i18n("file") + "

"; + QString arguments = "

" + i18n("file: the file to load") + "

"; + m_answer = title + desc + syntax + arguments; +} + + +QString QalculateSyntaxHelpObject::answer() +{ + fetchInformation(); + return m_answer; +} + diff -Nru cantor-4.7.3/src/backends/qalculate/qalculatesyntaxhelpobject.h cantor-4.7.90/src/backends/qalculate/qalculatesyntaxhelpobject.h --- cantor-4.7.3/src/backends/qalculate/qalculatesyntaxhelpobject.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/qalculatesyntaxhelpobject.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,42 @@ +/************************************************************************************* + * Copyright (C) 2009 by Milian Wolff * + * * + * 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 * + *************************************************************************************/ + +#ifndef QALCULATESYNTAXHELPOBJECT_H +#define QALCULATESYNTAXHELPOBJECT_H + +#include + +class QalculateSession; + +class QalculateSyntaxHelpObject : public Cantor::SyntaxHelpObject +{ +public: + QalculateSyntaxHelpObject( const QString& command, QalculateSession* session ); + QString answer(); + +protected: + virtual void fetchInformation(); + + void setPlotInformation(); + void setSaveVariablesInformation(); + void setLoadVariablesInformation(); + + QString m_answer; +}; + +#endif // QALCULATESYNTAXHELPOBJECT_H diff -Nru cantor-4.7.3/src/backends/qalculate/settings.kcfgc cantor-4.7.90/src/backends/qalculate/settings.kcfgc --- cantor-4.7.3/src/backends/qalculate/settings.kcfgc 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/settings.kcfgc 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,3 @@ +File=qalculatebackend.kcfg +ClassName=QalculateSettings +Singleton=true diff -Nru cantor-4.7.3/src/backends/qalculate/settings.ui cantor-4.7.90/src/backends/qalculate/settings.ui --- cantor-4.7.3/src/backends/qalculate/settings.ui 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/settings.ui 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,657 @@ + + + QalculateSettingsBase + + + + 0 + 0 + 420 + 327 + + + + + + + 0 + + + + General + + + + + + + + Number base: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + Fraction format: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Decimal + + + + + Exact + + + + + Fractional + + + + + Combined + + + + + + + + + + + + Numerical display: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + None + + + + + Pure + + + + + Scientific + + + + + Precision + + + + + + + + + + + + Indicate infinite series: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + + + Use all SI prefixes: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + + + Use negative exponents: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + Qt::Vertical + + + + 20 + 102 + + + + + + + + + Evaluate + + + + + + + + Convert to best SI units: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + + + Angle unit: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + None + + + + + Radians + + + + + Degrees + + + + + Gradians + + + + + + + + + + + + Structuring Mode: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + None + + + + + Simplify + + + + + Factorize + + + + + + + + + + Qt::Vertical + + + + 20 + 185 + + + + + + + + + Plotting + + + + + + + + Display plots inline: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + + + Colored Plots: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + + + Show grid: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + + + Show full borders: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Enabled + + + + + + + + + + + Width of lines: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 1 + + + + + + + + + + + Sampling rate + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 1 + + + + + + + + + + + Smoothing Mode: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + None + + + + + Monotonic + + + + + Natural cubic Splines + + + + + Bezier + + + + + Bezier (monotonic) + + + + + + + + + + + + Plot Style: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Lines + + + + + Points + + + + + Points and Lines + + + + + Boxes + + + + + Histogram + + + + + Steps + + + + + Candlesticks + + + + + Dots + + + + + + + + + + + + Legend Position: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Hide legend + + + + + Top-left + + + + + Top-right + + + + + Bottom-left + + + + + Bottom-right + + + + + Below + + + + + Outside + + + + + + + + + + Qt::Vertical + + + + 20 + 22 + + + + + + + + + + + + + KIntSpinBox + QSpinBox +
knuminput.h
+
+ + KComboBox + QComboBox +
kcombobox.h
+
+ + KTabWidget + QTabWidget +
ktabwidget.h
+ 1 +
+ + KIntNumInput + QWidget +
knuminput.h
+
+
+ + ktabwidget + kcfg_base + kcfg_fractionFormat + kcfg_minExp + kcfg_indicateInfiniteSeries + kcfg_useAllPrefixes + kcfg_negativeExponents + kcfg_postConversion + kcfg_angleUnit + kcfg_structuring + kcfg_inlinePlot + kcfg_coloredPlot + kcfg_plotGrid + kcfg_plotBorder + kcfg_plotLineWidth + kcfg_plotSteps + kcfg_plotSmoothing + kcfg_plotStyle + kcfg_plotLegend + + + +
diff -Nru cantor-4.7.3/src/backends/qalculate/settingswidget.cpp cantor-4.7.90/src/backends/qalculate/settingswidget.cpp --- cantor-4.7.3/src/backends/qalculate/settingswidget.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/settingswidget.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,24 @@ +/* + Copyright (C) 2011 Matteo Agostinelli + + 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 3 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, see . + +*/ + +#include "settingswidget.h" + +QalculateSettingsWidget::QalculateSettingsWidget(QWidget* parent, Qt::WindowFlags f): QWidget(parent, f) +{ + setupUi(this); +} diff -Nru cantor-4.7.3/src/backends/qalculate/settingswidget.h cantor-4.7.90/src/backends/qalculate/settingswidget.h --- cantor-4.7.3/src/backends/qalculate/settingswidget.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/qalculate/settingswidget.h 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,32 @@ +/* + Copyright (C) 2011 Matteo Agostinelli + + 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 3 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, see . + +*/ + +#ifndef SETTINGSWIDGET_H +#define SETTINGSWIDGET_H + +#include "ui_settings.h" + +class QalculateSettingsWidget : public QWidget, public Ui::QalculateSettingsBase +{ +Q_OBJECT + +public: + explicit QalculateSettingsWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); +}; + +#endif \ No newline at end of file diff -Nru cantor-4.7.3/src/backends/R/rbackend.desktop cantor-4.7.90/src/backends/R/rbackend.desktop --- cantor-4.7.3/src/backends/R/rbackend.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/backends/R/rbackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon=rbackend Name=R +Name[bg]=R Name[bs]=R Name[ca]=R Name[ca@valencia]=R @@ -46,6 +47,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=Backend for The R Project for Statistical Computing +Comment[bg]=Ядро за проекта R за статистически изчисления Comment[ca]=Dorsal per al projecte R, paquet d'estadística per ordinador Comment[ca@valencia]=Dorsal per al projecte R, paquet d'estadística per ordinador Comment[cs]=Podpůrná vrstva pro projekt R pro statistické výpočty @@ -59,6 +61,7 @@ Comment[fr]=Moteur pour le projet R destiné au calcul statistique Comment[gl]=Infraestrutura do Proxecto R de estatística computacional Comment[hr]=Pozadinski servis za R (projekt za statističko računanje) +Comment[hu]=Modul az R projekthez Comment[it]=Backend per il progetto R per l'analisi statistica Comment[ja]=統計計算のための R のバックエンド Comment[km]=កម្ម​វិធី​ខាង​ក្រោយ​សម្រាប់​គម្រោង​ R សម្រាប់​ការ​គណនា​ស្ថិតិ diff -Nru cantor-4.7.3/src/backends/sage/sagebackend.desktop cantor-4.7.90/src/backends/sage/sagebackend.desktop --- cantor-4.7.3/src/backends/sage/sagebackend.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/backends/sage/sagebackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon=sagebackend Name=Sage +Name[bg]=Sage Name[bs]=Sage Name[ca]=Sage Name[ca@valencia]=Sage @@ -34,7 +35,6 @@ Name[sl]=Sage Name[sv]=Sage Name[tr]=Sage -Name[ug]=Sage Name[uk]=Sage Name[x-test]=xxSagexx Name[zh_CN]=Sage @@ -46,6 +46,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=Backend for the Sage Mathematics Software +Comment[bg]=Ядро за математическата програма Sage Comment[ca]=Dorsal per al programari matemàtic Sage Comment[ca@valencia]=Dorsal per al programari matemàtic Sage Comment[cs]=Podpůrná vrstva pro matematický software Sage @@ -59,6 +60,7 @@ Comment[fr]=Moteur pour le logiciel de mathématiques Sage Comment[gl]=Infraestrutura do Software de matemáticas Sage Comment[hr]=Pozadniski servis za Sage +Comment[hu]=Modul a Sage matematikai szoftverhez Comment[it]=Backend per il software matematico Sage Comment[ja]=数値演算ソフトウェア Sage のバックエンド Comment[km]=កម្មវិធី​ខាង​ក្រោយ​សម្រាប់​កម្មវិធី​គណិតវិទ្យា​​ Sage diff -Nru cantor-4.7.3/src/backends/sage/sagesession.cpp cantor-4.7.90/src/backends/sage/sagesession.cpp --- cantor-4.7.3/src/backends/sage/sagesession.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/backends/sage/sagesession.cpp 2011-07-27 18:37:50.000000000 +0000 @@ -232,7 +232,7 @@ command=("help("+command.mid(1)+')'); kDebug()<<"writing "<pty()->write((command+'\n').toUtf8()); + m_process->pty()->write(QString(command+'\n').toUtf8()); } } diff -Nru cantor-4.7.3/src/backends/scilab/CMakeLists.txt cantor-4.7.90/src/backends/scilab/CMakeLists.txt --- cantor-4.7.3/src/backends/scilab/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/CMakeLists.txt 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,30 @@ +find_package(KDE4 REQUIRED KIO KDIRWATCH) + +set( ScilabBackend_SRCS + scilabbackend.cpp + scilabsession.cpp + scilabexpression.cpp + scilabkeywords.cpp + scilabhighlighter.cpp + scilabcompletionobject.cpp +) + +kde4_add_kcfg_files(ScilabBackend_SRCS settings.kcfgc) +install(FILES scilabbackend.kcfg DESTINATION ${KCFG_INSTALL_DIR}) + +kde4_add_ui_files(ScilabBackend_SRCS settings.ui) + +kde4_add_plugin( cantor_scilabbackend ${ScilabBackend_SRCS} ) +target_link_libraries( cantor_scilabbackend ${KDE4_KDEUI_LIBS} cantorlibs ${KDE4_KIO_LIBS}) + +# kde4_add_unit_test( testsage testsage.cpp) +# target_link_libraries( testsage +# ${KDE4_KDECORE_LIBS} +# ${QT_QTTEST_LIBRARY} +# cantorlibs +# cantortest +# ) + +install(FILES scilabbackend.desktop DESTINATION ${SERVICES_INSTALL_DIR}/cantor) +install(FILES keywords.xml DESTINATION ${DATA_INSTALL_DIR}/cantor/scilabbackend) +install(TARGETS cantor_scilabbackend DESTINATION ${PLUGIN_INSTALL_DIR}) diff -Nru cantor-4.7.3/src/backends/scilab/keywords.xml cantor-4.7.90/src/backends/scilab/keywords.xml --- cantor-4.7.3/src/backends/scilab/keywords.xml 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/keywords.xml 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,2755 @@ + + + + %pi + %i_abs + %i_cumprod + %i_cumsum + %i_diag + %i_matrix + %i_max + %i_maxi + %i_min + %i_mini + %i_mput + %i_p + %i_prod + %i_sum + %i_tril + %i_triu + %msp_full + %msp_spget + %z + %s + %tk + %pvm + %F + %T + %nan + %inf + %gui + %fftw + $ + %t + %f + %eps + %io + %i + %e + %diagram_xcos + %s_s_b + %b_s_b + %b_r_s + %msp_nnz + %b_x_s + %msp_abs + %msp_sparse + %b_a_b + %b_prod + %b_l_b + %b_m_b + %b_p_s + %b_l_s + %s_p_b + %s_l_b + %s_m_b + %b_a_s + %b_d_s + %s_d_b + %s_a_msp + %s_c_b + %b_cumprod + %msp_find + %b_cumsum + %msp_t + %b_f_s + %msp_length + %msp_a_s + %b_r_b + %msp_e + %s_x_b + %msp_maxi + %b_c_s + %s_f_b + %s_r_b + %s_a_b + %b_s_s + %b_sum + %s_m_msp + %msp_m_s + %b_x_b + %b_m_s + %_strsplit + %sn + %k + %asn + %lss_o_s + %grayplot_i_h + %lss_v_s + %sp_tril + %r_a_hm + %p_o_lss + %st_i_msp + %hm_s + %l_isequal + %r_a_s + %hm_degree + %sp_p_s + %s_r_p + %hm_f_hm + %p_d_s + %r_d_s + %lss_s_p + %p_l_p + %i_and + %p_r_s + %lss_o_p + %c_e + %p_m_r + %s_r_s + %l_o_l + %s_q_r + %b_h_s + %lss_r_lss + %s_o_hm + %b_h_spb + %i_a_i + %r_diag + %s_g_b + %r_r_s + %sp_d_s + %p_o_l + %p_p_s + %spb_prod + %st_i_st + %lss_i_r + %p_e + %s_5 + %r_i_ce + %ce_size + %r_r_p + %i_x_i + %choose + %sp_i_ce + %s_h_s + %spb_f_b + %sp_s_s + %c_i_s + %s_n_l + %hm_a_s + %hm_maxi + %hm_prod + %sp_r_s + %lss_c_s + %r_y_r + %s_v_r + %r_i_p + %r_d_r + %sp_c_s + %r_m_r + %s_pow + %sp_prod + %r_l_p + %sp_i_sp + %s_4_hm + %r_s_r + %p_n_l + %s_i_lss + %p_j_s + %lss_l_p + %l_o_c + %l_i_s + %s_i_s + %ce_f_ce + %hm_floor + %c_i_lss + %cblock_f_cblock + %sp_or + %xlssheet_size + %s_i_r + %sp_triu + %hm_o_i + %i_i_ce + %i_m_i + %l_n_s + %r_norm + %sp_q_s + %r_c_r + %dir_p + %st_o_p + %lss_l_lss + %b_triu + %hm_i_s + %lss_r_p + %b_g_s + %st_o_c + %r_c_s + %spb_sum + %p_i_lss + %hm_g_hm + %p_i_hm + %p_q_r + %s_v_p + %i_s_i + %r_r_r + %i_i_s + %hm_size + %p_o_sp + %r_f_s + %hm_cumprod + %st_c_st + %sp_int + %sp_f_s + %p_s_r + %lss_f_s + %i_i_h + %sp_round + %sp_sum + %i_d_i + %l_n_c + %lss_n_s + %st_i_ip + %st_i_p + %s_1_hm + %s_i_sp + %p_d_p + %c_b_c + %sp_cumprod + %i_or + %s_q_sp + %hm_3_hm + %sp_diag + %mc_i_h + %s_z_r + %p_r_r + %hm_n_hm + %hm_2_s + %s_i_h + %hm_x_s + %c_tril + %r_f_r + %p_f_lss + %hm_isnan + %p_x_hm + %sp_y_s + %s_r_lss + %p_v_p + %lss_norm + %st_t + %sp_floor + %ce_e + %p_i_h + %ip_n_ip + %r_n_p + %p_y_p + %hm_rand + %s_a_r + %c_i_st + %sp_ceil + %st_i_i + %sp_e + %s_v_s + %p_prod + %sp_inv + %i_length + %sp_exp + %s_i_c + %hm_m_s + %sp_z_sp + %st_n_mc + %spb_i_b + %lss_v_r + %sp_and + %lss_a_lss + %p_i_r + %s_2_hm + %r_p_s + %p_s_lss + %b_g_spb + %r_x_r + %p_z_r + %hm_a_r + %r_x_p + %sp_i_s + %b_i_b + %s_a_ip + %sp_sin + %r_size + %ip_m_s + %st_string + %hm_k_hm + %lss_s_s + %s_z_p + %sp_a_sp + %c_o_st + %hm_ceil + %r_m_lss + %r_k_r + %st_f_st + %r_ones + %r_s_hm + %s_d_sp + %r_y_p + %st_o_mc + %cblock_p + %p_i_ce + createstruct + %s_y_sp + %hm_k_s + %hm_e + %hm_i_i + %r_n_lss + %p_x_r + %b_i_ce + %sp_l_s + %l_n_m + %cblock_c_s + %hm_i_ce + %s_x_hm + %st_i_r + %p_matrix + %s_i_b + %p_inv + %hm_x_hm + %hm_or + %p_v_s + %lss_size + %s_h_b + %st_i_h + %st_n_p + %st_i_fptr + %r_q_r + %s_i_spb + %s_i_hm + %r_o_lss + %b_string + %hm_cumsum + %st_o_tl + %s_k_sp + %s_e + %hm_and + %mc_n_st + %s_b_s + %hm_j_s + %s_q_p + %s_simp + %lss_inv + %lss_i_lss + %st_i_b + %hm_d_s + %r_o_r + %r_c_p + %r_v_r + %c_i_h + %sp_cumsum + %s_m_r + %hm_i_hm + %p_z_s + %r_k_p + %s_f_lss + %s_n_r + %hm_s_s + %s_or + %r_z_r + %ticks_i_h + %s_f_r + %sp_r_sp + %hm_st_deviation + %hm_p + %hm_fft + %spb_and + %lss_c_r + %r_a_lss + %r_m_hm + %champdat_i_h + %msp_o_msp + %msp_spones + %r_i_s + %sp_i_h + %spb_tril + %lss_r_r + %spb_i_ce + %r_n_r + %s_o_st + %s_o_lss + %0_i_st + %s_s_sp + %c_o_l + %s_i_ce + %hm_i_b + %fptr_i_st + %i_i_hm + %r_y_s + %hm_exp + %ip_s_s + %st_size + %c_matrix + %ip_o_ip + %sp_s_sp + %i_g_i + %p_k_r + %r_l_s + %hm_a_hm + %s_k_hm + %s_n_lss + %hm_cos + %p_q_s + %hm_3_s + %r_q_p + %spb_or + %p_l_lss + %b_tril + %i_b_s + %lss_a_p + %lss_l_r + %ce_i_s + %spb_h_b + %c_n_l + %lss_e + %st_o_l + %lt_i_s + %lss_s_lss + %s_m_ip + %s_c_r + %s_m_hm + %ce_p + %r_clean + %spb_cumprod + %lss_l_s + %p_i_st + %hm_i_p + %ce_matrix + %r_i_lss + %hm_m_p + %c_diag + %st_p + %lss_a_r + %sp_cos + %hm_o_s + %r_t + %hm_imag + %s_f_sp + %hm_i_st + %r_simp + %sp_y_sp + %lss_n_p + %b_i_sp + %p_i_p + %hm_4_hm + %lss_n_lss + %s_matrix + %r_i_st + %r_s_s + %hm_sqrt + %r_l_lss + %p_d_r + %s_k_p + %p_m_lss + %r_p + %s_q_hm + %c_i_c + %lss_i_st + %hm_h_hm + %lss_i_p + %hm_find + %p_cumsum + %hm_c_hm + %b_i_spb + %spb_c_b + %s_d_p + %p_string + %r_matrix + %m_n_l + %s_a_lss + %r_rand + %s_o_r + %lss_i_ce + %p_cumprod + %s_x_r + %mc_i_st + %s_3_hm + %hm_real + %sp_a_s + %hm_1_hm + %r_o_s + %i_e + %msp_n_msp + %r_l_r + %s_r_r + %cblock_size + %s_m_lss + %s_y_p + %lss_m_s + %ce_string + %l_o_p + %r_z_s + %ce_i_st + %b_diag + %b_iconvert + %lss_v_lss + %lss_c_p + %st_i_s + %b_i_s + %c_a_c + %r_v_lss + %lss_c_lss + %ip_p + %3d_i_h + %ce_i_ce + %lss_m_lss + %lss_v_p + %msp_i_st + %st_i_lss + %spb_cumsum + %st_i_c + %hm_sin + %s_g_s + %hm_x_p + %c_ones + %s_k_r + %msp_i_s + %spb_i_h + %c_i_hm + %lss_a_s + %s_d_r + %st_i_sp + %r_e + %spb_g_b + %hm_matrix + %hm_ones + %s_n_st + %lss_f_r + %r_s + %s_r_sp + %hm_median + %h_i_st + %s_z_sp + %p_i_s + %p_sum + %ip_a_s + %p_c_r + %st_matrix + %r_v_s + %i_gcd + %b_i_st + %hm_n_s + %p_y_r + %p_simp + %hm_d_hm + %c_rand + %hm_o_hm + %r_z_p + %hm_m_r + %c_f_s + %i_i_st + %c_b_s + %r_n_s + %ar_p + %xls_e + %r_v_p + %spb_triu + %r_i_hm + %hm_iconvert + %p_l_s + %l_o_m + %i_ascii + %hm_int + %r_o_p + %r_a_p + %hm_mini + %r_cumprod + %sp_q_sp + %sp_k_s + %hm_string + %c_triu + %hm_r_s + %p_v_r + %lss_f_lss + %xls_p + %spb_diag + %r_triu + %xlssheet_p + %l_n_p + %r_inv + %i_i_i + %c_i_ce + %hm_s_hm + %r_q_s + %hm_j_hm + %r_prod + %i_round + %r_det + %cblock_e + %hm_bool2s + %hm_i_r + %b_matrix + %p_det + %ce_t + %s_and + %b_i_h + %p_v_lss + %ce_6 + %lss_m_r + %cblock_c_cblock + %lss_r_s + %ip_string + %i_bezout + %r_k_s + %s_o_l + %sp_d_sp + %r_x_s + %sp_z_s + %r_eye + %sp_l_sp + %l_i_st + %hm_sum + %hm_1_s + %hm_isreal + %st_e + %sp_k_sp + %r_i_r + %p_k_p + %sp_i_st + %sp_length + %b_e + %p_f_r + %s_v_lss + %hm_sign + %b_f_spb + %p_c_lss + %p_q_p + %r_r_lss + %s_c_cblock + %lss_f_p + %s_s_lss + %sp_sqrt + %l_o_s + %p_r_p + %st_n_s + %ip_i_st + %s_a_hm + %i_r_i + %spb_g_spb + %spb_i_st + %lss_s + %hm_conj + %lss_m_p + %mc_i_s + %r_s_p + %r_m_s + %r_c_lss + %i_h_i + %r_string + %st_n_c + %s_l_p + %p_r_lss + %msp_p + %xlssheet_e + %s_l_hm + %lss_eye + %s_y_r + %r_tril + %s_l_lss + %r_m_p + %st_i_spb + %p_y_s + %hm_4_s + %r_a_r + %hm_log + %r_f_lss + %lss_n_r + %hm_5 + %c_n_st + %hm_round + %lss_rand + %st_6 + %st_n_l + %b_c_spb + %s_l_r + %l_n_st + %p_a_r + %s_i_st + %s_n_hm + %hm_2_hm + %p_m_hm + %r_s_lss + %hm_abs + %b_i_hm + %s_l_s + %s_a_sp + %s_b_i + %lss_o_lss + %st_o_s + %lss_s_r + %s_i_p + %mc_o_st + %hm_s_r + %hm_zeros + %c_i_r + %s_l_sp + %spb_h_spb + %s_s_r + %p_z_p + %p_a_lss + %r_sum + %lss_o_r + %hm_q_hm + %r_f_p + %p_n_lss + %lss_ones + %l_n_l + %p_k_s + %lss_i_s + %s_s_ip + %p_n_r + %s_c_sp + %l_i_h + %c_eye + %p_o_r + %s_f_cblock + %p_l_r + %m_o_l + %i_lcm + %l_o_st + %s_s_hm + %sp_norm + %spb_e + %hm_mean + %r_d_p + %lss_t + %s_c_lss + %xlssheet_string + %ce_c_ce + %r_j_s + %TSIMPLEX_string + %TSIMPLEX_p + %TOPTIM_p + %TOPTIM_string + %TNELDER_p + %TNMPLOT_string + %TNMPLOT_p + %TNELDER_string + %mps_string + %mps_p + %i_s_s + %s_s_i + %i_d_s + %i_j_i + %s_o_i + %i_fft + %s_n_i + %i_plot2d + %i_plot2d1 + %s_r_i + %i_mfprintf + %s_j_i + %i_q_s + %s_1_i + %i_champ1 + %i_mprintf + %i_Matplot + %s_p_i + %i_l_s + %i_p_s + %s_l_i + %i_a_s + %i_n_s + %i_msprintf + %s_d_i + %i_x_s + %s_m_i + %s_4_i + %s_x_i + %i_3_s + %i_champ + %i_m_s + %i_r_s + %i_j_s + %s_2_i + %i_plot2d2 + %i_p_i + %s_3_i + %i_contour2d + %i_o_s + %s_q_i + %i_1_s + %s_a_i + %i_4_s + %i_sign + %s_i_i + %i_string + %i_2_s + %i_contour + %h_delete + %h_get + %_xget + %h_matrix + %_plot2d + %_xstringb + %_fec + %_Matplot + %h_draw + %_champ + %_champ1 + %_xtitle + %_param3d1 + %h_copy + %h_p + %_plot2d4 + %_plot3d1 + %_plot2d3 + %_plot2d1 + %h_set + %_xset + %h_e + %h_load + %_plot2d2 + %_grayplot + %_param3d + %_Matplot1 + %h_save + %_plot3d + %datatips_p + %sp_gsort + %_gsort + + + Calendar + ClipBoard + Matplot + Matplot1 + PlaySound + TCL_DeleteInterp + TCL_DoOneEvent + TCL_EvalFile + TCL_EvalStr + TCL_ExistArray + TCL_ExistInterp + TCL_ExistVar + TCL_GetVar + TCL_GetVersion + TCL_SetVar + TCL_UnsetVar + TCL_UpVar + _ + about + abs + acos + addcb + addf + addhistory + addinter + amell + and + argn + arl2_ius + ascii + asin + atan + backslash + balanc + banner + basename + bdiag + beep + besselh + besseli + besselj + besselk + bessely + beta + bezout + bfinit + blkfc1i + blkslvi + bool2s + browsevar + bsplin3val + buildDoc + buildDocv2 + buildouttb + bvode + c_link + calerf + call + callblk + captions + cd + cdfbet + cdfbin + cdfchi + cdfchn + cdff + cdffnc + cdfgam + cdfnbn + cdfnor + cdfpoi + cdft + ceil + champ + champ1 + chdir + chol + clean + clear_pixmap + clearfun + clearglobal + closeEditor + closeXcos + code2str + coeff + comp + completion + conj + contour2di + contr + convstr + copy + copyfile + corr + cos + coserror + createdir + cshep2d + ctree2 + ctree3 + ctree4 + cumprod + cumsum + curblock + curblockc + dasrt + dassl + data2sig + debug + deff + definedfields + degree + delbpt + delete + deletefile + delip + delmenu + det + dgettext + dhinf + diag + diary + diffobjs + disp + dispbpt + displayhistory + disposefftwlibrary + dlgamma + dnaupd + dneupd + double + draw + drawaxis + drawlater + drawnow + dsaupd + dsearch + dseupd + duplicate + editor + editvar + emptystr + end_scicosim + ereduc + errcatch + errclear + error + eval_cshep2d + exec + execstr + exists + exp + expm + exportUI + export_to_hdf5 + eye + fadj2sp + fec + feval + fftw + fftw_flags + fftw_forget_wisdom + fftwlibraryisloaded + file + fileext + fileinfo + fileparts + filesep + find + findBD + findfiles + floor + format + fort + fprintfMat + freq + frexp + fromc + fromjava + fscanfMat + fsolve + fstair + full + fullpath + funcprot + funptr + gamma + gammaln + geom3d + get + get_absolute_file_path + get_fftw_wisdom + getblocklabel + getcallbackobject + getdate + getdebuginfo + getdefaultlanguage + getdrives + getdynlibext + getenv + getfield + gethistory + gethistoryfile + getinstalledlookandfeels + getio + getlanguage + getlongpathname + getlookandfeel + getmd5 + getmemory + getmodules + getos + getpid + getrelativefilename + getscicosvars + getscilabmode + getshortpathname + gettext + getvariablesonstack + getversion + glist + global + glue + grand + grayplot + grep + gsort + gstacksize + havewindow + helpbrowser + hess + hinf + historymanager + historysize + host + iconvert + iconvert + ieee + ilib_verbose + imag + impl + import_from_hdf5 + imult + inpnvi + int + int16 + int2d + int32 + int3d + int8 + interp + interp2d + interp3d + intg + intppty + inttype + inv + is_handle_valid + isalphanum + isascii + isdef + isdigit + isdir + isequal + isequalbitwise + iserror + isfile + isglobal + isletter + isreal + iswaitingforinput + javaclasspath + javalibrarypath + kron + lasterror + ldiv + ldivf + legendre + length + lib + librarieslist + libraryinfo + linear_interpn + lines + link + linmeq + list + load + loadScicos + loadfftwlibrary + loadhistory + log + log1p + lsq + lsq_splin + lsqrsolve + lsslist + lstcat + lstsize + ltitr + lu + ludel + lufact + luget + lusolve + macr2lst + macr2tree + matfile_close + matfile_listvar + matfile_open + matfile_varreadnext + matfile_varwrite + matrix + max + maxfiles + mclearerr + mclose + meof + merror + messagebox + mfprintf + mfscanf + mget + mgeti + mgetl + mgetstr + min + mlist + mode + model2blk + mopen + move + movefile + mprintf + mput + mputl + mputstr + mscanf + mseek + msprintf + msscanf + mtell + mtlb_mode + mtlb_sparse + mucomp + mulf + nearfloat + newaxes + newest + newfun + nnz + notify + number_properties + ode + odedc + ones + opentk + optim + or + ordmmd + parallel_concurrency + parallel_run + param3d + param3d1 + part + pathconvert + pathsep + permutobj + phase_simulation + plot2d + plot2d1 + plot2d2 + plot2d3 + plot2d4 + plot3d + plot3d1 + pointer_xproperty + poly + ppol + pppdiv + predef + print + printfigure + printsetupbox + prod + progressionbar + prompt + qld + qp_solve + qr + raise_window + rand + rankqr + rat + rcond + rdivf + read + read4b + readb + readgateway + readmps + real + realtime + realtimeinit + regexp + relocate_handle + remez + removedir + removelinehistory + resethistory + residu + ricc + ricc_old + rlist + roots + rotate_axes + round + rpem + rtitr + rubberbox + save + saveafterncommands + saveconsecutivecommands + savehistory + schur + sci_haltscicos + sci_tree2 + sci_tree3 + sci_tree4 + sciargs + scicos_debug + scicos_debug_count + scicos_time + scicosim + scinotes + sctree + semidef + set + set_blockerror + set_fftw_wisdom + set_xproperty + setbpt + setdefaultlanguage + setenv + setfield + sethistoryfile + setlanguage + setlookandfeel + setmenu + sfact + sfinit + show_pixmap + show_window + showalluimenushandles + sident + sig2data + sign + simp + simp_mode + sin + size + slash + sleep + sorder + sparse + spchol + spcompack + spec + spget + splin + splin2d + splin3d + spones + sqrt + stacksize + str2code + strcat + strchr + strcmp + strcspn + strindex + string + stringbox + stripblanks + strncpy + strrchr + strrev + strsplit + strspn + strstr + strsubst + strtod + strtok + subf + sum + svd + swap_handles + symfcti + syredi + system_getproperty + system_setproperty + ta2lpd + tan + testmatrix + timer + tlist + tohome + tokens + toolbar + toprint + tr_zer + tril + triu + type + typename + uiDisplayTree + uicontextmenu + uicontrol + uigetcolor + uigetdir + uigetfile + uigetfont + uimenu + uint16 + uint32 + uint8 + uipopup + uiputfile + uiwait + ulink + unglue + unix + unsetmenu + unzoom + usecanvas + user + var2vec + varn + vec2var + waitbar + warnBlockByUID + warning + where + whereis + winsid + with_embedded_jre + with_module + writb + write + write4b + x_choose + x_choose_modeless + x_dialog + x_mdialog + xarc + xarcs + xarrows + xchange + xchoicesi + xclick + xcos + xcosConfigureXmlFile + xcosDiagramToHDF5 + xcosPalCategoryAdd + xcosPalDelete + xcosPalDisable + xcosPalEnable + xcosPalGenerateIcon + xcosPalLoad + xcosPalMove + xdel + xfarc + xfarcs + xfpoly + xfpolys + xfrect + xget + xgetech + xgetmouse + xgraduate + xgrid + xlfont + xls_open + xls_read + xname + xpause + xpoly + xpolys + xrect + xrects + xs2bmp + xs2eps + xs2gif + xs2jpg + xs2pdf + xs2png + xs2ppm + xs2ps + xs2svg + xsegs + xset + xsetech + xstring + xstringb + xtitle + zeros + znaupd + zneupd + zoom_rect + abort + apropos + break + case + catch + clc + clear + continue + do + else + elseif + end + endfunction + exit + for + function + help + if + pause + pwd + quit + resume + return + select + then + try + what + while + who + home + modules_managerlib + helptoolslib + scinoteslib + xcoslib + matiolib + atomslib + atomsguilib + parameterslib + simulated_annealinglib + genetic_algorithmslib + fft + scicos_autolib + scicos_utilslib + spreadsheetlib + demo_toolslib + assertlib + development_toolslib + soundlib + texmacslib + tclscilib + m2scilib + maple2scilablib + compatibility_functilib + statisticslib + timelib + stringlib + special_functionslib + sparselib + signal_processinglib + polynomialslib + overloadinglib + optimsimplexlib + optimbaselib + neldermeadlib + optimizationlib + linear_algebralib + jvmlib + output_streamlib + iolib + interpolationlib + integerlib + dynamic_linklib + guilib + uitreelib + data_structureslib + cacsdlib + graphic_exportlib + graphicslib + datatipslib + fileiolib + functionslib + elementary_functionslib + differential_equationlib + corelib + PWD + SCI + SCIHOME + TMPDIR + tbx_builder_macros + tbx_build_loader + tbx_builder + tbx_builder_src + tbx_build_help_loader + tbx_build_macros + tbx_build_gateway + tbx_build_src + tbx_builder_help + tbx_build_gateway_loader + tbx_builder_src_lang + tbx_build_gateway_clean + tbx_build_cleaner + tbx_builder_gateway + tbx_builder_help_lang + tbx_build_blocks + tbx_builder_gateway_lang + tbx_build_help + xmltojar + help_skeleton + check_help + xmltopdf + manedit + apropos + clean_help + extract_help_examples + xmltoweb + del_module_help_chapter + help + xmltops + add_module_help_chapter + xmltoformat + xmltohtml + find_links + help_from_sci + del_help_chapter + xmltochm + xmlfiletohtml + add_help_chapter + edit_error + xcos_workspace_init + importScicosPal + generateBlockImage + xcosPal + getModelicaPath + generateBlockImages + xcosPalExport + xcosConfigureModelica + xcosPalAdd + xcosBlockEval + loadXcosLibs + loadScicosLibs + getDiagramVersion + xcos_compile + xcos_simulate + importXcosDiagram + xcos_run + xcosShowBlockWarning + xcosPalAddBlock + xcosCodeGeneration + importScicosDiagram + xcosBlockInterface + WritemiMatrix + savematfile + ReadmiMatrix + loadmatfile + atomsShow + atomsSetConfig + atomsCategoryList + atomsSearch + atomsSystemInit + atomsLoad + atomsGetLoadedPath + atomsSystemUpdate + atomsRepositoryList + atomsDepTreeShow + atomsRepositoryDel + atomsInstall + atomsAutoload + atomsRepositoryAdd + atomsIsInstalled + atomsList + atomsUpdate + atomsAutoloadList + atomsTest + atomsVersion + atomsAutoloadAdd + atomsIsLoaded + atomsGetInstalled + atomsAutoloadDel + atomsRemove + atomsGetLoaded + atomsGui + cbAtomsGui + set_param + remove_param + list_param + is_param + get_param + init_param + add_param + temp_law_fsa + temp_law_csa + temp_law_vfsa + accept_func_vfsa + temp_law_default + neigh_func_fsa + optim_sa + compute_initial_temp + temp_law_huang + neigh_func_default + accept_func_default + neigh_func_vfsa + neigh_func_csa + optim_nsga2 + init_ga_default + selection_ga_random + optim_nsga + pareto_filter + crossover_ga_binary + optim_ga + optim_moga + mutation_ga_binary + selection_ga_elitist + coding_ga_identity + convert_to_float + mutation_ga_default + crossover_ga_default + coding_ga_binary + scicos + steadycos + scicos_simulate + lincos + scicos_demonstration + get_scicos_version + scicos_getvalue + fixedpointgcd + initial_scicos_tables + scicos_workspace_init + create_palette + find_scicos_version + scilab2scicos + returntoscilab + block_parameter_error + create_gif + with_modelica_compiler + readxls + write_csv + read_csv + demo_end + demo_gui + demo_run + demo_choose + demo_file_choice + demo_function_choice + demo_viewCode + demo_message + demo_folder_choice + demo_compiler + demo_begin + demo_mdialog + assert_checkfilesequal + assert_checkfalse + assert_checktrue + assert_comparecomplex + assert_checkerror + assert_generror + assert_computedigits + assert_checkequal + assert_cond2reqdigits + assert_cond2reltol + assert_checkalmostequal + testexamples + test_clean + scitest + bench_run + launchtest + unit_test_run + nonreg_test_run + test_run + devtools_run_builder + mapsound + lin2mu + wavwrite + playsnd + savewave + auread + analyze + loadwave + auwrite + sound + wavread + soundsec + mu2lin + texout + addmenus + plotout + winlist + gettklib + TCL_CreateSlave + sciGUI_init + winclose + config + m2sci_gui + cb_m2sci_gui + translatepaths + matfile2sci + mfile2sci + sci2map + mtlb_sortrows + mtlb_var + mtlb_all + mtlb_cov + mtlb_subplot + mtlb_cond + mtlb_uint32 + mtlb_zeros + mtlb_tril + mtlb_fprintf + mtlb_semilogy + mtlb_legendre + mtlb_plot + mtlb_image + mtlb + mtlb_cumsum + mtlb_get + asciimat + mtlb_int16 + mtlb_min + mtlb_diff + mtlb_isletter + mtlb_fread + mtlb_size + mtlb_median + mtlb_qr + mtlb_mean + mtlb_more + mtlb_colordef + mtlb_fscanf + mtlb_fwrite + mtlb_loglog + mtlb_grid + mtlb_upper + char + mtlb_conv + mtlb_any + mtlb_eye + mtlb_axes + mtlb_rcond + mtlb_delete + firstnonsingleton + mtlb_imp + mtlb_strrep + mtlb_echo + mtlb_sscanf + mtlb_is + mtlb_linspace + mtlb_diag + mtlb_ifft + mtlb_setstr + mtlb_cumprod + mtlb_prod + mtlb_meshdom + mtlb_false + mtlb_0 + mtlb_pcolor + mtlb_sum + mtlb_strcmp + mtlb_e + mtlb_semilogx + mtlb_uint16 + mtlb_num2str + mtlb_fliplr + mtlb_beta + mtlb_rand + mtlb_std + mtlb_max + mtlb_double + mtlb_l + mtlb_type + fseek_origin + mtlb_find + mtlb_dir + mtlb_filter + mtlb_exist + mtlb_strcmpi + sci_sparse + mtlb_dec2hex + mtlb_sprintf + mtlb_eval + mtlb_fft + mtlb_a + mtlb_error + mtlb_choices + mtlb_uint8 + mtlb_repmat + mtlb_logical + mtlb_lower + mtlb_logic + mtlb_i + mtlb_sort + mtlb_findstr + mtlb_realmin + mtlb_int32 + mtlb_toeplitz + makecell + mtlb_isfield + mtlb_mesh + mtlb_s + mtlb_format + mtlb_fftshift + mtlb_hold + mstr2sci + mtlb_t + mtlb_true + mtlb_isa + mtlb_triu + mtlb_int8 + mtlb_realmax + mtlb_randn + mtlb_strfind + mtlb_isspace + enlarge_shape + mtlb_axis + mtlb_ones + mtlb_full + mtlb_box + mtlb_fopen + mtlb_qz + mtlb_close + regress + mvcorrel + variancef + msd + wcenter + geomean + nanmean + samwr + mvvacov + nand2mean + quart + cmoment + pca + center + iqr + ftest + harmean + nanstdev + princomp + show_pca + tabul + perctl + samplef + trimmean + mean + meanf + thrownan + stdevf + ftuneq + variance + nfreq + sample + st_deviation + stdev + correl + median + nanmeanf + strange + nancumsum + nansum + nanmin + nanmax + covar + nanmedian + moment + mad + eomday + isLeapYear + weekday + now + date + clock + etime + toc + datenum + datevec + calendar + tic + cat_code + rhs2code + justify + ascii2string + tokenpos + expression2code + isnum + instruction2code + eval + tree2code + blanks + format_txt + strcmpi + arobasestring2strings + sci2exp + evstr + erfinv + qmr + sp2adj + gmres + pcg + adj2sp + speye + spzeros + issparse + sprand + zpbutt + intdec + cheb2mag + findm + faurre + mfft + cepstrum + bilt + hilbert + group + yulewalk + sincd + iirmod + lev + window + srfaur + lattn + eqfir + remezb + buttmag + detrend + filt_sinc + wigner + zpch2 + mrfit + levin + chepol + zpell + mese + srkf + find_freq + trans + ifft + kalm + ell1mag + cheb1mag + analpf + ffilt + fftshift + iirlp + czt + lindquist + casc + filter + pspect + fsfirlin + iir + fft2 + jmat + dft + wiener + iirgroup + cspect + convol + sskf + wfir + frfit + hilb + eqiir + hank + phc + frmag + zpch1 + system + derivat + polfact + inv_coeff + coffg + numer + cmndred + detr + htrianr + rowcompr + pol2str + gcd + hrmt + lcmdiag + hermit + colcompr + pfactors + systmat + horner + determ + denom + invr + factors + pdiv + lcm + sylm + diophant + pol2des + generic_i_hm + generic_i_h + generic_i_s + st_i_generic + generic_i_ce + generic_i_st + optimsimplex_getallfv + optimsimplex_xbar + optimsimplex_setve + optimsimplex_getx + optimsimplex_getnbve + optimsimplex_shrink + optimsimplex_reflect + optimsimplex_getn + optimsimplex_setn + optimsimplex_print + optimsimplex_sort + optimsimplex_deltafvmax + optimsimplex_setx + optimsimplex_destroy + optimsimplex_gradientfv + optimsimplex_compsomefv + optimsimplex_setnbve + optimsimplex_size + optimsimplex_getallx + optimsimplex_setfv + optimsimplex_tostring + optimsimplex_setall + optimsimplex_getall + optimsimplex_center + optimsimplex_check + optimsimplex_fvvariance + optimsimplex_log + optimsimplex_fvmean + optimsimplex_setallx + optimsimplex_getfv + optimsimplex_fvstdev + optimsimplex_computefv + optimsimplex_deltafv + optimsimplex_dirmat + optimsimplex_getve + optimsimplex_new + optimsimplex_setallfv + optimbase_function + optimbase_cget + optimbase_terminate + optimbase_checkcostfun + optimbase_incriter + optimbase_logstartup + optimbase_outstruct + optimbase_hasbounds + optimbase_checkx0 + optimbase_stoplog + optimbase_new + optimbase_set + optimbase_destroy + optimbase_histget + optimbase_isinnonlincons + optimbase_get + optimbase_logshutdown + optimbase_histset + optimbase_outputcmd + optimbase_hasnlcons + optimbase_proj2bnds + optimbase_log + optimbase_hasconstraints + optimbase_checkbounds + optimbase_display + optimbase_isfeasible + optimbase_isinbounds + optimbase_configure + nmplot_historyplot + neldermead_destroy + neldermead_costf + nmplot_outputcmd + neldermead_cget + optimget + optimplotfval + neldermead_updatesimp + nmplot_log + nmplot_new + nmplot_restart + nmplot_destroy + nmplot_simplexhistory + optimplotx + nmplot_configure + nmplot_display + optimset + optimplotfunccount + neldermead_display + neldermead_search + nmplot_cget + neldermead_function + nmplot_function + neldermead_restart + neldermead_configure + nmplot_search + neldermead_new + nmplot_contour + neldermead_get + neldermead_log + fminsearch + nmplot_get + list2vec + vec2list + pack + pencost + datafit + aplat + karmarkar + leastsq + qpsolve + fit_dat + bvodeS + unpack + lmitool + lmisolver + derivative + NDcost + numdiff + recons + coff + spanplus + im_inv + diff + givens + linsolve + norm + eigenmarkov + chfact + sqroot + gspec + nlev + fullrf + rank + pbig + aff2ab + glever + companion + pinv + orth + classmarkov + range + trace + spaninter + randpencil + squeeze + cond + householder + rref + chsolve + cmb_lin + proj + rowcomp + colcomp + gschur + penlaur + kroneck + projspec + fullrfk + pencan + spantwo + polar + psmall + rowshuff + sva + genmarkov + pen2ea + kernel + quaskro + check_classpath + check_librarypath + jre_path + sprintf + printf + prettyprint + ssprint + unix_g + halt + unix_x + unix_w + getscilabkeywords + unix_s + input + interpln + interp1 + smooth + ilib_build + ilib_mex_build + ilib_gen_gateway + G_make + configure_msvc + detectmsvc64tools + findmsifortcompiler + ilib_for_link + ilib_compile + configure_msifort + ilib_gen_Make + ilib_gen_cleaner + ilib_include_flag + findmsvccompiler + haveacompiler + ilib_gen_Make_unix + gencompilationflags_unix + dllinfo + detectmsifort64tools + ilib_gen_loader + x_matrix + addmenu + clipboard + about + x_choices + findobj + menubar + getvalue + close + createpopup + figure + uiGetParentNode + uiCreateTree + uiFindNode + uiDumpTree + uiDeleteNode + uiEqualsTree + uiGetNodePosition + uiInsertNode + uiGetChildrenNode + uiCreateNode + uiConcatTree + struct + iscellstr + isfield + iscell + hypermat + cell + fieldnames + isstruct + obsv_mat + augment + lqg_ltr + nehari + dscr + dsimul + reglin + cont_mat + narsimul + obs_gram + smga + leqr + obsvss + abinv + invrs + markp2ss + riccati + plzr + stabil + entropy + lyap + sensi + abcd + bilin + lqg2stan + bloc2exp + fourplan + arhnk + sysconv + armax + sm2des + h_inf_st + g_margin + cainv + contrss + bloc2ss + epred + sgrid + gfrancis + show_margins + arma2p + rowregul + findx0BD + kpure + observer + solve + ss2tf + h_cl + dbphi + dhnorm + invsyslin + freson + krac2 + arsimul + ss2des + h2norm + specfact + flts + hankelsv + noisegen + p_margin + equil + nicholschart + findAC + gainplot + equil1 + h_norm + nyquistfrequencybounds + syslin + findABCD + m_circle + ccontrg + bode + lft + sysfact + statgain + prbs_a + sm2ss + lqg + hallchart + des2tf + tf2des + cfspec + csim + frep2tf + inistate + nyquist + ddp + trzeros + armax1 + chart + linf + h_inf + dtsi + sylv + st_ility + fspecg + minreal + ss2ss + zeropen + zgrid + pfss + trfmod + acf + syssize + balreal + gcare + calfrq + sysdiag + cont_frm + gamitg + lcf + lin + fspec + minss + copfac + imrep2ss + time_id + evans + bstap + dcf + canon + sdiff + findR + svplot + lqr + trisolve + unobs + tf2ss + linfn + projsl + phasemag + arl2 + gfare + dt_ility + ui_observer + ric_desc + fstabst + trianfml + black + obscont + parrot + findBDK + colinout + repfreq + armac + des2ss + lqe + cls2dls + gtild + ctr_gram + colregul + ssrand + rowinout + macglov + leqe + routh_t + xend + xinit + xs2fig + xs2emf + driver + wintercolormap + locate + dragrect + bonecolormap + getsymbol + getcolor + fcontour + gda + contour2d + replot + ged_insert + getLineSpec + getmark + TitleLabel + Sfgrayplot + square + mesh + surf + edit_curv + genfac3d + getTitleLabelPropertyNam + ged + xsave + jetcolormap + isoview + ghdl_fields + plot + histplot + oceancolormap + fac3d + getSurfPropertyName + sd2sci + secto3d + legends + rgb2name + plotframe + comet3d + errbar + sca + graycolormap + fplot3d + plot3d2 + paramfplot2d + bar + gce + autumncolormap + graduate + fcontour2d + xclear + scf + twinkle + getColorIndex + setDefaultColor + graypolarplot + fplot3d1 + ResetFigureDDM + getfont + name2rgb + setSurfProperty + gr_menu + xselect + summercolormap + fac3d1 + contourf + xrpoly + xnumb + clf + whitecolormap + coolcolormap + xload + contour + getlinestyle + gcf + zlabel + pinkcolormap + addcolor + checkXYPair + xstringl + oldplot + xlabel + fchamp + color + setPlotProperty + nf3d + Sgrayplot + getPlotPropertyName + titlepage + colorbar + fplot2d + milk_drop + barh + coppercolormap + barhomogenize + get_figure_handle + pie + colordef + gca + hsv2rgb + comet + ghdl2tree + subplot + gdf + sdf + scaling + projaff + xsetm + fgrayplot + setTitleLabelProperty + check2dFun + legend + rotate + seteventhandler + ylabel + xbasr + hsvcolormap + rainbowcolormap + xinfo + hotcolormap + eval3d + plot3d3 + polarplot + hist3d + springcolormap + title + eval3dp + sda + datatipGetEntities + datatipInitStruct + datatipRemoveAll + datatipMove + datatipRemove + datatipRedraw + datatipManagerMode + datatipToggle + datatipSetStruct + datatipSetOrientation + datatipSetDisplay + datatipGetStruct + datatipSetInterp + datatipEventhandler + orthProj + pixDist + datatipDefaultDisplay + datatipCreate + setStringPosition + dir + is_absolute_path + get_file_path + rmdir + ls + listfiles + mkdir + dispfiles + fprintf + mdelete + fullfile + sscanf + dirname + listvarinfile + scanf + fscanf + bytecode + get_profile + showprofile + check_gateways + listfunctions + get_function_path + reset_profiling + getd + genlib_old + createfun + remove_profiling + profile + fun2string + bytecodewalk + warnobsolete + plotprofile + genlib + add_profiling + recompilefunction + macrovar + head_comments + acosd + bitcmp + cscd + perms + sinc + bitor + pertrans + cotd + base2dec + ndgrid + secd + cothm + sinh + sech + isnan + resize_matrix + num2cell + cell2mat + bitxor + tand + union + flipdim + logspace + erfc + dec2oct + meshgrid + toeplitz + acosh + null + tanh + cat + ind2sub + sinhm + nextpow2 + tanm + ndims + cosd + acotd + complex + asinhm + acot + isvector + coth + logm + asech + tanhm + asec + bitand + acoth + permute + sinm + repmat + intsplin + dec2bin + acsc + erf + lex_sort + intersect + squarewave + sub2ind + vectorfind + convertindex + factorial + acoshm + atanhm + csgn + csch + pmodulo + linspace + sqrtm + atanm + cotg + acosm + primes + coshm + csc + bitget + modulo + factor + log10 + unique + oct2dec + isinf + asecd + sec + bitset + fix + cosm + asinm + erfcx + asind + isempty + atand + GLoad + asinh + bin2dec + binomial + inttrap + acscd + cosh + sind + dec2hex + cellstr + signm + hex2dec + atanh + log2 + IsAScalar + setdiff + acsch + intc + dae + odeoptions + integrate + intl + daeoptions + OS_Version + with_macros_source + whereami + with_tk + typeof + check_modules_xml + add_demo + who_user + with_javasci + getshell + check_versions + with_pvm + whos + toolboxes + with_texmacs + edit + perl + ver + get_scicos_version + scicos_getvalue + fixedpointgcd + initial_scicos_tables + scicos_workspace_init + create_palette + find_scicos_version + scilab2scicos + returntoscilab + block_parameter_error + create_gif + with_modelica_compiler + scicos + steadycos + scicos_simulate + lincos + scicos_demonstration + + + ans + + diff -Nru cantor-4.7.3/src/backends/scilab/scilabbackend.cpp cantor-4.7.90/src/backends/scilab/scilabbackend.cpp --- cantor-4.7.3/src/backends/scilab/scilabbackend.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabbackend.cpp 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,96 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#include "scilabbackend.h" + +#include "scilabsession.h" +#include "settings.h" +#include "ui_settings.h" + +#include "kdebug.h" +#include + +#include "cantor_macros.h" + +ScilabBackend::ScilabBackend( QObject* parent,const QList args ) : Cantor::Backend( parent,args ) +{ + kDebug()<<"Creating ScilabBackend"; + + setObjectName("scilabbackend"); +} + +ScilabBackend::~ScilabBackend() +{ + kDebug()<<"Destroying ScilabBackend"; +} + +QString ScilabBackend::id() const +{ + return "scilab"; +} + +Cantor::Session* ScilabBackend::createSession() +{ + kDebug()<<"Spawning a new Scilab session"; + + return new ScilabSession(this); +} + +Cantor::Backend::Capabilities ScilabBackend::capabilities() const +{ + kDebug()<<"Requesting capabilities of ScilabSession"; + + return Cantor::Backend::SyntaxHighlighting | + Cantor::Backend::Completion; +} + +bool ScilabBackend::requirementsFullfilled() const +{ + QFileInfo info(ScilabSettings::self()->path().toLocalFile()); + return info.isExecutable(); +} + +QWidget* ScilabBackend::settingsWidget(QWidget* parent) const +{ + QWidget* widget=new QWidget(parent); + Ui::ScilabSettingsBase s; + s.setupUi(widget); + return widget; +} + +KConfigSkeleton* ScilabBackend::config() const +{ + return ScilabSettings::self(); +} + +KUrl ScilabBackend::helpUrl() const +{ + return i18nc("the url to the documentation of Scilab, please check if there is a translated version and use the correct url", "http://www.scilab.org/support/documentation"); +} + +QString ScilabBackend::description() const +{ + return i18n("Scilab is an free software, cross-platform numerical computational package and a high-level, numerically oriented programming language.
" \ + "Scilab is distributed under CeCILL license (GPL compatible)"); +} + +K_EXPORT_CANTOR_PLUGIN(scilabbackend, ScilabBackend) + +#include "scilabbackend.moc" diff -Nru cantor-4.7.3/src/backends/scilab/scilabbackend.desktop cantor-4.7.90/src/backends/scilab/scilabbackend.desktop --- cantor-4.7.3/src/backends/scilab/scilabbackend.desktop 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabbackend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,67 @@ +[Desktop Entry] +Type=Service +Icon=scilabbackend +Name=Scilab +Name[ca]=Scilab +Name[de]=Scilab +Name[es]=Scilab +Name[hu]=Scilab +Name[nds]=Scilab +Name[nl]=Scilab +Name[pt]=Scilab +Name[pt_BR]=Scilab +Name[sv]=Scilab +Name[uk]=Scilab +Name[x-test]=xxScilabxx +Name[zh_CN]=Scilab +Name[zh_TW]=Scilab +X-KDE-PluginInfo-Website=http://scilab.org/ +X-KDE-ServiceTypes=Cantor/Backend +X-KDE-Library=cantor_scilabbackend +X-KDE-PluginInfo-Name=Scilab +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPL +Comment=Backend for the Scilab Scientific Programming Environment +Comment[ca]=Dorsal per a l'entorn de programació científic Scilab +Comment[de]=Modul für die wissenschaftliche Programmierumgebung Scilab +Comment[es]=Motor para el entorno de programación científico Scilab +Comment[hu]=Modul a Scilab tudományos programozási környezethez +Comment[nl]=Backend voor de Scilab wetenschappelijke programmeeromgeving +Comment[pt]=Infra-Estrutura do Ambiente de Programação Científica Scilab +Comment[pt_BR]=Infraestrutura do ambiente de programação científica Scilab +Comment[sv]=Bakgrundsprogram för Scilab vetenskaplig programmeringsmiljö +Comment[uk]=Сервер наукового середовища програмування Scilab +Comment[x-test]=xxBackend for the Scilab Scientific Programming Environmentxx +Comment[zh_CN]=Scilab 科学编程环境的后端 +Comment[zh_TW]=Scilab 科學程式環境的後端介面 +# Comment[ca]=Dorsal per al Scilab: un sistema d'àlgebra per ordinador +# Comment[ca@valencia]=Dorsal per al Scilab: un sistema d'àlgebra per ordinador +# Comment[cs]=Podpůrná vrstva pro počítačový systém algebry Scilab +# Comment[da]=Backend til Scilab Computer Algebra System +# Comment[de]=„Scilab Computer Algebra System“-Modul für Cantor +# Comment[el]=Υποσύστημα για το αλγεβρικό σύστημα υπολογιστών Scilab +# Comment[en_GB]=Backend for the Scilab Computer Algebra System +# Comment[es]=Motor para el sistema algebraico informatizado Scilab +# Comment[et]=Scilab kompuuter-algebrasüsteemi taustaprogramm +# Comment[fr]=Module pour le système d'algèbres Scilab pour ordinateur +# Comment[gl]=Infraestrutura do Sistema de álxebra computerizada Scilab +# Comment[hr]=Pozadinski servis za Maximu +# Comment[it]=Backend per il sistema di calcolo algebrico Scilab +# Comment[ja]=Scilab のためのバックエンド +# Comment[km]=កម្មវិធី​ខាង​ក្រោយ​សម្រាប់​ប្រព័ន្ធ​ពិជ​​​គណិត​​អតិបរមា​របស់​កុំព្យូទ័រ +# Comment[lv]=Scilab Computer Algebra System aizmugure +# Comment[nb]=Bakgrunnsmotor for algebrasystemet Scilab +# Comment[nds]=Hülpprogramm för dat Algebraprogramm »Scilab« +# Comment[nl]=Backend voor het Scilab Computer Algebra System +# Comment[nn]=Motor for algebrasystemet Scilab +# Comment[pl]=Mechanizm dla systemu algebry komputerowej Scilab +# Comment[pt]=Infra-Estrutura para o Sistema Algébrico por Computador Scilab +# Comment[pt_BR]=Infraestrutura para o Scilab Computer Algebra System +# Comment[ru]=Модуль поддержки системы компьютерной алгебры Scilab +# Comment[sv]=Bakgrundsprogram för datoralgebrasystemet Scilab +# Comment[tr]=Scilab Computer Algebra System için arka uç +# Comment[uk]=Сервер системи комп’ютерної алгебри Scilab +# Comment[x-test]=xxBackend for the Scilab Computer Algebra Systemxx +# Comment[zh_CN]=Scilab 计算器代数系统后端 +# Comment[zh_TW]=Scilab 電腦代數系統的後端介面 + diff -Nru cantor-4.7.3/src/backends/scilab/scilabbackend.h cantor-4.7.90/src/backends/scilab/scilabbackend.h --- cantor-4.7.3/src/backends/scilab/scilabbackend.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabbackend.h 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,46 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#ifndef _SCILABBACKEND_H +#define _SCILABBACKEND_H + +#include "backend.h" + +class ScilabBackend : public Cantor::Backend +{ + Q_OBJECT + public: + explicit ScilabBackend( QObject* parent = 0,const QList args = QList()); + ~ScilabBackend(); + + QString id() const; + Cantor::Session *createSession(); + Cantor::Backend::Capabilities capabilities() const; + virtual bool requirementsFullfilled() const; + + QWidget* settingsWidget(QWidget* parent) const; + KConfigSkeleton* config() const; + + KUrl helpUrl() const; + QString description() const; +}; + + +#endif /* _SCILABBACKEND_H */ diff -Nru cantor-4.7.3/src/backends/scilab/scilabbackend.kcfg cantor-4.7.90/src/backends/scilab/scilabbackend.kcfg --- cantor-4.7.3/src/backends/scilab/scilabbackend.kcfg 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabbackend.kcfg 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,19 @@ + + + + kstandarddirs.h + + + + + KStandardDirs::findExe("/home/kdevil/scilab/bin/scilab-adv-cli") + + + + false + + + diff -Nru cantor-4.7.3/src/backends/scilab/scilabcompletionobject.cpp cantor-4.7.90/src/backends/scilab/scilabcompletionobject.cpp --- cantor-4.7.3/src/backends/scilab/scilabcompletionobject.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabcompletionobject.cpp 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,59 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#include + +#include "scilabcompletionobject.h" + +#include "scilabsession.h" +#include "scilabkeywords.h" + +ScilabCompletionObject::ScilabCompletionObject(const QString& command, ScilabSession* session) : Cantor::CompletionObject(command, session) +{ + kDebug() << "ScilabCompletionObject construtor"; + + //Only use the completion for the last command part between end and opening bracket or ; or space + QString cmd=command; + int brIndex=cmd.lastIndexOf('(')+1; + int semIndex=cmd.lastIndexOf(';')+1; + int spaceIndex=cmd.lastIndexOf(' ')+1; + + cmd=cmd.mid(qMax(brIndex, qMax(semIndex, spaceIndex))); + + setCommand(cmd); +} + +ScilabCompletionObject::~ScilabCompletionObject() +{ + +} + +void ScilabCompletionObject::fetchCompletions() +{ + QStringList allCompletions; + + allCompletions << ScilabKeywords::instance()->variables(); + allCompletions << ScilabKeywords::instance()->functions(); + allCompletions << ScilabKeywords::instance()->keywords(); + + setCompletions(allCompletions); + + emit done(); +} diff -Nru cantor-4.7.3/src/backends/scilab/scilabcompletionobject.h cantor-4.7.90/src/backends/scilab/scilabcompletionobject.h --- cantor-4.7.3/src/backends/scilab/scilabcompletionobject.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabcompletionobject.h 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,38 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#ifndef _SCILABCOMPLETIONOBJECT_H +#define _SCILABCOMPLETIONOBJECT_H + +#include "completionobject.h" + +class ScilabSession; + +class ScilabCompletionObject : public Cantor::CompletionObject +{ + public: + ScilabCompletionObject(const QString& cmd, ScilabSession* session); + ~ScilabCompletionObject(); + + protected slots: + void fetchCompletions(); +}; + +#endif /* _SCILABCOMPLETIONOBJECT_H */ diff -Nru cantor-4.7.3/src/backends/scilab/scilabexpression.cpp cantor-4.7.90/src/backends/scilab/scilabexpression.cpp --- cantor-4.7.3/src/backends/scilab/scilabexpression.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabexpression.cpp 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,167 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#include "scilabexpression.h" + +#include + +#include "textresult.h" +#include "imageresult.h" +#include "helpresult.h" +#include +#include +#include +#include +#include "scilabsession.h" +#include "settings.h" + +#include "imageresult.h" +#include +typedef Cantor::ImageResult ScilabPlotResult; + +ScilabExpression::ScilabExpression( Cantor::Session* session ) : Cantor::Expression(session) +{ + kDebug() << "ScilabExpression construtor"; + + m_timer=new QTimer(this); + m_timer->setSingleShot(true); + connect(m_timer, SIGNAL(timeout()), this, SLOT(evalFinished())); +} + +ScilabExpression::~ScilabExpression() +{ + +} + +void ScilabExpression::evaluate() +{ + kDebug() << "evaluating " << command(); + setStatus(Cantor::Expression::Computing); + + ScilabSession* scilabSession = dynamic_cast(session()); + + if((ScilabSettings::integratePlots()) && (command().contains("plot"))){ + + kDebug() << "Preparing export figures property"; + + QString exportCommand; + numPlot = 0; + + QStringList commandList = command().split("\n"); + + for(int count = 0; count < commandList.size(); count++){ + + if(commandList.at(count).toLocal8Bit().contains("plot")){ + + exportCommand = QString("\nxs2png(gcf(), 'cantor-export-figure-%1.png');\ndelete(gcf());").arg(numPlot); + + commandList[count].append(exportCommand); + + exportCommand.clear(); + numPlot++; + } + + kDebug() << "Command " << count << ": " << commandList.at(count).toLocal8Bit().constData(); + } + + QString newCommand = commandList.join("\n"); + newCommand.prepend("clf();\n"); + newCommand.append("\n"); + + this->setCommand(newCommand); + + kDebug() << "New Command " << command(); + + } + + scilabSession->runExpression(this); + + m_timer->start(1000); +} + +void ScilabExpression::parseOutput(QString output) +{ + kDebug() << "output: " << output; + setResult(new Cantor::TextResult(output)); +} + +void ScilabExpression::parseError(QString error) +{ + kDebug() << "error" << error; + setResult(new Cantor::TextResult(error)); + setErrorMessage(error); + setStatus(Cantor::Expression::Error); +} + +void ScilabExpression::parsePlotFile() +{ + kDebug() << "parsePlotFile"; + + if(numPlot != 0){ + + QString plotId; + + for(int count = 0; count <= numPlot; count++){ + plotId = QString("/cantor-export-figure-%1.png").arg(count); + plotId.prepend(QDir::tempPath()); + + kDebug() << "Exist file " << plotId << "? " << QFile::exists(plotId); + + if (QFile::exists(plotId)) + { + kDebug() << "ScilabExpression::parsePlotFile: " << plotId; + + setResult(new ScilabPlotResult(plotId)); + + bool removed = QFile::remove(plotId); + kDebug() << "Removed file " << plotId << "? " << removed; + + plotId.clear(); + } + } + } + + numPlot = 0; + setPlotPending(false); + + if (m_finished) + { + kDebug() << "ScilabExpression::parsePlotFile: done"; + setStatus(Done); + } +} + +void ScilabExpression::interrupt() +{ + kDebug()<<"interruptinging command"; + m_timer->stop(); + setStatus(Cantor::Expression::Interrupted); +} + +void ScilabExpression::evalFinished() +{ + kDebug()<<"evaluation finished"; + setStatus(Cantor::Expression::Done); +} + +void ScilabExpression::setPlotPending(bool plot) +{ + m_plotPending = plot; +} diff -Nru cantor-4.7.3/src/backends/scilab/scilabexpression.h cantor-4.7.90/src/backends/scilab/scilabexpression.h --- cantor-4.7.3/src/backends/scilab/scilabexpression.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabexpression.h 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,53 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#ifndef _SCILABEXPRESSION_H +#define _SCILABEXPRESSION_H + +#include "expression.h" +#include + +class QTimer; + +class ScilabExpression : public Cantor::Expression +{ + Q_OBJECT + public: + ScilabExpression( Cantor::Session* session); + ~ScilabExpression(); + + void evaluate(); + void interrupt(); + void parseOutput(QString output); + void parseError(QString error); + void parsePlotFile(); + void setPlotPending(bool plot); + + public slots: + void evalFinished(); + + private: + QTimer* m_timer; + bool m_finished; + bool m_plotPending; + int numPlot; +}; + +#endif /* _SCILABEXPRESSION_H */ diff -Nru cantor-4.7.3/src/backends/scilab/scilabhighlighter.cpp cantor-4.7.90/src/backends/scilab/scilabhighlighter.cpp --- cantor-4.7.3/src/backends/scilab/scilabhighlighter.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabhighlighter.cpp 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,93 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#include "scilabhighlighter.h" +#include "scilabkeywords.h" + +#include +#include + +ScilabHighlighter::ScilabHighlighter(QTextEdit* edit) : Cantor::DefaultHighlighter(edit) +{ + kDebug() << "ScilabHighlighter construtor"; + addRule(QRegExp("\\b[A-Za-z0-9_]+(?=\\()"), functionFormat()); + + //Code highlighting the different keywords + addKeywords(ScilabKeywords::instance()->keywords()); + + addRule("FIXME", commentFormat()); + addRule("TODO", commentFormat()); + + addFunctions(ScilabKeywords::instance()->functions()); + addVariables(ScilabKeywords::instance()->variables()); + + addRule(QRegExp("\".*\""), stringFormat()); + addRule(QRegExp("'.*'"), stringFormat()); + addRule(QRegExp("//[^\n]*"), commentFormat()); + + commentStartExpression = QRegExp("/\\*"); + commentEndExpression = QRegExp("\\*/"); +} + +ScilabHighlighter::~ScilabHighlighter() +{ +} + +void ScilabHighlighter::highlightBlock(const QString& text) +{ + kDebug() << "ScilabHighlighter::highlightBlock"; + kDebug() << "text: " << text; + + if (skipHighlighting(text)){ + kDebug() << "skipHighlighting(" << text << " ) " << "== true"; + return; + } + + //Do some backend independent highlighting (brackets etc.) + DefaultHighlighter::highlightBlock(text); + + setCurrentBlockState(0); + + int startIndex = 0; + if (previousBlockState() != 1) + startIndex = commentStartExpression.indexIn(text); + + while (startIndex >= 0) { + + int endIndex = commentEndExpression.indexIn(text, startIndex); + int commentLength; + if (endIndex == -1) { + + setCurrentBlockState(1); + commentLength = text.length() - startIndex; + } else { + commentLength = endIndex - startIndex + + commentEndExpression.matchedLength(); + } + setFormat(startIndex, commentLength, commentFormat()); + startIndex = commentStartExpression.indexIn(text, startIndex + commentLength); + } +} + +QString ScilabHighlighter::nonSeparatingCharacters() const +{ + kDebug() << "ScilabHighlighter::nonSeparatingCharacters() function"; + return "[%]"; +} diff -Nru cantor-4.7.3/src/backends/scilab/scilabhighlighter.h cantor-4.7.90/src/backends/scilab/scilabhighlighter.h --- cantor-4.7.3/src/backends/scilab/scilabhighlighter.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabhighlighter.h 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,41 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#ifndef _SCILABHIGHLIGHTER_H +#define _SCILABHIGHLIGHTER_H + +#include "defaulthighlighter.h" + +class ScilabHighlighter : public Cantor::DefaultHighlighter +{ + public: + ScilabHighlighter(QTextEdit* edit); + ~ScilabHighlighter(); + + protected: + void highlightBlock(const QString &text); + QString nonSeparatingCharacters() const; + + private: + QRegExp commentStartExpression; + QRegExp commentEndExpression; +}; + +#endif /* _SCILABHIGHLIGHTER_H */ diff -Nru cantor-4.7.3/src/backends/scilab/scilabkeywords.cpp cantor-4.7.90/src/backends/scilab/scilabkeywords.cpp --- cantor-4.7.3/src/backends/scilab/scilabkeywords.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabkeywords.cpp 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,120 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#include "scilabkeywords.h" + +#include +#include + +#include +#include + +ScilabKeywords::ScilabKeywords() +{ + kDebug() << "ScilabKeywords construtor"; + +} + + +ScilabKeywords::~ScilabKeywords() +{ + +} + +ScilabKeywords* ScilabKeywords::instance() +{ + static ScilabKeywords* inst = 0; + if(inst == 0) + { + inst = new ScilabKeywords(); + inst->loadFromFile(); + } + + return inst; +} + +void ScilabKeywords::loadFromFile() +{ + kDebug() << "ScilabKeywords lodFromFile()"; + + //load the known keywords from an xml file + QFile file(KStandardDirs::locate("appdata", "scilabbackend/keywords.xml")); + + if(!file.open(QIODevice::ReadOnly)) + { + kDebug() << "error opening keywords.xml file. highlighting and completion won't work"; + return; + } + + QXmlStreamReader xml(&file); + + xml.readNextStartElement(); + while(xml.readNextStartElement()) + { + const QStringRef name = xml.name(); + + if((name == "keywords") || (name == "variables") || (name == "functions")) + { + while(xml.readNextStartElement()) + { + Q_ASSERT(xml.isStartElement() && xml.name() == "word"); + + const QString text = xml.readElementText(); + + if(name == "keywords") + m_keywords << text; + + else if(name == "variables"){ +// kDebug() << text; + m_variables << text; + } + + else if(name == "functions") + m_functions << text; + } + } + else + { + xml.skipCurrentElement(); + } + } + + if (xml.hasError()) + { + kDebug() << "error parsing element"; + kDebug() << "error: "<< xml.errorString(); + } + +} + +const QStringList& ScilabKeywords::variables() const +{ + return m_variables; +} + +const QStringList& ScilabKeywords::functions() const +{ + return m_functions; +} + +const QStringList& ScilabKeywords::keywords() const +{ + return m_keywords; +} diff -Nru cantor-4.7.3/src/backends/scilab/scilabkeywords.h cantor-4.7.90/src/backends/scilab/scilabkeywords.h --- cantor-4.7.3/src/backends/scilab/scilabkeywords.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabkeywords.h 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,50 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#ifndef _SCILABKEYWORDS_H +#define _SCILABKEYWORDS_H + +#include + +/* + Class storint a listsof names, known to maxima + used for syntax highlighting and tab completion + */ +class ScilabKeywords +{ + private: + ScilabKeywords(); + ~ScilabKeywords(); + public: + static ScilabKeywords* instance(); + + const QStringList& functions() const; + const QStringList& keywords() const; + const QStringList& variables() const; + + private: + void loadFromFile(); + + private: + QStringList m_functions; + QStringList m_keywords; + QStringList m_variables; +}; +#endif /* _SCILABKEYWORDS_H */ diff -Nru cantor-4.7.3/src/backends/scilab/scilabsession.cpp cantor-4.7.90/src/backends/scilab/scilabsession.cpp --- cantor-4.7.3/src/backends/scilab/scilabsession.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabsession.cpp 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,233 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#include "scilabsession.h" +#include "scilabexpression.h" +#include "scilabhighlighter.h" +#include "scilabcompletionobject.h" + +#include +#include +#include + +#include +#include + +#include +#include + +ScilabSession::ScilabSession( Cantor::Backend* backend) : Session(backend) +{ + m_process = 0; + kDebug(); +} + +ScilabSession::~ScilabSession() +{ + m_process->terminate(); + kDebug(); +} + +void ScilabSession::login() +{ + kDebug()<<"login"; + + QStringList args; + + args << "-nb"; + + m_process = new KProcess(this); + m_process->setProgram(ScilabSettings::self()->path().toLocalFile(), args); + + kDebug() << m_process->program(); + + m_process->setOutputChannelMode(KProcess::SeparateChannels); + QObject::connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(readOutput())); + QObject::connect(m_process, SIGNAL(readyReadStandardError()), SLOT (readError())); + + m_process->start(); + + if(ScilabSettings::integratePlots()) + { + kDebug() << "integratePlots"; + + QString tempPath = QDir::tempPath(); + + QString pathScilabOperations = tempPath; + pathScilabOperations.prepend("chdir('"); + pathScilabOperations.append("');\n"); + + kDebug() << "Processing command to change chdir in Scilab. Command " << pathScilabOperations.toLocal8Bit(); + + m_process->write(pathScilabOperations.toLocal8Bit()); + + m_watch = new KDirWatch(this); + m_watch->setObjectName("ScilabDirWatch"); + + m_watch->addDir(tempPath, KDirWatch::WatchFiles); + + kDebug() << "addDir " << tempPath << "? " << m_watch->contains(tempPath.toLocal8Bit()); + + QObject::connect(m_watch, SIGNAL(created(QString)), SLOT(plotFileChanged(QString))); + } + + emit ready(); +} + +void ScilabSession::logout() +{ + kDebug()<<"logout"; + + m_process->write("exit\n"); + if (!m_process->waitForFinished(1000)) + { + m_process->kill(); + } + + m_runningExpressions.clear(); + kDebug() << "m_runningExpressions: " << m_runningExpressions.isEmpty(); + + changeStatus(Cantor::Session::Done); +} + +void ScilabSession::interrupt() +{ + kDebug()<<"interrupt"; + + foreach(Cantor::Expression* e, m_runningExpressions) + e->interrupt(); + + m_runningExpressions.clear(); + changeStatus(Cantor::Session::Done); +} + +Cantor::Expression* ScilabSession::evaluateExpression(const QString& cmd, Cantor::Expression::FinishingBehavior behave) +{ + kDebug() << "evaluating: " << cmd; + ScilabExpression* expr = new ScilabExpression(this); + + changeStatus(Cantor::Session::Running); + + expr->setFinishingBehavior(behave); + expr->setCommand(cmd); + expr->evaluate(); + + return expr; +} + +void ScilabSession::runExpression(ScilabExpression* expr) +{ + QString command; + + command += expr->command(); + + m_currentExpression = expr; + + connect(m_currentExpression, SIGNAL(statusChanged(Cantor::Expression::Status)), this, + SLOT(currentExpressionStatusChanged(Cantor::Expression::Status))); + + command += "\n"; + kDebug() << "Writing command to process" << command; + + m_process->write(command.toLocal8Bit()); + +} + +void ScilabSession::expressionFinished() +{ + kDebug()<<"finished"; + ScilabExpression* expression = qobject_cast(sender()); + + m_runningExpressions.removeAll(expression); + kDebug() << "size: " << m_runningExpressions.size(); +} + +void ScilabSession::readError() +{ + kDebug() << "readError"; + + QString error = m_process->readAllStandardError(); + + kDebug() << "error: " << error; + m_currentExpression->parseError(error); +} + +void ScilabSession::readOutput() +{ + kDebug() << "readOutput"; + + QString output = m_process->readAllStandardOutput(); + + kDebug() << "output.isNull? " << output.isNull(); + kDebug() << "output: " << output; + + if(status() != Running || output.isNull()){ + return; + } + + m_currentExpression->parseOutput(output); + +} + +void ScilabSession::plotFileChanged(QString filename) +{ + kDebug() << "plotFileChanged filename:" << filename; + + if ((m_currentExpression) && (filename.contains("cantor-export-figure"))) + { + kDebug() << "Calling parsePlotFile"; + m_currentExpression->parsePlotFile(); + +// bool removed = QFile::remove(filename); +// kDebug() << "Removed file " << filename << "? " << removed; + } +} + +void ScilabSession::currentExpressionStatusChanged(Cantor::Expression::Status status) +{ + kDebug() << "currentExpressionStatusChanged: " << status; + + switch (status) + { + case Cantor::Expression::Computing: + break; + + case Cantor::Expression::Interrupted: + break; + + case Cantor::Expression::Done: + case Cantor::Expression::Error: + changeStatus(Done); + + break; + } +} + +QSyntaxHighlighter* ScilabSession::syntaxHighlighter(QTextEdit* parent) +{ + return new ScilabHighlighter(parent); +} + +Cantor::CompletionObject* ScilabSession::completionFor(const QString& command) +{ + return new ScilabCompletionObject(command, this); +} + +#include "scilabsession.moc" diff -Nru cantor-4.7.3/src/backends/scilab/scilabsession.h cantor-4.7.90/src/backends/scilab/scilabsession.h --- cantor-4.7.3/src/backends/scilab/scilabsession.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/scilabsession.h 2011-12-02 21:17:55.000000000 +0000 @@ -0,0 +1,67 @@ +/* + 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. + + --- + Copyright (C) 2011 Filipe Saraiva + */ + +#ifndef _SCILABSESSION_H +#define _SCILABSESSION_H + +#include "session.h" + +class ScilabExpression; +class KTemporaryFile; +class KDirWatch; +class KProcess; + +class ScilabSession : public Cantor::Session +{ + Q_OBJECT + public: + ScilabSession( Cantor::Backend* backend); + ~ScilabSession(); + + void login(); + void logout(); + + void interrupt(); + void runExpression(ScilabExpression* expr); + + QSyntaxHighlighter* syntaxHighlighter(QTextEdit* parent); + + Cantor::Expression* evaluateExpression(const QString& command, Cantor::Expression::FinishingBehavior behave); + Cantor::CompletionObject* completionFor(const QString& command); + + public slots: + void readOutput(); + void readError(); + void plotFileChanged(QString filename); + + private: + KProcess* m_process; + KDirWatch* m_watch; + QString m_tempDir; + + QList m_runningExpressions; + ScilabExpression* m_currentExpression; + + private slots: + void expressionFinished(); + void currentExpressionStatusChanged(Cantor::Expression::Status status); +}; + +#endif /* _SCILABSESSION_H */ diff -Nru cantor-4.7.3/src/backends/scilab/settings.kcfgc cantor-4.7.90/src/backends/scilab/settings.kcfgc --- cantor-4.7.3/src/backends/scilab/settings.kcfgc 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/settings.kcfgc 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,3 @@ +File=scilabbackend.kcfg +ClassName=ScilabSettings +Singleton=true diff -Nru cantor-4.7.3/src/backends/scilab/settings.ui cantor-4.7.90/src/backends/scilab/settings.ui --- cantor-4.7.3/src/backends/scilab/settings.ui 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/backends/scilab/settings.ui 2011-11-17 20:56:23.000000000 +0000 @@ -0,0 +1,59 @@ + + + ScilabSettingsBase + + + + 0 + 0 + 400 + 300 + + + + + + + + + Path to scilab-adv-cli command: + + + + + + + + + + + + Integrate Plots in Worksheet + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + KUrlRequester + QFrame +
kurlrequester.h
+
+
+ + +
diff -Nru cantor-4.7.3/src/cantor.desktop cantor-4.7.90/src/cantor.desktop --- cantor-4.7.3/src/cantor.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/cantor.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -1,5 +1,6 @@ [Desktop Entry] Name=Cantor +Name[bg]=Cantor Name[bs]=Cantor Name[ca]=Cantor Name[ca@valencia]=Cantor @@ -56,6 +57,7 @@ GenericName[fr]=Interface KDE pour des logiciels de mathématiques GenericName[gl]=Interface de KDE de software matemático GenericName[hr]=KDE sučelje za matematički softver +GenericName[hu]=KDE előtétprogram matematikai alkalmazásokhoz GenericName[it]=Interfaccia KDE per software matematico GenericName[ja]=数値演算ソフトウェアのための KDE フロントエンド GenericName[km]=កម្មវិធី​ខាង​មុខ​របស់​ KDE សម្រាប់​កម្មវិធី​គណិតវិទ្យា​ diff -Nru cantor-4.7.3/src/cantor_part.cpp cantor-4.7.90/src/cantor_part.cpp --- cantor-4.7.3/src/cantor_part.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/cantor_part.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -160,6 +160,15 @@ actionCollection()->addAction("insert_text_entry", insertTextEntry); connect(insertTextEntry, SIGNAL(triggered()), m_worksheet, SLOT(insertTextEntry())); + KAction* insertPageBreakEntry=new KAction(i18n("Insert Page Break"), actionCollection()); + actionCollection()->addAction("insert_page_break_entry", insertPageBreakEntry); + connect(insertPageBreakEntry, SIGNAL(triggered()), m_worksheet, SLOT(insertPageBreakEntry())); + + KAction* insertImageEntry=new KAction(i18n("Insert Image"), actionCollection()); + actionCollection()->addAction("insert_image_entry", insertImageEntry); + connect(insertImageEntry, SIGNAL(triggered()), m_worksheet, SLOT(insertImageEntry())); + + /* KAction* insertCommandEntryBefore=new KAction(i18n("Insert Command Entry Before"), actionCollection()); //insertCommandEntryBefore->setShortcut(Qt::CTRL + Qt::Key_Return); actionCollection()->addAction("insert_command_entry_before", insertCommandEntryBefore); @@ -170,6 +179,16 @@ actionCollection()->addAction("insert_text_entry_before", insertTextEntryBefore); connect(insertTextEntryBefore, SIGNAL(triggered()), m_worksheet, SLOT(insertTextEntryBefore())); + KAction* insertPageBreakEntryBefore=new KAction(i18n("Insert Page Break Before"), actionCollection()); + actionCollection()->addAction("insert_page_break_entry_before", insertPageBreakEntryBefore); + connect(insertPageBreakEntryBefore, SIGNAL(triggered()), m_worksheet, SLOT(insertPageBreakEntryBefore())); + + KAction* insertImageEntryBefore=new KAction(i18n("Insert Image Entry Before"), actionCollection()); + //insertTextEntryBefore->setShortcut(Qt::CTRL + Qt::Key_Return); + actionCollection()->addAction("insert_image_entry_before", insertImageEntryBefore); + connect(insertImageEntryBefore, SIGNAL(triggered()), m_worksheet, SLOT(insertImageEntryBefore())); + */ + KAction* removeCurrent=new KAction(i18n("Remove current Entry"), actionCollection()); removeCurrent->setShortcut(Qt::ShiftModifier + Qt::Key_Delete); actionCollection()->addAction("remove_current", removeCurrent); @@ -247,7 +266,7 @@ // the non-i18n name here must be the same as the directory in // which the part's rc file is installed ('partrcdir' in the // Makefile) - KAboutData *aboutData = new KAboutData("cantorpart", "cantor", ki18n("CantorPart"), "0.2"); + KAboutData *aboutData = new KAboutData("cantorpart", "cantor", ki18n("CantorPart"), "0.3"); aboutData->addAuthor(ki18n("Alexander Rieder"), KLocalizedString(), "alexanderrieder@gmail.com"); return aboutData; } diff -Nru cantor-4.7.3/src/cantor_part.desktop cantor-4.7.90/src/cantor_part.desktop --- cantor-4.7.3/src/cantor_part.desktop 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/cantor_part.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -12,6 +12,7 @@ Name[et]=Cantori komponent Name[fr]=CantorPart Name[gl]=CantorPart +Name[hu]=CantorPart Name[it]=CantorPart Name[ja]=Cantor パーツ Name[km]=CantorPart diff -Nru cantor-4.7.3/src/cantor_part.rc cantor-4.7.90/src/cantor_part.rc --- cantor-4.7.3/src/cantor_part.rc 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/cantor_part.rc 2011-07-27 18:37:50.000000000 +0000 @@ -25,8 +25,12 @@ - - + + + + + + diff -Nru cantor-4.7.3/src/CMakeLists.txt cantor-4.7.90/src/CMakeLists.txt --- cantor-4.7.3/src/CMakeLists.txt 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/CMakeLists.txt 2011-09-26 09:43:34.000000000 +0000 @@ -33,6 +33,7 @@ kde4_add_ui_files(cantor_SRCS settings.ui) kde4_add_ui_files(cantor_SRCS backendchooser.ui) +kde4_add_ui_files(cantor_SRCS imagesettings.ui) kde4_add_app_icon(cantor_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-cantor.png") @@ -63,18 +64,26 @@ worksheetentry.cpp commandentry.cpp textentry.cpp + pagebreakentry.cpp + imageentry.cpp + latexentry.cpp + imagesettingsdialog.cpp scripteditorwidget.cpp resultproxy.cpp loadedexpression.cpp animationhandler.cpp animation.cpp resultcontextmenu.cpp + formulatextobject.cpp ) configure_file (config-cantor.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-cantor.h ) kde4_add_plugin(cantorpart WITH_PREFIX ${cantor_PART_SRCS}) +#add_library(blahtexcore STATIC IMPORTED) +#set_property(TARGET blahtexcore PROPERTY IMPORTED_LOCATION Path_To_BlahtexCore_Library/libblahtexcore.a) + target_link_libraries(cantorpart ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KNEWSTUFF3_LIBS} ${KDE4_KTEXTEDITOR_LIBS} ${QT_QTXMLPATTERNS_LIBRARY} cantorlibs cantor_config ) diff -Nru cantor-4.7.3/src/commandentry.cpp cantor-4.7.90/src/commandentry.cpp --- cantor-4.7.3/src/commandentry.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/commandentry.cpp 2011-07-27 18:37:50.000000000 +0000 @@ -258,12 +258,6 @@ }else if(isInCommandCell(cursor)) { KMenu* defaultMenu = new KMenu(m_worksheet); - KMenu* subMenuInsert = new KMenu(defaultMenu); - - subMenuInsert->addAction(i18n("Command Entry"), m_worksheet, SLOT(insertCommandEntry())); - subMenuInsert->addAction(i18n("Command Entry Before"), m_worksheet, SLOT(insertCommandEntryBefore())); - subMenuInsert->addAction(i18n("Text Entry"), m_worksheet, SLOT(insertTextEntry())); - subMenuInsert->addAction(i18n("Text Entry Before"), m_worksheet, SLOT(insertTextEntryBefore())); defaultMenu->addAction(KStandardAction::cut(m_worksheet)); defaultMenu->addAction(KStandardAction::copy(m_worksheet)); @@ -281,10 +275,9 @@ defaultMenu->addSeparator(); defaultMenu->addAction(KIcon("edit-delete"),i18n("Remove Entry"), m_worksheet, SLOT(removeCurrentEntry())); - subMenuInsert->setTitle(i18n("Insert Entry")); - defaultMenu->addSeparator(); - defaultMenu->addMenu(subMenuInsert); + createSubMenuInsert(defaultMenu); + defaultMenu->popup(event->globalPos()); return true; diff -Nru cantor-4.7.3/src/formulatextobject.cpp cantor-4.7.90/src/formulatextobject.cpp --- cantor-4.7.3/src/formulatextobject.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/formulatextobject.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -0,0 +1,48 @@ +/* + 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. + + --- + Copyright (C) 2011 Alexander Rieder + */ + +#include + +#include "formulatextobject.h" +#include +#include + +QSizeF FormulaTextObject::intrinsicSize(QTextDocument * doc, int /*posInDocument*/, + const QTextFormat &format) +{ + KUrl url=qVariantValue(format.property(ResourceUrl)); + //kDebug()<<"looking for: "<(doc->resource(QTextDocument::ImageResource, url)); + QSize size = bufferedImage.size(); + + //kDebug()<<"size: "<(format.property(ResourceUrl)); + QImage bufferedImage = qVariantValue(doc->resource(QTextDocument::ImageResource, url)); + + painter->drawImage(rect, bufferedImage); +} + diff -Nru cantor-4.7.3/src/formulatextobject.h cantor-4.7.90/src/formulatextobject.h --- cantor-4.7.3/src/formulatextobject.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/formulatextobject.h 2011-09-26 09:43:34.000000000 +0000 @@ -0,0 +1,53 @@ +/* + 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. + + --- + Copyright (C) 2011 Alexander Rieder + */ + +#ifndef _FORMULATEXTOBJECT_H +#define _FORMULATEXTOBJECT_H + + +#include + +#include "cantor_export.h" + +class QTextDocument; +class QTextFormat; +class QPainter; +class QRectF; +class QSizeF; + +class CANTOR_EXPORT FormulaTextObject : public QObject, public QTextObjectInterface +{ + Q_OBJECT + Q_INTERFACES(QTextObjectInterface) + + public: + enum { FormulaTextFormat = QTextFormat::UserObject + 1 }; + enum FormulaProperties { LatexCode = 1, FormulaType = 2, Data = 3, ResourceUrl = 4 }; + enum FormulaType { LatexFormula=0, MmlFormula=1 }; + + + QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, + const QTextFormat &format); + void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, + int posInDocument, const QTextFormat &format); + +}; + +#endif /* _FORMULATEXTOBJECT_H */ diff -Nru cantor-4.7.3/src/imageentry.cpp cantor-4.7.90/src/imageentry.cpp --- cantor-4.7.3/src/imageentry.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/imageentry.cpp 2011-07-27 18:37:50.000000000 +0000 @@ -0,0 +1,450 @@ +/* + 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. + + --- + Copyright (C) 2011 martin Kuettler + */ + +#include "imageentry.h" +#include "worksheet.h" + +#ifdef LIBSPECTRE_FOUND + #include "libspectre/spectre.h" +#endif + +#include +#include +#include +#include +#include + +#include +#include + +ImageEntry::ImageEntry(QTextCursor position, Worksheet* parent) : + WorksheetEntry( position, parent ) +{ + m_imagePath = QString(); + m_displaySize.width = -1; + m_displaySize.height = -1; + m_printSize.width = -1; + m_printSize.height = -1; + m_displaySize.widthUnit = QString(); + m_displaySize.heightUnit = QString(); + m_printSize.widthUnit = QString(); + m_printSize.heightUnit = QString(); + m_useDisplaySizeForPrinting = true; + m_settingsDialog = 0; + + connect(&m_imageWatcher, SIGNAL(fileChanged(const QString&)), this, SLOT(update())); + + /*QTextFrameFormat frameFormat = m_frame->frameFormat(); + frameFormat.setBorderStyle(QTextFrameFormat::BorderStyle_None); + m_frame->setFrameFormat(frameFormat);*/ + + update(); +} + +ImageEntry::~ImageEntry() +{ + if (m_settingsDialog != 0) + delete m_settingsDialog; +} + +int ImageEntry::type() +{ + return Type; +} + +bool ImageEntry::isEmpty() +{ + /* Are we empty? */ + return m_imagePath.isEmpty(); +} + +QTextCursor ImageEntry::closestValidCursor(const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + return firstValidCursorPosition(); +} + +QTextCursor ImageEntry::firstValidCursorPosition() +{ + return m_frame->lastCursorPosition(); +} + +QTextCursor ImageEntry::lastValidCursorPosition() +{ + return m_frame->lastCursorPosition(); +} + +bool ImageEntry::isValidCursor(const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + return false; +} + +bool ImageEntry::worksheetContextMenuEvent(QContextMenuEvent* event, const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + KMenu* defaultMenu = new KMenu(m_worksheet); + + defaultMenu->addAction(i18n("Configure Image"), this, SLOT(startConfigDialog())); + defaultMenu->addSeparator(); + + if(!m_worksheet->isRunning()) + defaultMenu->addAction(KIcon("system-run"),i18n("Evaluate Worksheet"),m_worksheet,SLOT(evaluate()),0); + else + defaultMenu->addAction(KIcon("process-stop"),i18n("Interrupt"),m_worksheet,SLOT(interrupt()),0); + defaultMenu->addSeparator(); + + defaultMenu->addAction(KIcon("edit-delete"),i18n("Remove Entry"), m_worksheet, SLOT(removeCurrentEntry())); + + createSubMenuInsert(defaultMenu); + + defaultMenu->popup(event->globalPos()); + + return true; + +} + +bool ImageEntry::acceptRichText() +{ + return false; +} + +bool ImageEntry::acceptsDrop(const QTextCursor& cursor) +{ + // Maybe we will, someday. + Q_UNUSED(cursor); + return false; +} + +void ImageEntry::setContent(const QString& content) +{ + Q_UNUSED(content); + return; +} + +void ImageEntry::setContent(const QDomElement& content, const KZip& file) +{ + Q_UNUSED(file); + + QDomElement pathElement = content.firstChildElement("Path"); + QDomElement displayElement = content.firstChildElement("Display"); + QDomElement printElement = content.firstChildElement("Print"); + m_imagePath = pathElement.text(); + m_displaySize.width = displayElement.attribute("width").toDouble(); + m_displaySize.height = displayElement.attribute("height").toDouble(); + m_displaySize.widthUnit = displayElement.attribute("widthUnit"); + m_displaySize.heightUnit = displayElement.attribute("heightUnit"); + m_useDisplaySizeForPrinting = printElement.attribute("useDisplaySize").toInt(); + m_printSize.width = printElement.attribute("width").toDouble(); + m_printSize.height = printElement.attribute("height").toDouble(); + m_printSize.widthUnit = printElement.attribute("widthUnit"); + m_printSize.heightUnit = printElement.attribute("heightUnit"); + + update(); +} + +QDomElement ImageEntry::toXml(QDomDocument& doc, KZip* archive) +{ + Q_UNUSED(archive); + + QDomElement image = doc.createElement("Image"); + QDomElement path = doc.createElement("Path"); + QDomText pathText = doc.createTextNode(m_imagePath); + path.appendChild(pathText); + image.appendChild(path); + QDomElement display = doc.createElement("Display"); + display.setAttribute("width", m_displaySize.width); + display.setAttribute("widthUnit", m_displaySize.widthUnit); + display.setAttribute("height", m_displaySize.height); + display.setAttribute("heightUnit", m_displaySize.heightUnit); + image.appendChild(display); + QDomElement print = doc.createElement("Print"); + print.setAttribute("useDisplaySize", m_useDisplaySizeForPrinting); + print.setAttribute("width", m_printSize.width); + print.setAttribute("widthUnit", m_printSize.widthUnit); + print.setAttribute("height", m_printSize.height); + print.setAttribute("heightUnit", m_printSize.heightUnit); + image.appendChild(print); + /* This element contains redundant information, but constructing + * the size string with xslt seems to be an unelegant solution to me. + */ + QDomElement latexSize = doc.createElement("LatexSizeString"); + QString sizeString; + if (m_useDisplaySizeForPrinting) { + sizeString = makeLatexSizeString(m_displaySize); + } + else { + sizeString = makeLatexSizeString(m_printSize); + } + QDomText latexSizeString = doc.createTextNode(sizeString); + latexSize.appendChild(latexSizeString); + image.appendChild(latexSize); + + return image; +} + +QString ImageEntry::toPlain(QString& commandSep, QString& commentStartingSeq, QString& commentEndingSeq) +{ + Q_UNUSED(commandSep); + + return commentStartingSeq + "image: " + m_imagePath + commentEndingSeq; + +} + +void ImageEntry::interruptEvaluation() +{ + return; +} + +bool ImageEntry::evaluate(bool current) +{ + Q_UNUSED(current); + return true; +} + +bool ImageEntry::worksheetKeyPressEvent(QKeyEvent* event, const QTextCursor& cursor) +{ + if (WorksheetEntry::worksheetKeyPressEvent(event, cursor)) + { + return true; + } + + return true; +} + +void ImageEntry::update() +{ + QTextCursor cursor(m_frame->firstCursorPosition()); + cursor.setPosition(m_frame->lastPosition(), QTextCursor::KeepAnchor); + cursor.removeSelectedText(); + + if (m_imagePath.isEmpty()) + { + if (m_worksheet->isPrinting()) + { + QTextFrameFormat frameFormat = m_frame->frameFormat(); + frameFormat.setBorderStyle(QTextFrameFormat::BorderStyle_None); + + m_frame->setFrameFormat(frameFormat); + return; + } + QTextBlockFormat block(cursor.blockFormat()); + block.setAlignment(Qt::AlignCenter); + cursor.setBlockFormat(block); + + KColorScheme color = KColorScheme(QPalette::Normal, KColorScheme::View); + cursor.insertText(i18n("Right click here to insert image")); + + return; + } + + QImage img(m_imagePath); + + if (img.isNull()) + { + if (m_worksheet->isPrinting()) + { + QTextFrameFormat frameFormat = m_frame->frameFormat(); + frameFormat.setBorderStyle(QTextFrameFormat::BorderStyle_None); + + m_frame->setFrameFormat(frameFormat); + return; + } + QTextBlockFormat block(cursor.blockFormat()); + block.setAlignment(Qt::AlignCenter); + cursor.setBlockFormat(block); + + KColorScheme color = KColorScheme(QPalette::Normal, KColorScheme::View); + cursor.insertText(i18n("Cannot load image ")+m_imagePath); + + return; + } + + QTextImageFormat imgFormat; + +#ifdef LIBSPECTRE_FOUND + // a better way to test for eps-files? + if (m_imagePath.endsWith(".eps")) + { + imgFormat = renderEps(m_printSize); + } + else +#endif + if (m_worksheet->isPrinting() && !m_useDisplaySizeForPrinting) + { + double w, h; + m_worksheet->document()->addResource(QTextDocument::ImageResource, QUrl(m_imagePath), QVariant(img)); + imgFormat.setName(m_imagePath); + calculateImageSize(img.width(), img.height(), m_printSize, w, h); + imgFormat.setWidth(w); + imgFormat.setHeight(h); + } + else + { + double w, h; + m_worksheet->document()->addResource(QTextDocument::ImageResource, QUrl(m_imagePath), QVariant(img)); + imgFormat.setName(m_imagePath); + calculateImageSize(img.width(), img.height(), m_displaySize, w, h); + imgFormat.setWidth(w); + imgFormat.setHeight(h); + } + + QTextBlockFormat block(cursor.blockFormat()); + block.setAlignment(Qt::AlignCenter); + cursor.setBlockFormat(block); + cursor.insertImage(imgFormat); +} + +void ImageEntry::setImageData(const QString& path, const ImageSize& displaySize, const ImageSize& printSize, bool useDisplaySizeForPrinting) +{ + m_imageWatcher.removePath(m_imagePath); + m_imageWatcher.addPath(path); + + m_imagePath = path; + m_displaySize = displaySize; + m_printSize = printSize; + m_useDisplaySizeForPrinting = useDisplaySizeForPrinting; + + update(); +} + +void ImageEntry::startConfigDialog() +{ + if (m_settingsDialog == 0) + { + m_settingsDialog = new ImageSettingsDialog(m_worksheet); + m_settingsDialog->setData(m_imagePath, m_displaySize, m_printSize, m_useDisplaySizeForPrinting); + connect(m_settingsDialog, SIGNAL(dataChanged(const QString&, const ImageSize&, const ImageSize&, bool)), + this, SLOT(setImageData(const QString&, const ImageSize&, const ImageSize&, bool))); + } + + if (m_settingsDialog->isHidden()) + m_settingsDialog->show(); + else + m_settingsDialog->activateWindow(); +} + +void ImageEntry::calculateImageSize(int imgWidth, int imgHeight, const ImageSize& imageSize, double& newWidth, double& newHeight) +{ + if (imgWidth == 0 || imgHeight == 0) + { + newWidth = 0; + newHeight = 0; + return; + } + + if (imageSize.heightUnit == "%") + newHeight = imgHeight * imageSize.height / 100; + else if (imageSize.heightUnit == "px") + newHeight = imageSize.height; + if (imageSize.widthUnit == "%") + newWidth= imgWidth * imageSize.width / 100; + else if (imageSize.widthUnit == "px") + newWidth = imageSize.width; + + if (imageSize.widthUnit == "(auto)") + { + if (imageSize.heightUnit == "(auto)") + { + newWidth = imgWidth; + newHeight = imgHeight; + return; + } + else + newWidth = newHeight / imgHeight * imgWidth; + } + else if (imageSize.heightUnit == "(auto)") + newHeight = newWidth / imgWidth * imgHeight; +} + +QString ImageEntry::makeLatexSizeString(const ImageSize& imageSize) +{ + // We use the transformation 1 px = 1/72 in ( = 1 pt in Latex) + // TODO: Handle missing cases; that requires the image size to be known + // (so it can only be done when m_imagePath points to a valid image) + + QString sizeString=""; + if (imageSize.widthUnit == "(auto)" && imageSize.heightUnit == "(auto)") { + return QString(""); + } + + if (imageSize.widthUnit == "%" && (imageSize.heightUnit == "(auto)" || + (imageSize.heightUnit == "%" && + imageSize.width == imageSize.height))) { + return "[scale=" + QString::number(imageSize.width / 100) + "]"; + } + else if (imageSize.widthUnit == "(auto)" && imageSize.heightUnit == "%") { + return "[scale=" + QString::number(imageSize.height / 100) + "]"; + } + + if (imageSize.heightUnit == "px") + sizeString = "height=" + QString::number(imageSize.height) + "pt"; + if (imageSize.widthUnit == "px") { + if (!sizeString.isEmpty()) + sizeString += ","; + sizeString += "width=" + QString::number(imageSize.width) + "pt"; + } + return "[" + sizeString + "]"; +} + +#ifdef LIBSPECTRE_FOUND +QTextImageFormat ImageEntry::renderEps(const ImageSize& imageSize) +{ + QTextImageFormat epsCharFormat; + + SpectreDocument* doc=spectre_document_new();; + SpectreRenderContext* rc=spectre_render_context_new(); + + spectre_document_load(doc, m_imagePath.toUtf8()); + + int w, h; + spectre_document_get_page_size(doc, &w, &h); + kDebug()<<"dimension: "<isPrinting()) + scale=4.0; //4x for high resolution + else + scale=1.0; + xScale = newWidth/w * scale; + yScale = newHeight/h * scale; + + unsigned char* data; + int rowLength; + + spectre_render_context_set_scale(rc, xScale, yScale); + spectre_document_render_full(doc, rc, &data, &rowLength); + + QImage img(data, w*xScale, h*yScale, rowLength, QImage::Format_RGB32); + + m_worksheet->document()->addResource(QTextDocument::ImageResource, m_imagePath, QVariant(img) ); + epsCharFormat.setName(m_imagePath); + epsCharFormat.setWidth(newWidth); + epsCharFormat.setHeight(newHeight); + + spectre_document_free(doc); + spectre_render_context_free(rc); + + return epsCharFormat; +} +#endif diff -Nru cantor-4.7.3/src/imageentry.h cantor-4.7.90/src/imageentry.h --- cantor-4.7.3/src/imageentry.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/imageentry.h 2011-07-27 18:37:50.000000000 +0000 @@ -0,0 +1,92 @@ +/* + 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. + + --- + Copyright (C) 2011 martin Kuettler + */ + +#ifndef _IMAGEENTRY_H +#define _IMAGEENTRY_H + +#include "worksheetentry.h" +#include "imagesettingsdialog.h" +#include + +#include +#include + +class Worksheet; +class WorksheetEntry; + +class ImageEntry : public WorksheetEntry +{ + Q_OBJECT + public: + ImageEntry(QTextCursor position, Worksheet* parent); + ~ImageEntry(); + + enum {Type = 4}; + + int type(); + + bool isEmpty(); + + QTextCursor closestValidCursor(const QTextCursor& cursor); + QTextCursor firstValidCursorPosition(); + QTextCursor lastValidCursorPosition(); + bool isValidCursor(const QTextCursor& cursor); + + // Handlers for the worksheet input events affecting worksheetentries + bool worksheetContextMenuEvent(QContextMenuEvent* event, const QTextCursor& cursor); + + bool acceptRichText(); + bool acceptsDrop(const QTextCursor& cursor); + + void setContent(const QString& content); + void setContent(const QDomElement& content, const KZip& file); + + QDomElement toXml(QDomDocument& doc, KZip* archive); + QString toPlain(QString& commandSep, QString& commentStartingSeq, QString& commentEndingSeq); + + void interruptEvaluation(); + bool worksheetKeyPressEvent(QKeyEvent* event, const QTextCursor& cursor); + + bool evaluate(bool current); + + public slots: + void update(); + + void startConfigDialog(); + void setImageData(const QString& path, const ImageSize& displaySize, const ImageSize& printSize, bool useDisplaySizeForPrinting); + + private: +#ifdef LIBSPECTRE_FOUND + QTextImageFormat renderEps(const ImageSize& imageSize); +#endif + void calculateImageSize(int imgWidth, int imgHeight, const ImageSize& imageSize, double& newWidth, double& newHeight); + QString makeLatexSizeString(const ImageSize&); + + private: + QString m_imagePath; + ImageSize m_displaySize; + ImageSize m_printSize; + bool m_useDisplaySizeForPrinting; + QFileSystemWatcher m_imageWatcher; + ImageSettingsDialog* m_settingsDialog; + +}; + +#endif /* _IMAGEENTRY_H */ diff -Nru cantor-4.7.3/src/imagesettingsdialog.cpp cantor-4.7.90/src/imagesettingsdialog.cpp --- cantor-4.7.3/src/imagesettingsdialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/imagesettingsdialog.cpp 2011-07-27 18:37:50.000000000 +0000 @@ -0,0 +1,190 @@ +/* + 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. + + --- + Copyright (C) 2011 Martin Kuettler + */ + +#include "imagesettingsdialog.h" +#include "qimagereader.h" +#include "qfiledialog.h" +#include "kurlcompletion.h" + +ImageSettingsDialog::ImageSettingsDialog(QWidget* parent) : KDialog(parent) +{ + QWidget *w = new QWidget(this); + m_ui.setupUi(w); + setMainWidget(w); + this->setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply ); + + m_units << "(auto)" << "px" << "%"; + m_unitNames << i18n("(auto)") << i18n("px") << i18n("%"); + + m_ui.displayWidthCombo->addItems(m_unitNames); + m_ui.displayHeightCombo->addItems(m_unitNames); + m_ui.printWidthCombo->addItems(m_unitNames); + m_ui.printHeightCombo->addItems(m_unitNames); + + KUrlCompletion* completer = new KUrlCompletion(KUrlCompletion::FileCompletion); + completer->setCompletionMode(KGlobalSettings::CompletionMan); + m_ui.pathEdit->setCompletionObject(completer); + m_ui.pathEdit->setAutoDeleteCompletionObject( true ); + + m_ui.displayWidthInput->setMinimum(0); + m_ui.displayHeightInput->setMinimum(0); + m_ui.printWidthInput->setMinimum(0); + m_ui.printHeightInput->setMinimum(0); + m_ui.displayWidthInput->setSingleStep(1); + m_ui.displayHeightInput->setSingleStep(1); + m_ui.printWidthInput->setSingleStep(1); + m_ui.printHeightInput->setSingleStep(1); + + connect(this, SIGNAL(okClicked()), this, SLOT(sendChangesAndClose())); + connect(this, SIGNAL(applyClicked()), this, SLOT(sendChanges())); + connect(this, SIGNAL(cancelClicked()), this, SLOT(close())); + + connect(m_ui.openDialogButton, SIGNAL(clicked()), this, SLOT(openDialog())); + //connect(m_fileDialog, SIGNAL(accepted()), this, SLOT(updatePath())); + + connect(m_ui.pathEdit, SIGNAL(editingFinished()), this, SLOT(updatePreview())); + + connect(m_ui.displayWidthCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateInputWidgets())); + connect(m_ui.displayHeightCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateInputWidgets())); + connect(m_ui.printWidthCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateInputWidgets())); + connect(m_ui.printHeightCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateInputWidgets())); + + connect(m_ui.useDisplaySize, SIGNAL(stateChanged(int)), this, SLOT(updatePrintingGroup(int))); +} + +ImageSettingsDialog::~ImageSettingsDialog() +{ + +} + +void ImageSettingsDialog::setData(const QString& file, const ImageSize& displaySize, const ImageSize& printSize, bool useDisplaySizeForPrinting) +{ + m_ui.pathEdit->setText(file); + if (displaySize.width >= 0) + m_ui.displayWidthInput->setValue(displaySize.width); + if (displaySize.height >= 0) + m_ui.displayHeightInput->setValue(displaySize.height); + if (printSize.width >= 0) + m_ui.printWidthInput->setValue(printSize.width); + if (printSize.height >= 0) + m_ui.printHeightInput->setValue(printSize.height); + if (displaySize.widthUnit.isEmpty()) + m_ui.displayWidthCombo->setCurrentIndex(0); + else + m_ui.displayWidthCombo->setCurrentIndex(m_units.indexOf(displaySize.widthUnit)); + if (displaySize.heightUnit.isEmpty()) + m_ui.displayHeightCombo->setCurrentIndex(0); + else + m_ui.displayHeightCombo->setCurrentIndex(m_units.indexOf(displaySize.heightUnit)); + if (printSize.widthUnit.isEmpty()) + m_ui.printWidthCombo->setCurrentIndex(0); + else + m_ui.printWidthCombo->setCurrentIndex(m_units.indexOf(printSize.widthUnit)); + if (printSize.heightUnit.isEmpty()) + m_ui.printHeightCombo->setCurrentIndex(0); + else + m_ui.printHeightCombo->setCurrentIndex(m_units.indexOf(printSize.heightUnit)); + if (useDisplaySizeForPrinting) + m_ui.useDisplaySize->setCheckState(Qt::Checked); + else + m_ui.useDisplaySize->setCheckState(Qt::Unchecked); + + updatePreview(); + updatePrintingGroup(useDisplaySizeForPrinting); + //updateInputWidgets(); + +} + +void ImageSettingsDialog::sendChangesAndClose() +{ + sendChanges(); + close(); +} + +void ImageSettingsDialog::sendChanges() +{ + ImageSize displaySize, printSize; + displaySize.width = m_ui.displayWidthInput->value(); + displaySize.height = m_ui.displayHeightInput->value(); + displaySize.widthUnit = m_units[m_ui.displayWidthCombo->currentIndex()]; + displaySize.heightUnit = m_units[m_ui.displayHeightCombo->currentIndex()]; + printSize.width = m_ui.printWidthInput->value(); + printSize.height = m_ui.printHeightInput->value(); + printSize.widthUnit = m_units[m_ui.printWidthCombo->currentIndex()]; + printSize.heightUnit = m_units[m_ui.printHeightCombo->currentIndex()]; + + emit dataChanged + (m_ui.pathEdit->text(), displaySize, printSize, + (m_ui.useDisplaySize->checkState() == Qt::Checked)); +} + +void ImageSettingsDialog::openDialog() +{ + QList formats = QImageReader::supportedImageFormats(); + QString formatString = "Images("; + foreach(QByteArray format, formats) + { + formatString += "*." + QString(format).toLower() + " "; + } + formatString += ")"; + QString file = QFileDialog::getOpenFileName(this, i18n("Open image file"), m_ui.pathEdit->text(), formatString); + if (!file.isEmpty()) + { + m_ui.pathEdit->setText(file); + updatePreview(); + } +} + +void ImageSettingsDialog::updatePreview() +{ + m_ui.imagePreview->showPreview(KUrl(m_ui.pathEdit->text())); +} + +void ImageSettingsDialog::updateInputWidgets() +{ + if (m_ui.displayWidthCombo->currentIndex() == 0) + m_ui.displayWidthInput->setEnabled(false); + else + m_ui.displayWidthInput->setEnabled(true); + + if (m_ui.displayHeightCombo->currentIndex() == 0) + m_ui.displayHeightInput->setEnabled(false); + else + m_ui.displayHeightInput->setEnabled(true); + + if (m_ui.printWidthCombo->currentIndex() == 0 || !m_ui.printWidthCombo->isEnabled()) + m_ui.printWidthInput->setEnabled(false); + else + m_ui.printWidthInput->setEnabled(true); + + if (m_ui.printHeightCombo->currentIndex() == 0 || !m_ui.printHeightCombo->isEnabled()) + m_ui.printHeightInput->setEnabled(false); + else + m_ui.printHeightInput->setEnabled(true); +} + +void ImageSettingsDialog::updatePrintingGroup(int b) +{ + + m_ui.printWidthCombo->setEnabled(!b); + m_ui.printHeightCombo->setEnabled(!b); + + updateInputWidgets(); +} diff -Nru cantor-4.7.3/src/imagesettingsdialog.h cantor-4.7.90/src/imagesettingsdialog.h --- cantor-4.7.3/src/imagesettingsdialog.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/imagesettingsdialog.h 2011-07-27 18:37:50.000000000 +0000 @@ -0,0 +1,64 @@ +/* + 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. + + --- + Copyright (C) 2011 Martin Kuettler + */ + +#ifndef _IMAGESETTINGSDIALOG_H +#define _IMAGESETTINGSDIALOG_H + +#include + +#include + +struct ImageSize +{ + double width; + double height; + QString widthUnit; + QString heightUnit; +}; + +class ImageSettingsDialog : public KDialog +{ + Q_OBJECT + public: + ImageSettingsDialog(QWidget* parent); + ~ImageSettingsDialog(); + + void setData(const QString& file, const ImageSize& displaySize, const ImageSize& printSize, bool useDisplaySizeForPrinting); + + signals: + void dataChanged(const QString& file, const ImageSize& displaySize, const ImageSize& printSize, bool useDisplaySizeForPrinting); + + private slots: + void sendChangesAndClose(); + void sendChanges(); + + void openDialog(); + void updatePreview(); + void updateInputWidgets(); + void updatePrintingGroup(int b); + + private: + /*static*/ QList m_units; + /*static*/ QList m_unitNames; + Ui_ImageSettingsBase m_ui; + +}; + +#endif //_IMAGESETTINGSDIALOG_H diff -Nru cantor-4.7.3/src/imagesettings.ui cantor-4.7.90/src/imagesettings.ui --- cantor-4.7.3/src/imagesettings.ui 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/imagesettings.ui 2011-07-27 18:37:50.000000000 +0000 @@ -0,0 +1,157 @@ + + + ImageSettingsBase + + + + 0 + 0 + 649 + 301 + + + + Image Settings + + + + + + + + + + + Open + + + + + + + + + Display Size + + + false + + + + + + Width + + + + + + + + + + + + + Height + + + + + + + + + + + + + + + + + + + Print Size + + + + + + Use Display Size + + + + + + + Width + + + + + + + + + + + + + Height + + + + + + + + + + + + + + + + + KDoubleNumInput + QWidget +
knuminput.h
+
+ + KImageFilePreview + QWidget +
kimagefilepreview.h
+
+ + KPushButton + QPushButton +
kpushbutton.h
+
+ + KLineEdit + QLineEdit +
klineedit.h
+
+ + KComboBox + QComboBox +
kcombobox.h
+
+
+ + pathEdit + openDialogButton + displayWidthInput + displayWidthCombo + displayHeightInput + displayHeightCombo + printWidthInput + printWidthCombo + printHeightInput + printHeightCombo + + + +
diff -Nru cantor-4.7.3/src/latexentry.cpp cantor-4.7.90/src/latexentry.cpp --- cantor-4.7.3/src/latexentry.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/latexentry.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -0,0 +1,325 @@ +/* + 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. + + --- + Copyright (C) 2011 Alexander Rieder + */ + +#include "latexentry.h" + +#include "worksheetentry.h" +#include "worksheet.h" +#include "resultproxy.h" +#include "lib/defaulthighlighter.h" +#include "lib/latexrenderer.h" + +#include "formulatextobject.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +LatexEntry::LatexEntry(QTextCursor position, Worksheet* parent ) : WorksheetEntry( position, parent ) +{ + QTextFrameFormat frameFormat = m_frame->frameFormat(); + frameFormat.setPadding(10); + m_frame->setFrameFormat(frameFormat); + QTextCharFormat format = firstCursorPosition().blockCharFormat(); + format.setProperty(Cantor::DefaultHighlighter::BlockTypeProperty, Cantor::DefaultHighlighter::NoHighlightBlock); + firstCursorPosition().setBlockCharFormat(format); +} + +LatexEntry::~LatexEntry() +{ + +} + +int LatexEntry::type() +{ + return Type; +} + +QTextCursor LatexEntry::firstValidCursorPosition() +{ + return firstCursorPosition(); +} + +QTextCursor LatexEntry::lastValidCursorPosition() +{ + return lastCursorPosition(); +} + +QTextCursor LatexEntry::closestValidCursor(const QTextCursor& cursor) +{ + return QTextCursor(cursor); +} + +bool LatexEntry::isValidCursor(const QTextCursor& cursor) +{ + int pos = cursor.position(); + return (firstValidPosition() <= pos && pos <= lastValidPosition()); +} + +bool LatexEntry::isEmpty() +{ + QTextCursor cursor = firstValidCursorPosition(); + cursor.setPosition(lastValidPosition(), QTextCursor::KeepAnchor); + return cursor.selection().isEmpty(); +} + +bool LatexEntry::worksheetMouseDoubleClickEvent(QMouseEvent* event, const QTextCursor& /*cursor*/) +{ + if(!m_isShowingCode) + { + m_isShowingCode=true; + QTextCursor cursor=firstValidCursorPosition(); + QString code=qVariantValue(cursor.charFormat().property(FormulaTextObject::LatexCode)); + kDebug()<<"code: "<addAction(KStandardAction::cut(m_worksheet)); + defaultMenu->addAction(KStandardAction::copy(m_worksheet)); + defaultMenu->addAction(KStandardAction::paste(m_worksheet)); + defaultMenu->addSeparator(); + + if(!m_worksheet->isRunning()) + defaultMenu->addAction(KIcon("system-run"),i18n("Evaluate Worksheet"),m_worksheet,SLOT(evaluate()),0); + else + defaultMenu->addAction(KIcon("process-stop"),i18n("Interrupt"),m_worksheet,SLOT(interrupt()),0); + defaultMenu->addSeparator(); + + defaultMenu->addAction(KIcon("edit-delete"),i18n("Remove Entry"), m_worksheet, SLOT(removeCurrentEntry())); + + createSubMenuInsert(defaultMenu); + + defaultMenu->popup(event->globalPos()); + + return true; +} + + +void LatexEntry::setContent(const QString& content) +{ + firstValidCursorPosition().insertText(content); +} + +void LatexEntry::setContent(const QDomElement& content, const KZip& file) +{ + QString latexCode= content.text(); + kDebug() << latexCode; + + QTextCursor cursor=firstValidCursorPosition(); + cursor.setPosition(lastValidPosition(), QTextCursor::KeepAnchor); + cursor.removeSelectedText(); + cursor=firstValidCursorPosition(); + + if(content.hasAttribute("filename")) + { + const KArchiveEntry* imageEntry=file.directory()->entry(content.attribute("filename")); + if (imageEntry&&imageEntry->isFile()) + { + const KArchiveFile* imageFile=static_cast(imageEntry); + QString dir=KGlobal::dirs()->saveLocation("tmp", "cantor/"); + imageFile->copyTo(dir); + QString imagePath=QString(dir+QLatin1Char('/')+imageFile->name()); + + KUrl internal=KUrl(imagePath); + internal.setProtocol("internal"); + + bool success=m_worksheet->resultProxy()->renderEpsToResource(imagePath); + kDebug()<<"rendering successfull? "<(cursor.charFormat().property(FormulaTextObject::LatexCode)); + if(cursor.charFormat().intProperty(FormulaTextObject::FormulaType)==FormulaTextObject::LatexFormula) + image=qVariantValue(cursor.charFormat().property(FormulaTextObject::Data)); + } + + QDomElement el = doc.createElement("Latex"); + + if(!image.isNull()) + { + KUrl url(image); + el.setAttribute("filename", url.fileName()); + archive->addLocalFile(image, url.fileName()); + } + + kDebug() << html; + QDomText text=doc.createTextNode(html); + + el.appendChild(text); + + return el; +} + +QString LatexEntry::toPlain(QString& commandSep, QString& commentStartingSeq, QString& commentEndingSeq) +{ + Q_UNUSED(commandSep); + + if (commentStartingSeq.isEmpty()) + return QString(); + QString text; + if(m_isShowingCode) + { + QTextCursor cursor = firstValidCursorPosition(); + cursor.setPosition(lastValidPosition(), QTextCursor::KeepAnchor); + text = cursor.selection().toPlainText(); + }else + { + QTextCursor cursor=firstValidCursorPosition(); + text=qVariantValue(cursor.charFormat().property(FormulaTextObject::LatexCode)); + } + if (!commentEndingSeq.isEmpty()) + return commentStartingSeq + text + commentEndingSeq + "\n"; + return commentStartingSeq + text.replace("\n", "\n" + commentStartingSeq) + "\n"; +} + +void LatexEntry::interruptEvaluation() +{ + +} + +bool LatexEntry::evaluate(bool current) +{ + Q_UNUSED(current); + + QTextDocument *doc = m_frame->document(); + QTextCursor cursor=firstValidCursorPosition(); + cursor.setPosition(lastValidPosition(), QTextCursor::KeepAnchor); + QString latexCode=cursor.selection().toPlainText(); + cursor.removeSelectedText(); + + Cantor::LatexRenderer* renderer=new Cantor::LatexRenderer(this); + renderer->setLatexCode(latexCode); + renderer->setEquationOnly(false); + renderer->setMethod(Cantor::LatexRenderer::LatexMethod); + + renderer->renderBlocking(); + + bool success=m_worksheet->resultProxy()->renderEpsToResource(renderer->imagePath()); + kDebug()<<"rendering successfull? "<imagePath(); + KUrl internal=KUrl(path); + internal.setProtocol("internal"); + + kDebug()<<"int: "<imagePath()); + formulaFormat.setProperty( FormulaTextObject::ResourceUrl, internal); + formulaFormat.setProperty( FormulaTextObject::LatexCode, latexCode); + formulaFormat.setProperty( FormulaTextObject::FormulaType, renderer->method()); + + cursor.insertText(QString(QChar::ObjectReplacementCharacter), formulaFormat); + delete renderer; + + m_isShowingCode=false; + + return true; +} + +void LatexEntry::update() +{ + if(!m_isShowingCode) + { + kDebug()<<"found a formula... rendering the eps..."; + QTextCursor cursor=firstValidCursorPosition(); + QTextCharFormat format=cursor.charFormat(); + QUrl url=qVariantValue(format.property(FormulaTextObject::Data)); + bool success=m_worksheet->resultProxy()->renderEpsToResource(url); + kDebug()<<"rendering successfull? "<document()->find(QString(QChar::ObjectReplacementCharacter), cursor); + } +} + + + diff -Nru cantor-4.7.3/src/latexentry.h cantor-4.7.90/src/latexentry.h --- cantor-4.7.3/src/latexentry.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/latexentry.h 2011-09-26 09:43:34.000000000 +0000 @@ -0,0 +1,65 @@ +/* + 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. + + --- + Copyright (C) 2011 Alexander Rieder + */ + +#ifndef _LATEXENTRY_H +#define _LATEXENTRY_H + +#include "worksheetentry.h" + +class LatexEntry : public WorksheetEntry +{ + public: + LatexEntry( QTextCursor position, Worksheet* parent); + ~LatexEntry(); + + enum {Type = 5}; + int type(); + + bool isEmpty(); + + QTextCursor closestValidCursor(const QTextCursor& cursor); + QTextCursor firstValidCursorPosition(); + QTextCursor lastValidCursorPosition(); + bool isValidCursor(const QTextCursor& cursor); + + bool worksheetContextMenuEvent(QContextMenuEvent* event, const QTextCursor& cursor); + bool worksheetMouseDoubleClickEvent(QMouseEvent* event, const QTextCursor& cursor); + + bool acceptRichText(); + bool acceptsDrop(const QTextCursor& cursor); + + void setContent(const QString& content); + void setContent(const QDomElement& content, const KZip& file); + + QDomElement toXml(QDomDocument& doc, KZip* archive); + QString toPlain(QString& commandSep, QString& commentStartingSeq, QString& commentEndingSeq); + + void interruptEvaluation(); + + bool evaluate(bool current); + public slots: + void update(); + + private: + bool m_isShowingCode; + +}; + +#endif /* _LATEXENTRY_H */ diff -Nru cantor-4.7.3/src/lib/cantor_assistant.desktop cantor-4.7.90/src/lib/cantor_assistant.desktop --- cantor-4.7.3/src/lib/cantor_assistant.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/lib/cantor_assistant.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=ServiceType X-KDE-ServiceType=Cantor/Assistant Comment=An Assistant for Cantor +Comment[bg]=Помощник за Cantor Comment[bs]=Asistent za Cantor Comment[ca]=Un assistent per al Cantor Comment[ca@valencia]=Un assistent per al Cantor @@ -16,6 +17,7 @@ Comment[fr]=Un assistant pour Cantor Comment[gl]=Un asistente para Cantor Comment[hr]=Pomoćnik za Cantor +Comment[hu]=Segéd a Cantorhoz Comment[it]=Un assistente per Cantor Comment[ja]=Cantor のウィザード Comment[km]=An Assistant for Cantor diff -Nru cantor-4.7.3/src/lib/cantor_backend.desktop cantor-4.7.90/src/lib/cantor_backend.desktop --- cantor-4.7.3/src/lib/cantor_backend.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/lib/cantor_backend.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=ServiceType X-KDE-ServiceType=Cantor/Backend Comment=A Backend for Cantor +Comment[bg]=Ядро за Cantor Comment[ca]=Un dorsal per al Cantor Comment[ca@valencia]=Un dorsal per al Cantor Comment[cs]=Podpůrná vrstva Cantoru @@ -15,6 +16,7 @@ Comment[fr]=Un moteur pour Cantor Comment[gl]=Unha infraestrutura para Cantor Comment[hr]=Pozadinski servis za Cantor +Comment[hu]=Egy modul a Cantorhoz Comment[it]=Un motore R per Cantor Comment[ja]=Cantor のバックエンド Comment[km]=កម្មវិធី​ខាង​ក្រោយ​សម្រាប់​ Cantor diff -Nru cantor-4.7.3/src/lib/cantor_panelplugin.desktop cantor-4.7.90/src/lib/cantor_panelplugin.desktop --- cantor-4.7.3/src/lib/cantor_panelplugin.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/lib/cantor_panelplugin.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=ServiceType X-KDE-ServiceType=Cantor/PanelPlugin Comment=A Plugin for Cantor's Panel +Comment[bg]=Приставка за панела на Cantor Comment[ca]=Un endollable per al plafó del Cantor Comment[ca@valencia]=Un endollable per al plafó del Cantor Comment[cs]=Modul pro panel Cantoru @@ -13,10 +14,10 @@ Comment[eu]=Cantorren panelarentzako plugin bat Comment[fr]=Un module externe pour le tableau de bord de Cantor Comment[gl]=Un engadido para o panel do Cantor +Comment[hu]=Egy bővítmény a Cantor paneléhez Comment[it]=Un'estensione per il pannello di Cantor Comment[ja]=Cantor のパネルのプラグイン Comment[km]=កម្មវិធី​ជំនួយ​សម្រាប់​ផ្ទាំង​របស់​ Cantor -Comment[lv]=Spraudnis Cantor panelim Comment[nb]=Et programtillegg for Cantors panel Comment[nds]=En Moduul för't Cantor-Paneel Comment[nl]=Een plugin voor het paneel van Cantor @@ -29,6 +30,7 @@ Comment[th]=ปลั๊กอินสำหรับพาแนลของ Cantor Comment[uk]=Додаток панелі Cantor Comment[x-test]=xxA Plugin for Cantor's Panelxx +Comment[zh_CN]=Cantor 面板插件 Comment[zh_TW]=Cantor 的面板外掛程式 [PropertyDef::RequiredExtensions] diff -Nru cantor-4.7.3/src/lib/CMakeLists.txt cantor-4.7.90/src/lib/CMakeLists.txt --- cantor-4.7.3/src/lib/CMakeLists.txt 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/lib/CMakeLists.txt 2011-09-26 09:43:34.000000000 +0000 @@ -1,4 +1,4 @@ -set(GENERIC_LIB_VERSION "0.0.2") +set(GENERIC_LIB_VERSION "0.0.3") set(GENERIC_LIB_SOVERSION "1") set( cantor_LIB_SRCS @@ -10,6 +10,7 @@ imageresult.cpp epsresult.cpp latexresult.cpp + latexrenderer.cpp helpresult.cpp animationresult.cpp extension.cpp @@ -59,6 +60,8 @@ target_link_libraries( cantorlibs ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} + ${QT_LIBRARIES} + ${QT_QTXML_LIBRARY} ) set_target_properties( cantorlibs PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} diff -Nru cantor-4.7.3/src/lib/defaulthighlighter.cpp cantor-4.7.90/src/lib/defaulthighlighter.cpp --- cantor-4.7.3/src/lib/defaulthighlighter.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/lib/defaulthighlighter.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -178,18 +178,56 @@ void DefaultHighlighter::highlightWords(const QString& text) { + kDebug() << "DefaultHighlighter::highlightWords"; + const QStringList& words = text.split(QRegExp("\\b"), QString::SkipEmptyParts); int count; int pos = 0; + const int n = words.size(); for (int i = 0; i < n; ++i) { count = words[i].size(); - const QString word = words[i].trimmed(); + QString word = words[i]; + + //kind of a HACK: + //look at previous words, if they end with allowed characters, + //prepend them to the current word. This allows for example + //to highlight words that start with a "Non-word"-character + //e.g. %pi in the scilab backend. + kDebug() << "nonSeparatingCharacters().isNull(): " << nonSeparatingCharacters().isNull(); + if(!nonSeparatingCharacters().isNull()) + { + for(int j = i - 1; j >= 0; j--) + { + kDebug() << "j: " << j << "w: " << words[j]; + const QString& w = words[j]; + const QString exp = QString("(%1)*$").arg(nonSeparatingCharacters()); + kDebug() << "exp: " << exp; + int idx = w.indexOf(QRegExp(exp)); + const QString& s = w.mid(idx); + kDebug() << "s: " << s; + + if(s.size() > 0) + { + pos -= s.size(); + count += s.size(); + word = s + word; + } else{ + break; + } + } + } + + word = word.trimmed(); + + kDebug() << "highlighing: " << word; + if (d->wordRules.contains(word)) { setFormat(pos, count, d->wordRules[word]); } + pos += count; } } @@ -340,5 +378,9 @@ d->regExpRules.removeAll(rule); } +QString DefaultHighlighter::nonSeparatingCharacters() const +{ + return QString(); +} #include "defaulthighlighter.moc" diff -Nru cantor-4.7.3/src/lib/defaulthighlighter.h cantor-4.7.90/src/lib/defaulthighlighter.h --- cantor-4.7.3/src/lib/defaulthighlighter.h 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/lib/defaulthighlighter.h 2011-11-17 20:56:23.000000000 +0000 @@ -153,6 +153,12 @@ */ void highlightRegExps(const QString& text); + /** + * Returns a string that contains a regular expression that matches for characters thar are allowed inside + * words for this backend. For example, maxima or scilab allow % at the beginning of variable names + */ + virtual QString nonSeparatingCharacters() const; + private slots: void positionChanged(); void updateFormats(); diff -Nru cantor-4.7.3/src/lib/epsresult.h cantor-4.7.90/src/lib/epsresult.h --- cantor-4.7.3/src/lib/epsresult.h 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/lib/epsresult.h 2011-11-17 20:56:23.000000000 +0000 @@ -46,7 +46,7 @@ QDomElement toXml(QDomDocument& doc); void saveAdditionalData(KZip* archive); - + void save(const QString& filename); private: diff -Nru cantor-4.7.3/src/lib/expression.cpp cantor-4.7.90/src/lib/expression.cpp --- cantor-4.7.3/src/lib/expression.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/lib/expression.cpp 2011-11-17 20:56:23.000000000 +0000 @@ -29,6 +29,7 @@ #include "imageresult.h" #include "latexresult.h" #include "settings.h" +#include "latexrenderer.h" #include @@ -55,8 +56,6 @@ Expression::Status status; Session* session; Expression::FinishingBehavior finishingBehavior; - - QString latexFilename; }; static const QString tex="\\documentclass[12pt,fleqn]{article} \n "\ @@ -106,6 +105,7 @@ void Expression::setResult(Result* result) { + if(d->result) delete d->result; @@ -166,69 +166,33 @@ kDebug()<<"rendering as latex"; kDebug()<<"checking if it really is a formula that can be typeset"; - QString dir=KGlobal::dirs()->saveLocation("tmp", "cantor/"); - - //Check if the cantor subdir exists, if not, create it - KTemporaryFile *texFile=new KTemporaryFile(); - texFile->setPrefix( "cantor/" ); - texFile->setSuffix( ".tex" ); - texFile->open(); - - QString expressionTex=tex; - expressionTex=expressionTex.arg(additionalLatexHeaders()); - expressionTex=expressionTex.arg(result()->data().toString().trimmed()); - - texFile->write(expressionTex.toUtf8()); - texFile->flush(); - - QString fileName = texFile->fileName(); - kDebug()<<"fileName: "<latexFilename=fileName; - d->latexFilename.replace(".tex", ".eps"); - KProcess *p=new KProcess( this ); - p->setWorkingDirectory(dir); - - (*p)<latexCommand()<<"-interaction=batchmode"<<"-halt-on-error"<setLatexCode(result()->data().toString().trimmed()); + renderer->addHeader(additionalLatexHeaders()); - connect(p, SIGNAL( finished(int, QProcess::ExitStatus) ), this, SLOT( convertToPs() ) ); - p->start(); -} - -void Expression::convertToPs() -{ - kDebug()<<"converting to ps"; - QString dviFile=d->latexFilename; - dviFile.replace(".eps", ".dvi"); - KProcess *p=new KProcess( this ); - kDebug()<<"running: "<dvipsCommand()<<"-E"<<"-o"<latexFilename<dvipsCommand()<<"-E"<<"-o"<latexFilename<start(); + renderer->render(); } void Expression::latexRendered() { - kDebug()<<"rendered file "<latexFilename; - //cleanup the temp directory a bit... - QString dir=KGlobal::dirs()->saveLocation("tmp", "cantor/"); - QStringList unneededExtensions; - unneededExtensions<<".log"<<".aux"<<".tex"<<".dvi"; - foreach(const QString& ext, unneededExtensions) - { - QString s=d->latexFilename; - s.replace(".eps", ext); - QFile f(s); - //f.remove(); - } + LatexRenderer* renderer=qobject_cast(sender()); + kDebug()<<"rendered a result to "<imagePath(); //replace the textresult with the rendered latex image result //ImageResult* latex=new ImageResult( d->latexFilename ); - if(QFileInfo(d->latexFilename).exists()) + if(renderer->renderingSuccessful()) { - LatexResult* latex=new LatexResult(result()->data().toString().trimmed(), KUrl(d->latexFilename)); + LatexResult* latex=new LatexResult(result()->data().toString().trimmed(), KUrl(renderer->imagePath())); setResult( latex ); + }else + { + kDebug()<<"error rendering latex: "<errorMessage(); } + + renderer->deleteLater(); } //saving code diff -Nru cantor-4.7.3/src/lib/expression.h cantor-4.7.90/src/lib/expression.h --- cantor-4.7.3/src/lib/expression.h 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/lib/expression.h 2011-09-26 09:43:34.000000000 +0000 @@ -236,7 +236,6 @@ private: void renderResultAsLatex(); private Q_SLOTS: - void convertToPs(); void latexRendered(); private: diff -Nru cantor-4.7.3/src/lib/latexrenderer.cpp cantor-4.7.90/src/lib/latexrenderer.cpp --- cantor-4.7.3/src/lib/latexrenderer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/lib/latexrenderer.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -0,0 +1,258 @@ +/* + 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. + + --- + Copyright (C) 2011 Alexander Rieder + */ + +#include "latexrenderer.h" +using namespace Cantor; + +#include +#include +#include +#include +#include +#include + +#include +#include "settings.h" + +class Cantor::LatexRendererPrivate +{ + public: + QString latexCode; + QString header; + LatexRenderer::Method method; + bool isEquationOnly; + LatexRenderer::EquationType equationType; + QString errorMessage; + bool success; + QString latexFilename; +}; + +static const QString tex="\\documentclass[12pt,fleqn]{article} \n "\ + "\\usepackage{latexsym,amsfonts,amssymb,ulem} \n "\ + "\\usepackage[dvips]{graphicx} \n "\ + "\\setlength\\textwidth{5in} \n "\ + "\\setlength{\\parindent}{0pt} \n "\ + "%1 \n "\ + "\\pagestyle{empty} \n "\ + "\\begin{document} \n "\ + "%2 \n "\ + "\\end{document}\n"; + +static const QString eqnHeader="\\begin{eqnarray*}%1\\end{eqnarray*} \n "; +static const QString inlineEqnHeader="$%1$ \n"; + +LatexRenderer::LatexRenderer(QObject* parent) : QObject(parent), + d(new LatexRendererPrivate) +{ + d->method=LatexMethod; + d->isEquationOnly=false; + d->equationType=InlineEquation; + d->success=false; +} + +LatexRenderer::~LatexRenderer() +{ + delete d; +} + +QString LatexRenderer::latexCode() const +{ + return d->latexCode; +} + +void LatexRenderer::setLatexCode(const QString& src) +{ + d->latexCode=src; +} + +QString LatexRenderer::header() const +{ + return d->header; +} + +void LatexRenderer::addHeader(const QString& header) +{ + d->header.append(header); +} + +void LatexRenderer::setHeader(const QString& header) +{ + d->header=header; +} + +LatexRenderer::Method LatexRenderer::method() const +{ + return d->method; +} + +void LatexRenderer::setMethod(LatexRenderer::Method method) +{ + d->method=method; +} + +void LatexRenderer::setEquationType(LatexRenderer::EquationType type) +{ + d->equationType=type; +} + +LatexRenderer::EquationType LatexRenderer::equationType() const +{ + return d->equationType; +} + + +void LatexRenderer::setErrorMessage(const QString& msg) +{ + d->errorMessage=msg; +} + +QString LatexRenderer::errorMessage() const +{ + return d->errorMessage; +} + +bool LatexRenderer::renderingSuccessful() const +{ + return d->success; +} + +void LatexRenderer::setEquationOnly(bool isEquationOnly) +{ + d->isEquationOnly=isEquationOnly; +} + +bool LatexRenderer::isEquationOnly() const +{ + return d->isEquationOnly; +} + + +QString LatexRenderer::imagePath() const +{ + return d->latexFilename; +} + +void LatexRenderer::render() +{ + switch(d->method) + { + case LatexRenderer::LatexMethod: renderWithLatex(); break; + case LatexRenderer::MmlMethod: renderWithMml(); break; + }; +} + +void LatexRenderer::renderBlocking() +{ + QEventLoop event; + connect(this, SIGNAL(done()), &event, SLOT(quit())); + connect(this, SIGNAL(error()), &event, SLOT(quit())); + + render(); + event.exec(); +} + +void LatexRenderer::renderWithLatex() +{ + kDebug()<<"rendering using latex method"; + QString dir=KGlobal::dirs()->saveLocation("tmp", "cantor/"); + + //Check if the cantor subdir exists, if not, create it + KTemporaryFile *texFile=new KTemporaryFile(); + texFile->setPrefix( "cantor/" ); + texFile->setSuffix( ".tex" ); + texFile->open(); + + QString expressionTex=tex; + expressionTex=expressionTex.arg(d->header); + if(isEquationOnly()) + { + switch(equationType()) + { + case FullEquation: expressionTex=expressionTex.arg(eqnHeader); break; + case InlineEquation: expressionTex=expressionTex.arg(inlineEqnHeader); break; + } + } + expressionTex=expressionTex.arg(d->latexCode); + + kDebug()<<"full tex: "<write(expressionTex.toUtf8()); + texFile->flush(); + + QString fileName = texFile->fileName(); + kDebug()<<"fileName: "<latexFilename=fileName; + d->latexFilename.replace(".tex", ".eps"); + KProcess *p=new KProcess( this ); + p->setWorkingDirectory(dir); + + (*p)<latexCommand()<<"-interaction=batchmode"<<"-halt-on-error"<start(); +} + +void LatexRenderer::convertToPs() +{ + kDebug()<<"converting to ps"; + QString dviFile=d->latexFilename; + dviFile.replace(".eps", ".dvi"); + KProcess *p=new KProcess( this ); + kDebug()<<"running: "<dvipsCommand()<<"-E"<<"-o"<latexFilename<dvipsCommand()<<"-E"<<"-o"<latexFilename<start(); +} + +void LatexRenderer::convertingDone() +{ + kDebug()<<"rendered file "<latexFilename; + //cleanup the temp directory a bit... + QString dir=KGlobal::dirs()->saveLocation("tmp", "cantor/"); + QStringList unneededExtensions; + unneededExtensions<<".log"<<".aux"<<".tex"<<".dvi"; + foreach(const QString& ext, unneededExtensions) + { + QString s=d->latexFilename; + s.replace(".eps", ext); + QFile f(s); + //f.remove(); + } + + if(QFileInfo(d->latexFilename).exists()) + { + d->success=true; + emit done(); + }else + { + d->success=false; + setErrorMessage("something is wrong"); + emit error(); + } +} + +void LatexRenderer::renderWithMml() +{ + kDebug()<<"WARNING: MML rendering not implemented yet!"; + emit done(); +} + +#include "latexrenderer.moc" diff -Nru cantor-4.7.3/src/lib/latexrenderer.h cantor-4.7.90/src/lib/latexrenderer.h --- cantor-4.7.3/src/lib/latexrenderer.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/lib/latexrenderer.h 2011-09-26 09:43:34.000000000 +0000 @@ -0,0 +1,78 @@ +/* + 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. + + --- + Copyright (C) 2011 Alexander Rieder + */ + +#ifndef _LATEXRENDERER_H +#define _LATEXRENDERER_H + +#include +#include "cantor_export.h" + +namespace Cantor{ +class LatexRendererPrivate; + +class CANTOR_EXPORT LatexRenderer : public QObject +{ + Q_OBJECT + public: + enum Method{ LatexMethod = 0, MmlMethod = 1}; + enum EquationType{ InlineEquation = 0, FullEquation = 1}; + LatexRenderer( QObject* parent = 0); + ~LatexRenderer(); + + QString latexCode() const; + void setLatexCode(const QString& src); + QString header() const; + void addHeader(const QString& header); + void setHeader(const QString& header); + Method method() const; + void setMethod( Method method); + void setEquationOnly(bool isEquationOnly); + bool isEquationOnly() const; + void setEquationType(EquationType type); + EquationType equationType() const; + + QString errorMessage() const; + bool renderingSuccessful() const; + + QString imagePath() const; + + Q_SIGNALS: + void done(); + void error(); + + public slots: + void render(); + + void renderBlocking(); + + private: + void setErrorMessage(const QString& msg); + + private Q_SLOTS: + void renderWithLatex(); + void renderWithMml(); + void convertToPs(); + void convertingDone(); + + private: + LatexRendererPrivate* d; +}; +} +#endif /* _LATEXRENDERER_H */ diff -Nru cantor-4.7.3/src/lib/panelpluginhandler.cpp cantor-4.7.90/src/lib/panelpluginhandler.cpp --- cantor-4.7.3/src/lib/panelpluginhandler.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/lib/panelpluginhandler.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -22,7 +22,6 @@ using namespace Cantor; #include -#include #include #include #include diff -Nru cantor-4.7.3/src/loadedexpression.cpp cantor-4.7.90/src/loadedexpression.cpp --- cantor-4.7.3/src/loadedexpression.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/loadedexpression.cpp 2011-07-27 18:37:50.000000000 +0000 @@ -68,7 +68,7 @@ const KArchiveFile* imageFile=static_cast(imageEntry); QString dir=KGlobal::dirs()->saveLocation("tmp", "cantor/"); imageFile->copyTo(dir); - KUrl imageUrl=dir+'/'+imageFile->name(); + KUrl imageUrl=QString(dir+QLatin1Char('/')+imageFile->name()); if(type=="latex") { result=new Cantor::LatexResult(resultElement.text(), imageUrl); diff -Nru cantor-4.7.3/src/main.cpp cantor-4.7.90/src/main.cpp --- cantor-4.7.3/src/main.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/main.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -28,7 +28,7 @@ static const char description[] = I18N_NOOP("KDE Frontend to mathematical applications"); -static const char version[] = "0.2"; +static const char version[] = "0.3"; int main(int argc, char **argv) { @@ -36,7 +36,7 @@ ki18n("Cantor"), version, ki18n(description), KAboutData::License_GPL, - ki18n("(C) 2009-2010 Alexander Rieder"), + ki18n("(C) 2009-2011 Alexander Rieder"), KLocalizedString(), 0 ); about.addAuthor( ki18n("Alexander Rieder"), KLocalizedString(), "alexanderrieder@gmail.com" ); diff -Nru cantor-4.7.3/src/pagebreakentry.cpp cantor-4.7.90/src/pagebreakentry.cpp --- cantor-4.7.3/src/pagebreakentry.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/pagebreakentry.cpp 2011-07-27 18:37:50.000000000 +0000 @@ -0,0 +1,180 @@ +/* + 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. + + --- + Copyright (C) 2011 Martin Kuettler + */ + +#include "pagebreakentry.h" +#include "worksheet.h" + +#include +#include +#include +#include + +PageBreakEntry::PageBreakEntry(QTextCursor position, Worksheet* parent) : + WorksheetEntry( position, parent ) +{ + QTextFrameFormat frameFormat = m_frame->frameFormat(); + + frameFormat.setBorderStyle(QTextFrameFormat::BorderStyle_None); + frameFormat.setPageBreakPolicy(QTextFormat::PageBreak_AlwaysAfter); + + m_frame->setFrameFormat(frameFormat); + + // do I need to call this? + update(); +} + +PageBreakEntry::~PageBreakEntry() +{ + +} + +int PageBreakEntry::type() +{ + return Type; +} + +bool PageBreakEntry::isEmpty() +{ + return true; +} + + +QTextCursor PageBreakEntry::closestValidCursor(const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + return firstValidCursorPosition(); +} + +QTextCursor PageBreakEntry::firstValidCursorPosition() +{ + return m_frame->lastCursorPosition(); +} + +QTextCursor PageBreakEntry::lastValidCursorPosition() +{ + return m_frame->lastCursorPosition(); +} + +bool PageBreakEntry::isValidCursor(const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + return false; +} + +bool PageBreakEntry::worksheetKeyPressEvent(QKeyEvent* event, const QTextCursor& cursor) +{ + if (WorksheetEntry::worksheetKeyPressEvent(event, cursor)) + return true; + + // Are there any other keys we should allow here? + return true; +} + +bool PageBreakEntry::worksheetContextMenuEvent(QContextMenuEvent* event, const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + KMenu* defaultMenu = new KMenu(m_worksheet); + + if(!m_worksheet->isRunning()) + defaultMenu->addAction(KIcon("system-run"),i18n("Evaluate Worksheet"),m_worksheet,SLOT(evaluate()),0); + else + defaultMenu->addAction(KIcon("process-stop"),i18n("Interrupt"),m_worksheet,SLOT(interrupt()),0); + defaultMenu->addSeparator(); + + defaultMenu->addAction(KIcon("edit-delete"),i18n("Remove Entry"), m_worksheet, SLOT(removeCurrentEntry())); + + createSubMenuInsert(defaultMenu); + + defaultMenu->popup(event->globalPos()); + + return true; +} + + +bool PageBreakEntry::acceptRichText() +{ + return false; +} + +bool PageBreakEntry::acceptsDrop(const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + return false; +} + +void PageBreakEntry::setContent(const QString& content) +{ + Q_UNUSED(content); + return; +} + +void PageBreakEntry::setContent(const QDomElement& content, const KZip& file) +{ + Q_UNUSED(content); + Q_UNUSED(file); + return; +} + +QDomElement PageBreakEntry::toXml(QDomDocument& doc, KZip* archive) +{ + Q_UNUSED(archive); + + QDomElement pgbrk = doc.createElement("PageBreak"); + return pgbrk; +} + +QString PageBreakEntry::toPlain(QString& commandSep, QString& commentStartingSeq, QString& commentEndingSeq) +{ + Q_UNUSED(commandSep); + + return commentStartingSeq + "page break" + commentEndingSeq; + +} + + +void PageBreakEntry::interruptEvaluation() +{ + return; +} + +bool PageBreakEntry::evaluate(bool current) +{ + Q_UNUSED(current); + return true; +} + +void PageBreakEntry::update() +{ + QTextCursor cursor(m_frame->firstCursorPosition()); + cursor.setPosition(m_frame->lastPosition(), QTextCursor::KeepAnchor); + cursor.removeSelectedText(); + + if (not m_worksheet->isPrinting()) + { + QTextBlockFormat block(cursor.blockFormat()); + block.setAlignment(Qt::AlignCenter); + cursor.setBlockFormat(block); + KColorScheme color = KColorScheme( QPalette::Normal, KColorScheme::View); + QTextCharFormat cformat(cursor.charFormat()); + cformat.setForeground(color.foreground(KColorScheme::InactiveText)); + + cursor.insertText("--- Page Break ---", cformat); + } +} diff -Nru cantor-4.7.3/src/pagebreakentry.h cantor-4.7.90/src/pagebreakentry.h --- cantor-4.7.3/src/pagebreakentry.h 1970-01-01 00:00:00.000000000 +0000 +++ cantor-4.7.90/src/pagebreakentry.h 2011-07-27 18:37:50.000000000 +0000 @@ -0,0 +1,72 @@ +/* + 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. + + --- + Copyright (C) 2011 Martin Kuettler + */ + +#ifndef _PAGEBREAKENTRY_H +#define _PAGEBREAKENTRY_H + +#include "worksheetentry.h" +#include + +class Worksheet; +class WorksheetEntry; + +/** + An entry in the worksheet that tells the printer to insert a page break. + **/ + +class PageBreakEntry : public WorksheetEntry +{ + Q_OBJECT + public: + + PageBreakEntry(QTextCursor position, Worksheet* parent); + ~PageBreakEntry(); + + enum {Type = 3}; + int type(); + + bool isEmpty(); + + QTextCursor closestValidCursor(const QTextCursor& cursor); + QTextCursor firstValidCursorPosition(); + QTextCursor lastValidCursorPosition(); + bool isValidCursor(const QTextCursor& cursor); + + bool worksheetKeyPressEvent(QKeyEvent* event, const QTextCursor& cursor); + bool worksheetContextMenuEvent(QContextMenuEvent* event, const QTextCursor& cursor); + + bool acceptRichText(); + bool acceptsDrop(const QTextCursor& cursor); + + void setContent(const QString& content); + void setContent(const QDomElement& content, const KZip& file); + + QDomElement toXml(QDomDocument& doc, KZip* archive); + QString toPlain(QString& commandSep, QString& commentStartingSeq, QString& commentEndingSeq); + + void interruptEvaluation(); + + bool evaluate(bool current); + + public slots: + void update(); +}; + +#endif /* _PAGEBREAKENTRY_H */ diff -Nru cantor-4.7.3/src/panelplugins/helppanel/helppanelplugin.desktop cantor-4.7.90/src/panelplugins/helppanel/helppanelplugin.desktop --- cantor-4.7.3/src/panelplugins/helppanel/helppanelplugin.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/panelplugins/helppanel/helppanelplugin.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon= Name=Help +Name[bg]=Помощ Name[ca]=Ajuda Name[ca@valencia]=Ajuda Name[cs]=Nápověda @@ -13,9 +14,9 @@ Name[eu]=Laguntza Name[fr]=Aide Name[gl]=Axuda +Name[hu]=Súgó Name[it]=Aiuto Name[km]=ជំនួយ -Name[lv]=Palīdzība Name[nb]=Hjelp Name[nds]=Hülp Name[nl]=Help @@ -30,6 +31,7 @@ Name[ug]=ياردەم Name[uk]=Довідка Name[x-test]=xxHelpxx +Name[zh_CN]=帮助 Name[zh_TW]=說明 X-KDE-ServiceTypes=Cantor/PanelPlugin X-KDE-Library=cantor_helppanelplugin @@ -37,6 +39,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=A panel to display help +Comment[bg]=Панел за показване на помощ Comment[ca]=Un plafó per mostrar les pàgines d'ajuda Comment[ca@valencia]=Un plafó per mostrar les pàgines d'ajuda Comment[cs]=Panel pro zobrazení nápovědy @@ -48,9 +51,9 @@ Comment[eu]=Laguntza bistaratzeko panel bat Comment[fr]=Un panneau pour afficher de l'aide Comment[gl]=Un panel que mostra axuda +Comment[hu]=Egy panel súgó megjelenítésére Comment[it]=Un pannello per visualizzare aiuto Comment[km]=ផ្ទាំង​សម្រាប់​បង្ហាញ​ជំនួយ -Comment[lv]=Panelis palīdzības parādīšanai Comment[nb]=Et panel for å vise hjelp Comment[nds]=En Hülppaneel Comment[nl]=Een paneel om help te tonen @@ -61,8 +64,8 @@ Comment[sl]=Podokno za prikaz pomoči Comment[sv]=En panel för att visa hjälp Comment[th]=แถบพาแนลเพื่อแสดงความช่วยเหลือ -Comment[ug]=ياردەم ئۇچۇرلىرىنى كۆرسىتىدىغان كۆزنەك Comment[uk]=Панель для показу довідки Comment[x-test]=xxA panel to display helpxx +Comment[zh_CN]=显示帮助的面板 Comment[zh_TW]=顯示說明的面板 RequiredExtensions= diff -Nru cantor-4.7.3/src/panelplugins/variablemgr/variablemanagerplugin.desktop cantor-4.7.90/src/panelplugins/variablemgr/variablemanagerplugin.desktop --- cantor-4.7.3/src/panelplugins/variablemgr/variablemanagerplugin.desktop 2011-10-28 07:43:04.000000000 +0000 +++ cantor-4.7.90/src/panelplugins/variablemgr/variablemanagerplugin.desktop 2011-12-02 21:17:55.000000000 +0000 @@ -2,6 +2,7 @@ Type=Service Icon= Name=Variable Manager +Name[bg]=Управление на променливи Name[ca]=Gestor de variables Name[ca@valencia]=Gestor de variables Name[cs]=Správce proměnných @@ -13,9 +14,9 @@ Name[eu]=Aldagaien kudeatzailea Name[fr]=Gestionnaire de variables Name[gl]=Xestor de variábeis +Name[hu]=Változókezelő Name[it]=Gestore Name[km]=កម្មវិធី​គ្រប់​គ្រង​អថេរ -Name[lv]=Mainīgo pārvaldnieks Name[nb]=Variabelhåndtering Name[nds]=Variabelnpleger Name[nl]=Beheerder van variabelen @@ -27,9 +28,9 @@ Name[sl]=Upravljalnik spremenljivk Name[sv]=Variabelhantering Name[th]=ตัวจัดการตัวแปร -Name[ug]=ئۆزگەرگۈچى باشقۇرغۇ Name[uk]=Керування змінними Name[x-test]=xxVariable Managerxx +Name[zh_CN]=变量管理器 Name[zh_TW]=變數管理員 X-KDE-ServiceTypes=Cantor/PanelPlugin X-KDE-Library=cantor_variablemanagerplugin @@ -37,6 +38,7 @@ X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL Comment=A panel to manage the variables of a session +Comment[bg]=Панел за управление променливите на сесията Comment[ca]=Un plafó per gestionar les variables d'una sessió Comment[ca@valencia]=Un plafó per gestionar les variables d'una sessió Comment[cs]=Panel pro správu proměnných sezení @@ -48,9 +50,9 @@ Comment[eu]=Saio baten aldagaiak kudeatzeko panel bat Comment[fr]=Un panneau pour gérer les variables d'une session Comment[gl]=Un panel para xestionar as variábeis dunha sesión +Comment[hu]=Egy panel a munkamenet változóinak kezelésére Comment[it]=Un pannello per gestire le variabili di una sessione Comment[km]=ផ្ទាំង​សម្រាប់​គ្រប់​គ្រង​អថេរ​របស់​សម័យ -Comment[lv]=Panelis sesijas mainīgo pārvaldīšanai Comment[nb]=Et panel for å håndtere variablene i en økt Comment[nds]=En Paneel för de Törnvariabelnpleeg Comment[nl]=Een paneel om de variabelen van een sessie te beheren @@ -61,8 +63,8 @@ Comment[sl]=Podokno za upravljanje spremenljivk v seji Comment[sv]=En panel för att hantera variablerna i en session Comment[th]=แถบพาแนลเพื่อจัดการตัวแปรของวาระ -Comment[ug]=ئەڭگىمە ئۆزگەرگۈچىلىرىنى باشقۇرىدىغان كۆزنەك Comment[uk]=Панель керування змінними сеансу Comment[x-test]=xxA panel to manage the variables of a sessionxx +Comment[zh_CN]=管理会话中变量的面板 Comment[zh_TW]=管理工作階段內的變數的面板 RequiredExtensions=VariableManagementExtension diff -Nru cantor-4.7.3/src/resultproxy.cpp cantor-4.7.90/src/resultproxy.cpp --- cantor-4.7.3/src/resultproxy.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/resultproxy.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -127,14 +127,49 @@ //private result specific rendering methods QTextCharFormat ResultProxy::renderEps(Cantor::Result* result) { -#ifdef LIBSPECTRE_FOUND + double scale; + if(m_useHighRes) + scale=1.2*4.0; //1.2 scaling factor, to make it look nice, 4x for high resolution + else + scale=1.8*m_scale; + QTextImageFormat epsCharFormat; + KUrl url=result->data().toUrl(); + + QSize s; + bool success=renderEpsToResource(url, &s); + + KUrl internal=url; + internal.setProtocol("internal"); + if(success) + { + epsCharFormat.setName(internal.url()); + if(m_useHighRes) + { + epsCharFormat.setWidth(s.width()*1.2); + epsCharFormat.setHeight(s.height()*1.2); + } + else + { + epsCharFormat.setWidth(s.width()*scale); + epsCharFormat.setHeight(s.height()*scale); + } + } + + return epsCharFormat; +} + +bool ResultProxy::renderEpsToResource(const KUrl& url, QSize* size) +{ +#ifdef LIBSPECTRE_FOUND SpectreDocument* doc=spectre_document_new();; SpectreRenderContext* rc=spectre_render_context_new(); - KUrl url=result->data().toUrl(); kDebug()<<"rendering eps file: "<addResource(QTextDocument::ImageResource, url, QVariant(img) ); - epsCharFormat.setName(url.url()); - if(m_useHighRes) - { - epsCharFormat.setWidth(w*1.2); - epsCharFormat.setHeight(h*1.2); - } - else - { - epsCharFormat.setWidth(w*scale); - epsCharFormat.setHeight(h*scale); - } - + m_document->addResource(QTextDocument::ImageResource, internal, QVariant(img) ); spectre_document_free(doc); spectre_render_context_free(rc); - return epsCharFormat; + if(size) + *size=QSize(w, h); + + return true; #else - Q_UNUSED(result); - return QTextFormat().toCharFormat(); + return false; #endif - } QTextCharFormat ResultProxy::renderGif(Cantor::Result* result) diff -Nru cantor-4.7.3/src/resultproxy.h cantor-4.7.90/src/resultproxy.h --- cantor-4.7.3/src/resultproxy.h 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/resultproxy.h 2011-09-26 09:43:34.000000000 +0000 @@ -23,6 +23,8 @@ #include #include +#include +#include namespace Cantor { @@ -48,6 +50,10 @@ qreal scale(); void useHighResolution(bool use); + + //this doesn't belong here! + bool renderEpsToResource(const KUrl& url, QSize* size = 0); + private: QTextCharFormat renderEps(Cantor::Result* result); QTextCharFormat renderGif(Cantor::Result* result); diff -Nru cantor-4.7.3/src/settings.ui cantor-4.7.90/src/settings.ui --- cantor-4.7.3/src/settings.ui 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/settings.ui 2011-11-17 20:56:23.000000000 +0000 @@ -7,7 +7,7 @@ 0 0 398 - 288 + 400 diff -Nru cantor-4.7.3/src/textentry.cpp cantor-4.7.90/src/textentry.cpp --- cantor-4.7.3/src/textentry.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/textentry.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -21,14 +21,24 @@ #include "textentry.h" #include "worksheetentry.h" #include "worksheet.h" +#include "resultproxy.h" #include "lib/defaulthighlighter.h" +#include "lib/latexrenderer.h" + +#include "formulatextobject.h" #include #include #include +#include #include #include +#include +#include +#include +#include +#include TextEntry::TextEntry(QTextCursor position, Worksheet* parent ) : WorksheetEntry( position, parent ) @@ -79,6 +89,19 @@ return cursor.selection().isEmpty(); } +bool TextEntry::worksheetMouseDoubleClickEvent(QMouseEvent* event, const QTextCursor& cursor) +{ + QTextCursor c=cursor; + + for(int pos=cursor.selectionStart()+1;pos<=cursor.selectionEnd();pos++) + { + c.setPosition(pos); + if (c.charFormat().objectType() == FormulaTextObject::FormulaTextFormat) + showLatexCode(c); + } + return true; +} + bool TextEntry::acceptRichText() { return true; @@ -91,6 +114,32 @@ return true; } +bool TextEntry::worksheetContextMenuEvent(QContextMenuEvent* event, const QTextCursor& cursor) +{ + Q_UNUSED(cursor); + KMenu* defaultMenu = new KMenu(m_worksheet); + + defaultMenu->addAction(KStandardAction::cut(m_worksheet)); + defaultMenu->addAction(KStandardAction::copy(m_worksheet)); + defaultMenu->addAction(KStandardAction::paste(m_worksheet)); + defaultMenu->addSeparator(); + + if(!m_worksheet->isRunning()) + defaultMenu->addAction(KIcon("system-run"),i18n("Evaluate Worksheet"),m_worksheet,SLOT(evaluate()),0); + else + defaultMenu->addAction(KIcon("process-stop"),i18n("Interrupt"),m_worksheet,SLOT(interrupt()),0); + defaultMenu->addSeparator(); + + defaultMenu->addAction(KIcon("edit-delete"),i18n("Remove Entry"), m_worksheet, SLOT(removeCurrentEntry())); + + createSubMenuInsert(defaultMenu); + + defaultMenu->popup(event->globalPos()); + + return true; +} + + void TextEntry::setContent(const QString& content) { firstValidCursorPosition().insertText(content); @@ -114,14 +163,34 @@ { Q_UNUSED(archive); - QTextCursor cursor = firstValidCursorPosition(); + bool needsEval=false; + //make sure that the latex code is shown instead of the rendered formulas + QTextCursor cursor = m_worksheet->document()->find(QString(QChar::ObjectReplacementCharacter), m_frame->firstCursorPosition()); + while(!cursor.isNull()&&cursor.position()<=m_frame->lastPosition()) + { + QTextCharFormat format=cursor.charFormat(); + if (format.objectType() == FormulaTextObject::FormulaTextFormat) + { + showLatexCode(cursor); + needsEval=true; + } + + cursor = m_worksheet->document()->find(QString(QChar::ObjectReplacementCharacter), cursor); + } + + + cursor = firstValidCursorPosition(); cursor.setPosition(lastValidPosition(), QTextCursor::KeepAnchor); + const QString& html = cursor.selection().toHtml(); kDebug() << html; QDomElement el = doc.createElement("Text"); QDomDocument myDoc = QDomDocument(); myDoc.setContent(html); el.appendChild(myDoc.documentElement().firstChildElement("body")); + + if(needsEval) + evaluate(false); return el; } @@ -147,10 +216,120 @@ bool TextEntry::evaluate(bool current) { Q_UNUSED(current); + + QTextDocument *doc = m_frame->document(); + //blahtex::Interface *translator = m_worksheet->translator(); + + QTextCursor cursor = findLatexCode(doc); + while (!cursor.isNull()) + { + QString latexCode = cursor.selectedText(); + kDebug()<<"found latex: "<setLatexCode(latexCode); + renderer->setEquationOnly(true); + renderer->setEquationType(Cantor::LatexRenderer::InlineEquation); + renderer->setMethod(Cantor::LatexRenderer::LatexMethod); + + renderer->renderBlocking(); + +#if 0 + QTextCharFormat mmlCharFormat; + mmlCharFormat.setObjectType(MmlTextObject::MmlTextFormat); + mmlCharFormat.setProperty(MmlTextObject::LatexCode, latexCode); + + if (!translator->ProcessInput(latexCode.toStdWString())) + break; + QString mmlCode = QString::fromStdWString(translator->GetMathml()); + kDebug() << mmlCode; + if (mmlCode.isEmpty()) + break; + + QtMmlDocument renderer; + renderer.setBaseFontPointSize(cursor.charFormat().fontPointSize()); + renderer.setFontName(QtMmlWidget::NormalFont, "STIXGeneral"); + renderer.setContent(mmlCode); + + QImage mmlBufferImage(renderer.size(), QImage::Format_ARGB32); + mmlBufferImage.fill(QColor(0, 0, 0, 0).value()); + QPainter painter(&mmlBufferImage); + renderer.paint(&painter, mmlBufferImage.rect().topLeft ()); + + mmlCharFormat.setProperty(MmlTextObject::MmlData, mmlBufferImage); + + cursor.removeSelectedText(); + cursor.insertText(QString(QChar::ObjectReplacementCharacter), mmlCharFormat); + +#endif + + bool success=m_worksheet->resultProxy()->renderEpsToResource(renderer->imagePath()); + kDebug()<<"rendering successfull? "<imagePath(); + KUrl internal=KUrl(path); + internal.setProtocol("internal"); + kDebug()<<"int: "<imagePath()); + formulaFormat.setProperty( FormulaTextObject::ResourceUrl, internal); + formulaFormat.setProperty( FormulaTextObject::LatexCode, latexCode); + formulaFormat.setProperty( FormulaTextObject::FormulaType, renderer->method()); + + cursor.insertText(QString(QChar::ObjectReplacementCharacter), formulaFormat); + delete renderer; + + cursor = findLatexCode(doc); + + } + return true; } void TextEntry::update() { - + QTextCursor cursor = m_worksheet->document()->find(QString(QChar::ObjectReplacementCharacter), m_frame->firstCursorPosition()); + while(!cursor.isNull()&&cursor.position()<=m_frame->lastPosition()) + { + QTextCharFormat format=cursor.charFormat(); + if (format.objectType() == FormulaTextObject::FormulaTextFormat) + { + kDebug()<<"found a formula... rendering the eps..."; + QUrl url=qVariantValue(format.property(FormulaTextObject::Data)); + bool success=m_worksheet->resultProxy()->renderEpsToResource(url); + kDebug()<<"rendering successfull? "<document()->find(QString(QChar::ObjectReplacementCharacter), cursor); + } +} + +QTextCursor TextEntry::findLatexCode(QTextDocument *doc) const +{ + QTextCursor startCursor = doc->find("$$"); + if (startCursor.isNull()) + return startCursor; + const QTextCursor endCursor = doc->find("$$", startCursor); + if (endCursor.isNull()) + return endCursor; + startCursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::MoveAnchor, 2); + startCursor.setPosition(endCursor.position(), QTextCursor::KeepAnchor); + return startCursor; +} + +void TextEntry::showLatexCode(QTextCursor cursor) +{ + QString latexCode = qVariantValue(cursor.charFormat().property(FormulaTextObject::LatexCode)); + cursor.deletePreviousChar(); + cursor.insertText("$$"+latexCode+"$$"); } diff -Nru cantor-4.7.3/src/textentry.h cantor-4.7.90/src/textentry.h --- cantor-4.7.3/src/textentry.h 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/textentry.h 2011-09-26 09:43:34.000000000 +0000 @@ -45,6 +45,9 @@ QTextCursor lastValidCursorPosition(); bool isValidCursor(const QTextCursor& cursor); + bool worksheetContextMenuEvent(QContextMenuEvent* event, const QTextCursor& cursor); + bool worksheetMouseDoubleClickEvent(QMouseEvent* event, const QTextCursor& cursor); + bool acceptRichText(); bool acceptsDrop(const QTextCursor& cursor); @@ -59,6 +62,10 @@ bool evaluate(bool current); public slots: void update(); + private: + QTextCursor findLatexCode(QTextDocument *doc) const; + void showLatexCode(QTextCursor cursor); + }; #endif /* _TEXTENTRY_H */ diff -Nru cantor-4.7.3/src/worksheet.cpp cantor-4.7.90/src/worksheet.cpp --- cantor-4.7.3/src/worksheet.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/worksheet.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -32,6 +32,9 @@ #include "worksheetentry.h" #include "commandentry.h" #include "textentry.h" +#include "imageentry.h" +#include "pagebreakentry.h" +#include "latexentry.h" #include "resultproxy.h" #include "animationhandler.h" @@ -61,6 +64,7 @@ #include "worksheet.h" #include "settings.h" +#include "formulatextobject.h" Worksheet::Worksheet(Cantor::Backend* backend, QWidget* parent) : KRichTextWidget(parent) @@ -84,7 +88,9 @@ m_proxy=new ResultProxy(document()); document()->documentLayout()->registerHandler(QTextFormat::ImageObject, new AnimationHandler(document())); + document()->documentLayout()->registerHandler(FormulaTextObject::FormulaTextFormat, new FormulaTextObject()); + m_isPrinting=false; //postpone login, until everything is set up correctly m_loginFlag=true; QTimer::singleShot(0, this, SLOT(loginToSession())); @@ -118,18 +124,26 @@ void Worksheet::print( QPrinter* printer ) { m_proxy->useHighResolution(true); + m_isPrinting = true; foreach(WorksheetEntry* e, m_entries) e->update(); KTextEdit::print(printer); + m_isPrinting = false; + m_proxy->useHighResolution(false); foreach(WorksheetEntry* e, m_entries) e->update(); } +bool Worksheet::isPrinting() +{ + return m_isPrinting; +} + bool Worksheet::event(QEvent* event) { if (event->type() == QEvent::ShortcutOverride) @@ -203,14 +217,9 @@ const QTextCursor cursor = cursorForPosition(event->pos()); WorksheetEntry* entry = entryAt(cursor); - if (entry) - { - if (!entry->worksheetContextMenuEvent(event, cursor)) - KRichTextWidget::contextMenuEvent(event); - if (entry != m_currentEntry) - setCurrentEntry(entry); - } - else + if (entry && entry != m_currentEntry) + setCurrentEntry(entry); + if (!entry || !entry->worksheetContextMenuEvent(event, cursor)) { KMenu* defaultMenu = new KMenu(this); @@ -225,6 +234,9 @@ { defaultMenu->addAction(i18n("Append Command Entry"),this,SLOT(appendCommandEntry()),0); defaultMenu->addAction(i18n("Append Text Entry"),this,SLOT(appendTextEntry()),0); + defaultMenu->addAction(i18n("Append Latex Entry"),this,SLOT(appendLatexEntry()),0); + defaultMenu->addAction(i18n("Append Image"),this,SLOT(appendImageEntry()),0); + defaultMenu->addAction(i18n("Append Page Break"),this,SLOT(appendPageBreakEntry()),0); } else @@ -232,6 +244,9 @@ setCurrentEntry(entryNextTo(cursor)); defaultMenu->addAction(i18n("Insert Command Entry"),this,SLOT(insertCommandEntryBefore()),0); defaultMenu->addAction(i18n("Insert Text Entry"),this,SLOT(insertTextEntryBefore()),0); + defaultMenu->addAction(i18n("Insert Latex Entry"),this,SLOT(insertLatexEntryBefore()),0); + defaultMenu->addAction(i18n("Insert Image"),this,SLOT(insertImageEntryBefore()),0); + defaultMenu->addAction(i18n("Insert Page Break"),this,SLOT(insertPageBreakEntryBefore()),0); } defaultMenu->popup(event->globalPos()); @@ -367,14 +382,23 @@ switch(type) { - case (TextEntry::Type): - entry = new TextEntry(cursor, this); - break; - case (CommandEntry::Type): - entry = new CommandEntry(cursor, this); - break; - default: - entry = 0; + case TextEntry::Type: + entry = new TextEntry(cursor, this); + break; + case CommandEntry::Type: + entry = new CommandEntry(cursor, this); + break; + case ImageEntry::Type: + entry = new ImageEntry(cursor, this); + break; + case PageBreakEntry::Type: + entry = new PageBreakEntry(cursor, this); + break; + case LatexEntry::Type: + entry = new LatexEntry(cursor,this); + break; + default: + entry = 0; } return entry; @@ -416,6 +440,22 @@ return appendEntry(TextEntry::Type); } + +WorksheetEntry* Worksheet::appendPageBreakEntry() +{ + return appendEntry(PageBreakEntry::Type); +} + +WorksheetEntry* Worksheet::appendImageEntry() +{ + return appendEntry(ImageEntry::Type); +} + +WorksheetEntry* Worksheet::appendLatexEntry() +{ + return appendEntry(LatexEntry::Type); +} + void Worksheet::appendCommandEntry(const QString& text) { WorksheetEntry* entry=m_entries.last(); @@ -461,11 +501,26 @@ return insertEntry(TextEntry::Type); } +WorksheetEntry* Worksheet::insertImageEntry() +{ + return insertEntry(ImageEntry::Type); +} + WorksheetEntry* Worksheet::insertCommandEntry() { return insertEntry(CommandEntry::Type); } +WorksheetEntry* Worksheet::insertPageBreakEntry() +{ + return insertEntry(PageBreakEntry::Type); +} + +WorksheetEntry* Worksheet::insertLatexEntry() +{ + return insertEntry(LatexEntry::Type); +} + void Worksheet::insertCommandEntry(const QString& text) { WorksheetEntry* entry = insertCommandEntry(); @@ -511,6 +566,21 @@ return insertEntryBefore(CommandEntry::Type); } +WorksheetEntry* Worksheet::insertPageBreakEntryBefore() +{ + return insertEntryBefore(PageBreakEntry::Type); +} + +WorksheetEntry* Worksheet::insertImageEntryBefore() +{ + return insertEntryBefore(ImageEntry::Type); +} + +WorksheetEntry* Worksheet::insertLatexEntryBefore() +{ + return insertEntryBefore(LatexEntry::Type); +} + void Worksheet::interrupt() { m_session->interrupt(); @@ -715,17 +785,18 @@ } - m_session=b->createSession(); - m_loginFlag=true; - QTimer::singleShot(0, this, SLOT(loginToSession())); - - //Set the Highlighting, depending on the current state - //If the session isn't logged in, use the default - enableHighlighting( m_highlighter!=0 || (m_loginFlag && Settings::highlightDefault()) ); + //cleanup the worksheet and all it contains + delete m_session; + m_session=0; + foreach(WorksheetEntry* entry, m_entries) + delete entry; clear(); m_entries.clear(); + m_session=b->createSession(); + m_loginFlag=true; + kDebug()<<"loading entries"; QDomElement expressionChild = root.firstChildElement(); WorksheetEntry* entry; @@ -740,11 +811,35 @@ { entry = appendTextEntry(); entry->setContent(expressionChild, file); + }else if (tag == "Latex") + { + entry = appendLatexEntry(); + entry->setContent(expressionChild, file); } + else if (tag == "PageBreak") + { + entry = appendPageBreakEntry(); + entry->setContent(expressionChild, file); + } + else if (tag == "Image") + { + entry = appendImageEntry(); + entry->setContent(expressionChild, file); + } expressionChild = expressionChild.nextSiblingElement(); } + //login to the session, but let Qt process all the events in its pipeline + //first. + QTimer::singleShot(0, this, SLOT(loginToSession())); + + //Set the Highlighting, depending on the current state + //If the session isn't logged in, use the default + enableHighlighting( m_highlighter!=0 || (m_loginFlag && Settings::highlightDefault()) ); + + + emit sessionChanged(); } diff -Nru cantor-4.7.3/src/worksheetentry.cpp cantor-4.7.90/src/worksheetentry.cpp --- cantor-4.7.3/src/worksheetentry.cpp 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/worksheetentry.cpp 2011-09-26 09:43:34.000000000 +0000 @@ -29,6 +29,7 @@ #include #include +#include WorksheetEntry::WorksheetEntry(QTextCursor position, Worksheet* parent ) : QObject( parent ) { @@ -37,6 +38,8 @@ QTextFrameFormat frameFormat; frameFormat.setBorderStyle(QTextFrameFormat::BorderStyle_Solid); frameFormat.setBorder(1); + frameFormat.setLeftMargin(6); + frameFormat.setRightMargin(6); connect(this, SIGNAL(destroyed(QObject*)), m_worksheet, SLOT(removeEntry(QObject*))); connect(this, SIGNAL(leftmostValidPositionReached()), m_worksheet, SLOT(moveToPreviousEntry())); @@ -217,4 +220,27 @@ } +void WorksheetEntry::createSubMenuInsert(KMenu* menu) +{ + KMenu* subMenuInsert = new KMenu(menu); + KMenu* subMenuInsertBefore = new KMenu(menu); + + subMenuInsert->addAction(i18n("Command Entry"), m_worksheet, SLOT(insertCommandEntry())); + subMenuInsert->addAction(i18n("Text Entry"), m_worksheet, SLOT(insertTextEntry())); + subMenuInsert->addAction(i18n("Image Entry"), m_worksheet, SLOT(insertImageEntry())); + subMenuInsert->addAction(i18n("Page Break"), m_worksheet, SLOT(insertPageBreakEntry())); + + subMenuInsertBefore->addAction(i18n("Command Entry"), m_worksheet, SLOT(insertCommandEntryBefore())); + subMenuInsertBefore->addAction(i18n("Text Entry"), m_worksheet, SLOT(insertTextEntryBefore())); + subMenuInsertBefore->addAction(i18n("Image Entry"), m_worksheet, SLOT(insertImageEntryBefore())); + subMenuInsertBefore->addAction(i18n("Page Break"), m_worksheet, SLOT(insertPageBreakEntryBefore())); + + subMenuInsert->setTitle(i18n("Insert Entry")); + subMenuInsertBefore->setTitle(i18n("Insert Entry Before")); + menu->addSeparator(); + menu->addMenu(subMenuInsert); + menu->addMenu(subMenuInsertBefore); +} + + #include "worksheetentry.moc" diff -Nru cantor-4.7.3/src/worksheetentry.h cantor-4.7.90/src/worksheetentry.h --- cantor-4.7.3/src/worksheetentry.h 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/worksheetentry.h 2011-07-27 18:37:50.000000000 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include #include "lib/expression.h" namespace Cantor{ @@ -99,6 +100,9 @@ virtual void update()=0; protected: + void createSubMenuInsert(KMenu* menu); + + protected: QTextFrame* m_frame; Worksheet* m_worksheet; }; diff -Nru cantor-4.7.3/src/worksheet.h cantor-4.7.90/src/worksheet.h --- cantor-4.7.3/src/worksheet.h 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/worksheet.h 2011-09-26 09:43:34.000000000 +0000 @@ -29,7 +29,6 @@ class Session; class Expression; } -//class QTextCursor; class WorksheetEntry; class ResultProxy; class TextEntry; @@ -50,15 +49,26 @@ void print(QPrinter* printer); + bool isPrinting(); + public slots: WorksheetEntry* appendCommandEntry(); void appendCommandEntry(const QString& text); WorksheetEntry* appendTextEntry(); + WorksheetEntry* appendImageEntry(); + WorksheetEntry* appendPageBreakEntry(); + WorksheetEntry* appendLatexEntry(); WorksheetEntry* insertCommandEntry(); void insertCommandEntry(const QString& text); WorksheetEntry* insertTextEntry(); + WorksheetEntry* insertImageEntry(); + WorksheetEntry* insertPageBreakEntry(); + WorksheetEntry* insertLatexEntry(); WorksheetEntry* insertCommandEntryBefore(); WorksheetEntry* insertTextEntryBefore(); + WorksheetEntry* insertImageEntryBefore(); + WorksheetEntry* insertPageBreakEntryBefore(); + WorksheetEntry* insertLatexEntryBefore(); void setCurrentEntry(WorksheetEntry * entry, bool moveCursor = true); void moveToPreviousEntry(); @@ -129,6 +139,7 @@ bool m_completionEnabled; bool m_showExpressionIds; bool m_loginFlag; + bool m_isPrinting; }; #endif /* _WORKSHEET_H */ diff -Nru cantor-4.7.3/src/xslt/latex.xsl cantor-4.7.90/src/xslt/latex.xsl --- cantor-4.7.3/src/xslt/latex.xsl 2011-10-02 13:23:39.000000000 +0000 +++ cantor-4.7.90/src/xslt/latex.xsl 2011-07-27 18:37:50.000000000 +0000 @@ -27,6 +27,22 @@ \end{verbatim} + + + \newpage{} + + + + +\begin{center} +\includegraphics + +{ + +} \end{center} + + + @@ -60,4 +76,4 @@ - \ No newline at end of file +