From 82f5d5efd7fd8dcea0865bb24ec206416cf15992 Mon Sep 17 00:00:00 2001 From: koldo Date: Mon, 18 Dec 2017 12:53:57 +0000 Subject: [PATCH] ScatterCtrl: Some fixes and improvements git-svn-id: svn://ultimatepp.org/upp/trunk@11577 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ScatterCtrl/PieCtrl.cpp | 55 +++++- uppsrc/ScatterCtrl/PieCtrl.h | 8 + uppsrc/ScatterCtrl/Properties.cpp | 175 ++++++++++++++----- uppsrc/ScatterCtrl/Properties.h | 13 +- uppsrc/ScatterCtrl/ScatterCtrl.cpp | 55 +++--- uppsrc/ScatterCtrl/ScatterCtrl.h | 39 +++-- uppsrc/ScatterCtrl/ScatterCtrl.lay | 200 +++++++++++----------- uppsrc/ScatterCtrl/ScatterCtrl.t | 251 ++++++++++++++++++---------- uppsrc/ScatterCtrl/ScatterCtrlX.cpp | 3 +- 9 files changed, 539 insertions(+), 260 deletions(-) diff --git a/uppsrc/ScatterCtrl/PieCtrl.cpp b/uppsrc/ScatterCtrl/PieCtrl.cpp index 7d8a66c1f..935cd8acd 100644 --- a/uppsrc/ScatterCtrl/PieCtrl.cpp +++ b/uppsrc/ScatterCtrl/PieCtrl.cpp @@ -1,5 +1,9 @@ #include "PieCtrl.h" +#define IMAGECLASS PieImg +#define IMAGEFILE +#include + PieCtrl::PieCtrl() : copyRatio(1) { Transparent(); @@ -22,7 +26,7 @@ void PieCtrl::SaveToClipboard(bool saveAsMetafile) GuiLock __; if (saveAsMetafile) { WinMetaFileDraw wmfd; - wmfd.Create(copyRatio*GetSize().cx, copyRatio*GetSize().cy, "ScatterCtrl", "chart"); + wmfd.Create(copyRatio*GetSize().cx, copyRatio*GetSize().cy, "Pie", "PieChart"); PaintPie(wmfd, copyRatio); WinMetaFile wmf = wmfd.Close(); wmf.WriteClipboard(); @@ -47,3 +51,52 @@ void PieCtrl::Paint(Draw& w) { PaintPie(w, 1); } + +void PieCtrl::RightDown(Point, dword) { + MenuBar::Execute(THISBACK(ContextMenu)); +} + +void PieCtrl::ContextMenu(Bar& bar) +{ + bar.Add(t_("Copy"), PieImg::Copy(), THISBACK1(SaveToClipboard, false)).Key(K_CTRL_C) + .Help(t_("Copy image to clipboard")); + bar.Add(t_("Save to file"), PieImg::Save(), THISBACK1(SaveToFile, Null)).Key(K_CTRL_S) + .Help(t_("Save image to file")); +} + +void PieCtrl::OnFileToSave() { + String name = ~fileToSave; + int ext = fileToSave.GetActiveType(); + if (ext == 0) + fileToSave.file = ForceExt(name, ".jpg"); + else + fileToSave.file = ForceExt(name, ".png"); +} + +void PieCtrl::SaveToFile(String fileName) +{ + GuiLock __; + if (IsNull(fileName)) { + String name = GetTitle(); + if (name.IsEmpty()) + name = t_("Pie plot"); + fileToSave.PreSelect(ForceExt(name, ".jpg")); + fileToSave.ClearTypes(); + fileToSave.Type(Format(t_("%s file"), "JPEG"), "*.jpg"); + fileToSave.Type(Format(t_("%s file"), "PNG"), "*.png"); + fileToSave.type.WhenAction = THISBACK(OnFileToSave); + if(!fileToSave.ExecuteSaveAs(t_("Saving plot to PNG or JPEG file"))) { + Exclamation(t_("Plot has not been saved")); + return; + } + fileName = ~fileToSave; + } + if (GetFileExt(fileName) == ".png") { + PNGEncoder encoder; + encoder.SaveFile(fileName, GetImage(copyRatio)); + } else if (GetFileExt(fileName) == ".jpg") { + JPGEncoder encoder(90); + encoder.SaveFile(fileName, GetImage(copyRatio)); + } else + Exclamation(Format(t_("File format \"%s\" not found"), GetFileExt(fileName))); +} \ No newline at end of file diff --git a/uppsrc/ScatterCtrl/PieCtrl.h b/uppsrc/ScatterCtrl/PieCtrl.h index 9b7dd8494..e60888783 100644 --- a/uppsrc/ScatterCtrl/PieCtrl.h +++ b/uppsrc/ScatterCtrl/PieCtrl.h @@ -3,6 +3,7 @@ #include #include +#include using namespace Upp; @@ -19,13 +20,20 @@ public: void SaveAsMetafile(const char* file); void SaveToClipboard(bool saveAsMetafile); + void SaveToFile(String fileName = Null); PieCtrl& SetCopyRatio(int ratio) {copyRatio = ratio; return *this;} int GetCopyRatio() {return copyRatio;} + virtual void RightDown(Point, dword); + void ContextMenu(Bar& bar); + private: int copyRatio; + FileSel fileToSave; + void OnFileToSave(); + public: PieCtrl& SetTitle(const String& title) {PieDraw::SetTitle(title); return *this;} diff --git a/uppsrc/ScatterCtrl/Properties.cpp b/uppsrc/ScatterCtrl/Properties.cpp index 62bc291be..78747dcd2 100644 --- a/uppsrc/ScatterCtrl/Properties.cpp +++ b/uppsrc/ScatterCtrl/Properties.cpp @@ -34,13 +34,17 @@ void MeasuresTab::Init(ScatterCtrl& scatter) xMin <<= scatter.GetXMin(); xMax <<= scatter.GetXRange() + scatter.GetXMin(); - yMin <<= scatter.GetYMin(); yMax <<= scatter.GetYRange() + scatter.GetYMin(); yMin2 <<= scatter.GetYMin2(); yMax2 <<= scatter.GetY2Range() + scatter.GetYMin2(); - butUpdate.WhenAction = THISBACK(Change); + xMin.WhenEnter = THISBACK(Change); + xMax.WhenEnter = THISBACK(Change); + yMin.WhenEnter = THISBACK(Change); + yMax.WhenEnter = THISBACK(Change); + yMin2.WhenEnter = THISBACK(Change); + yMax2.WhenEnter = THISBACK(Change); Change(); } @@ -279,16 +283,14 @@ void SeriesTab::Change() ScatterCtrl &scatter = *pscatter; - scatter.SetDataColor(index, Upp::Color(~linecolor)); scatter.SetFillColor(index, ~fillcolor); scatter.ScatterDraw::Show(index, ~visible); - scatter.Dash(index, DashStyle::Style(DashStyle::TypeIndex(~dashStyle))); - scatter.SetDataThickness(index, ~linethickness); + scatter.Dash(index, DashStyle::Style(DashStyle::TypeIndex(~dashStyle))); + scatter.Stroke(index, ~linethickness, Upp::Color(~linecolor)); - scatter.MarkStyle(index, ~markstyle); + scatter.MarkStyle(index, String(~markstyle)); scatter.SetMarkColor(index, Upp::Color(~markcolor)); scatter.SetMarkWidth(index, ~markwidth); - scatter.SetMarkStyleType(index, marktype.GetIndex()); ChangeMark(); scatter.Units(index, ~unitsY, ~unitsX); @@ -312,7 +314,6 @@ void SeriesTab::UpdateFields() name <<= list.Get(0); - linecolor <<= scatter.GetDataColor(index); fillcolor <<= scatter.GetFillColor(index); visible <<= scatter.ScatterDraw::IsVisible(index); int id = DashStyle::StyleIndex(scatter.GetDash(index)); @@ -321,8 +322,13 @@ void SeriesTab::UpdateFields() dashStyle.Add(DashStyle::TypeName(id)); } dashStyle <<= DashStyle::TypeName(id); - linethickness <<= scatter.GetDataThickness(index); - + + Upp::Color color; + double thickness; + + scatter.GetStroke(index, thickness, color); + linethickness <<= thickness; + linecolor <<= color; markstyle <<= scatter.GetMarkStyleName(index); markcolor <<= scatter.GetMarkColor(index); markwidth <<= scatter.GetMarkWidth(index); @@ -473,7 +479,7 @@ void DataDlg::ArraySaveToFile(String fileName) { String name = pscatter->GetTitle() + " " + pscatter->GetLegend(series[index].scatterIndex); if (name.IsEmpty()) name = t_("Scatter plot data"); - fileToSave.Set(ForceExt(name, ".csv")); + fileToSave.PreSelect(ForceExt(name, ".csv")); fileToSave.ClearTypes(); fileToSave.Type(Format(t_("%s file"), t_("Comma separated values (.csv)")), "*.csv"); if(!fileToSave.ExecuteSaveAs(t_("Saving plot data"))) { @@ -564,7 +570,13 @@ ProcessingDlg::ProcessingDlg(ScatterCtrl& scatter) : scatter(scatter) CtrlLayout(*this); Sizeable().Zoomable(); - Title(t_("Scatter processing")); + String title; + if (scatter.GetTitle().IsEmpty()) + title = t_("Data processing"); + else + title = Format(t_("%s processing"), scatter.GetTitle()); + + Title(title); list.Reset(); list.SetLineCy(EditField::GetStdHeight()); @@ -606,6 +618,7 @@ void ProcessingDlg::UpdateFields() tabs[index].UpdateField(~list.Get(0), int(list.Get(1))); } +int r2Compare(const Vector& v1, const Vector& v2) {return double(v1[2]) > double(v2[2]);} ProcessingTab::ProcessingTab() { @@ -614,9 +627,11 @@ ProcessingTab::ProcessingTab() CtrlLayout(tabFit); CtrlLayout(tabFreq); CtrlLayout(tabOp); + CtrlLayout(tabBestFit); tab.Add(tabFit.SizePos(), t_("Data fit")); tab.Add(tabFreq.SizePos(), t_("Frequency")); tab.Add(tabOp.SizePos(), t_("Operations")); + tab.Add(tabBestFit.SizePos(), t_("Best fit")); tab.WhenSet = THISBACK(OnSet); tabFreq.butFFT.WhenAction = THISBACK(OnFFT); @@ -656,13 +671,74 @@ ProcessingTab::ProcessingTab() tabOp.xLow.WhenLostFocus = THISBACK(OnOperation); tabOp.xHigh.WhenLostFocus = THISBACK(OnOperation); - tabFreqFirst = tabOpFirst = true; - avgFirst = linearFirst = cuadraticFirst = cubicFirst = sinusFirst = sinusTendFirst = splineFirst = true; + tabBestFit.coefficients = 0; + tabBestFit.minR2 = 0.6; + tabBestFit.userFormula <<= "c0 + c1*x^2"; + tabBestFit.gridTrend.AddColumn("Type", 10); + tabBestFit.gridTrend.AddColumn("Equation", 40); + tabBestFit.gridTrend.AddColumn("R2", 5); + tabBestFit.gridTrend.SetLineCy(EditField::GetStdHeight()).MultiSelect(); + tabBestFit.gridTrend.WhenBar = THISBACK(OnArrayBar); + tabBestFit.gridTrend.Sort(r2Compare); + for (int i = 0; i < ExplicitEquation::GetEquationCount(); ++i) + /*ExplicitEquation &equation = */equationTypes.Add(ExplicitEquation::Create(i)); + userEquation = new UserEquation; + equationTypes.Add(userEquation); + tabBestFit.butFit.WhenPush = THISBACK(OnFit); + + tabFreqFirst = tabOpFirst = tabBestFitFirst = true; + avgFirst = linearFirst = cuadraticFirst = cubicFirst = sinusFirst = sinusTendFirst = splineFirst = true; + exclamationOpened = false; newWidthMax = newWidthMin = newWidthMovAvg-1; } +void ProcessingTab::ArrayCopy() { + tabBestFit.gridTrend.SetClipboard(true, true); +} + +void ProcessingTab::ArraySelect() { + tabBestFit.gridTrend.Select(0, tabBestFit.gridTrend.GetCount(), true); +} + +void ProcessingTab::OnArrayBar(Bar &menu) { + menu.Add(t_("Select all"), Null, THISBACK(ArraySelect)).Key(K_CTRL_A).Help(t_("Select all rows")); + menu.Add(t_("Copy"), ScatterImgP::Copy(), THISBACK(ArrayCopy)).Key(K_CTRL_C).Help(t_("Copy selected rows")); +} + +void ProcessingTab::OnFit() { + //ds.Init(pscatter->GetSeries(id)); + DataSource &ds = pscatter->GetSeries(id); + + userEquation->Init("User", ~tabBestFit.userFormula, "x"); + + Array r2; + r2.SetCount(equationTypes.GetCount()); + + for (int i = 0; i < equationTypes.GetCount(); ++i) { + equationTypes[i].GuessCoeff(ds); + equationTypes[i].Fit(ds, r2[i]); + } + tabBestFit.scatter.RemoveAllSeries(); + tabBestFit.scatter.AddSeries(ds).Legend("Series").NoMark(); + for (int i = 0; i < equationTypes.GetCount(); ++i) { + if (r2[i] >= tabBestFit.minR2) + tabBestFit.scatter.AddSeries(equationTypes[i]).Legend(equationTypes[i].GetFullName()).NoMark().Stroke(2); + } + tabBestFit.scatter.ZoomToFit(true, true); + + int numDecimals = 3; + switch (tabBestFit.coefficients) { + case 1: numDecimals = 40; break; + case 2: numDecimals = Null; break; + } + tabBestFit.gridTrend.Clear(); + for (int i = 0; i < equationTypes.GetCount(); ++i) + tabBestFit.gridTrend.Add(equationTypes[i].GetFullName(), equationTypes[i].GetEquation(numDecimals), r2[i]); + tabBestFit.gridTrend.SetSortColumn(2, true); +} + void ProcessingTab::OnOp() { DataSource &data = tabFit.scatter.GetSeries(0); @@ -707,15 +783,15 @@ void ProcessingTab::OnOp() sinusFirst = false; } if (tabFit.opSinusTend && sinusTendFirst) { - DataSetCond dataSetCond; - dataSetCond.Init(data, Null, Null); + DataXRange dataXRange; + dataXRange.Init(data, Null, Null); double r2SinusTendBest = Null; SinEquation sinusTendBest; for (int iLow = 9; iLow >= 0; iLow--) { double xLow = data.x(int64(data.GetCount()*iLow/10.)); - dataSetCond.SetXLow(xLow); - sinusTend.GuessCoeff(dataSetCond); - if (sinusTend.Fit(dataSetCond, r2SinusTend) < 0) + dataXRange.SetXLow(xLow); + sinusTend.GuessCoeff(dataXRange); + if (sinusTend.Fit(dataXRange, r2SinusTend) < 0) break; if (!IsNull(r2SinusTendBest) && r2SinusTendBest > r2SinusTend) break; @@ -797,7 +873,7 @@ void ProcessingTab::OnOperation() } } exclamationOpened = false; - dataSetCond.Init(pscatter->GetSeries(id), tabOp.xLow, tabOp.xHigh); + dataXRange.Init(pscatter->GetSeries(id), tabOp.xLow, tabOp.xHigh); tabOp.scatter.Refresh(); } @@ -811,14 +887,17 @@ void ProcessingTab::UpdateField(const String _name, int _id) .Legend(pscatter->GetLegend(id)); tabFit.scatter.SetFastViewX(pscatter->GetFastViewX()); - tabFit.scatter.SetDataColor(0, pscatter->GetDataColor(id)); tabFit.scatter.SetFillColor(0, pscatter->GetFillColor(id)); tabFit.scatter.Dash(0, pscatter->GetDash(id)); - tabFit.scatter.SetDataThickness(0, pscatter->GetDataThickness(id)); + + Upp::Color color; + double thickness; + pscatter->GetStroke(0, thickness, color); + tabFit.scatter.Stroke(0, thickness, color); tabFit.scatter.MarkStyle(0, pscatter->GetMarkStyleName(id)); tabFit.scatter.SetMarkColor(0, pscatter->GetMarkColor(id)); tabFit.scatter.SetMarkWidth(0, pscatter->GetMarkWidth(id)); - tabFit.scatter.SetMarkStyleType(0, pscatter->GetMarkStyleType(id)); + tabFit.scatter.MarkStyle(0, pscatter->GetMarkStyleName(id)); tabFit.scatter.SetLegendAnchor(ScatterDraw::LEGEND_ANCHOR_RIGHT_TOP).SetLegendFillColor(Null); tabFit.scatter.Units(0, pscatter->GetUnitsX(id), pscatter->GetUnitsY(id)); @@ -853,19 +932,19 @@ void ProcessingTab::UpdateField(const String _name, int _id) tabFit.width <<= pscatter->GetXRange()/15.; tabFit.width.SetInc(pscatter->GetXRange()/15./2.); - tabFit.scatter.AddSeries(average).NoMark().SetDataThickness(1.5); - tabFit.scatter.AddSeries(linear).NoMark().SetDataThickness(1.5); - tabFit.scatter.AddSeries(cuadratic).NoMark().SetDataThickness(1.5); - tabFit.scatter.AddSeries(cubic).NoMark().SetDataThickness(1.5); - tabFit.scatter.AddSeries(sinus).NoMark().SetDataThickness(1.5); - tabFit.scatter.AddSeries(sinusTend).NoMark().SetDataThickness(1.5); - tabFit.scatter.AddSeries(spline).NoMark().Dash(LINE_SOLID).SetDataThickness(1.5); + tabFit.scatter.AddSeries(average).NoMark().Stroke(1.5); + tabFit.scatter.AddSeries(linear).NoMark().Stroke(1.5); + tabFit.scatter.AddSeries(cuadratic).NoMark().Stroke(1.5); + tabFit.scatter.AddSeries(cubic).NoMark().Stroke(1.5); + tabFit.scatter.AddSeries(sinus).NoMark().Stroke(1.5); + tabFit.scatter.AddSeries(sinusTend).NoMark().Stroke(1.5); + tabFit.scatter.AddSeries(spline).NoMark().Dash(LINE_SOLID).Stroke(1.5); tabFit.scatter.AddSeries(upperEnvelope).Legend(pscatter->GetLegend(id) + String("-") + t_("Max")) - .NoMark().Dash(LINE_DASHED).SetDataThickness(1.5).SetSequentialX(true); + .NoMark().Dash(LINE_DASHED).Stroke(1.5).SetSequentialX(true); tabFit.scatter.AddSeries(lowerEnvelope).Legend(pscatter->GetLegend(id) + String("-") + t_("Min")) .NoMark().Dash(LINE_DASHED).SetSequentialX(true); - tabFit.scatter.AddSeries(movAvg).SetDataThickness(1.5).Legend(pscatter->GetLegend(id) + String("-") + t_("MovAvg")).NoMark(); - tabFit.scatter.AddSeries(secAvg).SetDataThickness(1.5).Legend(pscatter->GetLegend(id) + String("-") + t_("SecAvg")).NoMark(); + tabFit.scatter.AddSeries(movAvg).Stroke(1.5).Legend(pscatter->GetLegend(id) + String("-") + t_("MovAvg")).NoMark(); + tabFit.scatter.AddSeries(secAvg).Stroke(1.5).Legend(pscatter->GetLegend(id) + String("-") + t_("SecAvg")).NoMark(); OnOp(); } else { @@ -969,12 +1048,12 @@ void ProcessingTab::OnSet() if (IsNull(xHigh)) xHigh = pscatter->GetXMin() + pscatter->GetXRange(); tabOp.xHigh <<= xHigh; - dataSetCond.Init(pscatter->GetSeries(id), xLow, xHigh); - tabOp.scatter.AddSeries(dataSetCond).SetSequentialX(pscatter->GetSequentialX()) - .Legend(legend + String("-") + t_("Processed")).NoMark().SetDataThickness(8) - .SetDataColor(Upp::Color(115, 214, 74)); + dataXRange.Init(pscatter->GetSeries(id), xLow, xHigh); + tabOp.scatter.AddSeries(dataXRange).SetSequentialX(pscatter->GetSequentialX()) + .Legend(legend + String("-") + t_("Processed")).NoMark() + .Stroke(8, Upp::Color(115, 214, 74)); tabOp.scatter.AddSeries(pscatter->GetSeries(id)).SetSequentialX(pscatter->GetSequentialX()) - .Legend(legend).NoMark().SetDataThickness(2).SetDataColor(Blue()); + .Legend(legend).NoMark().Stroke(2, Blue()); tabOp.scatter.SetFastViewX(pscatter->GetFastViewX()); tabOp.scatter.SetLegendAnchor(ScatterDraw::LEGEND_ANCHOR_RIGHT_TOP).SetLegendFillColor(Null); @@ -987,6 +1066,26 @@ void ProcessingTab::OnSet() tabOp.scatter.SetXYMin(pscatter->GetXMin(), primary ? pscatter->GetYMin() : pscatter->GetY2Min()); tabOp.scatter.SetMouseHandling(true, true).ShowInfo().ShowContextMenu().ShowProcessDlg().ShowPropertiesDlg(); + } else if (tabBestFitFirst && tab.Get() == 3) { + tabBestFitFirst = false; + + tabBestFit.scatter.RemoveAllSeries(); + String legend = pscatter->GetLegend(id); + + tabBestFit.scatter.AddSeries(pscatter->GetSeries(id)).SetSequentialX(pscatter->GetSequentialX()) + .Legend(legend).NoMark().Stroke(2); + tabBestFit.scatter.SetFastViewX(pscatter->GetFastViewX()); + + tabBestFit.scatter.SetLegendAnchor(ScatterDraw::LEGEND_ANCHOR_RIGHT_TOP).SetLegendFillColor(Null); + + tabBestFit.scatter.Units(0, pscatter->GetUnitsX(id), pscatter->GetUnitsY(id)); + + bool primary = pscatter->IsDataPrimaryY(id); + tabBestFit.scatter.SetRange(pscatter->GetXRange(), primary ? pscatter->GetYRange() : pscatter->GetY2Range()); + tabBestFit.scatter.SetMajorUnits(pscatter->GetMajorUnitsX(), primary ? pscatter->GetMajorUnitsY() : pscatter->GetMajorUnitsY2()); + tabBestFit.scatter.SetXYMin(pscatter->GetXMin(), primary ? pscatter->GetYMin() : pscatter->GetY2Min()); + + tabBestFit.scatter.SetMouseHandling(true, true).ShowInfo().ShowContextMenu().ShowProcessDlg().ShowPropertiesDlg(); } } diff --git a/uppsrc/ScatterCtrl/Properties.h b/uppsrc/ScatterCtrl/Properties.h index 2c6dbcd12..6fbbfecf4 100644 --- a/uppsrc/ScatterCtrl/Properties.h +++ b/uppsrc/ScatterCtrl/Properties.h @@ -125,6 +125,7 @@ public: void OnOperation(); void OnSet(); void OnUpdateSensitivity(); + void OnFit(); private: ScatterCtrl* pscatter; @@ -133,10 +134,18 @@ private: WithProcessingTabFit tabFit; WithProcessingTabFrequency tabFreq; WithProcessingTabOp tabOp; + WithProcessingTabBestFit tabBestFit; + + void ArrayCopy(); + void ArraySelect(); + void OnArrayBar(Bar &menu); + Array equationTypes; + UserEquation *userEquation; + //GridCtrlSource ds; bool avgFirst, linearFirst, cuadraticFirst, cubicFirst, sinusFirst, sinusTendFirst, splineFirst; double r2Linear, r2Cuadratic, r2Cubic, r2Sinus, r2SinusTend; - bool tabFreqFirst, tabOpFirst; + bool tabFreqFirst, tabOpFirst, tabBestFitFirst; Vector fft; AvgEquation average; @@ -147,7 +156,7 @@ private: SplineEquation spline; Vector upperEnvelope, lowerEnvelope; Vector movAvg, secAvg; - DataSetCond dataSetCond; + DataXRange dataXRange; bool exclamationOpened; double newWidthMax, newWidthMin, newWidthMovAvg; }; diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.cpp b/uppsrc/ScatterCtrl/ScatterCtrl.cpp index 9e1e19f90..1a567ed61 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.cpp +++ b/uppsrc/ScatterCtrl/ScatterCtrl.cpp @@ -64,7 +64,7 @@ void ScatterCtrl::Paint(Draw& w) } else { ImageBuffer ib(GetSize()); BufferPainter bp(ib, mode); - bp.LineCap(LINECAP_SQUARE); + bp.LineCap(LINECAP_BUTT); bp.LineJoin(LINEJOIN_MITER); ScatterCtrl::SetDrawing(bp, GetSize(), 1); w.DrawImage(0, 0, ib); @@ -134,10 +134,10 @@ void ScatterCtrl::ProcessPopUp(const Point & pt) String str = popTextX + ": " + _strx; if (strx != _strx) - str << "; " + popTextX + "': " + strx + "; Δ" + popTextX + ": " + dstrx; + str << "; " + popTextX + "': " + strx + "; " + t_("Δ") + popTextX + ": " + dstrx; str << "\n" + popTextY + ": " + _stry; if (stry != _stry) - str << "; " + popTextY + "': " + stry + "; Δ" + popTextY + ": " + dstry; + str << "; " + popTextY + "': " + stry + "; " + t_("Δ") + popTextY + ": " + dstry; if (drawY2Reticle) { String stry2, _stry2, dstry2; if (cbModifFormatY2) { @@ -157,7 +157,7 @@ void ScatterCtrl::ProcessPopUp(const Point & pt) str << "\n" + popTextY2 + ": " + _stry2; if (stry2 != _stry2) - str << "; " + popTextY2 + ": " + stry2 + "; Δ" + popTextY2 + ": " + dstry2; + str << "; " + popTextY2 + ": " + stry2 + "; " + t_("Δ") + popTextY2 + ": " + dstry2; } const Point p2 = pt + offset; popText.SetText(str).Move(this, p2.x, p2.y); @@ -190,7 +190,8 @@ void ScatterCtrl::DoMouseAction(bool down, Point pt, ScatterAction action, int v case SCROLL_LEFT: case SCROLL_RIGHT: case SCROLL_UP: - case SCROLL_DOWN:; + case SCROLL_DOWN: + case ZOOM_FIT:; } } @@ -205,6 +206,7 @@ void ScatterCtrl::DoKeyAction(ScatterAction action) case SCROLL_RIGHT: ScatterDraw::Scroll(-0.2, 0); break; case SCROLL_UP: ScatterDraw::Scroll(0, -0.2); break; case SCROLL_DOWN: ScatterDraw::Scroll(0, 0.2); break; + case ZOOM_FIT: ScatterDraw::ZoomToFit(true, true); break; case NO_ACTION: case SCROLL: case SHOW_COORDINATES: @@ -547,27 +549,27 @@ ScatterCtrl &ScatterCtrl::SetMouseHandling(bool valx, bool valy) void ScatterCtrl::ContextMenu(Bar& bar) { if (mouseHandlingX || mouseHandlingY) { - bar.Add(t_("Fit to data"), ScatterImg::ShapeHandles(), THISBACK3(ZoomToFit, mouseHandlingX, mouseHandlingY, 0)) - .Help(t_("Zoom to fit visible all data")); - bar.Add(t_("Zoom +"), ScatterImg::ZoomPlus(), THISBACK3(Zoom, 1/1.2, true, mouseHandlingY)) + bar.Add(t_("Fit to data"), ScatterImg::ShapeHandles(), THISBACK3(ZoomToFit, mouseHandlingX, mouseHandlingY, 0)).Key(K_CTRL_F) + .Help(t_("Zoom to fit visible all data")); + bar.Add(t_("Zoom +"), ScatterImg::ZoomPlus(), THISBACK3(Zoom, 1/1.2, true, mouseHandlingY)).Key(K_CTRL|K_ADD) .Help(t_("Zoom in (closer)")); - bar.Add(t_("Zoom -"), ScatterImg::ZoomMinus(), THISBACK3(Zoom, 1.2, true, mouseHandlingY)) - .Help(t_("Zoom out (away)")); + bar.Add(t_("Zoom -"), ScatterImg::ZoomMinus(), THISBACK3(Zoom, 1.2, true, mouseHandlingY)).Key(K_CTRL|K_SUBTRACT) + .Help(t_("Zoom out (away)")); } bar.Add(t_("Attach X axis"), Null, THISBACK(ChangeMouseHandlingX)).Check(!mouseHandlingX) - .Help(t_("Fix X axis so no zoom or scroll is possible")); + .Help(t_("Fix X axis so no zoom or scroll is possible")); if (mouseHandlingX) { - bar.Add(t_("Scroll Left"), ScatterImg::LeftArrow(), THISBACK2(ScatterDraw::Scroll, 0.2, 0)).Key(K_CTRL_LEFT) + bar.Add(t_("Scroll Left"), ScatterImg::LeftArrow(), THISBACK2(ScatterDraw::Scroll, 0.2, 0)).Key(K_CTRL_LEFT) .Help(t_("Scrolls plot to the left")); - bar.Add(t_("Scroll Right"), ScatterImg::RightArrow(), THISBACK2(ScatterDraw::Scroll, -0.2, 0)).Key(K_CTRL_RIGHT) + bar.Add(t_("Scroll Right"),ScatterImg::RightArrow(), THISBACK2(ScatterDraw::Scroll, -0.2, 0)).Key(K_CTRL_RIGHT) .Help(t_("Scrolls plot to the right")); } - bar.Add(t_("Attach Y axis"), Null, THISBACK(ChangeMouseHandlingY)).Check(!mouseHandlingY) + bar.Add(t_("Attach Y axis"), Null, THISBACK(ChangeMouseHandlingY)).Check(!mouseHandlingY) .Help(t_("Fix Y axis so no zoom or scroll is possible")); if (mouseHandlingY) { - bar.Add(t_("Scroll Up"), ScatterImg::UpArrow(), THISBACK2(ScatterDraw::Scroll, 0, -0.2)).Key(K_CTRL_UP) + bar.Add(t_("Scroll Up"), ScatterImg::UpArrow(), THISBACK2(ScatterDraw::Scroll, 0, -0.2)).Key(K_CTRL_UP) .Help(t_("Scrolls plot up")); - bar.Add(t_("Scroll Down"), ScatterImg::DownArrow(), THISBACK2(ScatterDraw::Scroll, 0, 0.2)).Key(K_CTRL_DOWN) + bar.Add(t_("Scroll Down"), ScatterImg::DownArrow(), THISBACK2(ScatterDraw::Scroll, 0, 0.2)).Key(K_CTRL_DOWN) .Help(t_("Scrolls plot down")); } if (mouseHandlingX || mouseHandlingY) @@ -600,6 +602,15 @@ void ScatterCtrl::ContextMenu(Bar& bar) .Help(t_("Save image to file")); } +void ScatterCtrl::OnFileToSave() { + String name = ~fileToSave; + int ext = fileToSave.GetActiveType(); + if (ext == 0) + fileToSave.file = ForceExt(name, ".jpg"); + else + fileToSave.file = ForceExt(name, ".png"); +} + void ScatterCtrl::SaveToFile(String fileName) { GuiLock __; @@ -607,15 +618,16 @@ void ScatterCtrl::SaveToFile(String fileName) String name = GetTitle(); if (name.IsEmpty()) name = t_("Scatter plot"); - fileToSave.Set(ForceExt(name, ".jpg")); + fileToSave.PreSelect(ForceExt(name, ".jpg")); fileToSave.ClearTypes(); fileToSave.Type(Format(t_("%s file"), "JPEG"), "*.jpg"); fileToSave.Type(Format(t_("%s file"), "PNG"), "*.png"); + fileToSave.type.WhenAction = THISBACK(OnFileToSave); if(!fileToSave.ExecuteSaveAs(t_("Saving plot to PNG or JPEG file"))) { Exclamation(t_("Plot has not been saved")); return; } - fileName = fileToSave; + fileName = ~fileToSave; } if (GetFileExt(fileName) == ".png") { PNGEncoder encoder; @@ -659,9 +671,9 @@ ScatterCtrl::ScatterCtrl() : offset(10,12), copyRatio(1), isLeftDown(false) { showInfo = mouseHandlingX = mouseHandlingY = isScrolling = isLabelPopUp = isZoomWindow = false; WantFocus(); - popTextX = "x"; - popTextY = "y1"; - popTextY2 = "y2"; + popTextX = t_("x"); + popTextY = t_("y1"); + popTextY2 = t_("y2"); popLT = popRB = Null; showContextMenu = false; showPropDlg = false; @@ -714,5 +726,6 @@ ScatterCtrl::ScatterCtrl() : offset(10,12), copyRatio(1), isLeftDown(false) AddKeyBehavior(true, false, false, K_RIGHT, true, ScatterCtrl::SCROLL_RIGHT); AddKeyBehavior(true, false, false, K_UP, true, ScatterCtrl::SCROLL_UP); AddKeyBehavior(true, false, false, K_DOWN, true, ScatterCtrl::SCROLL_DOWN); + AddKeyBehavior(true, false, false, K_F, true, ScatterCtrl::ZOOM_FIT); } diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.h b/uppsrc/ScatterCtrl/ScatterCtrl.h index 2e0af7f32..06b3d7357 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.h +++ b/uppsrc/ScatterCtrl/ScatterCtrl.h @@ -44,13 +44,18 @@ public: for (int i = 0; i < ids.GetCount(); ++i) ids[i] = _ids[i]; beginData = _beginData; - numData = _numData; if (IsNull(_numData)) { if (!useCols) - numData = data->GetColumnCount() - beginData; + numData = data->GetColumnCount(); else - numData = data->GetCount() - beginData; + numData = data->GetCount(); + } else { + if (!useCols) + numData = min(_numData, data->GetColumnCount()); + else + numData = min(_numData, data->GetCount()); } + numData -= beginData; } void Init(ArrayCtrl &_data, int idY, int idX, bool _useCols = true, int _beginData = 0, int _numData = Null) { //Vector ids; @@ -95,13 +100,18 @@ public: for (int i = 0; i < ids.GetCount(); ++i) ids[i] = _ids[i]; beginData = _beginData; - numData = _numData; if (IsNull(_numData)) { if (!useCols) - numData = data->GetColumnCount() - beginData; + numData = data->GetColumnCount(); else - numData = data->GetRowCount() - beginData; - } + numData = data->GetRowCount(); + } else { + if (!useCols) + numData = min(_numData, data->GetColumnCount()); + else + numData = min(_numData, data->GetRowCount()); + } + numData -= beginData; } void Init(GridCtrl &_data, int idY, int idX, bool _useCols = true, int _beginData = 0, int _numData = Null) { Vector ids; @@ -139,7 +149,7 @@ public: ScatterCtrl(); enum ScatterAction {NO_ACTION = 0, SCROLL, ZOOM_H_ENL, ZOOM_H_RED, ZOOM_V_ENL, ZOOM_V_RED, SHOW_COORDINATES, CONTEXT_MENU, ZOOM_WINDOW, - SCROLL_LEFT, SCROLL_RIGHT, SCROLL_UP, SCROLL_DOWN}; + SCROLL_LEFT, SCROLL_RIGHT, SCROLL_UP, SCROLL_DOWN, ZOOM_FIT}; #define SHOW_INFO SHOW_COORDINATES struct MouseBehavior { @@ -178,12 +188,12 @@ public: CheckButtonVisible(); return *this; } - ScatterCtrl& ShowProcessDlg(bool show = true) { + ScatterCtrl& ShowProcessDlg(bool show = true) { showProcessDlg = show; CheckButtonVisible(); return *this; } - ScatterCtrl& ShowButtons(bool show = true) { + ScatterCtrl& ShowButtons(bool show = true) { showButtons = show; CheckButtonVisible(); return *this; @@ -269,6 +279,14 @@ public: ScatterCtrl& SetDefaultCSVSeparator(String sep) {defaultCSVseparator = sep; return *this;} String GetDefaultCSVSeparator() {return defaultCSVseparator;} + void Jsonize(JsonIO& json) { + ScatterDraw::Jsonize(json); + json + ("mouseHandlingX", mouseHandlingX) + ("mouseHandlingY", mouseHandlingY) + ; + } + private: bool showInfo; Point clickPoint; @@ -338,6 +356,7 @@ private: String defaultCSVseparator; FileSel fileToSave; + void OnFileToSave(); Button processButton, dataButton, propertiesButton; }; diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.lay b/uppsrc/ScatterCtrl/ScatterCtrl.lay index baeddc99d..eaa7bf956 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.lay +++ b/uppsrc/ScatterCtrl/ScatterCtrl.lay @@ -1,101 +1,100 @@ LAYOUT(Properties, 436, 252) ITEM(TabCtrl, tab, HSizePosZ(0, 0).VSizePosZ(0, 28)) - ITEM(Button, close, SetLabel(t_("Close")).Tip(t_("Close this dialog")).RightPosZ(4, 68).BottomPosZ(4, 20)) + ITEM(Button, close, SetLabel(t_("OK")).Tip(t_("Close this dialog")).RightPosZ(4, 68).BottomPosZ(4, 20)) END_LAYOUT LAYOUT(Measures, 396, 256) - ITEM(LabelBox, dv___0, HSizePosZ(80, 80).VSizePosZ(28, 56)) - ITEM(LabelBox, dv___1, HSizePosZ(4, 4).VSizePosZ(0, 4)) - ITEM(Label, dv___2, SetLabel(t_("X max")).RightPosZ(80, 64).BottomPosZ(35, 21)) - ITEM(EditDoubleNotNull, xMax, RightPosZ(80, 64).BottomPosZ(13, 19)) - ITEM(Label, dv___4, SetLabel(t_("Y max 2")).RightPosZ(12, 64).TopPosZ(12, 21)) - ITEM(EditDoubleNotNull, yMax2, RightPosZ(12, 64).TopPosZ(36, 19)) - ITEM(Label, dv___6, SetLabel(t_("Y min 2")).RightPosZ(12, 64).BottomPosZ(79, 21)) - ITEM(EditDoubleNotNull, yMin2, RightPosZ(12, 64).BottomPosZ(57, 19)) - ITEM(Label, dv___8, SetLabel(t_("Y max")).LeftPosZ(12, 64).TopPosZ(12, 21)) ITEM(EditDoubleNotNull, yMax, LeftPosZ(12, 64).TopPosZ(36, 19)) - ITEM(Label, dv___10, SetLabel(t_("Y min")).LeftPosZ(12, 64).BottomPosZ(79, 21)) ITEM(EditDoubleNotNull, yMin, LeftPosZ(12, 64).BottomPosZ(57, 19)) - ITEM(Label, dv___12, SetLabel(t_("X min")).LeftPosZ(80, 64).BottomPosZ(35, 21)) ITEM(EditDoubleNotNull, xMin, LeftPosZ(80, 64).BottomPosZ(13, 19)) - ITEM(Button, butUpdate, SetLabel(t_("Update")).RightPosZ(12, 56).BottomPosZ(13, 19)) + ITEM(EditDoubleNotNull, xMax, RightPosZ(80, 64).BottomPosZ(13, 19)) + ITEM(EditDoubleNotNull, yMax2, RightPosZ(12, 64).TopPosZ(36, 19)) + ITEM(EditDoubleNotNull, yMin2, RightPosZ(12, 64).BottomPosZ(57, 19)) + ITEM(LabelBox, dv___6, HSizePosZ(80, 80).VSizePosZ(28, 56)) + ITEM(LabelBox, dv___7, HSizePosZ(4, 4).VSizePosZ(0, 4)) + ITEM(Label, dv___8, SetLabel(t_("X max")).RightPosZ(80, 64).BottomPosZ(35, 21)) + ITEM(Label, dv___9, SetLabel(t_("Y max 2")).RightPosZ(12, 64).TopPosZ(12, 21)) + ITEM(Label, dv___10, SetLabel(t_("Y min 2")).RightPosZ(12, 64).BottomPosZ(79, 21)) + ITEM(Label, dv___11, SetLabel(t_("Y max")).LeftPosZ(12, 64).TopPosZ(12, 21)) + ITEM(Label, dv___12, SetLabel(t_("Y min")).LeftPosZ(12, 64).BottomPosZ(79, 21)) + ITEM(Label, dv___13, SetLabel(t_("X min")).LeftPosZ(80, 64).BottomPosZ(35, 21)) END_LAYOUT LAYOUT(Texts, 472, 284) - ITEM(Label, dv___0, SetLabel(t_("Label Y2:")).RightPosZ(16, 68).TopPosZ(48, 21)) - ITEM(EditString, yLabel2, RightPosZ(16, 68).TopPosZ(72, 19)) - ITEM(EditString, yLabel, LeftPosZ(12, 64).TopPosZ(72, 20)) - ITEM(Label, dv___3, SetLabel(t_("Title:")).LeftPosZ(12, 64).TopPosZ(16, 21)) - ITEM(EditString, title, SetFrame(ThinInsetFrame()).HSizePosZ(80, 208).TopPosZ(16, 19)) - ITEM(Label, dv___5, SetLabel(t_("Label X:")).LeftPosZ(12, 64).BottomPosZ(11, 21)) - ITEM(EditString, xLabel, HSizePosZ(80, 228).BottomPosZ(13, 19)) - ITEM(Label, dv___7, SetLabel(t_("Top margin:")).RightPosZ(128, 72).TopPosZ(16, 21)) - ITEM(Label, dv___8, SetLabel(t_("Label Y:")).LeftPosZ(12, 64).TopPosZ(48, 21)) - ITEM(LabelBox, dv___9, HSizePosZ(80, 88).VSizePosZ(40, 36)) - ITEM(LabelBox, dv___10, HSizePosZ(4, 8).VSizePosZ(0, 4)) - ITEM(Label, dv___11, SetLabel(t_("Left margin:")).LeftPosZ(12, 64).BottomPosZ(67, 21)) ITEM(EditIntSpin, topMargin, RightPosZ(88, 40).TopPosZ(16, 19)) - ITEM(Label, dv___13, SetLabel(t_("Right margin:")).RightPosZ(12, 72).BottomPosZ(67, 21)) - ITEM(EditIntSpin, rightMargin, RightPosZ(44, 40).BottomPosZ(45, 19)) + ITEM(EditString, yLabel, LeftPosZ(12, 64).TopPosZ(72, 20)) ITEM(EditIntSpin, leftMargin, LeftPosZ(12, 40).BottomPosZ(45, 19)) - ITEM(Label, dv___16, SetLabel(t_("Bottom margin:")).RightPosZ(128, 88).BottomPosZ(11, 21)) + ITEM(EditString, yLabel2, RightPosZ(16, 68).TopPosZ(72, 19)) + ITEM(EditIntSpin, rightMargin, RightPosZ(44, 40).BottomPosZ(45, 19)) + ITEM(EditString, xLabel, HSizePosZ(80, 228).BottomPosZ(13, 19)) ITEM(EditIntSpin, bottomMargin, RightPosZ(88, 40).BottomPosZ(13, 19)) + ITEM(Label, dv___7, SetLabel(t_("Label Y2:")).RightPosZ(16, 68).TopPosZ(48, 21)) + ITEM(Label, dv___8, SetLabel(t_("Title:")).LeftPosZ(12, 64).TopPosZ(16, 21)) + ITEM(EditString, title, SetFrame(ThinInsetFrame()).HSizePosZ(80, 208).TopPosZ(16, 19)) + ITEM(Label, dv___10, SetLabel(t_("Label X:")).LeftPosZ(12, 64).BottomPosZ(11, 21)) + ITEM(Label, dv___11, SetLabel(t_("Top margin:")).RightPosZ(128, 72).TopPosZ(16, 21)) + ITEM(Label, dv___12, SetLabel(t_("Label Y:")).LeftPosZ(12, 64).TopPosZ(48, 21)) + ITEM(LabelBox, dv___13, HSizePosZ(80, 88).VSizePosZ(40, 36)) + ITEM(LabelBox, dv___14, HSizePosZ(4, 8).VSizePosZ(0, 4)) + ITEM(Label, dv___15, SetLabel(t_("Left margin:")).LeftPosZ(12, 64).BottomPosZ(67, 21)) + ITEM(Label, dv___16, SetLabel(t_("Right margin:")).RightPosZ(12, 72).BottomPosZ(67, 21)) + ITEM(Label, dv___17, SetLabel(t_("Bottom margin:")).RightPosZ(128, 88).BottomPosZ(11, 21)) END_LAYOUT LAYOUT(Legend, 340, 216) + ITEM(Option, showLegend, SetLabel(t_("Show Legend")).LeftPosZ(8, 100).TopPosZ(8, 16)) + ITEM(Switch, legendPosition, SetLabel(t_("Top\nTable")).LeftPosZ(128, 64).TopPosZ(24, 32)) + ITEM(ColorPusher, fillColor, LeftPosZ(92, 20).TopPosZ(84, 19)) + ITEM(EditIntSpin, numCols, Min(1).NotNull(true).LeftPosZ(220, 44).TopPosZ(84, 19)) + ITEM(ColorPusher, borderColor, LeftPosZ(92, 20).TopPosZ(108, 19)) + ITEM(EditIntSpin, rowSpacing, Min(0).NotNull(true).LeftPosZ(220, 44).TopPosZ(108, 19)) ITEM(LabelBox, rectangle, SetLabel(t_("Position")).LeftPosZ(120, 80).TopPosZ(4, 60)) + ITEM(Option, legendAnchorLT, SetLabel(t_("Left-Top")).LeftPosZ(20, 92).TopPosZ(152, 16)) + ITEM(Option, legendAnchorRT, SetLabel(t_("Right-Top")).LeftPosZ(116, 92).TopPosZ(152, 16)) + ITEM(Option, legendAnchorLB, SetLabel(t_("Left-Bottom")).LeftPosZ(20, 92).TopPosZ(180, 16)) + ITEM(Option, legendAnchorRB, SetLabel(t_("Right-Bottom")).LeftPosZ(116, 92).TopPosZ(180, 16)) + ITEM(EditIntSpin, tableHoriz, NotNull(true).LeftPosZ(280, 44).TopPosZ(152, 19)) + ITEM(EditIntSpin, tableVert, Min(0).NotNull(true).LeftPosZ(280, 44).TopPosZ(176, 19)) ITEM(Label, labelVert, SetLabel(t_("Vertical:")).LeftPosZ(232, 48).TopPosZ(176, 21)) ITEM(Label, labelNumCols, SetLabel(t_("Column number:")).LeftPosZ(128, 92).TopPosZ(84, 21)) ITEM(Label, labelRowSpacing, SetLabel(t_("Row spacing:")).LeftPosZ(128, 76).TopPosZ(108, 21)) - ITEM(EditIntSpin, tableVert, Min(0).NotNull(true).LeftPosZ(280, 44).TopPosZ(176, 19)) - ITEM(EditIntSpin, numCols, Min(1).NotNull(true).LeftPosZ(220, 44).TopPosZ(84, 19)) - ITEM(EditIntSpin, tableHoriz, NotNull(true).LeftPosZ(280, 44).TopPosZ(152, 19)) - ITEM(ColorPusher, borderColor, LeftPosZ(92, 20).TopPosZ(108, 19)) ITEM(Label, labelBorder, SetLabel(t_("Border color:")).LeftPosZ(12, 76).TopPosZ(108, 19)) - ITEM(ColorPusher, fillColor, LeftPosZ(92, 20).TopPosZ(84, 19)) ITEM(Label, labelHoriz, SetLabel(t_("Horiz.:")).LeftPosZ(232, 48).TopPosZ(152, 21)) - ITEM(Option, showLegend, SetLabel(t_("Show Legend")).LeftPosZ(8, 100).TopPosZ(8, 16)) - ITEM(EditIntSpin, rowSpacing, Min(0).NotNull(true).LeftPosZ(220, 44).TopPosZ(108, 19)) ITEM(Label, labelFill, SetLabel(t_("Fill color:")).LeftPosZ(12, 64).TopPosZ(84, 19)) ITEM(LabelBox, labelDistance, SetLabel(t_("Distance to corner")).LeftPosZ(224, 104).TopPosZ(136, 68)) ITEM(LabelBox, labelAnchorCorner, SetLabel(t_("Anchor corner")).LeftPosZ(12, 204).TopPosZ(136, 68)) - ITEM(Switch, legendPosition, SetLabel(t_("Top\nTable")).LeftPosZ(128, 64).TopPosZ(24, 32)) - ITEM(Option, legendAnchorRB, SetLabel(t_("Right-Bottom")).LeftPosZ(116, 92).TopPosZ(180, 16)) - ITEM(Option, legendAnchorLT, SetLabel(t_("Left-Top")).LeftPosZ(20, 92).TopPosZ(152, 16)) - ITEM(Option, legendAnchorRT, SetLabel(t_("Right-Top")).LeftPosZ(116, 92).TopPosZ(152, 16)) ITEM(LabelBox, table, SetLabel(t_("Table")).LeftPosZ(4, 332).TopPosZ(64, 148)) - ITEM(Option, legendAnchorLB, SetLabel(t_("Left-Bottom")).LeftPosZ(20, 92).TopPosZ(180, 16)) END_LAYOUT LAYOUT(Series, 420, 228) - ITEM(ArrayCtrl, list, LeftPosZ(4, 120).VSizePosZ(4, 4)) ITEM(EditString, name, HSizePosZ(168, 80).TopPosZ(4, 19)) - ITEM(EditDoubleSpin, linethickness, Min(0.0001).NotNull(true).LeftPosZ(200, 60).TopPosZ(72, 19)) - ITEM(EditString, unitsX, LeftPosZ(288, 64).TopPosZ(196, 19)) - ITEM(EditString, unitsY, LeftPosZ(176, 64).TopPosZ(196, 19)) + ITEM(Option, primary, SetLabel(t_("Primary")).RightPosZ(4, 68).TopPosZ(4, 16)) + ITEM(DropList, dashStyle, LeftPosZ(200, 132).TopPosZ(48, 19)) ITEM(Option, visible, SetLabel(t_("Visible")).LeftPosZ(352, 56).TopPosZ(48, 16)) + ITEM(EditDoubleSpin, linethickness, Min(0.0001).NotNull(true).LeftPosZ(200, 60).TopPosZ(72, 19)) + ITEM(ColorPusher, linecolor, LeftPosZ(312, 20).TopPosZ(72, 19)) + ITEM(ColorPusher, fillcolor, LeftPosZ(388, 20).TopPosZ(72, 19)) + ITEM(DropList, markstyle, LeftPosZ(176, 116).TopPosZ(124, 19)) ITEM(DropList, marktype, LeftPosZ(332, 80).TopPosZ(124, 19)) ITEM(EditDoubleSpin, markwidth, SetInc(0.5).Min(0.0001).NotNull(true).LeftPosZ(176, 56).TopPosZ(148, 19)) - ITEM(LabelBox, dv___8, SetLabel(t_("Units")).HSizePosZ(128, 4).TopPosZ(180, 44)) - ITEM(LabelBox, dv___9, SetLabel(t_("Mark")).HSizePosZ(128, 4).TopPosZ(108, 68)) - ITEM(Label, dv___10, SetLabel(t_("Type:")).LeftPosZ(296, 36).TopPosZ(124, 19)) - ITEM(Label, dv___11, SetLabel(t_("Color:")).LeftPosZ(244, 40).TopPosZ(148, 19)) ITEM(ColorPusher, markcolor, LeftPosZ(288, 20).TopPosZ(148, 19)) - ITEM(Label, dv___13, SetLabel(t_("Fill:")).LeftPosZ(340, 44).TopPosZ(72, 19)) - ITEM(ColorPusher, fillcolor, LeftPosZ(388, 20).TopPosZ(72, 19)) - ITEM(Label, dv___15, SetLabel(t_("X axis:")).LeftPosZ(248, 40).TopPosZ(196, 19)) - ITEM(Label, dv___16, SetLabel(t_("Y axis:")).LeftPosZ(136, 40).TopPosZ(196, 19)) - ITEM(LabelBox, dv___17, SetLabel(t_("Line:")).HSizePosZ(128, 4).TopPosZ(32, 68)) - ITEM(Label, dv___18, SetLabel(t_("Color:")).LeftPosZ(264, 44).TopPosZ(72, 19)) - ITEM(ColorPusher, linecolor, LeftPosZ(312, 20).TopPosZ(72, 19)) - ITEM(Label, dv___20, SetLabel(t_("Dash:")).LeftPosZ(136, 64).TopPosZ(48, 19)) - ITEM(Label, dv___21, SetLabel(t_("Thickness:")).LeftPosZ(136, 64).TopPosZ(72, 19)) - ITEM(Label, dv___22, SetLabel(t_("Name:")).LeftPosZ(128, 40).TopPosZ(4, 21)) - ITEM(Label, dv___23, SetLabel(t_("Width:")).LeftPosZ(136, 40).TopPosZ(148, 19)) - ITEM(DropList, dashStyle, LeftPosZ(200, 132).TopPosZ(48, 19)) - ITEM(Option, primary, SetLabel(t_("Primary")).RightPosZ(4, 68).TopPosZ(4, 16)) - ITEM(DropList, markstyle, LeftPosZ(176, 116).TopPosZ(124, 19)) - ITEM(Label, dv___27, SetLabel(t_("Style:")).LeftPosZ(136, 40).TopPosZ(124, 19)) + ITEM(EditString, unitsY, LeftPosZ(176, 64).TopPosZ(196, 19)) + ITEM(EditString, unitsX, LeftPosZ(288, 64).TopPosZ(196, 19)) + ITEM(LabelBox, dv___13, SetLabel(t_("Units")).HSizePosZ(128, 4).TopPosZ(180, 44)) + ITEM(LabelBox, dv___14, SetLabel(t_("Mark")).HSizePosZ(128, 4).TopPosZ(108, 68)) + ITEM(Label, dv___15, SetLabel(t_("Type:")).LeftPosZ(296, 36).TopPosZ(124, 19)) + ITEM(Label, dv___16, SetLabel(t_("Color:")).LeftPosZ(244, 40).TopPosZ(148, 19)) + ITEM(Label, dv___17, SetLabel(t_("Fill:")).LeftPosZ(340, 44).TopPosZ(72, 19)) + ITEM(Label, dv___18, SetLabel(t_("X axis:")).LeftPosZ(248, 40).TopPosZ(196, 19)) + ITEM(Label, dv___19, SetLabel(t_("Y axis:")).LeftPosZ(136, 40).TopPosZ(196, 19)) + ITEM(LabelBox, dv___20, SetLabel(t_("Line:")).HSizePosZ(128, 4).TopPosZ(32, 68)) + ITEM(Label, dv___21, SetLabel(t_("Color:")).LeftPosZ(264, 44).TopPosZ(72, 19)) + ITEM(Label, dv___22, SetLabel(t_("Dash:")).LeftPosZ(136, 64).TopPosZ(48, 19)) + ITEM(Label, dv___23, SetLabel(t_("Thickness:")).LeftPosZ(136, 64).TopPosZ(72, 19)) + ITEM(Label, dv___24, SetLabel(t_("Name:")).LeftPosZ(128, 40).TopPosZ(4, 21)) + ITEM(Label, dv___25, SetLabel(t_("Width:")).LeftPosZ(136, 40).TopPosZ(148, 19)) + ITEM(Label, dv___26, SetLabel(t_("Style:")).LeftPosZ(136, 40).TopPosZ(124, 19)) + ITEM(ArrayCtrl, list, LeftPosZ(4, 120).VSizePosZ(4, 4)) END_LAYOUT LAYOUT(Data, 436, 252) @@ -124,43 +123,43 @@ LAYOUT(ProcessingTabFit, 700, 428) ITEM(Option, opLinear, SetLabel(t_("Linear")).RightPosZ(136, 64).TopPosZ(44, 16)) ITEM(Option, opCuadratic, SetLabel(t_("Cuadratic")).RightPosZ(136, 64).TopPosZ(64, 16)) ITEM(Option, opCubic, SetLabel(t_("Cubic")).RightPosZ(136, 64).TopPosZ(84, 16)) + ITEM(Option, opSinus, SetLabel(t_("Sinusoidal")).RightPosZ(136, 64).TopPosZ(104, 16)) ITEM(Option, opSinusTend, SetLabel(t_("Sin. tend.")).RightPosZ(136, 64).TopPosZ(124, 16)) - ITEM(Option, opMax, SetLabel(t_("Max curve")).RightPosZ(72, 128).TopPosZ(188, 16)) - ITEM(Option, opMin, SetLabel(t_("Min curve")).RightPosZ(72, 128).TopPosZ(208, 16)) ITEM(Option, opSpline, SetLabel(t_("Spline")).RightPosZ(72, 128).TopPosZ(144, 16)) - ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(50).ShowContextMenu(true).ShowPropertiesDlg(true).ShowProcessDlg(true).ShowButtons(true).HSizePosZ(0, 208).VSizePosZ(0, 0)) - ITEM(Label, dv___10, SetLabel(t_("Max imp.:")).RightPosZ(144, 56).TopPosZ(316, 19)) - ITEM(Label, dv___11, SetLabel(t_("R2 coeff.")).RightPosZ(0, 48).TopPosZ(4, 19)) - ITEM(Label, dv___12, SetLabel(t_("Num decimals:")).RightPosZ(120, 80).TopPosZ(164, 19)) ITEM(EditIntSpin, numDecimals, Max(20).Min(0).RightPosZ(84, 36).TopPosZ(164, 19)) ITEM(Option, showEquation, SetLabel(t_("Show Eq.")).RightPosZ(4, 72).TopPosZ(164, 16)) - ITEM(Label, dv___15, SetLabel(t_("Max:")).RightPosZ(144, 56).TopPosZ(292, 19)) - ITEM(Label, dv___16, SetLabel(t_("StdDev:")).RightPosZ(144, 56).TopPosZ(412, 19)) + ITEM(Option, opMax, SetLabel(t_("Max curve")).RightPosZ(72, 128).TopPosZ(188, 16)) + ITEM(Option, opMin, SetLabel(t_("Min curve")).RightPosZ(72, 128).TopPosZ(208, 16)) + ITEM(Option, opMovAvg, SetLabel(t_("Moving Average")).RightPosZ(72, 128).TopPosZ(228, 16)) + ITEM(Option, opSecAvg, SetLabel(t_("Sector Average")).RightPosZ(72, 128).TopPosZ(248, 16)) + ITEM(Button, butAutoSensSector, SetLabel(t_("Autosens")).RightPosZ(4, 64).TopPosZ(248, 15)) + ITEM(EditDoubleLostFocusSpin, width, RightPosZ(8, 60).TopPosZ(212, 19)) + ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(50).ShowContextMenu(true).ShowPropertiesDlg(true).ShowProcessDlg(true).ShowButtons(true).HSizePosZ(0, 208).VSizePosZ(0, 0)) + ITEM(Label, dv___17, SetLabel(t_("Max imp.:")).RightPosZ(144, 56).TopPosZ(316, 19)) + ITEM(Label, dv___18, SetLabel(t_("R2 coeff.")).RightPosZ(0, 48).TopPosZ(4, 19)) + ITEM(Label, dv___19, SetLabel(t_("Num decimals:")).RightPosZ(120, 80).TopPosZ(164, 19)) + ITEM(Label, dv___20, SetLabel(t_("Max:")).RightPosZ(144, 56).TopPosZ(292, 19)) + ITEM(Label, dv___21, SetLabel(t_("StdDev:")).RightPosZ(144, 56).TopPosZ(412, 19)) ITEM(EditString, eMaxImp, SetEditable(false).RightPosZ(4, 136).TopPosZ(316, 19)) ITEM(EditDouble, eStdDev, SetEditable(false).RightPosZ(4, 136).TopPosZ(412, 19)) ITEM(EditString, eqSinusTend, SetEditable(false).RightPosZ(52, 84).TopPosZ(124, 19)) ITEM(EditDouble, r2Linear, SetEditable(false).RightPosZ(4, 44).TopPosZ(44, 19)) ITEM(EditDouble, r2Cuadratic, SetEditable(false).RightPosZ(4, 44).TopPosZ(64, 19)) ITEM(EditDouble, r2SinusTend, SetEditable(false).RightPosZ(4, 44).TopPosZ(124, 19)) - ITEM(Option, opSinus, SetLabel(t_("Sinusoidal")).RightPosZ(136, 64).TopPosZ(104, 16)) ITEM(EditString, eqSinus, SetEditable(false).RightPosZ(52, 84).TopPosZ(104, 19)) ITEM(EditDouble, r2Sinus, SetEditable(false).RightPosZ(4, 44).TopPosZ(104, 19)) ITEM(EditString, eqCubic, SetEditable(false).RightPosZ(52, 84).TopPosZ(84, 19)) ITEM(EditDouble, r2Cubic, SetEditable(false).RightPosZ(4, 44).TopPosZ(84, 19)) ITEM(EditString, eMax, SetEditable(false).RightPosZ(4, 136).TopPosZ(292, 19)) - ITEM(Label, dv___29, SetLabel(t_("Average:")).RightPosZ(144, 56).TopPosZ(364, 19)) + ITEM(Label, dv___33, SetLabel(t_("Average:")).RightPosZ(144, 56).TopPosZ(364, 19)) ITEM(EditDouble, eAverage, SetEditable(false).RightPosZ(4, 136).TopPosZ(364, 19)) ITEM(EditString, eqLinear, SetEditable(false).RightPosZ(52, 84).TopPosZ(44, 19)) ITEM(EditString, eqCuadratic, SetEditable(false).RightPosZ(52, 84).TopPosZ(64, 19)) ITEM(EditString, eqAverage, SetEditable(false).RightPosZ(52, 84).TopPosZ(24, 19)) - ITEM(EditDoubleLostFocusSpin, width, RightPosZ(8, 60).TopPosZ(212, 19)) - ITEM(Label, dv___35, SetLabel(t_("Sensitivity")).RightPosZ(8, 60).TopPosZ(196, 19)) - ITEM(Option, opSecAvg, SetLabel(t_("Sector Average")).RightPosZ(72, 128).TopPosZ(248, 16)) - ITEM(Option, opMovAvg, SetLabel(t_("Moving Average")).RightPosZ(72, 128).TopPosZ(228, 16)) - ITEM(LabelBox, dv___38, SetLabel(t_("Statistical data")).RightPosZ(4, 200).TopPosZ(268, 24)) - ITEM(Label, dv___39, SetLabel(t_("RMS:")).RightPosZ(144, 56).TopPosZ(388, 19)) + ITEM(Label, dv___38, SetLabel(t_("Sensitivity")).RightPosZ(8, 60).TopPosZ(196, 19)) + ITEM(LabelBox, dv___39, SetLabel(t_("Statistical data")).RightPosZ(4, 200).TopPosZ(268, 24)) + ITEM(Label, dv___40, SetLabel(t_("RMS:")).RightPosZ(144, 56).TopPosZ(388, 19)) ITEM(EditDouble, eRMS, SetEditable(false).RightPosZ(4, 136).TopPosZ(388, 19)) - ITEM(Button, butAutoSensSector, SetLabel(t_("Autosens")).RightPosZ(4, 64).TopPosZ(248, 15)) ITEM(Label, dv___42, SetLabel(t_("Min:")).RightPosZ(144, 56).TopPosZ(340, 19)) ITEM(EditString, eMin, SetEditable(false).RightPosZ(4, 136).TopPosZ(340, 19)) END_LAYOUT @@ -196,25 +195,36 @@ LAYOUT(ProcessingTabFrequency, 552, 420) END_LAYOUT LAYOUT(ProcessingTabOp, 544, 328) - ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(50).ShowContextMenu(true).ShowPropertiesDlg(true).ShowProcessDlg(true).ShowButtons(true).HSizePosZ(0, 116).VSizePosZ(0, 0)) - ITEM(Label, dv___1, SetLabel(t_("x <")).RightPosZ(76, 24).TopPosZ(44, 19)) - ITEM(LabelBox, dv___2, SetLabel(t_("Conditions")).RightPosZ(4, 104).TopPosZ(4, 68)) - ITEM(EditDoubleLostFocus, xHigh, RightPosZ(8, 68).TopPosZ(44, 19)) - ITEM(Label, dv___4, SetLabel(t_("x >")).RightPosZ(76, 24).TopPosZ(20, 19)) ITEM(EditDoubleLostFocus, xLow, RightPosZ(8, 68).TopPosZ(20, 19)) + ITEM(EditDoubleLostFocus, xHigh, RightPosZ(8, 68).TopPosZ(44, 19)) + ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(50).ShowContextMenu(true).ShowPropertiesDlg(true).ShowProcessDlg(true).ShowButtons(true).HSizePosZ(0, 116).VSizePosZ(0, 0)) + ITEM(Label, dv___3, SetLabel(t_("x <")).RightPosZ(76, 24).TopPosZ(44, 19)) + ITEM(LabelBox, dv___4, SetLabel(t_("Conditions")).RightPosZ(4, 104).TopPosZ(4, 68)) + ITEM(Label, dv___5, SetLabel(t_("x >")).RightPosZ(76, 24).TopPosZ(20, 19)) END_LAYOUT -LAYOUT(Text, 224, 124) +LAYOUT(ProcessingTabBestFit, 700, 428) + ITEM(Switch, coefficients, SetLabel(t_("Normal\nFull\nText")).RightPosZ(108, 148).TopPosZ(24, 15)) + ITEM(EditDouble, minR2, RightPosZ(4, 44).TopPosZ(28, 19)) + ITEM(Button, butFit, SetLabel(t_("Fit")).RightPosZ(4, 88).TopPosZ(4, 20)) + ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(50).ShowContextMenu(true).ShowPropertiesDlg(true).ShowProcessDlg(true).ShowButtons(true).HSizePosZ(0, 268).VSizePosZ(0, 0)) + ITEM(ArrayCtrl, gridTrend, RightPosZ(4, 260).VSizePosZ(56, 28)) + ITEM(Label, dv___5, SetLabel(t_("Min R2:")).RightPosZ(48, 44).TopPosZ(28, 21)) + ITEM(LabelBox, dv___6, SetLabel(t_("Coefficients")).RightPosZ(100, 164).TopPosZ(4, 44)) + ITEM(EditString, userFormula, RightPosZ(4, 260).BottomPosZ(5, 19)) +END_LAYOUT + +LAYOUT(Text, 224, 108) ITEM(EditString, text, HSizePosZ(44, 4).TopPosZ(4, 19)) - ITEM(Label, dv___1, SetLabel(t_("Size:")).LeftPosZ(4, 40).TopPosZ(52, 19)) - ITEM(Label, dv___2, SetLabel(t_("Font:")).LeftPosZ(4, 40).TopPosZ(28, 19)) - ITEM(Label, dv___3, SetLabel(t_("Text:")).LeftPosZ(4, 40).TopPosZ(4, 19)) - ITEM(DropList, dv___4, HSizePosZ(44, 4).TopPosZ(28, 19)) - ITEM(Option, dv___5, SetLabel(t_("Bold")).LeftPosZ(84, 56).TopPosZ(52, 16)) - ITEM(Option, dv___6, SetLabel(t_("Italic")).LeftPosZ(84, 56).TopPosZ(76, 16)) - ITEM(EditIntSpin, dv___7, LeftPosZ(44, 36).TopPosZ(52, 19)) - ITEM(Label, dv___8, SetLabel(t_("Color:")).LeftPosZ(148, 44).TopPosZ(52, 19)) + ITEM(DropList, dv___1, HSizePosZ(44, 4).TopPosZ(28, 19)) + ITEM(EditIntSpin, dv___2, LeftPosZ(44, 36).TopPosZ(52, 19)) + ITEM(Option, dv___3, SetLabel(t_("Bold")).LeftPosZ(84, 56).TopPosZ(52, 16)) + ITEM(Option, dv___4, SetLabel(t_("Italic")).LeftPosZ(84, 56).TopPosZ(76, 16)) ITEM(ColorPusher, linecolor, LeftPosZ(196, 20).TopPosZ(52, 19)) - ITEM(Button, ok, SetLabel(t_("OK")).LeftPosZ(164, 56).TopPosZ(104, 15)) + ITEM(Button, ok, SetLabel(t_("OK")).LeftPosZ(164, 56).TopPosZ(88, 15)) + ITEM(Label, dv___7, SetLabel(t_("Size:")).LeftPosZ(4, 40).TopPosZ(52, 19)) + ITEM(Label, dv___8, SetLabel(t_("Font:")).LeftPosZ(4, 40).TopPosZ(28, 19)) + ITEM(Label, dv___9, SetLabel(t_("Text:")).LeftPosZ(4, 40).TopPosZ(4, 19)) + ITEM(Label, dv___10, SetLabel(t_("Color:")).LeftPosZ(148, 44).TopPosZ(52, 19)) END_LAYOUT diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.t b/uppsrc/ScatterCtrl/ScatterCtrl.t index b609a122a..f98c253f1 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.t +++ b/uppsrc/ScatterCtrl/ScatterCtrl.t @@ -3,6 +3,12 @@ #endif // ScatterCtrl.cpp +T_("\316\224") +caES("") +esES("\342\210\206") +euES("") +frFR("") + T_("Fit to data") caES("Ajust a les dades") esES("Ajustar a los datos") @@ -201,6 +207,24 @@ esES("Formato \"%s\" no encontrado") euES("Formatua \"%s\" ez da aurkitu") frFR("Format de fichier \"%s\" est introuvable") +T_("x") +caES("") +esES("") +euES("") +frFR("") + +T_("y1") +caES("") +esES("") +euES("") +frFR("") + +T_("y2") +caES("") +esES("") +euES("") +frFR("") + // Properties.cpp @@ -342,9 +366,15 @@ esES("Series") euES("Series") frFR("S\303\250ries") -T_("Scatter processing") +T_("Data processing") caES("") -esES("Procesando gr\303\241fico") +esES("Procesado de datos") +euES("") +frFR("") + +T_("%s processing") +caES("") +esES("Procesado de %s") euES("") frFR("") @@ -372,6 +402,18 @@ esES("Operaciones") euES("") frFR("") +T_("Best fit") +caES("") +esES("") +euES("") +frFR("") + +T_("Copy selected rows") +caES("") +esES("") +euES("") +frFR("") + T_("'x >' has to be lower than 'x <'") caES("") esES("'x >' tiene que ser menor que 'x <'") @@ -513,11 +555,11 @@ frFR("") // ScatterCtrl.lay -T_("Close") -caES("Tancar") -esES("Cerrar") -euES("Itxi") -frFR("Fermer") +T_("OK") +caES("Continuar") +esES("") +euES("") +frFR("") T_("Close this dialog") caES("Tancar aquesta finestra") @@ -561,12 +603,6 @@ esES("") euES("") frFR("") -T_("Update") -caES("") -esES("Actualizar") -euES("") -frFR("") - T_("Label Y2:") caES("Etiqueta Y2:") esES("Etiqueta Y2:") @@ -615,12 +651,48 @@ esES("Margen inferior:") euES("") frFR("") +T_("Show Legend") +caES("Mostra llegenda") +esES("Mostrar leyenda") +euES("Erakutsi legenda") +frFR("Afficher la l\303\251gende") + +T_("Top\nTable") +caES("Dalt\nTaula") +esES("Arriba\nTabla") +euES("Sortu\nTaula") +frFR("Haut\nTable") + T_("Position") caES("Posici\303\263") esES("Posici\303\263n") euES("Kokaleku") frFR("Position") +T_("Left-Top") +caES("Esq-Dalt") +esES("Izq-Arriba") +euES("Ezker-Sortu") +frFR("Gauche-Haut") + +T_("Right-Top") +caES("Dret-Dalt") +esES("Der-Arriba") +euES("Esku-Sortu") +frFR("Droit-Haut") + +T_("Left-Bottom") +caES("Esq-Fons") +esES("Izq-Abajo") +euES("Ezker-Behean") +frFR("Gauche-Bas") + +T_("Right-Bottom") +caES("Dret-Fons") +esES("Der-Abajo") +euES("Esku-Behean") +frFR("Droit-Bas") + T_("Vertical:") caES("Vertical:") esES("Vertical:") @@ -651,12 +723,6 @@ esES("Horiz.:") euES("Horitz.:") frFR("Horiz.:") -T_("Show Legend") -caES("Mostra llegenda") -esES("Mostrar leyenda") -euES("Erakutsi legenda") -frFR("Afficher la l\303\251gende") - T_("Fill color:") caES("Color de farciment:") esES("Color de relleno:") @@ -675,41 +741,17 @@ esES("Esquina de anclaje") euES("Txoko aingura") frFR("Ancrage de coin") -T_("Top\nTable") -caES("Dalt\nTaula") -esES("Arriba\nTabla") -euES("Sortu\nTaula") -frFR("Haut\nTable") - -T_("Right-Bottom") -caES("Dret-Fons") -esES("Der-Abajo") -euES("Esku-Behean") -frFR("Droit-Bas") - -T_("Left-Top") -caES("Esq-Dalt") -esES("Izq-Arriba") -euES("Ezker-Sortu") -frFR("Gauche-Haut") - -T_("Right-Top") -caES("Dret-Dalt") -esES("Der-Arriba") -euES("Esku-Sortu") -frFR("Droit-Haut") - T_("Table") caES("Taula") esES("Tabla") euES("Taula") frFR("Table") -T_("Left-Bottom") -caES("Esq-Fons") -esES("Izq-Abajo") -euES("Ezker-Behean") -frFR("Gauche-Bas") +T_("Primary") +caES("Prim\303\240ria") +esES("Primaria") +euES("Lehen") +frFR("Primaire") T_("Visible") caES("Visible") @@ -789,24 +831,30 @@ esES("Anchura:") euES("Zabalera:") frFR("Largeur:") -T_("Primary") -caES("Prim\303\240ria") -esES("Primaria") -euES("Lehen") -frFR("Primaire") - T_("Style:") caES("Estil:") esES("Estilo:") euES("Tankera:") frFR("Style:") +T_("Close") +caES("Tancar") +esES("Cerrar") +euES("Itxi") +frFR("Fermer") + T_("Sin. tend.") caES("") esES("") euES("") frFR("") +T_("Show Eq.") +caES("") +esES("Most. eq.") +euES("") +frFR("") + T_("Max curve") caES("") esES("Curva m\303\241x.") @@ -819,6 +867,24 @@ esES("Curva m\303\255n.") euES("") frFR("") +T_("Moving Average") +caES("") +esES("Media m\303\263vil") +euES("") +frFR("") + +T_("Sector Average") +caES("") +esES("Promed. sector") +euES("") +frFR("") + +T_("Autosens") +caES("") +esES("") +euES("") +frFR("") + T_("Max imp.:") caES("") esES("") @@ -837,12 +903,6 @@ esES("N\303\272m decimales:") euES("") frFR("") -T_("Show Eq.") -caES("") -esES("Most. eq.") -euES("") -frFR("") - T_("Max:") caES("") esES("M\303\241x:") @@ -867,18 +927,6 @@ esES("Sensibilidad") euES("") frFR("") -T_("Sector Average") -caES("") -esES("Promed. sector") -euES("") -frFR("") - -T_("Moving Average") -caES("") -esES("Media m\303\263vil") -euES("") -frFR("") - T_("Statistical data") caES("") esES("Datos estadisticos") @@ -891,12 +939,6 @@ esES("Med. cuad.:") euES("") frFR("") -T_("Autosens") -caES("") -esES("") -euES("") -frFR("") - T_("Min:") caES("") esES("M\303\255n:") @@ -1005,6 +1047,42 @@ esES("") euES("") frFR("") +T_("Normal\nFull\nText") +caES("") +esES("") +euES("") +frFR("") + +T_("Fit") +caES("") +esES("") +euES("") +frFR("") + +T_("Min R2:") +caES("") +esES("") +euES("") +frFR("") + +T_("Coefficients") +caES("") +esES("") +euES("") +frFR("") + +T_("Bold") +caES("") +esES("Negrita") +euES("") +frFR("") + +T_("Italic") +caES("") +esES("Cursiva") +euES("") +frFR("") + T_("Size:") caES("") esES("Tam:") @@ -1023,20 +1101,11 @@ esES("Texto:") euES("") frFR("") -T_("Bold") -caES("") -esES("Negrita") -euES("") -frFR("") -T_("Italic") -caES("") -esES("Cursiva") -euES("") -frFR("") +// Obsolete -T_("OK") -caES("Continuar") -esES("") +T_("Update") +caES("") +esES("Actualizar") euES("") frFR("") diff --git a/uppsrc/ScatterCtrl/ScatterCtrlX.cpp b/uppsrc/ScatterCtrl/ScatterCtrlX.cpp index 4597ff5c8..869300bcb 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrlX.cpp +++ b/uppsrc/ScatterCtrl/ScatterCtrlX.cpp @@ -19,8 +19,7 @@ int GetKeyCodeX(int key) { if (key > 0x00ff) key = key | 0x01000000; - key = XKeysymToKeycode(dpy, key); - key += K_DELTA; + key = XKeysymToKeycode(dpy, key) + K_DELTA; XFlush(dpy); XCloseDisplay(dpy);