Compare commits
No commits in common. "33edfe999f60257235221d793b03e08e8fcbad01" and "b1f9f71fae168a9eac5f5e2502e1352524e04436" have entirely different histories.
33edfe999f
...
b1f9f71fae
Binary file not shown.
Before Width: | Height: | Size: 340 B |
@ -1,96 +0,0 @@
|
|||||||
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_())
|
|
Loading…
x
Reference in New Issue
Block a user