1
0
forked from IPKM/nmreval

Compare commits

...

6 Commits

Author SHA1 Message Date
90084e3481 dev (#297)
this time it will not break!

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: IPKM/nmreval#297
2024-11-14 17:20:31 +00:00
91b2594b90 Revert "dev (#295)"
This reverts commit 7145f9e3cd.
2024-11-14 12:14:17 +01:00
7145f9e3cd dev (#295)
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: IPKM/nmreval#295
2024-11-13 13:02:05 +00:00
4108deb69a run scripts
run scripts

Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: IPKM/nmreval#291
2024-09-29 17:21:40 +00:00
b2a3881fa8 dev (#285)
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: IPKM/nmreval#285
2024-09-11 15:33:00 +00:00
1ab32af333 dev (#284)
Co-authored-by: Dominik Demuth <dominik.demuth@physik.tu-darmstadt.de>
Reviewed-on: IPKM/nmreval#284
Co-authored-by: Dominik Demuth <dominik.demuth@pkm.tu-darmstadt.de>
Co-committed-by: Dominik Demuth <dominik.demuth@pkm.tu-darmstadt.de>
2024-09-07 17:25:01 +00:00
41 changed files with 2347 additions and 737 deletions

View File

@ -360,7 +360,7 @@ class Ui_ascii_reader(object):
self.x_label.setText(_translate("ascii_reader", "x")) self.x_label.setText(_translate("ascii_reader", "x"))
self.dsdfsf.setText(_translate("ascii_reader", "Numerical value")) self.dsdfsf.setText(_translate("ascii_reader", "Numerical value"))
self.label_9.setText(_translate("ascii_reader", "Match index")) self.label_9.setText(_translate("ascii_reader", "Match index"))
self.regex_input.setToolTip(_translate("ascii_reader", "<html><head/><body><p>Token:<br/>[abc]: Matches any of a, b, or c<br/>[a-z]: Matches any digit in the range a-z<br/>\\d: Matches any digit in the range 0-9 (equal to [0-9}</p><p>Quantifiers:<br/>a*: 0 or more of a<br/>a*: 1 or more of a<br/>a?: 0 or 1 of a</p></body></html>")) self.regex_input.setToolTip(_translate("ascii_reader", "<html><head/><body><p>Token:<br/>[abc]: Matches any of a, b, or c<br/>[a-z]: Matches any digit in the range a-z<br/>\\d: Matches any digit in the range 0-9 (equal to [0-9}</p><p>Quantifiers:<br/>a*: 0 or more of a<br/>a+: 1 or more of a<br/>a?: 0 or 1 of a</p></body></html>"))
self.re_button.setText(_translate("ascii_reader", "Regex")) self.re_button.setText(_translate("ascii_reader", "Regex"))
self.custom_button.setText(_translate("ascii_reader", "Custom value")) self.custom_button.setText(_translate("ascii_reader", "Custom value"))
self.label_8.setText(_translate("ascii_reader", "Filename")) self.label_8.setText(_translate("ascii_reader", "Filename"))

View File

@ -372,6 +372,8 @@ class Ui_BaseWindow(object):
self.action_cut_xaxis.setObjectName("action_cut_xaxis") self.action_cut_xaxis.setObjectName("action_cut_xaxis")
self.action_cut_yaxis = QtWidgets.QAction(BaseWindow) self.action_cut_yaxis = QtWidgets.QAction(BaseWindow)
self.action_cut_yaxis.setObjectName("action_cut_yaxis") self.action_cut_yaxis.setObjectName("action_cut_yaxis")
self.actionUse_script = QtWidgets.QAction(BaseWindow)
self.actionUse_script.setObjectName("actionUse_script")
self.menuSave.addAction(self.actionSave) self.menuSave.addAction(self.actionSave)
self.menuSave.addAction(self.actionExportGraphic) self.menuSave.addAction(self.actionExportGraphic)
self.menuSave.addAction(self.action_save_fit_parameter) self.menuSave.addAction(self.action_save_fit_parameter)
@ -399,6 +401,7 @@ class Ui_BaseWindow(object):
self.menuData.addAction(self.menuCut_to_visible_range.menuAction()) self.menuData.addAction(self.menuCut_to_visible_range.menuAction())
self.menuData.addSeparator() self.menuData.addSeparator()
self.menuData.addAction(self.actionChange_datatypes) self.menuData.addAction(self.actionChange_datatypes)
self.menuData.addAction(self.actionUse_script)
self.menuHelp.addAction(self.actionShow_error_log) self.menuHelp.addAction(self.actionShow_error_log)
self.menuHelp.addAction(self.actionUpdate) self.menuHelp.addAction(self.actionUpdate)
self.menuHelp.addAction(self.actionBugs) self.menuHelp.addAction(self.actionBugs)
@ -647,6 +650,7 @@ class Ui_BaseWindow(object):
self.action_cut_xaxis.setToolTip(_translate("BaseWindow", "Remove data points outside visible x range.")) self.action_cut_xaxis.setToolTip(_translate("BaseWindow", "Remove data points outside visible x range."))
self.action_cut_yaxis.setText(_translate("BaseWindow", "y axis")) self.action_cut_yaxis.setText(_translate("BaseWindow", "y axis"))
self.action_cut_yaxis.setToolTip(_translate("BaseWindow", "Remove data points outside visible y range. Uses real part of points.")) self.action_cut_yaxis.setToolTip(_translate("BaseWindow", "Remove data points outside visible y range. Uses real part of points."))
self.actionUse_script.setText(_translate("BaseWindow", "Use script..."))
from ..data.datawidget.datawidget import DataWidget from ..data.datawidget.datawidget import DataWidget
from ..data.integral_widget import IntegralWidget from ..data.integral_widget import IntegralWidget
from ..data.point_select import PointSelectWidget from ..data.point_select import PointSelectWidget

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/datawidget.ui' # Form implementation generated from reading ui file './nmreval/src/resources/_ui/datawidget.ui'
# #
# Created by: PyQt5 UI code generator 5.12.3 # Created by: PyQt5 UI code generator 5.15.10
# #
# WARNING! All changes made in this file will be lost! # WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -49,6 +50,12 @@ class Ui_DataWidget(object):
self.horizontalLayout.addWidget(self.func_toolButton) self.horizontalLayout.addWidget(self.func_toolButton)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem) self.horizontalLayout.addItem(spacerItem)
self.pokemon_toolbutton = QtWidgets.QToolButton(self.frame)
self.pokemon_toolbutton.setText("")
self.pokemon_toolbutton.setToolButtonStyle(QtCore.Qt.ToolButtonTextOnly)
self.pokemon_toolbutton.setAutoRaise(True)
self.pokemon_toolbutton.setObjectName("pokemon_toolbutton")
self.horizontalLayout.addWidget(self.pokemon_toolbutton)
self.verticalLayout_2.addWidget(self.frame) self.verticalLayout_2.addWidget(self.frame)
self.retranslateUi(DataWidget) self.retranslateUi(DataWidget)

260
src/gui_qt/_py/pokeentry.py Normal file
View File

@ -0,0 +1,260 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './nmreval/src/resources/_ui/pokeentry.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(640, 642)
self.verticalLayout_4 = QtWidgets.QVBoxLayout(Form)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.artwork_label = QtWidgets.QLabel(Form)
self.artwork_label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.artwork_label.setObjectName("artwork_label")
self.verticalLayout_4.addWidget(self.artwork_label)
self.formLayout = QtWidgets.QFormLayout()
self.formLayout.setContentsMargins(3, 3, 3, 3)
self.formLayout.setVerticalSpacing(12)
self.formLayout.setObjectName("formLayout")
self.label = QtWidgets.QLabel(Form)
self.label.setObjectName("label")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
self.nationaldex_label = QtWidgets.QLabel(Form)
self.nationaldex_label.setObjectName("nationaldex_label")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.nationaldex_label)
self.label_1 = QtWidgets.QLabel(Form)
self.label_1.setObjectName("label_1")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_1)
self.species_label = QtWidgets.QLabel(Form)
self.species_label.setObjectName("species_label")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.species_label)
self.label_4 = QtWidgets.QLabel(Form)
self.label_4.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_4)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.type1_label = QtWidgets.QLabel(Form)
self.type1_label.setObjectName("type1_label")
self.verticalLayout_2.addWidget(self.type1_label)
self.type2_label = QtWidgets.QLabel(Form)
self.type2_label.setObjectName("type2_label")
self.verticalLayout_2.addWidget(self.type2_label)
self.formLayout.setLayout(2, QtWidgets.QFormLayout.FieldRole, self.verticalLayout_2)
self.label_5 = QtWidgets.QLabel(Form)
self.label_5.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.label_5.setObjectName("label_5")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.ability1_label = QtWidgets.QLabel(Form)
self.ability1_label.setObjectName("ability1_label")
self.verticalLayout.addWidget(self.ability1_label)
self.ability2_label = QtWidgets.QLabel(Form)
self.ability2_label.setObjectName("ability2_label")
self.verticalLayout.addWidget(self.ability2_label)
self.ability3_label = QtWidgets.QLabel(Form)
self.ability3_label.setObjectName("ability3_label")
self.verticalLayout.addWidget(self.ability3_label)
self.formLayout.setLayout(3, QtWidgets.QFormLayout.FieldRole, self.verticalLayout)
self.label_2 = QtWidgets.QLabel(Form)
self.label_2.setObjectName("label_2")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_2)
self.height_label = QtWidgets.QLabel(Form)
self.height_label.setObjectName("height_label")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.height_label)
self.label_3 = QtWidgets.QLabel(Form)
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.weight_label = QtWidgets.QLabel(Form)
self.weight_label.setObjectName("weight_label")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.weight_label)
self.gender_label = QtWidgets.QLabel(Form)
self.gender_label.setObjectName("gender_label")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.gender_label)
self.verticalLayout_4.addLayout(self.formLayout)
self.groupBox = QtWidgets.QGroupBox(Form)
self.groupBox.setFlat(True)
self.groupBox.setObjectName("groupBox")
self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox)
self.gridLayout_4.setContentsMargins(3, 3, 3, 3)
self.gridLayout_4.setObjectName("gridLayout_4")
self.spec_attack_bar = QtWidgets.QProgressBar(self.groupBox)
self.spec_attack_bar.setStyleSheet("QProgressBar{\n"
" border: none;\n"
" background-color: transparent;\n"
" text-align: center;\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: #009cda;\n"
" border-radius: 3px;\n"
"}")
self.spec_attack_bar.setMaximum(194)
self.spec_attack_bar.setProperty("value", 24)
self.spec_attack_bar.setObjectName("spec_attack_bar")
self.gridLayout_4.addWidget(self.spec_attack_bar, 0, 3, 1, 1)
self.label_8 = QtWidgets.QLabel(self.groupBox)
self.label_8.setObjectName("label_8")
self.gridLayout_4.addWidget(self.label_8, 0, 2, 1, 1)
self.spec_defense_bar = QtWidgets.QProgressBar(self.groupBox)
self.spec_defense_bar.setStyleSheet("QProgressBar{\n"
" border: none;\n"
" background-color: transparent;\n"
" text-align: center;\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: #009cda;\n"
" border-radius: 3px;\n"
"}")
self.spec_defense_bar.setMaximum(250)
self.spec_defense_bar.setProperty("value", 24)
self.spec_defense_bar.setObjectName("spec_defense_bar")
self.gridLayout_4.addWidget(self.spec_defense_bar, 1, 3, 1, 1)
self.label_6 = QtWidgets.QLabel(self.groupBox)
self.label_6.setFrameShadow(QtWidgets.QFrame.Plain)
self.label_6.setObjectName("label_6")
self.gridLayout_4.addWidget(self.label_6, 0, 0, 1, 1)
self.hp_bar = QtWidgets.QProgressBar(self.groupBox)
self.hp_bar.setStyleSheet("QProgressBar{\n"
" border: none;\n"
" background-color: transparent;\n"
" text-align: center;\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: #009cda;\n"
" border-radius: 3px;\n"
"}")
self.hp_bar.setMaximum(255)
self.hp_bar.setProperty("value", 24)
self.hp_bar.setObjectName("hp_bar")
self.gridLayout_4.addWidget(self.hp_bar, 0, 1, 1, 1)
self.speed_bar = QtWidgets.QProgressBar(self.groupBox)
self.speed_bar.setStyleSheet("QProgressBar{\n"
" border: none;\n"
" background-color: transparent;\n"
" text-align: center;\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: #009cda;\n"
" border-radius: 3px;\n"
"}")
self.speed_bar.setMaximum(200)
self.speed_bar.setProperty("value", 24)
self.speed_bar.setObjectName("speed_bar")
self.gridLayout_4.addWidget(self.speed_bar, 2, 3, 1, 1)
self.label_11 = QtWidgets.QLabel(self.groupBox)
self.label_11.setObjectName("label_11")
self.gridLayout_4.addWidget(self.label_11, 2, 2, 1, 1)
self.label_10 = QtWidgets.QLabel(self.groupBox)
self.label_10.setObjectName("label_10")
self.gridLayout_4.addWidget(self.label_10, 1, 2, 1, 1)
self.defense_bar = QtWidgets.QProgressBar(self.groupBox)
self.defense_bar.setStyleSheet("QProgressBar{\n"
" border: none;\n"
" background-color: transparent;\n"
" text-align: center;\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: #009cda;\n"
" border-radius: 3px;\n"
"}")
self.defense_bar.setMaximum(250)
self.defense_bar.setProperty("value", 24)
self.defense_bar.setObjectName("defense_bar")
self.gridLayout_4.addWidget(self.defense_bar, 2, 1, 1, 1)
self.attack_bar = QtWidgets.QProgressBar(self.groupBox)
self.attack_bar.setStyleSheet("QProgressBar{\n"
" border: none;\n"
" background-color: transparent;\n"
" text-align: center;\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: #009cda;\n"
" border-radius: 3px;\n"
"}")
self.attack_bar.setMaximum(190)
self.attack_bar.setProperty("value", 24)
self.attack_bar.setObjectName("attack_bar")
self.gridLayout_4.addWidget(self.attack_bar, 1, 1, 1, 1)
self.label_7 = QtWidgets.QLabel(self.groupBox)
self.label_7.setObjectName("label_7")
self.gridLayout_4.addWidget(self.label_7, 1, 0, 1, 1)
self.label_9 = QtWidgets.QLabel(self.groupBox)
self.label_9.setObjectName("label_9")
self.gridLayout_4.addWidget(self.label_9, 2, 0, 1, 1)
self.verticalLayout_4.addWidget(self.groupBox)
self.groupBox_2 = QtWidgets.QGroupBox(Form)
self.groupBox_2.setFlat(True)
self.groupBox_2.setCheckable(False)
self.groupBox_2.setObjectName("groupBox_2")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_2)
self.verticalLayout_3.setContentsMargins(3, 3, 3, 3)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.tableWidget = QtWidgets.QTableWidget(self.groupBox_2)
self.tableWidget.setStyleSheet("background-color: transparent;")
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.tableWidget.setShowGrid(False)
self.tableWidget.setGridStyle(QtCore.Qt.NoPen)
self.tableWidget.setWordWrap(False)
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setColumnCount(0)
self.tableWidget.setRowCount(0)
self.tableWidget.horizontalHeader().setVisible(False)
self.tableWidget.verticalHeader().setVisible(False)
self.verticalLayout_3.addWidget(self.tableWidget)
self.verticalLayout_4.addWidget(self.groupBox_2)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_4.addItem(spacerItem)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.artwork_label.setText(_translate("Form", "TextLabel"))
self.label.setText(_translate("Form", "National No."))
self.nationaldex_label.setText(_translate("Form", "TextLabel"))
self.label_1.setText(_translate("Form", "Species"))
self.species_label.setText(_translate("Form", "TextLabel"))
self.label_4.setText(_translate("Form", "Type"))
self.type1_label.setText(_translate("Form", "TextLabel"))
self.type2_label.setText(_translate("Form", "TextLabel"))
self.label_5.setText(_translate("Form", "Abilities"))
self.ability1_label.setText(_translate("Form", "TextLabel"))
self.ability2_label.setText(_translate("Form", "TextLabel"))
self.ability3_label.setText(_translate("Form", "TextLabel"))
self.label_2.setText(_translate("Form", "Height"))
self.height_label.setText(_translate("Form", "0.0 m"))
self.label_3.setText(_translate("Form", "Weight"))
self.weight_label.setText(_translate("Form", "0.0 kg"))
self.gender_label.setText(_translate("Form", "TextLabel"))
self.groupBox.setTitle(_translate("Form", "Stats"))
self.spec_attack_bar.setFormat(_translate("Form", "%v"))
self.label_8.setText(_translate("Form", "Special Attack"))
self.spec_defense_bar.setFormat(_translate("Form", "%v"))
self.label_6.setText(_translate("Form", "HP"))
self.hp_bar.setFormat(_translate("Form", "%v"))
self.speed_bar.setFormat(_translate("Form", "%v"))
self.label_11.setText(_translate("Form", "Speed"))
self.label_10.setText(_translate("Form", "Special Defense"))
self.defense_bar.setFormat(_translate("Form", "%v"))
self.attack_bar.setFormat(_translate("Form", "%v"))
self.label_7.setText(_translate("Form", "Attack"))
self.label_9.setText(_translate("Form", "Defense"))
self.groupBox_2.setTitle(_translate("Form", "Evolution chain"))

