def __init__(self, parent=None): QtWidgets.QDialog.__init__(self, parent) self.parent = parent self.list_of_sql_table_names = self.parent.list_of_sql_table_names self.translation = translation.Translation() if self.list_of_sql_table_names: self.users_choice = self.list_of_sql_table_names[0] self.init()
def __init__(self, list_of_graphics_menus_instances, dict_of_options, parent=None): super(MPLTemplateSubWindow, self).__init__(parent) self.list_of_graphics_menus_instances = list_of_graphics_menus_instances self.dict_of_options = dict_of_options self.translation = translation.Translation() self.init()
def __init__(self, list_of_graphics_menus_instances, dict_of_options, parent=None): super(PyqtgraphTemplateSubWindow, self).__init__(parent) pg.setConfigOption('background', (255, 255, 255)) pg.setConfigOption('foreground', (30, 30, 30)) pg.setConfigOptions(antialias=True) self.translation = translation.Translation() self.list_of_graphics_menus_instances = list_of_graphics_menus_instances self.dict_of_options = dict_of_options self.init()
def init(self): widget = QWidget() self.setCentralWidget(widget) layout = QVBoxLayout(widget) layout.setSpacing(1) layout.setContentsMargins(2, 2, 2, 2) widget.setLayout(layout) self.translation = translation.Translation() self.title = self.translation.selected_language.get('help', 'Help') self.left = 100 self.top = 100 self.windowWidth = 300 self.windowHeight = 400 self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.windowWidth, self.windowHeight) font = QtGui.QFont() font.setPointSize(11) frame = QtWidgets.QFrame() frame.setFrameStyle(QtWidgets.QFrame.Panel | QtWidgets.QFrame.Plain) vbox = QtWidgets.QVBoxLayout() frame.setLayout(vbox) label_text = QLabel() label_text.setText( self.translation.selected_language.get('help', 'Help') ) vbox.addWidget(label_text) text_edit = QTextEdit() text_edit.setReadOnly(True) text = 'datavisualizer/resources/help/help.txt\n\n' text_edit.setText(text) try: with open( os.path.join(os.getcwd(), 'datavisualizer', 'resources', 'help', 'help.txt'), encoding='utf-8' ) as file: text = file.read() text_edit.append(text) except: pass vbox.addWidget(text_edit) layout.addWidget(frame)
def __init__(self): super(GraphicsInstanceWidget, self).__init__() self.translation = translation.Translation() self.label_for_name = QtWidgets.QLabel() self.label_for_additional_info = QtWidgets.QLabel() self.label_for_visibility = QtWidgets.QLabel() self.label_for_color = QtWidgets.QLabel() self.label_for_color.setFixedSize(60, 60) self.qVBoxLayout = QtWidgets.QVBoxLayout() self.qHBoxLayout = QtWidgets.QHBoxLayout() self.qVBoxLayout.addWidget(self.label_for_name) self.qVBoxLayout.addWidget(self.label_for_additional_info) self.qVBoxLayout.addWidget(self.label_for_visibility) self.qHBoxLayout.addWidget(self.label_for_color, 0) self.qHBoxLayout.addLayout(self.qVBoxLayout, 1) self.frame = QtWidgets.QFrame() self.frame.setFrameStyle(QtWidgets.QFrame.Panel | QtWidgets.QFrame.Plain) self.frame.setLayout(self.qHBoxLayout) self.layout = QtWidgets.QVBoxLayout() self.layout.addWidget(self.frame) self.setLayout(self.layout)
def __init__(self): self.translation = translation.Translation() self.unique_id = None self.deleted = False self.table_deleted = False self.table_name = None self.table_id = None self.file_name = None self.color = None self.name = None self.visible = True self.original_type_of_creation = None self.contains_non_original_zero_values = False self.number_of_values_of_axis_x = None self.number_of_values_of_axis_y = None self.number_of_values_of_axis_z = None self.index_of_users_choice_in_context_menu_of_creation_type = None self.index_of_users_choice_in_options_of_list_to_show = 0 self.list_of_lists_of_values_to_show = [ ] # list of 3 lists of lists to show # original list of all selected cells (raw row and column numbers) self.list_of_cells = [] self.list_of_x_to_load = [ ] # list of cells to load from table for axis X self.list_of_y_to_load = [ ] # list of cells to load from table for axis Y self.list_of_z_to_load = [ ] # list of cells to load from table for axis Z # in-between data, contains values and raw row and column numbers self.list_of_x_y_z = [] self.final_list_of_x_y_z = [] # final list of 3 lists of lists
def __init__(self): self.translation = translation.Translation() self.list_of_custom_table_instances = [] self.counter_of_custom_table_instances = 0 self.list_of_graphics_menus_instances = [] self.counter_of_graphics_instances = 0 self.dict_of_plot_types = {} self.list_of_plot_types = [ '===== 2D: simple and fast: =====', '2D plot (matplotlib)', '2D plot (pyqtgraph)', '===== 2D: pyqtgraph (advanced): =====', '2D interactive plot (pyqtgraph)', '2D double plot (pyqtgraph)', '2D linked plots by axis X (pyqtgraph)', '2D linked plots by axis Y (pyqtgraph)', '===== 3D: 1st type =====', '3D scatter plot 1st type (matplotlib)', '3D wireframe plot 1st type (matplotlib)', '3D surface plot 1st type (matplotlib)', '===== 3D: 2nd type =====', '3D scatter plot 2nd type (matplotlib)', '3D wireframe plot 2nd type (matplotlib)', '3D surface plot 2nd type (matplotlib)', ] for i, v in enumerate(self.list_of_plot_types): self.dict_of_plot_types[v] = v self.type_of_plot = self.list_of_plot_types[0] self.delete_previous_plots = True self.display_previous_subwindows = True self.show_legend = True self.show_axis_names = True self.name_of_axis_x = self.translation.selected_language.get( 'axis_x', 'Axis X') self.name_of_axis_y = self.translation.selected_language.get( 'axis_y', 'Axis Y') self.name_of_axis_z = self.translation.selected_language.get( 'axis_z', 'Axis Z')
def __init__(self, parent=None): QtWidgets.QDialog.__init__(self, parent) self.parent = parent self.dynamically_changeable_gi = self.parent.dynamically_changeable_gi self.translation = translation.Translation() self.list_of_choices = [ self.translation.selected_language.get( 'choice_0', 'choice 0 is: x:x, y:y, z:z'), self.translation.selected_language.get( 'choice_1', 'choice 1 is: x:y, y:x, z:z'), self.translation.selected_language.get( 'choice_2', 'choice 2 is: x:z, y:y, z:x'), self.translation.selected_language.get( 'choice_3', 'choice 3 is: x:z, y:x, z:y'), self.translation.selected_language.get( 'choice_4', 'choice 4 is: x:x, y:z, z:y'), self.translation.selected_language.get( 'choice_5', 'choice 5 is: x:y, y:z, z:x') ] self.users_choice = self.list_of_choices[ self.dynamically_changeable_gi. index_of_users_choice_in_options_of_list_to_show] self.init()
def init(self): self.translation = translation.Translation() self.title = self.translation.selected_language.get( "about_window_title", "About") self.left = 100 self.top = 100 self.windowWidth = 300 self.windowHeight = 400 self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.windowWidth, self.windowHeight) widget = QWidget() self.setCentralWidget(widget) layout = QVBoxLayout(widget) layout.setSpacing(1) layout.setContentsMargins(2, 2, 2, 2) widget.setLayout(layout) frame = QtWidgets.QFrame() frame.setFrameStyle(QtWidgets.QFrame.Panel | QtWidgets.QFrame.Plain) vbox = QtWidgets.QVBoxLayout() frame.setLayout(vbox) label_creator_name = QLabel() creator_name = self.translation.selected_language.get( 'about_window_creators_name', 'Pavlov Alex') label_creator_name.setText(creator_name) vbox.addWidget(label_creator_name) label_creator_github = QLabel() creator_github = self.translation.selected_language.get( 'about_window_creators_github', 'https://github.com/alexLX7') label_creator_github.setText(creator_github) vbox.addWidget(label_creator_github) vbox.setAlignment(QtCore.Qt.AlignCenter) layout.addWidget(frame)