From 8c5e2b2ebf20ff3051c5ae3bc69444e1fc89830f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Tue, 29 Apr 2025 14:07:16 +0200 Subject: [PATCH] Update help --- about/help_en | 42 ++++++++++++++++++++++++++++++++++++++++++ about/help_fr | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ about/help_sk | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ chartgraph.cpp | 1 + 4 files changed, 139 insertions(+) diff --git a/about/help_en b/about/help_en index 522151f..ec297b4 100644 --- a/about/help_en +++ b/about/help_en @@ -184,6 +184,48 @@ Location of this directory is on Windows: "C:/Users/<USER>/AppData/Roaming core.log(JSON.stringify(profile));
  • setSolverProfile(index) set solver profile by index. Valid values are from 1 to 8 as in GUI.
  • setSolverProfile(profile) set solver profile. Parameter is same as object returned by getSolverProfile() method
  • +
  • question(question, buttons, title = "") show dialog with question. First argument question is string. Second argument buttons + is array of following strings. "ok", "yes", "no", "yesall", "noall", "abort", "retry", "ignore", "cancel", "discard", "apply", "reset" Third argument title is optional string that show in title bar. + It return button that was clicked as a string. +
    var button = core.question("Apply to all files?", ["yes", "no"]);
    +
  • +
  • plot(graph) this method show graph defined by JS object. + +
    +var chart = {
    +    "title": "Chart title", // Title that will show on top of chart
    +    "legend":
    +    {
    +        "visible": true,// default is true
    +        "align": "left" // allowed values are "top", "right", "bottom", "left". default is "top"
    +    },
    +    "series":[ // array of data series
    +        {
    +            "title": "HFR",
    +            "type": "bar", // type of the serie. Can be one of "line", "points", "linePoints", "bar"
    +            "y":[2.5,3.1,2.6,2.2] // array of values
    +        },
    +        {
    +            "title": "Ecc",
    +            "y":[0.37, 0.4, 0.35, 0.25],
    +            "color": "red" // color of serie. It can be name of color like "green" or RGB hex value "#ccddff"
    +        },
    +        {
    +            "title": "Stars",
    +            "type": "points", // type of serie. can be "line", "points", "linePoints" and "bar". Default is "line"
    +            "shape": "star", // shape of markers. valid only for points
    +            "x":[1, 2.5, 3.5, 6],// line, points and linePoints can also have "x" values. Otherwise it assume sequence 0,1,2 ...
    +            "y":[523,412,487,510],
    +            "y2": true, // if set to true this serie will use secondary Y axis
    +            "bestFit": true, // show best fit line
    +            "color": "#0000ff"
    +        }
    +    ]
    +};
    +
    +core.plot(chart);
    +
    +
  • File

    diff --git a/about/help_fr b/about/help_fr index 325cf49..3665b73 100644 --- a/about/help_fr +++ b/about/help_fr @@ -135,6 +135,54 @@ Le deuxième paramètre est la valeur par défaut dans la zone de saisie. Les tr
  • getItem(items) affiche une boîte de dialogue de sélection qui permet de sélectionner un élément dans un tableau d'éléments. Lorsque vous appuyez sur Annuler, il renvoie Undefined.
  • setStartingSolution(solution) with this you can set starting point and image scale. It accepth object with attributes "ra", "dec", "pixscale". Same object as returned by File.solve() method. You can also call it without paramer in which case it will clear any previously set values.
  • +
  • getSolverProfile() return solver profile as Object. +
    var profile = core.getSolverProfile();
    +core.log(JSON.stringify(profile));
  • +
  • setSolverProfile(index) set solver profile by index. Valid values are from 1 to 8 as in GUI.
  • +
  • setSolverProfile(profile) set solver profile. Parameter is same as object returned by getSolverProfile() method
  • +
  • question(question, buttons, title = "") show dialog with question. First argument question is string. Second argument buttons + is array of following strings. "ok", "yes", "no", "yesall", "noall", "abort", "retry", "ignore", "cancel", "discard", "apply", "reset" Third argument title is optional string that show in title bar. + It return button that was clicked as a string. +
    var button = core.question("Apply to all files?", ["yes", "no"]);
    +
  • +
  • plot(graph) this method show graph defined by JS object. + +
    +var chart = {
    +    "title": "Chart title", // Title that will show on top of chart
    +    "legend":
    +    {
    +        "visible": true,// default is true
    +        "align": "left" // allowed values are "top", "right", "bottom", "left". default is "top"
    +    },
    +    "series":[ // array of data series
    +        {
    +            "title": "HFR",
    +            "type": "bar", // type of the serie. Can be one of "line", "points", "linePoints", "bar"
    +            "y":[2.5,3.1,2.6,2.2] // array of values
    +        },
    +        {
    +            "title": "Ecc",
    +            "y":[0.37, 0.4, 0.35, 0.25],
    +            "color": "red" // color of serie. It can be name of color like "green" or RGB hex value "#ccddff"
    +        },
    +        {
    +            "title": "Stars",
    +            "type": "points", // type of serie. can be "line", "points", "linePoints" and "bar". Default is "line"
    +            "shape": "star", // shape of markers. valid only for points
    +            "x":[1, 2.5, 3.5, 6],// line, points and linePoints can also have "x" values. Otherwise it assume sequence 0,1,2 ...
    +            "y":[523,412,487,510],
    +            "y2": true, // if set to true this serie will use secondary Y axis
    +            "bestFit": true, // show best fit line
    +            "color": "#0000ff"
    +        }
    +    ]
    +};
    +
    +core.plot(chart);
    +
    +
  • +

    File

    diff --git a/about/help_sk b/about/help_sk index ef0e0b6..cf6cc79 100644 --- a/about/help_sk +++ b/about/help_sk @@ -126,6 +126,54 @@ V skripte je dostupný globálny objekt nazvaný core ktorý má nasledov
  • getItem(items) ukáže dialog pre výber jednej hodnoty z poľa hodnôt. Vracia vybranú hodnotu ako String alebo ak je stlačené tlačidlo zrušiť vráti Undefined.
  • setStartingSolution(solution) with this you can set starting point and image scale. It accepth object with attributes "ra", "dec", "pixscale". Same object as returned by File.solve() method. You can also call it without paramer in which case it will clear any previously set values.
  • +
  • getSolverProfile() return solver profile as Object. +
    var profile = core.getSolverProfile();
    +core.log(JSON.stringify(profile));
  • +
  • setSolverProfile(index) set solver profile by index. Valid values are from 1 to 8 as in GUI.
  • +
  • setSolverProfile(profile) set solver profile. Parameter is same as object returned by getSolverProfile() method
  • +
  • question(question, buttons, title = "") show dialog with question. First argument question is string. Second argument buttons + is array of following strings. "ok", "yes", "no", "yesall", "noall", "abort", "retry", "ignore", "cancel", "discard", "apply", "reset" Third argument title is optional string that show in title bar. + It return button that was clicked as a string. +
    var button = core.question("Apply to all files?", ["yes", "no"]);
    +
  • +
  • plot(graph) this method show graph defined by JS object. + +
    +var chart = {
    +    "title": "Chart title", // Title that will show on top of chart
    +    "legend":
    +    {
    +        "visible": true,// default is true
    +        "align": "left" // allowed values are "top", "right", "bottom", "left". default is "top"
    +    },
    +    "series":[ // array of data series
    +        {
    +            "title": "HFR",
    +            "type": "bar", // type of the serie. Can be one of "line", "points", "linePoints", "bar"
    +            "y":[2.5,3.1,2.6,2.2] // array of values
    +        },
    +        {
    +            "title": "Ecc",
    +            "y":[0.37, 0.4, 0.35, 0.25],
    +            "color": "red" // color of serie. It can be name of color like "green" or RGB hex value "#ccddff"
    +        },
    +        {
    +            "title": "Stars",
    +            "type": "points", // type of serie. can be "line", "points", "linePoints" and "bar". Default is "line"
    +            "shape": "star", // shape of markers. valid only for points
    +            "x":[1, 2.5, 3.5, 6],// line, points and linePoints can also have "x" values. Otherwise it assume sequence 0,1,2 ...
    +            "y":[523,412,487,510],
    +            "y2": true, // if set to true this serie will use secondary Y axis
    +            "bestFit": true, // show best fit line
    +            "color": "#0000ff"
    +        }
    +    ]
    +};
    +
    +core.plot(chart);
    +
    +
  • +

    File

    diff --git a/chartgraph.cpp b/chartgraph.cpp index 082cc73..f6a62e8 100644 --- a/chartgraph.cpp +++ b/chartgraph.cpp @@ -89,6 +89,7 @@ protected: ChartGraph::ChartGraph(QWidget *parent) : QMainWindow(parent) { setAttribute(Qt::WA_DeleteOnClose); + setWindowTitle(tr("Chart")); _chartView = new ChartView(this); setCentralWidget(_chartView);