View File

@ -1,118 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/pokemon.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(400, 359)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
Dialog.setSizePolicy(sizePolicy)
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName("verticalLayout")
self.tabWidget = QtWidgets.QTabWidget(Dialog)
self.tabWidget.setObjectName("tabWidget")
self.verticalLayout.addWidget(self.tabWidget)
self.formLayout = QtWidgets.QFormLayout()
self.formLayout.setObjectName("formLayout")
self.label = QtWidgets.QLabel(Dialog)
self.label.setObjectName("label")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
self.pokedex_nr = QtWidgets.QLabel(Dialog)
self.pokedex_nr.setObjectName("pokedex_nr")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.pokedex_nr)
self.label_2 = QtWidgets.QLabel(Dialog)
self.label_2.setObjectName("label_2")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2)
self.name = QtWidgets.QComboBox(Dialog)
self.name.setObjectName("name")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.name)
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3)
self.category = QtWidgets.QLabel(Dialog)
self.category.setObjectName("category")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.category)
self.label_4 = QtWidgets.QLabel(Dialog)
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4)
self.poketype = QtWidgets.QLabel(Dialog)
self.poketype.setObjectName("poketype")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.poketype)
self.label_5 = QtWidgets.QLabel(Dialog)
self.label_5.setObjectName("label_5")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_5)
self.height = QtWidgets.QLabel(Dialog)
self.height.setObjectName("height")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.height)
self.label_6 = QtWidgets.QLabel(Dialog)
self.label_6.setObjectName("label_6")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_6)
self.weight = QtWidgets.QLabel(Dialog)
self.weight.setObjectName("weight")
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.weight)
self.label_7 = QtWidgets.QLabel(Dialog)
self.label_7.setObjectName("label_7")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_7)
self.color = QtWidgets.QLabel(Dialog)
self.color.setObjectName("color")
self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.color)
self.label_8 = QtWidgets.QLabel(Dialog)
self.label_8.setObjectName("label_8")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.label_8)
self.info = QtWidgets.QLabel(Dialog)
self.info.setObjectName("info")
self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.info)
self.verticalLayout.addLayout(self.formLayout)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.prev_button = QtWidgets.QToolButton(Dialog)
self.prev_button.setObjectName("prev_button")
self.horizontalLayout_2.addWidget(self.prev_button)
self.next_button = QtWidgets.QToolButton(Dialog)
self.next_button.setObjectName("next_button")
self.horizontalLayout_2.addWidget(self.next_button)
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close|QtWidgets.QDialogButtonBox.Retry)
self.buttonBox.setCenterButtons(False)
self.buttonBox.setObjectName("buttonBox")
self.horizontalLayout_2.addWidget(self.buttonBox)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.label_2.setBuddy(self.name)
self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(-1)
self.buttonBox.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Random Pokémon"))
self.label.setText(_translate("Dialog", "National-Dex"))
self.pokedex_nr.setText(_translate("Dialog", "TextLabel"))
self.label_2.setText(_translate("Dialog", "Name"))
self.label_3.setText(_translate("Dialog", "Kategorie"))
self.category.setText(_translate("Dialog", "TextLabel"))
self.label_4.setText(_translate("Dialog", "Typ"))
self.poketype.setText(_translate("Dialog", "TextLabel"))
self.label_5.setText(_translate("Dialog", "Größe"))
self.height.setText(_translate("Dialog", "TextLabel"))
self.label_6.setText(_translate("Dialog", "Gewicht"))
self.weight.setText(_translate("Dialog", "TextLabel"))
self.label_7.setText(_translate("Dialog", "Farbe"))
self.color.setText(_translate("Dialog", "TextLabel"))
self.label_8.setText(_translate("Dialog", "Mehr..."))
self.info.setText(_translate("Dialog", "TextLabel"))
self.prev_button.setText(_translate("Dialog", "Prev."))
self.next_button.setText(_translate("Dialog", "Next"))

View File

