diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.cpp b/uppsrc/ScatterCtrl/ScatterCtrl.cpp index e6e165010..575dc140e 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.cpp +++ b/uppsrc/ScatterCtrl/ScatterCtrl.cpp @@ -637,6 +637,12 @@ void ScatterCtrl::InsertSeries(int id, GridCtrl &data, bool useCols, int idX, in InsertSeries(id, data, useCols, idX, idY, beginData, numData); } +void ScatterCtrl::CheckButtonVisible() { + processButton.Show(showButtons && showProcessDlg); + dataButton.Show(showButtons && showPropDlg); + propertiesButton.Show(showButtons && showPropDlg); +} + ScatterCtrl::ScatterCtrl() : offset(10,12), copyRatio(1), isLeftDown(false) { showInfo = mouseHandlingX = mouseHandlingY = isScrolling = isLabelPopUp = isZoomWindow = false; @@ -648,6 +654,7 @@ ScatterCtrl::ScatterCtrl() : offset(10,12), copyRatio(1), isLeftDown(false) showContextMenu = false; showPropDlg = false; showProcessDlg = false; + showButtons = false; defaultCSVseparator = ";"; Color(graphColor); BackPaint(); @@ -658,6 +665,21 @@ ScatterCtrl::ScatterCtrl() : offset(10,12), copyRatio(1), isLeftDown(false) highlighting = false; ShowInfo().ShowContextMenu().ShowPropertiesDlg(); + Add(processButton.RightPosZ(0, 15).TopPosZ(0, 15)); + processButton.Show(false); + processButton.SetImage(ScatterImg::chart_curve_edit()).Tip(t_("Data processing dialog")); + processButton.WhenAction = THISBACK(DoProcessing); + + Add(dataButton.RightPosZ(15, 15).TopPosZ(0, 15)); + dataButton.Show(false); + dataButton.SetImage(ScatterImg::Database()).Tip(t_("Raw data table")); + dataButton.WhenAction = THISBACK(DoShowData); + + Add(propertiesButton.RightPosZ(30, 15).TopPosZ(0, 15)); + propertiesButton.Show(false); + propertiesButton.SetImage(ScatterImg::Gear()).Tip(t_("Plot properties dialog")); + propertiesButton.WhenAction = THISBACK1(DoShowEditDlg, 0); + AddMouseBehavior(false, false, false, true , false, 0, false, ScatterCtrl::SHOW_COORDINATES); AddMouseBehavior(true, false, false, true , false, 0, false, ScatterCtrl::ZOOM_WINDOW); AddMouseBehavior(false, false, false, false, false, 0, true , ScatterCtrl::CONTEXT_MENU); diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.h b/uppsrc/ScatterCtrl/ScatterCtrl.h index 372ffd50b..2e0af7f32 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.h +++ b/uppsrc/ScatterCtrl/ScatterCtrl.h @@ -172,9 +172,23 @@ public: void RemoveKeyBehavior(ScatterAction action); void ClearKeyBehavior(); - ScatterCtrl& ShowContextMenu(bool show = true) {showContextMenu = show; return *this;} - ScatterCtrl& ShowPropertiesDlg(bool show = true) {showPropDlg = show; return *this;} - ScatterCtrl& ShowProcessDlg(bool show = true) {showProcessDlg = show; return *this;} + ScatterCtrl& ShowContextMenu(bool show = true) {showContextMenu = show; return *this;} + ScatterCtrl& ShowPropertiesDlg(bool show = true){ + showPropDlg = show; + CheckButtonVisible(); + return *this; + } + ScatterCtrl& ShowProcessDlg(bool show = true) { + showProcessDlg = show; + CheckButtonVisible(); + return *this; + } + ScatterCtrl& ShowButtons(bool show = true) { + showButtons = show; + CheckButtonVisible(); + return *this; + } + void CheckButtonVisible(); ScatterCtrl& SetPopText(const String x, const String y1, const String y2) {popTextX = x; popTextY = y1; popTextY2 = y2; return *this;} @@ -273,6 +287,7 @@ private: bool showContextMenu; bool showPropDlg; bool showProcessDlg; + bool showButtons; int lastRefresh_ms; dword lastRefresh0_ms; @@ -323,6 +338,8 @@ private: String defaultCSVseparator; FileSel fileToSave; + + Button processButton, dataButton, propertiesButton; }; template diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.lay b/uppsrc/ScatterCtrl/ScatterCtrl.lay index 86d70a96a..303bee1b9 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.lay +++ b/uppsrc/ScatterCtrl/ScatterCtrl.lay @@ -128,7 +128,7 @@ LAYOUT(ProcessingTabFit, 580, 400) ITEM(Option, opMax, SetLabel(t_("Max curve")).RightPosZ(72, 128).TopPosZ(168, 16)) ITEM(Option, opMin, SetLabel(t_("Min curve")).RightPosZ(72, 128).TopPosZ(188, 16)) ITEM(Option, opSpline, SetLabel(t_("Spline")).RightPosZ(72, 128).TopPosZ(124, 16)) - ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(50).HSizePosZ(0, 208).VSizePosZ(0, 0)) + 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_("Min:")).RightPosZ(160, 40).TopPosZ(296, 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(144, 19)) @@ -160,7 +160,7 @@ LAYOUT(ProcessingTabFit, 580, 400) END_LAYOUT LAYOUT(ProcessingTabFrequency, 524, 276) - ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(40).HSizePosZ(0, 100).VSizePosZ(0, 20)) + ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(40).ShowContextMenu(true).ShowPropertiesDlg(true).ShowProcessDlg(true).ShowButtons(true).HSizePosZ(0, 100).VSizePosZ(0, 20)) ITEM(Label, dv___1, SetLabel(t_("sec")).RightPosZ(4, 28).TopPosZ(20, 19)) ITEM(EditDouble, samplingTime, RightPosZ(36, 56).TopPosZ(20, 19)) ITEM(Button, butFFT, SetLabel(t_("FFT")).RightPosZ(4, 88).TopPosZ(48, 20)) @@ -173,7 +173,7 @@ LAYOUT(ProcessingTabFrequency, 524, 276) END_LAYOUT LAYOUT(ProcessingTabOp, 544, 328) - ITEM(ScatterCtrl, scatter, SetPlotAreaLeftMargin(60).SetPlotAreaBottomMargin(50).HSizePosZ(0, 116).VSizePosZ(0, 0)) + 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, xLower, RightPosZ(8, 68).TopPosZ(44, 19)) diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.t b/uppsrc/ScatterCtrl/ScatterCtrl.t index 5e04cf42b..997b11cb0 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.t +++ b/uppsrc/ScatterCtrl/ScatterCtrl.t @@ -143,7 +143,7 @@ frFR("") T_("Data processing dialog") caES("") -esES("Dia\303\241logo para procesado de datos") +esES("Di\303\241logo para procesado de datos") euES("") frFR("") @@ -867,6 +867,12 @@ esES("Datos estadisticos") euES("") frFR("") +T_("RMS:") +caES("") +esES("") +euES("") +frFR("") + T_("sec") caES("") esES("seg") diff --git a/uppsrc/ScatterCtrl/ScatterCtrl.usc b/uppsrc/ScatterCtrl/ScatterCtrl.usc index 1b8f0f353..16e1d1a66 100644 --- a/uppsrc/ScatterCtrl/ScatterCtrl.usc +++ b/uppsrc/ScatterCtrl/ScatterCtrl.usc @@ -40,6 +40,10 @@ ctrl ScatterCtrl { bool ShowHGrid = true; bool ShowVGrid = true; bool ShowInfo = true; + bool ShowContextMenu = false; + bool ShowPropertiesDlg = false; + bool ShowProcessDlg = false; + bool ShowButtons = false; bool ShowLegend = true; LEGEND_POS SetLegendAnchor; int SetLegendPosX = 5;