From d0e402066001a4c775ea5d6a8cf5e9e87b985f6a Mon Sep 17 00:00:00 2001 From: MatManSky Date: Wed, 18 Oct 2023 00:13:39 +0300 Subject: [PATCH] =?UTF-8?q?PlotterDialog=20=D0=B1=D1=8B=D0=BB=20=D0=B8?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D1=91=D0=BD=20=D0=BC=D0=BD=D0=BE=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QдизайнT/PlotterDialog.py | 96 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 QдизайнT/PlotterDialog.py diff --git a/QдизайнT/PlotterDialog.py b/QдизайнT/PlotterDialog.py new file mode 100644 index 0000000..e3173df --- /dev/null +++ b/QдизайнT/PlotterDialog.py @@ -0,0 +1,96 @@ +from PyQt5.QtWidgets import * +class Widget1(QWidget): + def __init__(self, parent=None): + QWidget.__init__(self, parent=parent) + layout = QFormLayout(self) + LineEditGraf = QLineEdit("график 1") + NameX=QGroupBox("X") + NameY = QGroupBox("Y") + LineEditX = QLineEdit() + LineEditY = QLineEdit() + layout.addWidget(LineEditGraf) + layout.addWidget(NameX) + layout.addWidget(LineEditX) + layout.addWidget(NameY) + layout.addWidget(LineEditY) +class Widget2(QWidget): + def __init__(self, parent=None): + QWidget.__init__(self, parent=parent) + layout = QHBoxLayout(self) + + # Кнопки функций + VariabelsButton_t = QPushButton('t', self) + #VariabelsButton_t.clicked.connect(self.on_click) + layout.addWidget(VariabelsButton_t) + + VariabelsButton_p = QPushButton('p', self) + # VariabelsButton_p.clicked.connect(self.on_click) + layout.addWidget(VariabelsButton_p) + + VariabelsButton_f = QPushButton('f', self) + # VariabelsButton_f.clicked.connect(self.on_click) + layout.addWidget(VariabelsButton_f) + + +class Widget3(QWidget): + def __init__(self, parent=None): + QWidget.__init__(self, parent=parent) + layout = QHBoxLayout(self) + + # Кнопки функций + FunctonButton_exp = QPushButton('exp', self) + #FunctonButton_exp.clicked.connect(self.on_click) + layout.addWidget(FunctonButton_exp) + + FunctonButton_ln = QPushButton('ln', self) + #FunctonButton_ln.clicked.connect(self.on_click) + layout.addWidget(FunctonButton_ln) + + FunctonButton_abs = QPushButton('abs', self) + #FunctonButton_abs.clicked.connect(self.on_click) + layout.addWidget(FunctonButton_abs) + + FunctonButton_sin = QPushButton('sin', self) + #FunctonButton_sin.clicked.connect(self.on_click) + layout.addWidget(FunctonButton_sin) + + FunctonButton_cos = QPushButton('cos', self) + #FunctonButton_cos.clicked.connect(self.on_click) + layout.addWidget(FunctonButton_cos) + + FunctonButton_tg = QPushButton('tg', self) + #FunctonButton_tg.clicked.connect(self.on_click) + layout.addWidget(FunctonButton_tg) +class stackedExample(QWidget): + def __init__(self, parent=None): + QWidget.__init__(self, parent=parent) + lay = QVBoxLayout(self) + self.Stack = QStackedWidget() + self.Stack.addWidget(Widget1()) + self.Stack.addWidget(Widget2()) + self.Stack.addWidget(Widget3()) + + btnNext = QPushButton("Next") + btnNext.clicked.connect(self.onNext) + btnPrevious = QPushButton("Previous") + btnPrevious.clicked.connect(self.onPrevious) + btnLayout = QHBoxLayout() + btnLayout.addWidget(btnPrevious) + btnLayout.addWidget(btnNext) + + lay.addWidget(self.Stack) + lay.addLayout(btnLayout) + + def onNext(self): + self.Stack.setCurrentIndex((self.Stack.currentIndex()+1) % 3) + + def onPrevious(self): + self.Stack.setCurrentIndex((self.Stack.currentIndex()-1) % 3) + + +if __name__ == '__main__': + import sys + app = QApplication(sys.argv) + w = stackedExample() + w.show() + sys.exit(app.exec_()) \ No newline at end of file