@ -0,0 +1,131 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './nmreval/src/resources/_ui/pokewindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(1687, 991)
self.gridLayout = QtWidgets.QGridLayout(Dialog)
self.gridLayout.setObjectName("gridLayout")
self.pushButton = QtWidgets.QPushButton(Dialog)
self.pushButton.setObjectName("pushButton")
self.gridLayout.addWidget(self.pushButton, 0, 2, 1, 1)
self.comboBox_2 = QtWidgets.QComboBox(Dialog)
self.comboBox_2.setObjectName("comboBox_2")
self.gridLayout.addWidget(self.comboBox_2, 0, 0, 1, 1)
self.comboBox = QtWidgets.QComboBox(Dialog)
self.comboBox.setObjectName("comboBox")
self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem, 0, 4, 1, 1)
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth())
self.buttonBox.setSizePolicy(sizePolicy)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
self.buttonBox.setObjectName("buttonBox")
self.gridLayout.addWidget(self.buttonBox, 0, 3, 1, 1)
self.splitter = QtWidgets.QSplitter(Dialog)
self.splitter.setOrientation(QtCore.Qt.Horizontal)
self.splitter.setObjectName("splitter")
self.tableWidget_2 = QtWidgets.QTableWidget(self.splitter)
self.tableWidget_2.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.tableWidget_2.setAlternatingRowColors(True)
self.tableWidget_2.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
self.tableWidget_2.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.tableWidget_2.setShowGrid(False)
self.tableWidget_2.setGridStyle(QtCore.Qt.NoPen)
self.tableWidget_2.setObjectName("tableWidget_2")
self.tableWidget_2.setColumnCount(13)
self.tableWidget_2.setRowCount(0)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(0, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(1, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(2, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(3, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(4, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(5, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(6, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(7, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(8, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(9, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(10, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(11, item)
item = QtWidgets.QTableWidgetItem()
self.tableWidget_2.setHorizontalHeaderItem(12, item)
self.tableWidget_2.horizontalHeader().setDefaultSectionSize(80)
self.tableWidget_2.horizontalHeader().setStretchLastSection(False)
self.tableWidget_2.verticalHeader().setVisible(False)
self.tabWidget = QtWidgets.QTabWidget(self.splitter)
self.tabWidget.setMinimumSize(QtCore.QSize(418, 0))
self.tabWidget.setObjectName("tabWidget")
self.gridLayout.addWidget(self.splitter, 1, 0, 1, 5)
self.retranslateUi(Dialog)
self.tabWidget.setCurrentIndex(-1)
self.buttonBox.rejected.connect(Dialog.close) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Gotta catch \'em all!"))
self.pushButton.setText(_translate("Dialog", "Random"))
self.tableWidget_2.setSortingEnabled(True)
item = self.tableWidget_2.horizontalHeaderItem(0)
item.setText(_translate("Dialog", "#"))
item = self.tableWidget_2.horizontalHeaderItem(1)
item.setText(_translate("Dialog", "Pokemon"))
item = self.tableWidget_2.horizontalHeaderItem(2)
item.setText(_translate("Dialog", "Type"))
item = self.tableWidget_2.horizontalHeaderItem(3)
item.setText(_translate("Dialog", "Total"))
item = self.tableWidget_2.horizontalHeaderItem(4)
item.setText(_translate("Dialog", "HP"))
item.setToolTip(_translate("Dialog", "Hit Points; Kraftpunkte"))
item = self.tableWidget_2.horizontalHeaderItem(5)
item.setText(_translate("Dialog", "Attack"))
item.setToolTip(_translate("Dialog", "Attacke"))
item = self.tableWidget_2.horizontalHeaderItem(6)
item.setText(_translate("Dialog", "Defense"))
item.setToolTip(_translate("Dialog", "Verteidigung"))
item = self.tableWidget_2.horizontalHeaderItem(7)
item.setText(_translate("Dialog", "Sp. Attack"))
item.setToolTip(_translate("Dialog", "Special Attack; Spezial-Attacke"))
item = self.tableWidget_2.horizontalHeaderItem(8)
item.setText(_translate("Dialog", "Sp. Defense"))
item.setToolTip(_translate("Dialog", "Special Defense; Spezial-Verteidigung"))
item = self.tableWidget_2.horizontalHeaderItem(9)
item.setText(_translate("Dialog", "Speed"))
item.setToolTip(_translate("Dialog", "Initiative"))
item = self.tableWidget_2.horizontalHeaderItem(10)
item.setText(_translate("Dialog", "Height"))
item.setToolTip(_translate("Dialog", "Größe"))
item = self.tableWidget_2.horizontalHeaderItem(11)
item.setText(_translate("Dialog", "Weight"))
item.setToolTip(_translate("Dialog", "Gewicht"))
item = self.tableWidget_2.horizontalHeaderItem(12)
item.setText(_translate("Dialog", "BMI"))
item.setToolTip(_translate("Dialog", "Body-Mass-Index"))

View File

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/_ui/ptstab.ui' # Form implementation generated from reading ui file 'nmreval/src/resources/_ui/ptstab.ui'
# #
# Created by: PyQt5 UI code generator 5.12.3 # Created by: PyQt5 UI code generator 5.15.10
# #
# WARNING! All changes made in this file will be lost! # WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
@ -13,29 +14,50 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object): class Ui_Form(object):
def setupUi(self, Form): def setupUi(self, Form):
Form.setObjectName("Form") Form.setObjectName("Form")
Form.resize(316, 747) Form.resize(417, 746)
self.verticalLayout = QtWidgets.QVBoxLayout(Form) self.gridLayout = QtWidgets.QGridLayout(Form)
self.verticalLayout.setContentsMargins(3, 3, 3, 3) self.gridLayout.setObjectName("gridLayout")
self.verticalLayout.setObjectName("verticalLayout") self.label_2 = QtWidgets.QLabel(Form)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 0, 0, 1, 2)
self.peaktable = QtWidgets.QListWidget(Form) self.peaktable = QtWidgets.QListWidget(Form)
self.peaktable.setEditTriggers(QtWidgets.QAbstractItemView.DoubleClicked|QtWidgets.QAbstractItemView.EditKeyPressed) self.peaktable.setEditTriggers(QtWidgets.QAbstractItemView.DoubleClicked|QtWidgets.QAbstractItemView.EditKeyPressed)
self.peaktable.setObjectName("peaktable") self.peaktable.setObjectName("peaktable")
self.verticalLayout.addWidget(self.peaktable) self.gridLayout.addWidget(self.peaktable, 1, 0, 1, 2)
self.groupBox = QtWidgets.QGroupBox(Form) self.special_checkbox = QtWidgets.QCheckBox(Form)
self.groupBox.setObjectName("groupBox") self.special_checkbox.setObjectName("special_checkbox")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox) self.gridLayout.addWidget(self.special_checkbox, 3, 0, 1, 1)
self.horizontalLayout.setContentsMargins(3, 3, 3, 3) self.special_comboBox = QtWidgets.QComboBox(Form)
self.horizontalLayout.setSpacing(3) self.special_comboBox.setEnabled(False)
self.horizontalLayout.setObjectName("horizontalLayout") self.special_comboBox.setObjectName("special_comboBox")
self.left_pt = QtWidgets.QSpinBox(self.groupBox) self.special_comboBox.addItem("")
self.left_pt.setMaximum(999) self.special_comboBox.addItem("")
self.left_pt.setObjectName("left_pt") self.special_comboBox.addItem("")
self.horizontalLayout.addWidget(self.left_pt) self.special_comboBox.addItem("")
self.right_pt = QtWidgets.QSpinBox(self.groupBox) self.gridLayout.addWidget(self.special_comboBox, 3, 1, 1, 1)
self.right_pt.setMaximum(999) spacerItem = QtWidgets.QSpacerItem(20, 30, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.right_pt.setObjectName("right_pt") self.gridLayout.addItem(spacerItem, 4, 0, 1, 1)
self.horizontalLayout.addWidget(self.right_pt) self.label_3 = QtWidgets.QLabel(Form)
self.average_combobox = QtWidgets.QComboBox(self.groupBox) self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 5, 0, 1, 1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.left_limit = QtWidgets.QLineEdit(Form)
self.left_limit.setObjectName("left_limit")
self.horizontalLayout_2.addWidget(self.left_limit)
self.right_limit = QtWidgets.QLineEdit(Form)
self.right_limit.setObjectName("right_limit")
self.horizontalLayout_2.addWidget(self.right_limit)
self.limit_combobox = QtWidgets.QComboBox(Form)
self.limit_combobox.setObjectName("limit_combobox")
self.limit_combobox.addItem("")
self.limit_combobox.addItem("")
self.horizontalLayout_2.addWidget(self.limit_combobox)
self.gridLayout.addLayout(self.horizontalLayout_2, 5, 1, 1, 1)
self.label_5 = QtWidgets.QLabel(Form)
self.label_5.setObjectName("label_5")
self.gridLayout.addWidget(self.label_5, 6, 0, 1, 1)
self.average_combobox = QtWidgets.QComboBox(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
@ -45,89 +67,94 @@ class Ui_Form(object):
self.average_combobox.addItem("") self.average_combobox.addItem("")
self.average_combobox.addItem("") self.average_combobox.addItem("")
self.average_combobox.addItem("") self.average_combobox.addItem("")
self.horizontalLayout.addWidget(self.average_combobox) self.average_combobox.addItem("")
self.verticalLayout.addWidget(self.groupBox) self.gridLayout.addWidget(self.average_combobox, 6, 1, 1, 1)
self.groupBox_2 = QtWidgets.QGroupBox(Form) self.label_4 = QtWidgets.QLabel(Form)
self.groupBox_2.setCheckable(True) self.label_4.setObjectName("label_4")
self.groupBox_2.setChecked(False) self.gridLayout.addWidget(self.label_4, 7, 0, 1, 1)
self.groupBox_2.setObjectName("groupBox_2") self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.groupBox_2) self.horizontalLayout.setObjectName("horizontalLayout")
self.horizontalLayout_5.setContentsMargins(3, 3, 3, 3) self.xbutton = QtWidgets.QCheckBox(Form)
self.horizontalLayout_5.setSpacing(2)
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.special_comboBox = QtWidgets.QComboBox(self.groupBox_2)
self.special_comboBox.setObjectName("special_comboBox")
self.special_comboBox.addItem("")
self.special_comboBox.addItem("")
self.special_comboBox.addItem("")
self.special_comboBox.addItem("")
self.horizontalLayout_5.addWidget(self.special_comboBox)
self.verticalLayout.addWidget(self.groupBox_2)
self.groupBox_3 = QtWidgets.QGroupBox(Form)
self.groupBox_3.setObjectName("groupBox_3")
self.gridLayout = QtWidgets.QGridLayout(self.groupBox_3)
self.gridLayout.setContentsMargins(3, 3, 3, 3)
self.gridLayout.setSpacing(3)
self.gridLayout.setObjectName("gridLayout")
self.xbutton = QtWidgets.QCheckBox(self.groupBox_3)
self.xbutton.setObjectName("xbutton") self.xbutton.setObjectName("xbutton")
self.gridLayout.addWidget(self.xbutton, 0, 0, 1, 1) self.horizontalLayout.addWidget(self.xbutton)
self.ybutton = QtWidgets.QCheckBox(self.groupBox_3) self.ybutton = QtWidgets.QCheckBox(Form)
self.ybutton.setChecked(True) self.ybutton.setChecked(True)
self.ybutton.setObjectName("ybutton") self.ybutton.setObjectName("ybutton")
self.gridLayout.addWidget(self.ybutton, 0, 1, 1, 1) self.horizontalLayout.addWidget(self.ybutton)
self.graph_checkbox = QtWidgets.QCheckBox(self.groupBox_3) self.gridLayout.addLayout(self.horizontalLayout, 7, 1, 1, 1)
self.label = QtWidgets.QLabel(Form)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 8, 0, 1, 1)
self.group_box = QtWidgets.QComboBox(Form)
self.group_box.setObjectName("group_box")
self.group_box.addItem("")
self.group_box.addItem("")
self.gridLayout.addWidget(self.group_box, 8, 1, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.gridLayout.addItem(spacerItem1, 9, 0, 1, 1)
self.graph_checkbox = QtWidgets.QCheckBox(Form)
self.graph_checkbox.setChecked(True) self.graph_checkbox.setChecked(True)
self.graph_checkbox.setObjectName("graph_checkbox") self.graph_checkbox.setObjectName("graph_checkbox")
self.gridLayout.addWidget(self.graph_checkbox, 1, 0, 1, 1) self.gridLayout.addWidget(self.graph_checkbox, 10, 0, 1, 1)
self.graph_combobox = QtWidgets.QComboBox(self.groupBox_3) self.graph_combobox = QtWidgets.QComboBox(Form)
self.graph_combobox.setEnabled(False) self.graph_combobox.setEnabled(False)
self.graph_combobox.setObjectName("graph_combobox") self.graph_combobox.setObjectName("graph_combobox")
self.gridLayout.addWidget(self.graph_combobox, 1, 1, 1, 1) self.gridLayout.addWidget(self.graph_combobox, 10, 1, 1, 1)
self.verticalLayout.addWidget(self.groupBox_3) spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.gridLayout.addItem(spacerItem2, 12, 0, 1, 1)
self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout_2.setSpacing(2)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.okButton = QtWidgets.QPushButton(Form) self.okButton = QtWidgets.QPushButton(Form)
icon = QtGui.QIcon.fromTheme("dialog-ok") icon = QtGui.QIcon.fromTheme("dialog-ok")
self.okButton.setIcon(icon) self.okButton.setIcon(icon)
self.okButton.setObjectName("okButton") self.okButton.setObjectName("okButton")
self.horizontalLayout_2.addWidget(self.okButton) self.gridLayout.addWidget(self.okButton, 11, 0, 1, 2)
self.deleteButton = QtWidgets.QPushButton(Form) self.deleteButton = QtWidgets.QPushButton(Form)
icon = QtGui.QIcon.fromTheme("dialog-cancel") icon = QtGui.QIcon.fromTheme("dialog-cancel")
self.deleteButton.setIcon(icon) self.deleteButton.setIcon(icon)
self.deleteButton.setObjectName("deleteButton") self.deleteButton.setObjectName("deleteButton")
self.horizontalLayout_2.addWidget(self.deleteButton) self.gridLayout.addWidget(self.deleteButton, 2, 0, 1, 2)
self.verticalLayout.addLayout(self.horizontalLayout_2) self.label_2.setBuddy(self.peaktable)
self.label_5.setBuddy(self.average_combobox)
self.label_4.setBuddy(self.xbutton)
self.label.setBuddy(self.group_box)
self.retranslateUi(Form) self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Form.setTabOrder(self.peaktable, self.limit_combobox)
Form.setTabOrder(self.limit_combobox, self.average_combobox)
Form.setTabOrder(self.average_combobox, self.xbutton)
Form.setTabOrder(self.xbutton, self.ybutton)
Form.setTabOrder(self.ybutton, self.group_box)
Form.setTabOrder(self.group_box, self.graph_checkbox)
Form.setTabOrder(self.graph_checkbox, self.graph_combobox)
def retranslateUi(self, Form): def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate _translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form")) Form.setWindowTitle(_translate("Form", "Form"))
self.label_2.setText(_translate("Form", "Selected points and regions"))
self.peaktable.setToolTip(_translate("Form", "Edit by entering new value: \n" self.peaktable.setToolTip(_translate("Form", "Edit by entering new value: \n"
"Single number for points (e.g. 1e-6); \n" "Single number for points (e.g. 1e-6); \n"
"two numbers separated by space for regions (e.g. 1e-6 5e-6). \n" "two numbers separated by space for regions (e.g. 1e-6 5e-6). \n"
"Changing between regions and points is NOT possible")) "Changing between regions and points is NOT possible"))
self.groupBox.setTitle(_translate("Form", "Average")) self.special_checkbox.setText(_translate("Form", "Use special value"))
self.left_pt.setSuffix(_translate("Form", " pts"))
self.left_pt.setPrefix(_translate("Form", "- "))
self.right_pt.setSuffix(_translate("Form", " pts"))
self.right_pt.setPrefix(_translate("Form", "+ "))
self.average_combobox.setItemText(0, _translate("Form", "Mean"))
self.average_combobox.setItemText(1, _translate("Form", "Sum"))
self.average_combobox.setItemText(2, _translate("Form", "Integral"))
self.groupBox_2.setTitle(_translate("Form", "Special value"))
self.special_comboBox.setToolTip(_translate("Form", "Automatic selection of respective points")) self.special_comboBox.setToolTip(_translate("Form", "Automatic selection of respective points"))
self.special_comboBox.setItemText(0, _translate("Form", "max(y)")) self.special_comboBox.setItemText(0, _translate("Form", "max(y)"))
self.special_comboBox.setItemText(1, _translate("Form", "max(abs(y))")) self.special_comboBox.setItemText(1, _translate("Form", "max(abs(y))"))
self.special_comboBox.setItemText(2, _translate("Form", "min(y)")) self.special_comboBox.setItemText(2, _translate("Form", "min(y)"))
self.special_comboBox.setItemText(3, _translate("Form", "min(abs(y))")) self.special_comboBox.setItemText(3, _translate("Form", "min(abs(y))"))
self.groupBox_3.setTitle(_translate("Form", "Result")) self.label_3.setText(_translate("Form", "Region around points"))
self.limit_combobox.setItemText(0, _translate("Form", "points"))
self.limit_combobox.setItemText(1, _translate("Form", "range"))
self.label_5.setText(_translate("Form", "Aggregation"))
self.average_combobox.setItemText(0, _translate("Form", "Mean"))
self.average_combobox.setItemText(1, _translate("Form", "Sum"))
self.average_combobox.setItemText(2, _translate("Form", "Integral"))
self.average_combobox.setItemText(3, _translate("Form", "Std. deviation"))
self.label_4.setText(_translate("Form", "New set based on"))
self.xbutton.setText(_translate("Form", "x")) self.xbutton.setText(_translate("Form", "x"))
self.ybutton.setText(_translate("Form", "y")) self.ybutton.setText(_translate("Form", "y"))
self.label.setText(_translate("Form", "Group by"))
self.group_box.setItemText(0, _translate("Form", "\"Group\" value"))
self.group_box.setItemText(1, _translate("Form", "x value"))
self.graph_checkbox.setText(_translate("Form", "New graph?")) self.graph_checkbox.setText(_translate("Form", "New graph?"))
self.okButton.setText(_translate("Form", "Apply")) self.okButton.setText(_translate("Form", "Apply"))
self.deleteButton.setText(_translate("Form", "Delete selected")) self.deleteButton.setText(_translate("Form", "Delete selection"))

View File

@ -584,6 +584,8 @@ class DataWidget(QtWidgets.QWidget, Ui_DataWidget):
self.propwidget.expansionChanged.connect(self.show_property) self.propwidget.expansionChanged.connect(self.show_property)
self.proptable.propertyChanged.connect(self.change_property) self.proptable.propertyChanged.connect(self.change_property)
self.pokemon_toolbutton.clicked.connect(self.catchthemall)
make_action_icons(self) make_action_icons(self)
def add_graph(self, idd: str, name: str): def add_graph(self, idd: str, name: str):
@ -645,6 +647,12 @@ class DataWidget(QtWidgets.QWidget, Ui_DataWidget):
def set_name(self, sid, value): def set_name(self, sid, value):
self.tree.set_name(sid, value) self.tree.set_name(sid, value)
def catchthemall(self):
from gui_qt.lib.pokemon import QPoke
dialog = QPoke( parent=self)
dialog.exec()
@property @property
def management(self): def management(self):
return self.tree.management return self.tree.management

View File

@ -1,6 +1,6 @@
import re import re
from ..Qt import QtCore, QtWidgets from ..Qt import QtCore, QtWidgets, QtGui
from .._py.ptstab import Ui_Form from .._py.ptstab import Ui_Form
from ..lib.pg_objects import LogInfiniteLine, RegionItem from ..lib.pg_objects import LogInfiniteLine, RegionItem
@ -27,15 +27,23 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
self._last_item = None self._last_item = None
self.connected_figure = '' self.connected_figure = ''
self._avg_modes = ['mean', 'sum', 'integral', 'std']
self._special_values = ['max', 'absmax', 'min', 'absmin']
self._group_modes = ['group', 'x']
self.okButton.clicked.connect(self.apply) self.okButton.clicked.connect(self.apply)
self.deleteButton.clicked.connect(self.remove_points) self.deleteButton.clicked.connect(self.remove_points)
self.peaktable.itemChanged.connect(self.editing_finished) self.peaktable.itemChanged.connect(self.editing_finished)
self.peaktable.itemDoubleClicked.connect(self.editing_started) self.peaktable.itemDoubleClicked.connect(self.editing_started)
self.left_limit.setValidator(QtGui.QDoubleValidator())
self.right_limit.setValidator(QtGui.QDoubleValidator())
def keyPressEvent(self, e): def keyPressEvent(self, e):
if e.key() == QtCore.Qt.Key_Delete: if e.key() == QtCore.Qt.Key.Key_Delete:
self.remove_points() self.remove_points()
elif e.key() == QtCore.Qt.Key_F2: elif e.key() == QtCore.Qt.Key.Key_F2:
self.editing_started() self.editing_started()
else: else:
super().keyPressEvent(e) super().keyPressEvent(e)
@ -91,7 +99,7 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
item = QtWidgets.QListWidgetItem(f'{self.pts[-1][0]:.5g} - {self.pts[-1][1]:.5g}') item = QtWidgets.QListWidgetItem(f'{self.pts[-1][0]:.5g} - {self.pts[-1][1]:.5g}')
else: else:
item = QtWidgets.QListWidgetItem(f'{self.pts[-1]:.5g}') item = QtWidgets.QListWidgetItem(f'{self.pts[-1]:.5g}')
item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEditable) item.setFlags(item.flags() ^ QtCore.Qt.ItemFlag.ItemIsEditable)
self.peaktable.blockSignals(True) self.peaktable.blockSignals(True)
self.peaktable.addItem(item) self.peaktable.addItem(item)
self.peaktable.blockSignals(False) self.peaktable.blockSignals(False)
@ -102,21 +110,22 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def apply(self) -> dict: def apply(self) -> dict:
ret_dic = {'avg_range': [self.left_pt.value(), self.right_pt.value()], ret_dic = {
'avg_mode': {0: 'mean', 1: 'sum', 2: 'integral'}[self.average_combobox.currentIndex()], 'avg_range': self.get_limits(),
'special': None, 'idx': None, 'avg_mode': self._avg_modes[self.average_combobox.currentIndex()],
'xy': (self.xbutton.isChecked(), self.ybutton.isChecked())} 'special': None,
'idx': None,
'xy': (self.xbutton.isChecked(), self.ybutton.isChecked()),
'groupby': self._group_modes[self.group_box.currentIndex()],
}
if self.groupBox_2.isChecked(): if self.special_checkbox.isChecked():
ret_dic['special'] = {0: 'max', 1: 'absmax', 2: 'min', 3: 'absmin'}[self.special_comboBox.currentIndex()] ret_dic['special'] = self._special_values[self.special_comboBox.currentIndex()]
if len(self.pts) != 0: if len(self.pts) != 0:
ret_dic['idx'] = self.pts ret_dic['idx'] = self.pts
if self.graph_checkbox.isChecked(): gid = self.graph_combobox.currentData() if not self.graph_checkbox.isChecked() else ''
gid = ''
else:
gid = self.graph_combobox.currentData()
self.points_selected.emit(ret_dic, gid) self.points_selected.emit(ret_dic, gid)
@ -199,4 +208,22 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
@QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged') @QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged')
def changed_state(self, checked): def changed_state(self, checked):
self.graph_combobox.setEnabled(checked != QtCore.Qt.Checked) self.graph_combobox.setEnabled(checked != QtCore.Qt.CheckState.Checked)
@QtCore.pyqtSlot(int, name='on_special_checkbox_stateChanged')
def changed_special(self, checked: int):
self.graph_combobox.setEnabled(checked != QtCore.Qt.CheckState.Checked)
def get_limits(self) -> tuple[float, float, str]:
try:
left = float(self.left_limit.text())
except ValueError:
left = 0.
try:
right = float(self.right_limit.text())
except ValueError:
right = 0.
return left, right, self.limit_combobox.currentText()

View File

View File

@ -187,10 +187,10 @@ class CodeEditor(QtWidgets.QPlainTextEdit):
self.highlight = PythonHighlighter(self.document()) self.highlight = PythonHighlighter(self.document())
def keyPressEvent(self, evt): def keyPressEvent(self, evt):
if evt.key() == QtCore.Qt.Key_Tab: if evt.key() == QtCore.Qt.Key.Key_Tab:
# use spaces instead of tab # use spaces instead of tab
self.insertPlainText(' '*4) self.insertPlainText(' '*4)
elif evt.key() == QtCore.Qt.Key_Insert: elif evt.key() == QtCore.Qt.Key.Key_Insert:
self.setOverwriteMode(not self.overwriteMode()) self.setOverwriteMode(not self.overwriteMode())
else: else:
super().keyPressEvent(evt) super().keyPressEvent(evt)
@ -225,7 +225,7 @@ class CodeEditor(QtWidgets.QPlainTextEdit):
def paintevent_linenumber(self, evt): def paintevent_linenumber(self, evt):
painter = QtGui.QPainter(self.current_linenumber) painter = QtGui.QPainter(self.current_linenumber)
painter.fillRect(evt.rect(), QtCore.Qt.lightGray) painter.fillRect(evt.rect(), QtCore.Qt.GlobalColor.lightGray)
block = self.firstVisibleBlock() block = self.firstVisibleBlock()
block_number = block.blockNumber() block_number = block.blockNumber()
@ -237,9 +237,9 @@ class CodeEditor(QtWidgets.QPlainTextEdit):
while block.isValid() and (top <= evt.rect().bottom()): while block.isValid() and (top <= evt.rect().bottom()):
if block.isVisible() and (bottom >= evt.rect().top()): if block.isVisible() and (bottom >= evt.rect().top()):
number = str(block_number + 1) number = str(block_number + 1)
painter.setPen(QtCore.Qt.black) painter.setPen(QtCore.Qt.GlobalColor.black)
painter.drawText(0, int(top), self.current_linenumber.width() - 3, height, painter.drawText(0, int(top), self.current_linenumber.width() - 3, height,
QtCore.Qt.AlignRight, number) QtCore.Qt.AlignmentFlag.AlignRight, number)
block = block.next() block = block.next()
top = bottom top = bottom
@ -252,7 +252,7 @@ class CodeEditor(QtWidgets.QPlainTextEdit):
if not self.isReadOnly(): if not self.isReadOnly():
selection = QtWidgets.QTextEdit.ExtraSelection() selection = QtWidgets.QTextEdit.ExtraSelection()
line_color = QtGui.QColor(QtCore.Qt.yellow).lighter(180) line_color = QtGui.QColor(QtCore.Qt.GlobalColor.yellow).lighter(180)
selection.format.setBackground(line_color) selection.format.setBackground(line_color)
selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True) selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True)

View File

@ -0,0 +1,30 @@
from __future__ import annotations
from pathlib import Path
from .usermodeleditor import QUsermodelEditor
from ..Qt import QtWidgets, QtCore, QtGui
class QEditor(QUsermodelEditor):
runSignal = QtCore.pyqtSignal(str)
def __init__(self, path: str | Path = None, parent=None):
super().__init__(path, parent=parent)
self.add_run_button()
def add_run_button(self):
self.disclaimer = QtWidgets.QLabel("This is work in progress and less than perfect :(")
self.disclaimer.setStyleSheet('QLabel {color: rgb(255, 0, 0); font-weight: bold; font-size: 2.5em;};')
self.centralwidget.layout().insertWidget(0, self.disclaimer)
self.run_button = QtWidgets.QPushButton("Run")
self.centralwidget.layout().addWidget(self.run_button)
self.run_button.clicked.connect(self.start_script)
@QtCore.pyqtSlot()
def start_script(self):
self.runSignal.emit(self.edit_field.toPlainText())

View File

@ -3,7 +3,7 @@ from __future__ import annotations
from pathlib import Path from pathlib import Path
from ..Qt import QtWidgets, QtCore, QtGui from ..Qt import QtWidgets, QtCore, QtGui
from ..lib.codeeditor import EditorWidget from .codeeditor import EditorWidget
class QUsermodelEditor(QtWidgets.QMainWindow): class QUsermodelEditor(QtWidgets.QMainWindow):
@ -50,18 +50,20 @@ class QUsermodelEditor(QtWidgets.QMainWindow):
self.menuFile.addAction('Close', self.close, QtGui.QKeySequence.Quit) self.menuFile.addAction('Close', self.close, QtGui.QKeySequence.Quit)
self.resize(800, 600) self.resize(800, 600)
self.setGeometry(QtWidgets.QStyle.alignedRect( self.setGeometry(
QtCore.Qt.LeftToRight, QtCore.Qt.AlignCenter, QtWidgets.QStyle.alignedRect(
self.size(), QtWidgets.qApp.desktop().availableGeometry() QtCore.Qt.LayoutDirection.LeftToRight,
)) QtCore.Qt.AlignmentFlag.AlignCenter,
self.size(),
QtWidgets.qApp.desktop().availableGeometry()
)
)
@property
def is_modified(self): def is_modified(self):
return self.edit_field.document().isModified() return self.edit_field.editor.document().isModified()
@is_modified.setter def set_modified(self, val: bool):
def is_modified(self, val: bool): self.edit_field.editor.document().setModified(val)
self.edit_field.document().setModified(val)
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def open_file(self): def open_file(self):
@ -75,17 +77,22 @@ class QUsermodelEditor(QtWidgets.QMainWindow):
def read_file(self, fname: str | Path): def read_file(self, fname: str | Path):
self.set_fname_opts(fname) self.set_fname_opts(fname)
if self.fname is not None:
with self.fname.open('r') as f: with self.fname.open('r') as f:
self.edit_field.setPlainText(f.read()) self.edit_field.setPlainText(f.read())
def set_fname_opts(self, fname: str | Path): def set_fname_opts(self, fname: str | Path):
fname = Path(fname)
if fname.is_file():
self.fname = Path(fname) self.fname = Path(fname)
self._dir = self.fname.parent self._dir = self.fname.parent
self.setWindowTitle('Edit ' + str(fname)) self.setWindowTitle('Edit ' + str(fname))
elif fname.is_dir():
self._dir = fname
@property
def changes_saved(self) -> bool: def changes_saved(self) -> bool:
if not self.is_modified: if not self.is_modified():
return True return True
ret = QtWidgets.QMessageBox.question(self, 'Time to think', ret = QtWidgets.QMessageBox.question(self, 'Time to think',
@ -97,9 +104,9 @@ class QUsermodelEditor(QtWidgets.QMainWindow):
self.save_file() self.save_file()
if ret == QtWidgets.QMessageBox.No: if ret == QtWidgets.QMessageBox.No:
self.is_modified = False self.set_modified(False)
return not self.is_modified return not self.is_modified()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def save_file(self): def save_file(self):
@ -111,9 +118,9 @@ class QUsermodelEditor(QtWidgets.QMainWindow):
self.set_fname_opts(outfile) self.set_fname_opts(outfile)
self.is_modified = False self.set_modified(False)
return self.is_modified return self.is_modified()
@QtCore.pyqtSlot() @QtCore.pyqtSlot()
def overwrite_file(self): def overwrite_file(self):
@ -123,10 +130,10 @@ class QUsermodelEditor(QtWidgets.QMainWindow):
self.modelsChanged.emit() self.modelsChanged.emit()
self.is_modified = False self.set_modified(False)
def closeEvent(self, evt: QtGui.QCloseEvent): def closeEvent(self, evt: QtGui.QCloseEvent):
if not self.changes_saved: if not self.changes_saved():
evt.ignore() evt.ignore()
else: else:
super().closeEvent(evt) super().closeEvent(evt)

View File

@ -12,12 +12,13 @@ from ..lib.forms import SelectionWidget
class QFitParameterWidget(QtWidgets.QWidget, Ui_FormFit): class QFitParameterWidget(QtWidgets.QWidget, Ui_FormFit):
value_requested = QtCore.pyqtSignal(int) value_requested = QtCore.pyqtSignal(int)
def __init__(self, parent=None): def __init__(self, func_id: int, parent=None):
super().__init__(parent=parent) super().__init__(parent=parent)
self.setupUi(self) self.setupUi(self)
self.func = None self.func = None
self.func_idx = None self.func_idx = None
self.func_id = func_id
self.max_width = QtCore.QSize(0, 0) self.max_width = QtCore.QSize(0, 0)
self.global_parameter = [] self.global_parameter = []
self.data_parameter = [] self.data_parameter = []
@ -301,8 +302,10 @@ class ParameterSingleWidget(QtWidgets.QWidget):
self.name = name self.name = name
self.parametername.setText(convert(name)) self.parametername.setText(convert(name))
self.parametername.setToolTip('If this is bold then this parameter is only for this data. ' self.parametername.setToolTip(
'Otherwise, the general parameter is used and displayed') 'If this is bold then this parameter is only for this data. '
'Otherwise, the general parameter is used and displayed'
)
# self.value_line.setValidator(QtGui.QDoubleValidator()) # self.value_line.setValidator(QtGui.QDoubleValidator())
self.value_line.textChanged.connect(lambda: self.valueChanged.emit(self.value) if self.value is not None else 0) self.value_line.textChanged.connect(lambda: self.valueChanged.emit(self.value) if self.value is not None else 0)

View File

@ -77,8 +77,12 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
""" """
w = self.param_widgets[idx] w = self.param_widgets[idx]
self.stackedWidget.removeWidget(w) self.stackedWidget.removeWidget(w)
w.setParent(None)
w.deleteLater() w.deleteLater()
del self.param_widgets[idx] del self.param_widgets[idx]
_, func_id = self.functionwidget.get_selected()
self.get_functions()
self._current_function = None self._current_function = None
if len(self.param_widgets) == 0: if len(self.param_widgets) == 0:
@ -104,7 +108,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
if function is None: if function is None:
return return
dialog = QFitParameterWidget(self.stackedWidget) dialog = QFitParameterWidget(function_id, self.stackedWidget)
data_names = self.data_table.data_list(include_name=True) data_names = self.data_table.data_list(include_name=True)
dialog.set_function(function, function_idx) dialog.set_function(function, function_idx)
@ -206,9 +210,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
for m in self.models[model_id]: for m in self.models[model_id]:
func_id = m['cnt'] func_id = m['cnt']
self.stackedWidget.removeWidget(self.param_widgets[func_id]) self.remove_function(func_id)
self.param_widgets.pop(func_id)
self._complex.pop(model_id) self._complex.pop(model_id)
self._func_list.pop(model_id) self._func_list.pop(model_id)

View File

@ -8,9 +8,9 @@ from typing import Any
import numpy as np import numpy as np
from gui_qt.Qt import QtCore, QtWidgets, QtGui from ..Qt import QtCore, QtWidgets, QtGui
from gui_qt._py.fitcreationdialog import Ui_Dialog from .._py.fitcreationdialog import Ui_Dialog
from gui_qt.lib.namespace import QNamespaceWidget from ..editors.namespace import QNamespaceWidget
__all__ = ['QUserFitCreator'] __all__ = ['QUserFitCreator']

View File

@ -539,6 +539,10 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
if self.graphic.plotItem.sceneBoundingRect().contains(evt.scenePos()) and evt.button() == 1: if self.graphic.plotItem.sceneBoundingRect().contains(evt.scenePos()) and evt.button() == 1:
pos = vb.mapSceneToView(evt.scenePos()) pos = vb.mapSceneToView(evt.scenePos())
if not _inside_range(pos.x(), pos.y(), vb.viewRange()):
return
_x, _y = pos.x(), pos.y() _x, _y = pos.x(), pos.y()
if self.log[0]: if self.log[0]:
@ -854,3 +858,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1]) self.set_color(foreground=self._prev_colors[0], background=self._prev_colors[1])
self._prev_colors = temp self._prev_colors = temp
def _inside_range(x: float, y: float, ranges: list[list[float]]) -> bool:
x_range, y_range = ranges
return (x_range[0] <= x <= x_range[1]) and (y_range[0] <= y <= y_range[1])

View File

@ -88,7 +88,6 @@ class QFCReader(QtWidgets.QDialog, Ui_FCEval_dialog):
def accept(self): def accept(self):
items = [self.listWidget.item(i).text() for i in range(self.listWidget.count())] items = [self.listWidget.item(i).text() for i in range(self.listWidget.count())]
print(items)
if items: if items:
with busy_cursor(): with busy_cursor():
self.read(items) self.read(items)

View File

@ -3,7 +3,7 @@ from pathlib import Path
from PyQt5 import QtWidgets from PyQt5 import QtWidgets
from .codeeditor import _make_textformats from ..editors.codeeditor import _make_textformats
from ..Qt import QtWidgets, QtCore, QtGui from ..Qt import QtWidgets, QtCore, QtGui
from nmreval.configs import config_paths from nmreval.configs import config_paths

View File

@ -4,6 +4,8 @@ from collections import namedtuple
import numpy as np import numpy as np
import nmreval
from nmreval import models from nmreval import models
from nmreval.configs import config_paths from nmreval.configs import config_paths
from nmreval.lib.importer import find_models, import_ from nmreval.lib.importer import find_models, import_
@ -28,6 +30,7 @@ class Namespace:
'y_err': (None, 'y error values'), 'y_err': (None, 'y error values'),
'fit': (None, 'dictionary of fit parameter', 'fit["PIKA"]'), 'fit': (None, 'dictionary of fit parameter', 'fit["PIKA"]'),
'np': (np, 'numpy module'), 'np': (np, 'numpy module'),
'nmreval': (nmreval, 'built-in classes and stuff')
}, },
parents=('Basic', 'General'), parents=('Basic', 'General'),
) )

556
src/gui_qt/lib/pokemon.py Normal file
View File

@ -0,0 +1,556 @@
import sqlite3
import urllib.request
from functools import cache
from PyQt5 import QtWidgets, QtGui, QtCore
from numpy.random import randint
from gui_qt._py.pokewindow import Ui_Dialog
from gui_qt._py.pokeentry import Ui_Form
def get_connection(db):
connection = sqlite3.connect(db)
connection.row_factory = sqlite3.Row
return connection
class QPoke(QtWidgets.QDialog, Ui_Dialog):
types = {None: ('', '')}
stats = {}
def __init__(self, parent=None):
super().__init__(parent=parent)
from importlib.resources import path
with path('resources', 'pokemon.sqlite') as fp:
self._db = str(fp)
PokemonEntry._db = str(fp)
self.setupUi(self)
self._fetch_names()
self.add_pokedexes()
self.tableWidget_2.itemSelectionChanged.connect(self.show_pokemon)
self.comboBox_2.currentIndexChanged.connect(self.collect_pokemon)
self.comboBox.currentIndexChanged.connect(self.collect_pokemon)
self.pushButton.clicked.connect(self.randomize)
self.collect_pokemon()
def _fetch_names(self):
connection = get_connection(self._db)
cursor = connection.cursor()
cursor.execute(
'SELECT * FROM types'
)
self.comboBox.addItem('All types', -1)
for entry in cursor.fetchall():
self.types[entry['id']] = (entry['name_de'], entry['name_en'])
self.comboBox.addItem(entry['name_en'], entry['id'])
connection.close()
def add_pokedexes(self):
connection = get_connection(self._db)
cursor = connection.cursor()
cursor.execute('SELECT * FROM pokedex_list')
for entry in cursor.fetchall():
self.comboBox_2.addItem(entry['name_en'], entry['id'])
connection.close()
def fill_list(self, idx: int = 0):
pokedex_id = self.comboBox_2.itemData(idx, QtCore.Qt.ItemDataRole.UserRole)
pokedex = self.get_pokedex(pokedex_id)
self.tableWidget_2.clear()
self.tableWidget_2.setColumnCount(4)
self.tableWidget_2.setRowCount(0)
for pokemon in pokedex:
poke_id = pokemon['species_id']
row_count = self.tableWidget_2.rowCount()
self.tableWidget_2.setRowCount(row_count + 1)
item = QtWidgets.QTableWidgetItem(f'#{pokemon["entry_number"]:04d}')
item.setData(QtCore.Qt.ItemDataRole.UserRole, poke_id)
self.tableWidget_2.setItem(row_count, 0, item)
item = QtWidgets.QTableWidgetItem(pokemon['name_en'])
item.setToolTip(pokemon['name_de'])
self.tableWidget_2.setItem(row_count, 1, item)
poke_type = self.types[pokemon['type1']]
item = QtWidgets.QTableWidgetItem(poke_type[1])
item.setToolTip(poke_type[0])
self.tableWidget_2.setItem(row_count, 2, item)
try:
poke_type = self.types[pokemon['type2']]
item = QtWidgets.QTableWidgetItem(poke_type[1])
item.setToolTip(poke_type[0])
self.tableWidget_2.setItem(row_count, 3, item)
except KeyError:
pass
self.tableWidget_2.resizeColumnsToContents()
def collect_pokemon(self, *args):
pokedex_id = self.comboBox_2.currentData(QtCore.Qt.ItemDataRole.UserRole)
type_id = self.comboBox.currentData(QtCore.Qt.ItemDataRole.UserRole)
connection = get_connection(self._db)
cursor = connection.cursor()
if pokedex_id == 1:
if type_id == -1:
cursor.execute(
'SELECT *, pokemon_list.species_id AS entry_number '
'FROM pokemon_list '
'ORDER BY entry_number'
)
else:
cursor.execute(
'SELECT *, pokemon_list.species_id AS entry_number '
'FROM pokemon_list '
'WHERE pokemon_list.type1 = ? OR pokemon_list.type2 = ? '
'ORDER BY entry_number',
(type_id, type_id)
)
else:
if type_id == -1:
cursor.execute(
'SELECT pokemon_list.*, pp.entry_number '
'FROM pokemon_list '
'JOIN pokedex_pokemon pp ON pp.species_id = pokemon_list.species_id '
'WHERE pp.pokedex_id = ? '
'ORDER BY pp.entry_number',
(pokedex_id,)
)
else:
cursor.execute(
'SELECT pokemon_list.*, pp.entry_number '
'FROM pokemon_list '
'JOIN pokedex_pokemon pp ON pp.species_id = pokemon_list.species_id '
'WHERE pp.pokedex_id = ? AND (pokemon_list.type1 = ? OR pokemon_list.type2 = ?) '
'ORDER BY pp.entry_number',
(pokedex_id, type_id, type_id)
)
result = cursor.fetchall()
connection.close()
self.fill_sorter(result)
def fill_sorter(self, result):
self.tableWidget_2.clearContents()
self.tableWidget_2.setRowCount(0)
self.tableWidget_2.setSortingEnabled(False)
for entry in result:
row = self.tableWidget_2.rowCount()
self.tableWidget_2.setRowCount(row+1)
item = QtWidgets.QTableWidgetItem(f"{entry['entry_number']:04d}")
item.setData(QtCore.Qt.ItemDataRole.UserRole, entry['species_id'])
item.setData(QtCore.Qt.ItemDataRole.UserRole+1, entry['pokemon_id'])
self.tableWidget_2.setItem(row, 0, item)
name_en = entry['name_en']
if entry['full_name_en']:
name_en = entry['full_name_en']
elif entry['form_en']:
name_en += f" {entry['form_en']}"
name_de = entry['name_de']
if entry['full_name_de']:
name_de = entry['full_name_de']
elif entry['form_de']:
name_de += f" {entry['form_de']}"
item = QtWidgets.QTableWidgetItem(name_en)
item.setToolTip(name_de)
self.tableWidget_2.setItem(row, 1, item)
type_en = []
type_de = []
for t_id in ('type1', 'type2'):
t_de, t_en = self.types[entry[t_id]]
if t_en:
type_en.append(t_en)
type_de.append(t_de)
item = QtWidgets.QTableWidgetItem(' / '.join(type_en))
item.setToolTip('\n'.join(type_en))
self.tableWidget_2.setItem(row, 2, item)
total = 0
for i, stat_name in enumerate(('hit_points', 'attack', 'defense', 'sp_atk', 'sp_def', 'speed')):
stat_value = entry[stat_name]
item = QtWidgets.QTableWidgetItem()
item.setData(QtCore.Qt.ItemDataRole.DisplayRole, stat_value)
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignRight | QtCore.Qt.AlignmentFlag.AlignVCenter)
self.tableWidget_2.setItem(row, i+4, item)
total += stat_value
item = QtWidgets.QTableWidgetItem()
item.setData(QtCore.Qt.ItemDataRole.DisplayRole, total)
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignRight | QtCore.Qt.AlignmentFlag.AlignVCenter)
self.tableWidget_2.setItem(row, 3, item)
item = QtWidgets.QTableWidgetItem()
item.setData(QtCore.Qt.ItemDataRole.DisplayRole, entry['height'] / 10)
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignRight | QtCore.Qt.AlignmentFlag.AlignVCenter)
self.tableWidget_2.setItem(row, 10, item)
item = QtWidgets.QTableWidgetItem()
item.setData(QtCore.Qt.ItemDataRole.DisplayRole, entry['weight'] / 10)
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignRight | QtCore.Qt.AlignmentFlag.AlignVCenter)
self.tableWidget_2.setItem(row, 11, item)
item = QtWidgets.QTableWidgetItem()
item.setData(QtCore.Qt.ItemDataRole.DisplayRole, round(entry['weight']/entry['height']**2 * 10, 2))
item.setTextAlignment(QtCore.Qt.AlignmentFlag.AlignRight | QtCore.Qt.AlignmentFlag.AlignVCenter)
self.tableWidget_2.setItem(row, 12, item)
self.tableWidget_2.resizeColumnToContents(1)
self.tableWidget_2.resizeColumnToContents(2)
self.tableWidget_2.setSortingEnabled(True)
def randomize(self):
select = randint(0, self.tableWidget_2.rowCount())
self.show_pokemon(select)
def show_pokemon(self, row: int = None):
table = self.tableWidget_2
if row is None:
row = table.currentRow()
species_id = table.item(row, 0).data(QtCore.Qt.ItemDataRole.UserRole)
poke_id = table.item(row, 0).data(QtCore.Qt.ItemDataRole.UserRole+1)
pokemon_name = table.item(row, 1).text()
connection = get_connection(self._db)
cursor = connection.cursor()
cursor.execute(
'SELECT p.id FROM pokemon p WHERE p.species_id = ?',
(species_id,)
)
pokemon = cursor.fetchall()
connection.close()
self.tabWidget.setCurrentIndex(0)
for i in range(1, self.tabWidget.count()):
self.tabWidget.setTabVisible(i, False)
widget_idx = 0
for i, p in enumerate(pokemon):
entry_widget = self.tabWidget.widget(i)
if poke_id == p[0]:
widget_idx = i
if entry_widget is None:
self.tabWidget.addTab(PokemonEntry(p[0]), '')
self.tabWidget.setTabText(i, pokemon_name)
self.tabWidget.setTabVisible(i, True)
name = self.tabWidget.widget(i).create_pokemon(p[0])
self.tabWidget.setTabText(i, name)
self.tabWidget.setCurrentIndex(widget_idx)
class PokemonEntry(QtWidgets.QWidget, Ui_Form):
_db = ''
def __init__(self, pokemon_id: int, parent=None):
super().__init__(parent=parent)
self.setupUi(self)
self.bars = [
None, self.hp_bar, self.attack_bar, self.defense_bar, self.spec_attack_bar, self.spec_defense_bar, self.speed_bar
]
self.ability_labels = [None, self.ability1_label, self.ability2_label, self.ability3_label]
self.type_labels = [None, self.type1_label, self.type2_label]
self.create_pokemon(pokemon_id)
def create_pokemon(self, poke_id):
pokemon = self.get_pokemon(poke_id)
species = self.get_species(pokemon['species_id'])
self.nationaldex_label.setText(f"{pokemon['species_id']:04d}")
self.species_label.setText(species['genus_en'])
self.species_label.setToolTip(species['genus_de'])
self.height_label.setText(f"{pokemon['height'] / 10} m")
self.weight_label.setText(f"{pokemon['weight'] / 10} kg")
if species['gender_ratio'] == -1:
gender = "Gender unknown"
else:
gender = f"{species['gender_ratio']*12.5:0.2f}% female, {100-species['gender_ratio']*12.5:0.2f}% male"
self.gender_label.setText(gender)
if not QtGui.QPixmapCache.find(str(poke_id)):
image = b''
if pokemon['artwork'] is not None:
try:
res = urllib.request.urlopen(pokemon['artwork'])
image = res.read()
except:
pass
pixmap = QtGui.QPixmap()
pixmap.loadFromData(image)
sc_pixmap = pixmap.scaled(400, 400, QtCore.Qt.AspectRatioMode.KeepAspectRatio)
QtGui.QPixmapCache.insert(str(poke_id), sc_pixmap)
self.artwork_label.setPixmap(QtGui.QPixmapCache.find(str(poke_id)))
stats = self.get_stats(poke_id)
for (stat_id, stat_value) in stats:
self.bars[stat_id].setValue(stat_value)
abilities = self.get_abilities(poke_id)
for lab in self.ability_labels[1:]:
lab.setVisible(False)
for (slot, is_hidden, name_de, name_en) in abilities:
self.ability_labels[slot].setVisible(True)
t = name_en
if is_hidden:
t += ' (hidden ability)'
self.ability_labels[slot].setText(t)
self.ability_labels[slot].setToolTip(name_de)
form, types = self.get_form_and_type(poke_id)
for lab in self.type_labels[1:]:
lab.setVisible(False)
for (type_id, slot) in types:
self.type_labels[slot].setVisible(True)
self.type_labels[slot].setText(QPoke.types[type_id][1])
self.type_labels[slot].setToolTip(QPoke.types[type_id][0])
evolutions = self.make_evolution(pokemon['evolution_id'])
self.tableWidget.clear()
self.tableWidget.setColumnCount(4)
self.tableWidget.setRowCount(len(evolutions))
for i, e in enumerate(evolutions):
item = QtWidgets.QTableWidgetItem(f'{e[0]} (#{e[1]:04d})')
self.tableWidget.setItem(i, 0, item)
item = QtWidgets.QTableWidgetItem('to')
self.tableWidget.setItem(i, 1, item)
item = QtWidgets.QTableWidgetItem(f'{e[2]} (#{e[3]:04d})')
self.tableWidget.setItem(i, 2, item)
item = QtWidgets.QTableWidgetItem(f'{e[4]}')
self.tableWidget.setItem(i, 3, item)
self.tableWidget.resizeColumnsToContents()
self.tableWidget.resizeRowsToContents()
if form['full_name_en'] is not None:
return form['full_name_en']
elif form['form_en'] is not None:
return f"{species['name_en']} ({form['form_en']})"
else:
return species['name_en']
@cache
def get_pokedex(self, pokedex_id):
connection = get_connection(self._db)
cursor = connection.cursor()
cursor.execute(
'SELECT pokemon_list.*, pp.entry_number FROM pokemon_list '
'JOIN pokedex_pokemon pp ON pp.species_id = pokemon_list.species_id '
'WHERE pp.pokedex_id = ? '
'ORDER BY pp.entry_number',
(pokedex_id,)
)
res = cursor.fetchall()
connection.close()
return res
@cache
def get_abilities(self, pokemon_id):
conn = get_connection(self._db)
cursor = conn.cursor()
cursor.execute(
'SELECT slot, ís_hidden, name_de, name_en FROM pokemon_ability '
'JOIN main.ability ON pokemon_ability.ability_id = ability.id '
'WHERE pokemon_id = ?',
(pokemon_id,)
)
abilities = cursor.fetchall()
conn.close()
return abilities
@cache
def get_pokemon(self, poke_id):
connection = get_connection(self._db)
cursor = connection.cursor()
cursor.execute(
'SELECT p.species_id, p.height, p.weight, p.artwork, p.evolution_id FROM pokemon p WHERE p.id = ?',
(poke_id,)
)
pokemon = cursor.fetchone()
connection.close()
return pokemon
@cache
def get_species(self, species_id):
connection = get_connection(self._db)
cursor = connection.cursor()
cursor.execute(
'SELECT s.id, s.name_en, s.name_de, s.genus_de, s.genus_en, s.color_id, s.is_mythical, s.is_legendary, s.generation, s.gender_ratio '
'FROM species s '
'WHERE s.id = ?',
(species_id,)
)
species = cursor.fetchone()
connection.close()
return species
@cache
def get_stats(self, pokemon_id):
conn = get_connection(self._db)
cursor = conn.cursor()
cursor.execute(
'SELECT stat_id, value FROM pokemon_stat WHERE pokemon_id = ?',
(pokemon_id,)
)
stats = cursor.fetchall()
conn.close()
return stats
@cache
def get_form_and_type(self, pokemon_id):
conn = get_connection(self._db)
cursor = conn.cursor()
cursor.execute(
'SELECT id, full_name_en, form_en FROM form WHERE pokemon_id = ? AND is_default = 1',
(pokemon_id,)
)
form = cursor.fetchone()
cursor.execute(
'SELECT type_id, slot FROM form_type WHERE form_id = ?',
(form['id'],)
)
types = cursor.fetchall()
conn.close()
return form, types
@cache
def make_evolution(self, poke_id: int):
steps = []
conn = get_connection(self._db)
cursor = conn.cursor()
cursor.execute('SELECT * FROM evolution_names WHERE id = ?', (poke_id,))
chain = cursor.fetchall()
conn.close()
trigger_texts = [
None,
'Level up',
'Trade',
'',
'Empty spot in party',
'Spin',
'Train in the Tower of Darkness',
'Train in the Tower of Water',
'Land three critical hits in a battle',
'Go somewhere after taking damage',
'',
'Use Psyshield Bash 20 times in Agile Style',
'Use Barb Barrage 20 times in Strong Style',
'Receive 294 recoil damage in battle',
]
special_pokemon = {
24: 'Use Rage Fist 20 times',
317: "Defeat 3 Bisharp that are holding Leader's Crest",
528: 'Collect 999 Coins from Roaming Form',
484: "Walk 1,000 steps in Let's Go mode",
485: "Walk 1,000 steps in Let's Go mode",
495: "Walk 1,000 steps in Let's Go mode",
499: "Walk 1,000 steps in Let's Go mode",
504: "Level up while in multiplayer"
}
condition_text = {
'min_level': lambda x: f"Lv. {x['min_level']}",
'min_happiness': lambda _: f"high Friendship",
'min_beauty': lambda _: f"needs max. Beauty",
'min_affection': lambda x: f"{x['min_affection']} Affection",
'location_en': lambda x: f"at {x['location_en']}",
'held_item_en': lambda x: f"hold {x['held_item_en']}",
'item_en': lambda x: f'Use {x["item_en"]}',
'known_move_en': lambda x: f"know {x['known_move_en']}",
'move_type_en': lambda x: f"know {x['move_type_en']} move",
'party_species_en': lambda x: f"{x['party_species_en']} in party",
'party_type_en': lambda x: f"{x['party_type_en']} in party",
'time_of_day': lambda x: f"at {x['time_of_day']}",
'trade_species_en': lambda x: f"with {x['trade_species_en']}",
'needs_rain': lambda _: 'during rain',
'upside_down': lambda _: 'hold controller upside-down',
'relative_stats': lambda x: {1: 'attack &gt; defense', 0: 'attack = defense', -1: 'attack &lt; defense'}[x['relative_stats']],
}
for c in chain:
lvl0 = c["name_en"]
if c['gender'] == 1:
lvl0 += ' (female)'
elif c['gender'] == 2:
lvl0 += ' (male)'
trig = c['trigger']
if trig == 10:
level_text = [special_pokemon[poke_id]]
else:
level_text = [trigger_texts[trig]]
for k, v in condition_text.items():
if c[k] is not None:
level_text.append(v(c))
steps.append(
(lvl0, c['evolves_from'], c['evolve_en'], c['species_id'], ', '.join(filter(lambda x: x, level_text)))
)
return steps

