def __init__(self, master, q_visibility): master.title('Login') self.master = master self.pin_entry = None self.q_visibility = q_visibility self.statusbar = StatusBar(self.master, bd=1, relief=SUNKEN, anchor=CENTER) self.statusbar.pack(side=BOTTOM, fill=X) # Setup GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(LED_LAUNCHREADY, GPIO.OUT)
def __init__(self, model): """Inits the class.""" Subject.__init__(self) QMainWindow.__init__(self) # Set model self.model = model # Create interface elements self.menu_bar = MenuBar(self) self.tool_bar = ToolBar(self) self.exif_area = ExifWidget(self) self.image_area = ImageWidget(self) self.status_bar = StatusBar() about_text = 'IEViewer 1.0' \ '<br><br>' \ 'Copyright © 2021 by' \ '<br>' \ 'Paula Mihalcea' \ '<br>' \ '<a href="mailto:[email protected]">[email protected]</a>' \ '<br><br>' \ 'This program uses PyQt5, a comprehensive set of Python bindings for Qt v5. Qt is a set of cross-platform C++ libraries that implement high-level APIs for accessing many aspects of modern desktop and mobile systems.\n' \ '<br><br>' \ 'PyQt5 is copyright © Riverbank Computing Limited. Its homepage is <a href="https://www.riverbankcomputing.com/software/pyqt/">https://www.riverbankcomputing.com/software/pyqt/</a>.' \ '<br><br>' \ 'No genasi were harmed in the making of this application. <a href="https://www.dndbeyond.com/races/genasi#WaterGenasi">#GenasiLivesMatter#NereisThalian</a>' self.about = AboutWidget('About IEViewer', about_text, image_path='icons/about_img.png') # Disable GUI elements that are unavailable when no image is opened self.menu_bar.disable_widgets() self.exif_area.hide() # Set layout self.setCentralWidget(Layout(self).central_widget) # Set window properties self.set_window_properties() # Install additional event filters self.image_area.installEventFilter(self)