drap 0.0.3.post5__py3-none-any.whl → 0.0.3.post7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- drap/gui.py +25 -2
- drap/qt_adjust.py +30 -0
- {drap-0.0.3.post5.dist-info → drap-0.0.3.post7.dist-info}/METADATA +1 -1
- drap-0.0.3.post7.dist-info/RECORD +13 -0
- {drap-0.0.3.post5.dist-info → drap-0.0.3.post7.dist-info}/entry_points.txt +1 -1
- drap-0.0.3.post5.dist-info/RECORD +0 -12
- {drap-0.0.3.post5.dist-info → drap-0.0.3.post7.dist-info}/WHEEL +0 -0
- {drap-0.0.3.post5.dist-info → drap-0.0.3.post7.dist-info}/licenses/LICENSE +0 -0
- {drap-0.0.3.post5.dist-info → drap-0.0.3.post7.dist-info}/top_level.txt +0 -0
drap/gui.py
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
from .utils import *
|
2
2
|
|
3
|
+
from PyQt5.QtWidgets import QApplication
|
4
|
+
import sys
|
5
|
+
|
6
|
+
from .qt_adjust import fix_qt_plugin_paths, assert_not_using_cv2_plugins
|
7
|
+
# from .safe_cv import im
|
8
|
+
|
9
|
+
|
10
|
+
|
3
11
|
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QVBoxLayout, QWidget, QPushButton, QFileDialog, QMessageBox, QLineEdit, QHBoxLayout, QGroupBox, QCheckBox
|
4
12
|
from PyQt5.QtGui import QPixmap, QPainter, QPen, QImage, QMouseEvent, QColor
|
5
13
|
from PyQt5.QtCore import Qt, QPoint, QRect, QFileInfo
|
@@ -16,7 +24,7 @@ from reportlab.lib.pagesizes import A4, letter
|
|
16
24
|
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle
|
17
25
|
from reportlab.pdfgen import canvas
|
18
26
|
from reportlab.lib import colors
|
19
|
-
|
27
|
+
|
20
28
|
import copy
|
21
29
|
import time as timelib
|
22
30
|
from datetime import datetime
|
@@ -25,7 +33,6 @@ import numpy as np
|
|
25
33
|
import sys
|
26
34
|
import re
|
27
35
|
import argparse
|
28
|
-
import cv2
|
29
36
|
import matplotlib
|
30
37
|
|
31
38
|
import matplotlib.pyplot as plt
|
@@ -38,8 +45,24 @@ matplotlib.use('Agg')
|
|
38
45
|
|
39
46
|
def main_gui():
|
40
47
|
|
48
|
+
|
49
|
+
fix_qt_plugin_paths(prefer_platform=None)
|
50
|
+
|
41
51
|
app = QApplication(sys.argv)
|
42
52
|
cropper = ImageCropper()
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
try:
|
57
|
+
assert_not_using_cv2_plugins()
|
58
|
+
except RuntimeError as e:
|
59
|
+
# Mostre uma mensagem amigável e encerre
|
60
|
+
from PyQt5.QtWidgets import QMessageBox
|
61
|
+
QMessageBox.critical(None, "Qt plugin error", str(e))
|
62
|
+
sys.exit(1)
|
63
|
+
|
64
|
+
|
65
|
+
|
43
66
|
sys.exit(app.exec_())
|
44
67
|
|
45
68
|
|
drap/qt_adjust.py
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
import os
|
3
|
+
from PyQt5.QtCore import QLibraryInfo, QCoreApplication
|
4
|
+
|
5
|
+
def fix_qt_plugin_paths(prefer_platform: str | None = None) -> None:
|
6
|
+
|
7
|
+
os.environ.pop("QT_QPA_PLATFORM_PLUGIN_PATH", None)
|
8
|
+
os.environ.pop("QT_PLUGIN_PATH", None)
|
9
|
+
|
10
|
+
if prefer_platform:
|
11
|
+
os.environ["QT_QPA_PLATFORM"] = prefer_platform
|
12
|
+
else:
|
13
|
+
os.environ.setdefault("QT_QPA_PLATFORM", "xcb") # ou 'wayland' conforme seu público
|
14
|
+
|
15
|
+
|
16
|
+
for p in list(QCoreApplication.libraryPaths()):
|
17
|
+
if "cv2/qt/plugins" in p:
|
18
|
+
QCoreApplication.removeLibraryPath(p)
|
19
|
+
|
20
|
+
|
21
|
+
pyqt_plugins = QLibraryInfo.location(QLibraryInfo.PluginsPath)
|
22
|
+
QCoreApplication.addLibraryPath(pyqt_plugins)
|
23
|
+
|
24
|
+
def assert_not_using_cv2_plugins() -> None:
|
25
|
+
|
26
|
+
for p in QCoreApplication.libraryPaths():
|
27
|
+
if "cv2/qt/plugins" in p:
|
28
|
+
raise RuntimeError(
|
29
|
+
"Error"
|
30
|
+
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: drap
|
3
|
-
Version: 0.0.3.
|
3
|
+
Version: 0.0.3.post7
|
4
4
|
Summary: Tool for analyzing droplet size and concentration using video and EDF images
|
5
5
|
Author-email: "Gabriel Braga Marques Teobaldo, Oleg Prymak, Natalie Wolff, Matthias Epple, Marco Aurélio Brizzotti Andrade, Cássio Alves and Cristiano Luis Pinto de Oliveira" <alves.casssio@gmail.com>
|
6
6
|
License: MIT
|
@@ -0,0 +1,13 @@
|
|
1
|
+
drap/__init__.py,sha256=RF05F-NDoYmyOjQ1EgdKSfsx2tTYCheTpL0AYrFmdI0,47
|
2
|
+
drap/automation.py,sha256=TvCwFeYgrKxc50kaQkV2ETGyD1RhxCCX5oCGMWo2JjU,1294
|
3
|
+
drap/gui.py,sha256=LzBBQwFiF6IcOZfBkWB6wnKsBKD-v-6Un8VoJMG7eKU,1553
|
4
|
+
drap/main.py,sha256=IBMQp932Qd6aBSeWCoQH2MQhMtmEU_yZKOsUO_U9Wmk,1201
|
5
|
+
drap/qt_adjust.py,sha256=K4lqMC7aZ8RlcA65BIVtftRoZWY9OVrAQQP-IHN2f_E,875
|
6
|
+
drap/terminal_interface.py,sha256=vCnobMdtxKvCUaFsu0fWmChd65a-Osn41LdMtSdMdO4,2201
|
7
|
+
drap/utils.py,sha256=5IIjrGB4MBR2FX6Gdh7rCYJOZpGSFn8eTj0g3yPaHxU,66804
|
8
|
+
drap-0.0.3.post7.dist-info/licenses/LICENSE,sha256=iHcEhVN-5ifqXsDa1Ny38sIBS7SJ9-eYJQRtHiJ3QU0,1098
|
9
|
+
drap-0.0.3.post7.dist-info/METADATA,sha256=1RABw2n4uyrNMlQr-GkTaxlHzQHPCYqGquu5F1BQdTg,1367
|
10
|
+
drap-0.0.3.post7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
11
|
+
drap-0.0.3.post7.dist-info/entry_points.txt,sha256=8AnGrT_RVCkh26SYRqjRTbstT4BMuOO68qRFqPfPr8M,69
|
12
|
+
drap-0.0.3.post7.dist-info/top_level.txt,sha256=jYMnBoijRdvPMYoMlILxlRNbSdKUX3_uwMa7DLRE4zE,5
|
13
|
+
drap-0.0.3.post7.dist-info/RECORD,,
|
@@ -1,12 +0,0 @@
|
|
1
|
-
drap/__init__.py,sha256=RF05F-NDoYmyOjQ1EgdKSfsx2tTYCheTpL0AYrFmdI0,47
|
2
|
-
drap/automation.py,sha256=TvCwFeYgrKxc50kaQkV2ETGyD1RhxCCX5oCGMWo2JjU,1294
|
3
|
-
drap/gui.py,sha256=M4XRdqAzABBQjVIDnR3OCs387GzGo5HUIWB0ErWiZo8,1074
|
4
|
-
drap/main.py,sha256=IBMQp932Qd6aBSeWCoQH2MQhMtmEU_yZKOsUO_U9Wmk,1201
|
5
|
-
drap/terminal_interface.py,sha256=vCnobMdtxKvCUaFsu0fWmChd65a-Osn41LdMtSdMdO4,2201
|
6
|
-
drap/utils.py,sha256=5IIjrGB4MBR2FX6Gdh7rCYJOZpGSFn8eTj0g3yPaHxU,66804
|
7
|
-
drap-0.0.3.post5.dist-info/licenses/LICENSE,sha256=iHcEhVN-5ifqXsDa1Ny38sIBS7SJ9-eYJQRtHiJ3QU0,1098
|
8
|
-
drap-0.0.3.post5.dist-info/METADATA,sha256=6FJjAWHmU33WCZYwweRk7lbtaGsiPHEUbrGClx2Jceg,1367
|
9
|
-
drap-0.0.3.post5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
10
|
-
drap-0.0.3.post5.dist-info/entry_points.txt,sha256=r_V3SXtWJt15QVs78jIxD7JJ41KgRtOhigYZFDcMEus,64
|
11
|
-
drap-0.0.3.post5.dist-info/top_level.txt,sha256=jYMnBoijRdvPMYoMlILxlRNbSdKUX3_uwMa7DLRE4zE,5
|
12
|
-
drap-0.0.3.post5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|