View File

@ -677,8 +677,9 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
from ..math.skipping import QSkipDialog from ..math.skipping import QSkipDialog
dial = QSkipDialog(self) dial = QSkipDialog(self)
dial.exec() res = dial.exec()
if res:
self.management.skip_points(**dial.get_arguments()) self.management.skip_points(**dial.get_arguments())
@QtCore.pyqtSlot(name='on_action_coup_calc_triggered') @QtCore.pyqtSlot(name='on_action_coup_calc_triggered')
@ -984,13 +985,21 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
@QtCore.pyqtSlot(name='on_actionFunction_editor_triggered') @QtCore.pyqtSlot(name='on_actionFunction_editor_triggered')
def edit_models(self): def edit_models(self):
if self.editor is None: if self.editor is None:
from ..lib.usermodeleditor import QUsermodelEditor from ..editors.usermodeleditor import QUsermodelEditor
self.editor = QUsermodelEditor(config_paths() / 'usermodels.py', parent=self) self.editor = QUsermodelEditor(config_paths() / 'usermodels.py', parent=self)
self.editor.modelsChanged.connect(lambda: self.fit_dialog.read_and_load_functions()) self.editor.modelsChanged.connect(lambda: self.fit_dialog.read_and_load_functions())
self.editor.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal) self.editor.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
self.editor.show() self.editor.show()
@QtCore.pyqtSlot(name='on_actionUse_script_triggered')
def open_editor(self):
from ..editors.script_editor import QEditor
editor = QEditor(self.path, parent=self)
editor.runSignal.connect(self.management.run_script)
editor.show()
@QtCore.pyqtSlot(list, bool) @QtCore.pyqtSlot(list, bool)
def extend_fit(self, sets: list, only_subplots: bool): def extend_fit(self, sets: list, only_subplots: bool):
if only_subplots: if only_subplots:

