-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainWindow.py
More file actions
37 lines (25 loc) · 1.19 KB
/
mainWindow.py
File metadata and controls
37 lines (25 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QMainWindow
from PySide6.QtGui import QIntValidator, QPalette
from ui.main_window import Ui_MainWindow
from handler.calc_buttons.calc_buttons_handlers import CalcButtonHandler
from handler.menu_buttons.menu_buttons_handlers import ViewButtonsHandler, FileButtonsHandler, EditButtonsHandler
from graphs.graph_manager import GraphManager
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self):
super().__init__()
self.setupUi(self)
self.setWindowTitle("Diffinitely")
self.setPalette(QPalette())
self.graph_manager = GraphManager(self.graph_widget)
# Initial font setup
self.initial_font_size = 11 # default font size
self.zoom_factor = 5 # zoom rate
self.current_font_size = self.initial_font_size
# Menu Bar Buttons
self.view_buttons_handler = ViewButtonsHandler(self)
self.file_buttons_handler = FileButtonsHandler(self)
self.edit_buttons_handler = EditButtonsHandler(self)
# N-value validator
self.n_value_edit.setValidator(QIntValidator(0, 1000))
self.calc_button_handler = CalcButtonHandler(self)