mostly finish rewrite
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
"""
|
||||
Filename: flaresbasewidget.py
|
||||
Description: Custom window design and supporting methods for FLARES
|
||||
|
||||
Author: Tyler de Zeeuw
|
||||
License: GPL-3.0
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from PySide6.QtWidgets import QApplication, QComboBox, QDialog, QHBoxLayout, QLabel, QLineEdit, QListView, QMessageBox, QPushButton, QVBoxLayout, QWidget, QFrame, QSpinBox
|
||||
@@ -5,9 +13,28 @@ from PySide6.QtGui import QStandardItemModel, QStandardItem, QPixmap, QIntValida
|
||||
from PySide6.QtCore import QEvent, Qt
|
||||
|
||||
from src.shared.shareddata import APP_NAME
|
||||
from src.shared.flaresbasewidget import FullClickComboBox
|
||||
|
||||
|
||||
class FullClickComboBox(QComboBox):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.setEditable(True)
|
||||
self.lineEdit().setReadOnly(True)
|
||||
self.lineEdit().installEventFilter(self)
|
||||
|
||||
def eventFilter(self, obj, event):
|
||||
if obj == self.lineEdit():
|
||||
|
||||
if event.type() == QEvent.MouseButtonPress:
|
||||
return True
|
||||
|
||||
if event.type() == QEvent.MouseButtonRelease:
|
||||
self.showPopup()
|
||||
return True
|
||||
|
||||
return super().eventFilter(obj, event)
|
||||
|
||||
|
||||
class ClickableLabel(QLabel):
|
||||
def __init__(self, full_pixmap: QPixmap, thumbnail_pixmap: QPixmap):
|
||||
super().__init__()
|
||||
|
||||
Reference in New Issue
Block a user