View File

@ -791,17 +791,28 @@ class UpperManagement(QtCore.QObject):
_active = self.graphs[self.current_graph].active _active = self.graphs[self.current_graph].active
new_datasets = {} new_datasets = {}
groupby = params.pop('groupby')
for sid in _active: for sid in _active:
data_i = self.data[sid] data_i = self.data[sid]
pts = data_i.points(params)
if groupby == 'group':
if data_i.group not in new_datasets: if data_i.group not in new_datasets:
new_datasets[data_i.group] = [], [] new_datasets[data_i.group] = [], []
new_x_axis, _temp = new_datasets[data_i.group] new_x_axis, _temp = new_datasets[data_i.group]
pts = data_i.points(params)
if pts: if pts:
new_x_axis.append(data_i.value) new_x_axis.append(data_i.value)
_temp.append(pts) _temp.append(pts)
else:
for (_x, _y, _yerr) in pts:
if _x not in new_datasets:
new_datasets[_x] = [], []
new_x_axis, _temp = new_datasets[_x]
new_x_axis.append(data_i.value)
_temp.append([[_x, _y, _yerr]])
key_list = [] key_list = []
for label, (new_x_axis, _temp) in new_datasets.items(): for label, (new_x_axis, _temp) in new_datasets.items():
_temp = np.array(_temp) # (number of sets, number of picks, (x, y, y_err)) _temp = np.array(_temp) # (number of sets, number of picks, (x, y, y_err))
@ -1033,7 +1044,7 @@ class UpperManagement(QtCore.QObject):
else: else:
data = self.data[sets[0]] data = self.data[sets[0]]
if isinstance(data.data, new_type): if isinstance(data.data, new_type):
error_list.append(f'{data.name} is alreade of type {new_type.__name__}') error_list.append(f'{data.name} is already of type {new_type.__name__}')
continue continue
new_data = new_type(data.x, np.zeros(data.x.size)) new_data = new_type(data.x, np.zeros(data.x.size))
@ -1067,6 +1078,8 @@ class UpperManagement(QtCore.QObject):
@QtCore.pyqtSlot(list, list, bool) @QtCore.pyqtSlot(list, list, bool)
def eval_expression(self, cmds: list, set_ids: list, overwrite: bool): def eval_expression(self, cmds: list, set_ids: list, overwrite: bool):
if self.namespace is None:
self.namespace = self.get_namespace()
ns = self.namespace.flatten() ns = self.namespace.flatten()
if overwrite: if overwrite:
@ -1099,13 +1112,28 @@ class UpperManagement(QtCore.QObject):
if failures: if failures:
err_msg = QtWidgets.QMessageBox(parent=self.sender()) err_msg = QtWidgets.QMessageBox(parent=self.sender())
err_msg.setText('One or more errors occured during evaluation.') err_msg.setText('One or more errors occurred during evaluation.')
err_msg.setDetailedText('\n'.join(f'{d.name} failed with error: {err.args}' for d, err in failures)) err_msg.setDetailedText('\n'.join(f'{d.name} failed with error: {err.args}' for d, err in failures))
err_msg.exec() err_msg.exec()
self.sender().success = not failures self.sender().success = not failures
self.sender().add_data(self.active_sets) self.sender().add_data(self.active_sets)
@QtCore.pyqtSlot(str)
def run_script(self, text):
self.namespace = self.get_namespace()
ns = self.namespace.flatten()
ns['return_list'] = []
# custom namespace must be available in global namespace of exec, otherwise imports do not work in functions
exec(text, ns, ns)
new_sets = []
for new_data in ns['return_list']:
new_sets.append(self.add(new_data))
self.newData.emit(new_sets, '')
@QtCore.pyqtSlot(list, dict) @QtCore.pyqtSlot(list, dict)
def create_from_function(self, cmds: list, opts: dict): def create_from_function(self, cmds: list, opts: dict):
ns = dict(self.namespace.flatten()) ns = dict(self.namespace.flatten())

