Пример #1
0
        for point in selected_params["points"]:
            params = self._format_point_params(point)
            # Dummy element that will be used as legend for points to avoid
            # repetition.
            try:  # DEBUG
                self.plot_core.add_point(**params)
            except RuntimeError:
                pass
            # Draw vertical or horizontal lines that visualize point intervals
            if self.range_point.value is True:
                self.plot_core.add_line(**params)


if __name__ == "__main__":
    import sys
    from eccw_gui.shared.file_management import EccwFile

    eccwf = EccwFile(filename="../../../tests/data/test.eccw")
    # eccwf.show()
    params = eccwf.values["plot"]

    try:
        app = QtWidgets.QApplication(sys.argv)
        myapp = PlotController(**params)
        myapp.current_dir = "/home/bmary/Programmation/eccw/tests/"
        sys.exit(app.exec_())
    finally:
        print("params =")
        # graph_print(myapp.get_params())
        graph_print(myapp.get_select())
Пример #2
0
        if args:
            self.set_params(*args)
        self.show()

    def get_params(self):
        return self.lineEdit.text()

    def set_params(self, arg):
        self.lineEdit.setText(str_check(arg))

    def get_select(self):
        return self.get_params()

    def clear(self):
        self.lineEdit.clear()


if __name__ == "__main__":
    import sys

    try:
        app = QtWidgets.QApplication(sys.argv)

        myapp = TitleEdit("Random Title")
        sys.exit(app.exec_())
    finally:
        print("params=")
        graph_print(myapp.get_params(), indent=2)
        print("select=")
        graph_print(myapp.get_select(), indent=2)
Пример #3
0
    def get_select(self):
        params = WrapperDict.get_select(self)
        ID = params["focus"]
        return OrderedDict([("type", ID), ("value", params[ID])])


if __name__ == "__main__":
    import sys

    try:
        app = QtWidgets.QApplication(sys.argv)

        p1 = {"thickness": 3.0, "style": "dashed", "color": (1, 0, 0, 1)}
        p2 = {"thickness": 3.0, "style": "dotted", "color": (1, 0, 1, 1)}
        # myapp = CurveGraphicSettings(**p1, label="poulpe")

        pr = {"thickness": 3.0, "style": "dashed", "colormap": "Inferno"}
        # myapp = CurveGraphicSettings(**pr)

        pd = {"normal": p1, "inverse": p2}
        # myapp = CurveDoubleGraphicSettings(**pd)

        params = {"default": p1, "range": pr, "double": pd, "focus": "double"}
        myapp = SwitchCurveGraphicSettings(**params)
        sys.exit(app.exec_())
    finally:
        print("params =")
        graph_print(myapp.get_params())
        print("select =")
        graph_print(myapp.get_select())