View File

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
from nmreval.nmr.coupling import * from nmreval.nmr.coupling import *
from nmreval.distributions import ColeCole, ColeDavidson, HavriliakNegami, KWW, LogGaussian from nmreval.distributions import ColeCole, ColeDavidson, HavriliakNegami, KWW, LogGaussian, GGAlpha
from nmreval.utils import pi from nmreval.utils import pi
from nmreval.utils.text import convert from nmreval.utils.text import convert
@ -19,7 +19,7 @@ class QRelaxCalc(QtWidgets.QDialog, Ui_Dialog):
self.graphs = {} self.graphs = {}
self.specdens = [ColeCole, ColeDavidson, HavriliakNegami, KWW, LogGaussian] self.specdens = [ColeCole, ColeDavidson, HavriliakNegami, KWW, LogGaussian, GGAlpha]
self.coupling = [Quadrupolar, HomoDipolar, Czjzek] self.coupling = [Quadrupolar, HomoDipolar, Czjzek]
self.tau_parameter = [] self.tau_parameter = []

View File

@ -31,7 +31,7 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
self.t1calculator = RelaxationEvaluation() self.t1calculator = RelaxationEvaluation()
self.sd_parameter = [] self.sd_parameter = []
self.sdmodels = [Debye, ColeCole, ColeDavidson, KWW, HavriliakNegami, LogGaussian] self.sdmodels = [Debye, ColeCole, ColeDavidson, KWW, HavriliakNegami, LogGaussian, GGAlpha]
for i in self.sdmodels: for i in self.sdmodels:
self.specdens_combobox.addItem(i.name) self.specdens_combobox.addItem(i.name)
self.specdens_combobox.currentIndexChanged.connect(self.update_specdens) self.specdens_combobox.currentIndexChanged.connect(self.update_specdens)
@ -51,8 +51,14 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
self.conv_y = QT1Widget.time_conversion[self.t1_combobox.currentIndex()] self.conv_y = QT1Widget.time_conversion[self.t1_combobox.currentIndex()]
self.minimum = (1, np.inf) self.minimum = (1, np.inf)
self.min_pos = PlotItem(x=np.array([]), y=np.array([]), self.min_pos = PlotItem(
symbol='+', symbolBrush=mkBrush(color='r'), symbolPen=mkPen(color='r'), symbolSize=14) x=np.array([]),
y=np.array([]),
symbol='+',
symbolBrush=mkBrush(color='r'),
symbolPen=mkPen(color='r'),
symbolSize=14,
)
self.parabola = PlotItem(x=np.array([]), y=np.array([])) self.parabola = PlotItem(x=np.array([]), y=np.array([]))
self.lineEdit_2.setValidator(QtGui.QDoubleValidator()) self.lineEdit_2.setValidator(QtGui.QDoubleValidator())
@ -83,10 +89,10 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
right_b = min(np.argmin(y)+3, len(x)-1) right_b = min(np.argmin(y)+3, len(x)-1)
self.lineEdit_2.blockSignals(True) self.lineEdit_2.blockSignals(True)
self.lineEdit_2.setText('{:.2f}'.format(x[left_b])) self.lineEdit_2.setText(f'{x[left_b]:.2f}')
self.lineEdit_2.blockSignals(False) self.lineEdit_2.blockSignals(False)
self.lineEdit_3.blockSignals(True) self.lineEdit_3.blockSignals(True)
self.lineEdit_3.setText('{:.2f}'.format(x[right_b])) self.lineEdit_3.setText(f'{x[right_b]:.2f}')
self.lineEdit_3.blockSignals(False) self.lineEdit_3.blockSignals(False)
self.t1calculator.set_data(x, y) self.t1calculator.set_data(x, y)
@ -110,6 +116,7 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
if self.sdmodels[idx].parameter is not None: if self.sdmodels[idx].parameter is not None:
for name in self.sdmodels[idx].parameter: for name in self.sdmodels[idx].parameter:
print(name)
_temp = FormWidget(parent=self, name=name, fixable=True) _temp = FormWidget(parent=self, name=name, fixable=True)
_temp.value = 1 _temp.value = 1
_temp.setChecked(True) _temp.setChecked(True)
@ -133,7 +140,7 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
try: try:
for i, v, in enumerate(values): for i, v, in enumerate(values):
self.sd_parameter[i].blockSignals(True) self.sd_parameter[i].blockSignals(True)
self.sd_parameter[i].value = '{:.3g}'.format(round(v, 3)) self.sd_parameter[i].value = f'{v:.3g}'
self.sd_parameter[i].blockSignals(False) self.sd_parameter[i].blockSignals(False)
except IndexError: except IndexError:
pass pass
@ -219,7 +226,7 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
self.update_model() self.update_model()
@QtCore.pyqtSlot(int, name='on_interpol_combobox_currentIndexChanged') @QtCore.pyqtSlot(int, name='on_interpol_combobox_currentIndexChanged')
def determine_minimum(self, idx): def determine_minimum(self, idx: int):
if idx == 0: if idx == 0:
self.checkBox_interpol.setChecked(False) self.checkBox_interpol.setChecked(False)
self.checkBox_interpol.hide() self.checkBox_interpol.hide()
@ -229,9 +236,10 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
self.checkBox_interpol.show() self.checkBox_interpol.show()
self.frame.show() self.frame.show()
try: try:
m, i_func = self.t1calculator.calculate_t1_min(interpolate=idx, m, i_func = self.t1calculator.calculate_t1_min(
trange=(float(self.lineEdit_2.text()), interpolate=idx,
float(self.lineEdit_3.text()))) trange=(float(self.lineEdit_2.text()), float(self.lineEdit_3.text())),
)
except ValueError: except ValueError:
m, i_func = self.t1calculator.calculate_t1_min(interpolate=None) m, i_func = self.t1calculator.calculate_t1_min(interpolate=None)
@ -273,11 +281,13 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
return return
with busy_cursor(): with busy_cursor():
calc_stretching, mini = self.t1calculator.get_increase(height=self.minimum[1], calc_stretching, mini = self.t1calculator.get_increase(
height=self.minimum[1],
idx=var_idx, mode=notfix, idx=var_idx, mode=notfix,
omega=2*np.pi*self.frequency, omega=2*np.pi*self.frequency,
dist_parameter=sd_args, prefactor=cp_args, dist_parameter=sd_args, prefactor=cp_args,
coupling_kwargs=cp_kwargs) coupling_kwargs=cp_kwargs
)
self.label_t1min.setText(f'{mini:.4g} s') self.label_t1min.setText(f'{mini:.4g} s')
@ -292,9 +302,13 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
sd_args, _ = self.get_sd_values() sd_args, _ = self.get_sd_values()
cp_args, cp_kwargs, _ = self.get_cp_values() cp_args, cp_kwargs, _ = self.get_cp_values()
tau_mode = ['fit', 'peak', 'mean', 'logmean'][self.tau_combox.currentIndex()] tau_mode = ['fit', 'peak', 'mean', 'logmean'][self.tau_combox.currentIndex()]
corr, opts = self.t1calculator.correlation_from_t1(omega=2*np.pi*self.frequency, dist_parameter=sd_args, corr, opts = self.t1calculator.correlation_from_t1(
omega=2*np.pi*self.frequency,
dist_parameter=sd_args,
coupling_param=cp_args, coupling_kwargs=cp_kwargs, coupling_param=cp_args, coupling_kwargs=cp_kwargs,
mode=tau_mode, interpolate=self.checkBox_interpol.isChecked()) mode=tau_mode,
interpolate=self.checkBox_interpol.isChecked()
)
name = self.name + '-' + str(self.t1calculator) + '(' name = self.name + '-' + str(self.t1calculator) + '('
name += ','.join([f'{a:.3g}' for a in sd_args]) name += ','.join([f'{a:.3g}' for a in sd_args])
@ -332,4 +346,4 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog):
@QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged') @QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged')
def changed_state(self, checked): def changed_state(self, checked):
self.graph_combobox.setEnabled(checked != QtCore.Qt.Checked) self.graph_combobox.setEnabled(checked != QtCore.Qt.CheckState.Checked)

View File

@ -156,3 +156,20 @@ double energyDistCorrelation(double x, void *user_data) {
return normalDist(x, e_m, e_b) * exp(-t * r); return normalDist(x, e_m, e_b) * exp(-t * r);
} }
// Generalised Gamma Function
double genGammaAlphaDist(double x, void *user_data) {
double *c = (double *)user_data;
double omega = c[0];
double tau0 = c[1];
double alpha = c[2];
double beta = c[3];
double b_to_a = beta / alpha;
double tau_to_tau0 = tau / tau0;
double norm = exp(-lgamma(b_to_a) + b_to_a * log(b_to_a)) * alpha;
return norm * exp(-b_to_a * pow(tau_to_tau0, alpha)) * pow(tau_to_tau0, beta);
}

View File

@ -273,9 +273,14 @@ class Points:
def length(self): def length(self):
return len(self._x) return len(self._x)
def points(self, idx: list = None, special: str = None, def points(
avg_range: tuple[int, int] = (0, 0), avg_mode: str = 'mean', self,
pts: list = None) -> list[tuple]: idx: list = None,
special: str = None,
avg_range: tuple[int, int] = (0, 0),
avg_mode: str = 'mean',
pts: list = None,
) -> list[tuple]:
""" """
Return (x, y) values at specified positions. Return (x, y) values at specified positions.
@ -294,7 +299,7 @@ class Points:
avg_range (tuple of int) : avg_range (tuple of int) :
Region for average of y values. Tuple (a, b) uses ``y[i-a:i+b+1]`` around index `i`. Default is (0, 0). Region for average of y values. Tuple (a, b) uses ``y[i-a:i+b+1]`` around index `i`. Default is (0, 0).
avg_mode (str {'mean', 'sum', 'integral'} , optional) : avg_mode (str {'mean', 'sum', 'integral', 'std'} , optional) :
Averaging type Averaging type
`mean` : Arithmetic average `mean` : Arithmetic average
@ -303,6 +308,8 @@ class Points:
'integral`: Integration over range using Simpson's rule 'integral`: Integration over range using Simpson's rule
'std': Standard deviation
pts (list, optional) : pts (list, optional) :
If given, points will be appended. If given, points will be appended.
@ -313,8 +320,8 @@ class Points:
if (idx is None) and (special is None): if (idx is None) and (special is None):
raise ValueError('Either `idx` or `special` must be given') raise ValueError('Either `idx` or `special` must be given')
if avg_mode not in ['mean', 'sum', 'integral']: if avg_mode not in ['mean', 'sum', 'integral', 'std']:
raise ValueError(f'Parameter `avg_mode` is `mean`, `sum`, `integral`, not `{avg_mode}`' ) raise ValueError(f'Parameter `avg_mode` is `mean`, `sum`, `integral`, `std`, not `{avg_mode}`' )
if pts is None: if pts is None:
pts = [] pts = []
@ -388,6 +395,10 @@ class Points:
y_mean = simpson(y[left:right].real, x=x[left:right]) y_mean = simpson(y[left:right].real, x=x[left:right])
y_err_mean = np.linalg.norm(cumulative_trapezoid(y_err[left:right].real, x=x[left:right])) y_err_mean = np.linalg.norm(cumulative_trapezoid(y_err[left:right].real, x=x[left:right]))
elif mode == 'std':
y_mean = np.std(y[left:right])
y_err_mean = 0.
else: else:
y_mean = y[idx].real y_mean = y[idx].real
y_err_mean = y_err[idx] y_err_mean = y_err[idx]

View File

@ -26,3 +26,4 @@ from .coledavidson import ColeDavidson
from .debye import Debye from .debye import Debye
from .kww import KWW from .kww import KWW
from .loggaussian import LogGaussian from .loggaussian import LogGaussian
from .gengamma import GGAlpha

View File

@ -95,7 +95,7 @@ def _integrate_c(func, omega: np.ndarray, temperature: np.ndarray, tau0: float,
for o, t in product(omega, temperature): for o, t in product(omega, temperature):
c = (c_double * 5)(o, tau0, e_m, e_b, t) c = (c_double * 5)(o, tau0, e_m, e_b, t)
user_data = cast(pointer(c), c_void_p) user_data = cast(pointer(c), c_void_p)
area = quad(LowLevelCallable(func, user_data), 0, np.infty, epsabs=1e-13)[0] area = quad(LowLevelCallable(func, user_data), 0, np.inf, epsabs=1e-13)[0]
res.append(area) res.append(area)
@ -111,7 +111,7 @@ def _integrate_py(func, axis, temp, tau0, e_m, e_b):
e_axis = np.linspace(max(0., e_m - 50*e_b), e_m + 50*e_b, num=5001) e_axis = np.linspace(max(0., e_m - 50*e_b), e_m + 50*e_b, num=5001)
ret_val = [] ret_val = []
for o, tt in product(x, temperature): for o, tt in product(x, temperature):
ret_val.append(simpson(func(e_axis, o, tau0, e_m, e_b, tt), e_axis)) ret_val.append(simpson(y=func(e_axis, o, tau0, e_m, e_b, tt), x=e_axis))
ret_val = np.array(ret_val).reshape(x.shape[0], temperature.shape[0]) ret_val = np.array(ret_val).reshape(x.shape[0], temperature.shape[0])

View File

@ -7,7 +7,7 @@ try:
from scipy.integrate import simpson from scipy.integrate import simpson
except ImportError: except ImportError:
from scipy.integrate import simps as simpson from scipy.integrate import simps as simpson
from scipy.special import gammaln from scipy.special import gammaln, gamma as scipy_gamma
from nmreval.distributions.base import Distribution from nmreval.distributions.base import Distribution
from nmreval.math.logfourier import logft from nmreval.math.logfourier import logft
@ -20,10 +20,10 @@ class AbstractGG(Distribution, ABC):
@classmethod @classmethod
def correlation(cls, t, tau0, *args): def correlation(cls, t, tau0, *args):
tt = np.asanyarray(t) tt = np.atleast_1d(t)
taus, ln_tau = AbstractGG._prepare_integration(tau0) taus, ln_tau = AbstractGG._prepare_integration(tau0)
g_tau = cls.distribution(taus, tau0, *args) g_tau = cls.distribution(taus, tau0, *args)
ret_val = np.array([simpson(np.exp(-t_i/taus) * g_tau, ln_tau) for t_i in tt]) ret_val = np.array([simpson(np.exp(-t_i/taus) * g_tau, x=ln_tau) for t_i in tt]).squeeze()
return ret_val return ret_val
@ -32,30 +32,41 @@ class AbstractGG(Distribution, ABC):
r""" r"""
Calculate spectral density \int G(ln(tau) tau/(1+(w*tau)^2) dln(tau) Calculate spectral density \int G(ln(tau) tau/(1+(w*tau)^2) dln(tau)
""" """
w = np.asanyarray(omega) _w = np.atleast_1d(omega)
taus, ln_tau = AbstractGG._prepare_integration(tau0) _t = np.atleast_1d(tau0)
g_tau = cls.distribution(taus, tau0, *args) ret_val = np.zeros((_w.size, _t.size), dtype=complex)
ret_val = np.array([simpson(g_tau / (1 - 1j*w_i*taus), ln_tau) for w_i in w]) for (i, tau_i) in enumerate(_t):
taus, ln_tau = AbstractGG._prepare_integration(tau_i)
g_tau = cls.distribution(taus, tau_i, *args)
return ret_val ret_val[:, i].real = np.array([simpson(g_tau * taus / (1 + (w_i*taus)**2), x=ln_tau) for w_i in _w])
ret_val[:, i].imag = np.array([simpson(g_tau * w_i * taus / (1 + (w_i*taus)**2), x=ln_tau) for w_i in _w])
return ret_val.squeeze()
@classmethod @classmethod
def specdens(cls, omega, tau0, *args): def specdens(cls, omega: float | np.ndarray, tau0: float | np.ndarray, *args) -> float | np.ndarray:
r""" r"""
Calculate spectral density \int G(ln(tau) tau/(1+(w*tau)^2) dln(tau) Calculate spectral density \int G(ln(tau) tau/(1+(w*tau)^2) dln(tau)
""" """
w = np.asanyarray(omega) _w = np.atleast_1d(omega)
taus, ln_tau = AbstractGG._prepare_integration(tau0) _t = np.atleast_1d(tau0)
g_tau = cls.distribution(taus, tau0, *args) ret_val = np.zeros((_w.size, _t.size))
ret_val = np.array([simpson(g_tau * taus / (1 + (w_i*taus)**2), ln_tau) for w_i in w]) for (i, tau_i) in enumerate(_t):
taus, ln_tau = AbstractGG._prepare_integration(tau_i)
g_tau = cls.distribution(taus, tau_i, *args)
return ret_val ret_val[:, i] = np.array([simpson(g_tau * taus / (1 + (w_i*taus)**2), x=ln_tau) for w_i in _w])
return ret_val.squeeze()
@staticmethod @staticmethod
def _prepare_integration( def _prepare_integration(
tau0: float, limits: tuple[int, int] = (20, 20), num_steps: int = 4001 tau0: float,
limits: tuple[int, int] = (20, 20),
num_steps: int = 4001,
) -> tuple[np.ndarray, np.ndarray]: ) -> tuple[np.ndarray, np.ndarray]:
""" """
Create array of correlation times for integration over ln(tau) Create array of correlation times for integration over ln(tau)
@ -66,7 +77,6 @@ class AbstractGG(Distribution, ABC):
Returns: Returns:
array of taus and array of ln(tau) array of taus and array of ln(tau)
""" """
ln_tau0 = np.log(tau0) ln_tau0 = np.log(tau0)
@ -77,23 +87,29 @@ class AbstractGG(Distribution, ABC):
# noinspection PyMethodOverriding # noinspection PyMethodOverriding
class GGAlpha(AbstractGG): class GGAlpha(AbstractGG):
name = r'General \Gamma (\alpha)' name = r'General Gamma (alpha)'
parameter = [r'\tau', r'\alpha', r'\beta'] parameter = [r'\alpha', r'\beta']
@staticmethod @staticmethod
def distribution(taus: float | np.ndarray, tau: float, alpha: float, beta: float) -> float | np.ndarray: def distribution(taus: float | np.ndarray, tau: float, alpha: float, beta: float) -> float | np.ndarray:
b_to_a = beta / alpha b_to_a = beta / alpha
norm = np.exp(gammaln(b_to_a) - b_to_a * np.log(b_to_a)) / alpha inv_norm = alpha * np.exp(-gammaln(b_to_a) + b_to_a * np.log(b_to_a))
t_to_t0 = taus / tau t_to_t0 = taus / tau
ret_val = np.exp(-b_to_a * t_to_t0**alpha) * t_to_t0**beta ret_val = np.exp(-b_to_a * t_to_t0**alpha) * t_to_t0**beta
return ret_val / norm return ret_val * inv_norm
@staticmethod
def mean(tau: float | np.ndarray, alpha: float, beta: float) -> float | np.ndarray:
beta_by_alpha = beta/alpha
inv_alpha = 1/alpha
return tau * (1/beta_by_alpha)**inv_alpha * scipy_gamma(beta_by_alpha + inv_alpha) / scipy_gamma(beta_by_alpha)
# noinspection PyMethodOverriding # noinspection PyMethodOverriding
class GGAlphaEW(AbstractGG): class GGAlphaEW(AbstractGG):
name = r'General \Gamma (\alpha + EW)' name = r'General Gamma (alpha + EW)'
parameter = [r'\tau', r'\alpha', r'\beta', r'\sigma', r'\gamma'] parameter = [r'\alpha', r'\beta', r'\sigma', r'\gamma']
@staticmethod @staticmethod
def distribution(tau: float | np.ndarray, tau0: float, def distribution(tau: float | np.ndarray, tau0: float,
@ -117,8 +133,8 @@ class GGAlphaEW(AbstractGG):
# noinspection PyMethodOverriding # noinspection PyMethodOverriding
class GGBeta(AbstractGG): class GGBeta(AbstractGG):
name = r'General \Gamma (\beta)' name = r'General Gamma (beta)'
parameter = [r'\tau', 'a', 'b'] parameter = ['a', 'b']
@staticmethod @staticmethod
def distribution(tau: float | np.ndarray, tau0: float, a: float, b: float) -> float | np.ndarray: def distribution(tau: float | np.ndarray, tau0: float, a: float, b: float) -> float | np.ndarray:

View File

@ -2,6 +2,7 @@ import numpy as np
from ..distributions import * from ..distributions import *
from ..distributions.energy import EnergyBarriers from ..distributions.energy import EnergyBarriers
from ..distributions.gengamma import GGAlpha
from ..distributions.intermolecular import FFHS from ..distributions.intermolecular import FFHS
from ..nmr.relaxation import Relaxation from ..nmr.relaxation import Relaxation
from ..utils.constants import gamma from ..utils.constants import gamma
@ -82,6 +83,13 @@ class FFHSFC(_AbstractFC):
relax = Relaxation(distribution=FFHS) relax = Relaxation(distribution=FFHS)
class GGAFC(_AbstractFC):
name = 'GG(alpha)'
params = _AbstractFC.params + [r'\alpha', r'\beta']
bounds = _AbstractFC.bounds + [(None, None), (None, None)]
relax = Relaxation(distribution=GGAlpha)
class EnergyFC(_AbstractFC): class EnergyFC(_AbstractFC):
name = 'Energy distribution' name = 'Energy distribution'
params = ['C', 'T'] + EnergyBarriers.parameter params = ['C', 'T'] + EnergyBarriers.parameter

View File

@ -1,19 +1,31 @@
from __future__ import annotations
import numpy as np import numpy as np
from scipy import special as special from scipy import special as special
from ..utils import kB from ..utils import kB
class Weight2Phase: class Weight:
type = 'Line shape' type = 'Line shape'
name = 'Weighting factor' name = 'Weighting factor'
equation = r'A*[0.5 + 0.5 erf[(x-T_{0})/\DeltaT]] + A_{0}' equation = r'A * [0.5 \pm 0.5 erf[(x-T_{0})/\DeltaT]] + A_{0}'
params = ['T_{0}', r'\DeltaT', 'A', 'A_{0}'] params = ['T_{0}', r'\DeltaT', 'A', 'A_{0}']
choices = [('Direction', 'sign', {'increase': '+', 'decrease': '-'})]
bounds = [(0, None), (0, None), (None, None), (None, None)] bounds = [(0, None), (0, None), (None, None), (None, None)]
@staticmethod @staticmethod
def func(x, t0, dt, amp, off): def func(x: np.ndarray | float, t0: float, dt: float, amp: float, off: float, sign: str = '+') -> np.ndarray | float:
return amp*(0.5 + 0.5*special.erf((x-t0)/dt)) + off if sign not in '+-':
raise ValueError(f"`value` is `+` or `-`, not {sign}")
error_func = 1
if sign == '+':
error_func += special.erf((x-t0)/dt)
else:
error_func -= special.erf((x - t0) / dt)
return amp * error_func / 2. + off
class HendricksonBray: class HendricksonBray:
@ -24,5 +36,5 @@ class HendricksonBray:
bounds = [(0, None)] * 4 bounds = [(0, None)] * 4
@staticmethod @staticmethod
def func(x, a, b, e, w0): def func(x: np.ndarray | float, a: float, b: float, e: float, w0: float) -> np.ndarray | float:
return a*b / (b + (a-b)*np.exp(-e/kB/x)) + w0 return a*b / (b + (a-b)*np.exp(-e/kB/x)) + w0

View File

@ -525,7 +525,7 @@ class RelaxationEvaluation(Relaxation):
dist_parameter: tuple | list = None, dist_parameter: tuple | list = None,
prefactor: tuple | list | float = None, prefactor: tuple | list | float = None,
coupling_kwargs: dict = None, coupling_kwargs: dict = None,
) -> None: ) -> tuple[float, float] :
""" """
Determine a single parameter from a T1 minimum. Determine a single parameter from a T1 minimum.
It replaces the previously set value. It replaces the previously set value.

View File

@ -336,7 +336,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Token:&lt;br/&gt;[abc]: Matches any of a, b, or c&lt;br/&gt;[a-z]: Matches any digit in the range a-z&lt;br/&gt;\d: Matches any digit in the range 0-9 (equal to [0-9}&lt;/p&gt;&lt;p&gt;Quantifiers:&lt;br/&gt;a*: 0 or more of a&lt;br/&gt;a*: 1 or more of a&lt;br/&gt;a?: 0 or 1 of a&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Token:&lt;br/&gt;[abc]: Matches any of a, b, or c&lt;br/&gt;[a-z]: Matches any digit in the range a-z&lt;br/&gt;\d: Matches any digit in the range 0-9 (equal to [0-9}&lt;/p&gt;&lt;p&gt;Quantifiers:&lt;br/&gt;a+: 0 or more of a&lt;br/&gt;a*: 1 or more of a&lt;br/&gt;a?: 0 or 1 of a&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -192,6 +192,7 @@
<addaction name="menuCut_to_visible_range"/> <addaction name="menuCut_to_visible_range"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionChange_datatypes"/> <addaction name="actionChange_datatypes"/>
<addaction name="actionUse_script"/>
</widget> </widget>
<widget class="QMenu" name="menuHelp"> <widget class="QMenu" name="menuHelp">
<property name="title"> <property name="title">
@ -1049,6 +1050,11 @@
<string>Remove data points outside visible y range. Uses real part of points.</string> <string>Remove data points outside visible y range. Uses real part of points.</string>
</property> </property>
</action> </action>
<action name="actionUse_script">
<property name="text">
<string>Use script...</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

View File

@ -106,6 +106,19 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QToolButton" name="pokemon_toolbutton">
<property name="text">
<string/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextOnly</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -0,0 +1,460 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>642</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="artwork_label">
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="verticalSpacing">
<number>12</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>National No.</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="nationaldex_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_1">
<property name="text">
<string>Species</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="species_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Type</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="type1_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="type2_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Abilities</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="ability1_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="ability2_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="ability3_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Height</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="height_label">
<property name="text">
<string>0.0 m</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Weight</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="weight_label">
<property name="text">
<string>0.0 kg</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="gender_label">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Stats</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="0" column="3">
<widget class="QProgressBar" name="spec_attack_bar">
<property name="styleSheet">
<string notr="true">QProgressBar{
border: none;
background-color: transparent;
text-align: center;
}
QProgressBar::chunk {
background-color: #009cda;
border-radius: 3px;
}</string>
</property>
<property name="maximum">
<number>194</number>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%v</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Special Attack</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QProgressBar" name="spec_defense_bar">
<property name="styleSheet">
<string notr="true">QProgressBar{
border: none;
background-color: transparent;
text-align: center;
}
QProgressBar::chunk {
background-color: #009cda;
border-radius: 3px;
}</string>
</property>
<property name="maximum">
<number>250</number>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%v</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<string>HP</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QProgressBar" name="hp_bar">
<property name="styleSheet">
<string notr="true">QProgressBar{
border: none;
background-color: transparent;
text-align: center;
}
QProgressBar::chunk {
background-color: #009cda;
border-radius: 3px;
}</string>
</property>
<property name="maximum">
<number>255</number>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%v</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QProgressBar" name="speed_bar">
<property name="styleSheet">
<string notr="true">QProgressBar{
border: none;
background-color: transparent;
text-align: center;
}
QProgressBar::chunk {
background-color: #009cda;
border-radius: 3px;
}</string>
</property>
<property name="maximum">
<number>200</number>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%v</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Speed</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Special Defense</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QProgressBar" name="defense_bar">
<property name="styleSheet">
<string notr="true">QProgressBar{
border: none;
background-color: transparent;
text-align: center;
}
QProgressBar::chunk {
background-color: #009cda;
border-radius: 3px;
}</string>
</property>
<property name="maximum">
<number>250</number>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%v</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QProgressBar" name="attack_bar">
<property name="styleSheet">
<string notr="true">QProgressBar{
border: none;
background-color: transparent;
text-align: center;
}
QProgressBar::chunk {
background-color: #009cda;
border-radius: 3px;
}</string>
</property>
<property name="maximum">
<number>190</number>
</property>
<property name="value">
<number>24</number>
</property>
<property name="format">
<string>%v</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Attack</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Defense</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Evolution chain</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QTableWidget" name="tableWidget">
<property name="styleSheet">
<string notr="true">background-color: transparent;</string>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="gridStyle">
<enum>Qt::NoPen</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,194 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>359</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Random Pokémon</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>National-Dex</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="pokedex_nr">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Name</string>
</property>
<property name="buddy">
<cstring>name</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="name"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Kategorie</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="category">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Typ</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="poketype">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Größe</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="height">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Gewicht</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="weight">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Farbe</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="color">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Mehr...</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="info">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QToolButton" name="prev_button">
<property name="text">
<string>Prev.</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="next_button">
<property name="text">
<string>Next</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Retry</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1687</width>
<height>991</height>
</rect>
</property>
<property name="windowTitle">
<string>Gotta catch 'em all!</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Random</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="comboBox_2"/>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBox"/>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
<item row="1" column="0" colspan="5">
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTableWidget" name="tableWidget_2">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="gridStyle">
<enum>Qt::NoPen</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>80</number>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>#</string>
</property>
</column>
<column>
<property name="text">
<string>Pokemon</string>
</property>
</column>
<column>
<property name="text">
<string>Type</string>
</property>
</column>
<column>
<property name="text">
<string>Total</string>
</property>
</column>
<column>
<property name="text">
<string>HP</string>
</property>
<property name="toolTip">
<string>Hit Points; Kraftpunkte</string>
</property>
</column>
<column>
<property name="text">
<string>Attack</string>
</property>
<property name="toolTip">
<string>Attacke</string>
</property>
</column>
<column>
<property name="text">
<string>Defense</string>
</property>
<property name="toolTip">
<string>Verteidigung</string>
</property>
</column>
<column>
<property name="text">
<string>Sp. Attack</string>
</property>
<property name="toolTip">
<string>Special Attack; Spezial-Attacke</string>
</property>
</column>
<column>
<property name="text">
<string>Sp. Defense</string>
</property>
<property name="toolTip">
<string>Special Defense; Spezial-Verteidigung</string>
</property>
</column>
<column>
<property name="text">
<string>Speed</string>
</property>
<property name="toolTip">
<string>Initiative</string>
</property>
</column>
<column>
<property name="text">
<string>Height</string>
</property>
<property name="toolTip">
<string>Größe</string>
</property>
</column>
<column>
<property name="text">
<string>Weight</string>
</property>
<property name="toolTip">
<string>Gewicht</string>
</property>
</column>
<column>
<property name="text">
<string>BMI</string>
</property>
<property name="toolTip">
<string>Body-Mass-Index</string>
</property>
</column>
</widget>
<widget class="QTabWidget" name="tabWidget">
<property name="minimumSize">
<size>
<width>418</width>
<height>0</height>
</size>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>762</x>
<y>969</y>
</hint>
<hint type="destinationlabel">
<x>762</x>
<y>495</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -6,27 +6,25 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>316</width> <width>417</width>
<height>747</height> <height>746</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <item row="0" column="0" colspan="2">
<number>3</number> <widget class="QLabel" name="label_2">
<property name="text">
<string>Selected points and regions</string>
</property> </property>
<property name="topMargin"> <property name="buddy">
<number>3</number> <cstring>peaktable</cstring>
</property> </property>
<property name="rightMargin"> </widget>
<number>3</number> </item>
</property> <item row="1" column="0" colspan="2">
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QListWidget" name="peaktable"> <widget class="QListWidget" name="peaktable">
<property name="toolTip"> <property name="toolTip">
<string>Edit by entering new value: <string>Edit by entering new value:
@ -39,110 +37,18 @@ Changing between regions and points is NOT possible</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="3" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QCheckBox" name="special_checkbox">
<property name="title">
<string>Average</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QSpinBox" name="left_pt">
<property name="suffix">
<string> pts</string>
</property>
<property name="prefix">
<string>- </string>
</property>
<property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="right_pt">
<property name="suffix">
<string> pts</string>
</property>
<property name="prefix">
<string>+ </string>
</property>
<property name="maximum">
<number>999</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="average_combobox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text"> <property name="text">
<string>Mean</string> <string>Use special value</string>
</property> </property>
</item>
<item>
<property name="text">
<string>Sum</string>
</property>
</item>
<item>
<property name="text">
<string>Integral</string>
</property>
</item>
</widget> </widget>
</item> </item>
</layout> <item row="3" column="1">
</widget> <widget class="QComboBox" name="special_comboBox">
</item> <property name="enabled">
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Special value</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QComboBox" name="special_comboBox">
<property name="toolTip"> <property name="toolTip">
<string>Automatic selection of respective points</string> <string>Automatic selection of respective points</string>
</property> </property>
@ -168,38 +74,113 @@ Changing between regions and points is NOT possible</string>
</item> </item>
</widget> </widget>
</item> </item>
</layout> <item row="4" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Region around points</string>
</property>
</widget> </widget>
</item> </item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QGroupBox" name="groupBox_3"> <widget class="QLineEdit" name="left_limit"/>
<property name="title"> </item>
<string>Result</string> <item>
<widget class="QLineEdit" name="right_limit"/>
</item>
<item>
<widget class="QComboBox" name="limit_combobox">
<item>
<property name="text">
<string>points</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> </item>
<property name="leftMargin"> <item>
<number>3</number> <property name="text">
<string>range</string>
</property> </property>
<property name="topMargin"> </item>
<number>3</number> </widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Aggregation</string>
</property> </property>
<property name="rightMargin"> <property name="buddy">
<number>3</number> <cstring>average_combobox</cstring>
</property> </property>
<property name="bottomMargin"> </widget>
<number>3</number> </item>
<item row="6" column="1">
<widget class="QComboBox" name="average_combobox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="spacing"> <item>
<number>3</number> <property name="text">
<string>Mean</string>
</property> </property>
<item row="0" column="0"> </item>
<item>
<property name="text">
<string>Sum</string>
</property>
</item>
<item>
<property name="text">
<string>Integral</string>
</property>
</item>
<item>
<property name="text">
<string>Std. deviation</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>New set based on</string>
</property>
<property name="buddy">
<cstring>xbutton</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="xbutton"> <widget class="QCheckBox" name="xbutton">
<property name="text"> <property name="text">
<string>x</string> <string>x</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QCheckBox" name="ybutton"> <widget class="QCheckBox" name="ybutton">
<property name="text"> <property name="text">
<string>y</string> <string>y</string>
@ -209,7 +190,49 @@ Changing between regions and points is NOT possible</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> </layout>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Group by</string>
</property>
<property name="buddy">
<cstring>group_box</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="group_box">
<item>
<property name="text">
<string>&quot;Group&quot; value</string>
</property>
</item>
<item>
<property name="text">
<string>x value</string>
</property>
</item>
</widget>
</item>
<item row="9" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="graph_checkbox"> <widget class="QCheckBox" name="graph_checkbox">
<property name="text"> <property name="text">
<string>New graph?</string> <string>New graph?</string>
@ -219,25 +242,30 @@ Changing between regions and points is NOT possible</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="10" column="1">
<widget class="QComboBox" name="graph_combobox"> <widget class="QComboBox" name="graph_combobox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="12" column="0">
</widget> <spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item> </item>
<item> <item row="11" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="okButton"> <widget class="QPushButton" name="okButton">
<property name="text"> <property name="text">
<string>Apply</string> <string>Apply</string>
@ -248,10 +276,10 @@ Changing between regions and points is NOT possible</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="2" column="0" colspan="2">
<widget class="QPushButton" name="deleteButton"> <widget class="QPushButton" name="deleteButton">
<property name="text"> <property name="text">
<string>Delete selected</string> <string>Delete selection</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="dialog-cancel"> <iconset theme="dialog-cancel">
@ -260,9 +288,17 @@ Changing between regions and points is NOT possible</string>
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget> </widget>
<tabstops>
<tabstop>peaktable</tabstop>
<tabstop>limit_combobox</tabstop>
<tabstop>average_combobox</tabstop>
<tabstop>xbutton</tabstop>
<tabstop>ybutton</tabstop>
<tabstop>group_box</tabstop>
<tabstop>graph_checkbox</tabstop>
<tabstop>graph_combobox</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

Binary file not shown.