fix bugs
This commit is contained in:
parent
63b37a1857
commit
a890d80b05
11
log.txt
11
log.txt
@ -1,5 +1,6 @@
|
|||||||
2022-05-12 21:03:53,901 - root - INFO - lic data:2022-12-01 00:00:00
|
2022-05-17 16:14:17,007 - root - INFO - lic data:2022-12-01 00:00:00
|
||||||
2022-05-12 21:03:53,905 - root - INFO - remain_days: 202
|
2022-05-17 16:14:17,010 - root - INFO - remain_days: 197
|
||||||
2022-05-12 21:03:55,251 - root - INFO - lic data:2022-12-01 00:00:00
|
2022-05-17 16:14:18,338 - root - INFO - lic data:2022-12-01 00:00:00
|
||||||
2022-05-12 21:03:55,251 - root - INFO - remain_days: 202
|
2022-05-17 16:14:18,338 - root - INFO - remain_days: 197
|
||||||
2022-05-12 21:04:11,685 - root - INFO - AAA.tif-BBB.tif
|
2022-05-17 16:35:12,026 - root - INFO - Empty module name
|
||||||
|
2022-05-17 16:35:13,397 - root - INFO - None
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import pdb
|
import pdb
|
||||||
from PyQt5.QtWidgets import QWidget, QApplication, QMainWindow, QToolBox
|
from PyQt5.QtWidgets import QWidget, QApplication, QMainWindow, QToolBox
|
||||||
from PyQt5.QtCore import Qt, QSize
|
from PyQt5.QtCore import Qt, QSize, QSettings
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtGui import QIcon
|
||||||
from PyQt5 import QtGui
|
from PyQt5 import QtGui
|
||||||
from PyQtAds import QtAds
|
from PyQtAds import QtAds
|
||||||
@ -17,14 +17,14 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def __init__(self, parent=None, **kargs):
|
def __init__(self, parent=None, **kargs):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.current_instance = kargs.get('current_instance', 0)
|
# self.current_instance = kargs.get('current_instance', 0)
|
||||||
if self.current_instance > 0:
|
# if self.current_instance > 0:
|
||||||
self.setWindowTitle(QApplication.applicationName() + ' ' + str(self.current_instance))
|
# self.setWindowTitle(QApplication.applicationName() + ' ' + str(self.current_instance))
|
||||||
else:
|
# else:
|
||||||
self.setWindowTitle(QApplication.applicationName())
|
self.setWindowTitle(QApplication.applicationName())
|
||||||
self.setWindowIcon(QIcon(":/icons/change_detect.png"))
|
self.setWindowIcon(QIcon(":/icons/change_detect.png"))
|
||||||
|
|
||||||
self.setAcceptDrops(True)
|
self.setAcceptDrops(False)
|
||||||
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||||
self.set_toolbar()
|
self.set_toolbar()
|
||||||
self.set_pannels()
|
self.set_pannels()
|
||||||
@ -67,7 +67,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def set_toolbar(self):
|
def set_toolbar(self):
|
||||||
self.toolbar = self.addToolBar('Toolbar')
|
self.toolbar = self.addToolBar('Toolbar')
|
||||||
self.toolbar.setMovable(False)
|
self.toolbar.setMovable(True)
|
||||||
self.toolbar.setFloatable(False)
|
self.toolbar.setFloatable(False)
|
||||||
self.toolbar.setIconSize(QSize(32, 32))
|
self.toolbar.setIconSize(QSize(32, 32))
|
||||||
self.toolbar.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
self.toolbar.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||||
@ -93,9 +93,9 @@ class MainWindow(QMainWindow):
|
|||||||
self.follow_box = QWidget(self)
|
self.follow_box = QWidget(self)
|
||||||
self.eye_box = QWidget(self)
|
self.eye_box = QWidget(self)
|
||||||
left_tool_box.setContextMenuPolicy(Qt.CustomContextMenu)
|
left_tool_box.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||||
left_tool_box.addItem(self.layer_tree, self.tr("图层树"))
|
left_tool_box.addItem(self.layer_tree, self.tr("图层控制"))
|
||||||
left_tool_box.addItem(self.follow_box, self.tr("流程"))
|
left_tool_box.addItem(self.follow_box, self.tr("检测流程"))
|
||||||
left_tool_box.addItem(self.eye_box, self.tr("鹰眼"))
|
left_tool_box.addItem(self.eye_box, self.tr("鹰眼视图"))
|
||||||
|
|
||||||
|
|
||||||
# self.layer_tree.setContextMenuPolicy(Qt.CustomContextMenu)
|
# self.layer_tree.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||||
|
@ -32,8 +32,8 @@ class DoubleCanvas(QWidget):
|
|||||||
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
||||||
self.mapcanva1 = CanvasWidget(self)
|
self.mapcanva1 = CanvasWidget(self)
|
||||||
self.mapcanva2 = CanvasWidget(self)
|
self.mapcanva2 = CanvasWidget(self)
|
||||||
self.mapcanva1.setCanvasColor(QColor(255, 255, 255))
|
self.mapcanva1.setCanvasColor(QColor(0, 0, 0))
|
||||||
self.mapcanva2.setCanvasColor(QColor(255, 255, 255))
|
self.mapcanva2.setCanvasColor(QColor(0, 0, 0))
|
||||||
|
|
||||||
self.mapcanva1.update_coordinates_text.connect(self.corr_changed)
|
self.mapcanva1.update_coordinates_text.connect(self.corr_changed)
|
||||||
self.mapcanva2.update_coordinates_text.connect(self.corr_changed)
|
self.mapcanva2.update_coordinates_text.connect(self.corr_changed)
|
||||||
@ -107,7 +107,7 @@ class DoubleCanvas(QWidget):
|
|||||||
layer:PairLayer = Project().layers[layer]
|
layer:PairLayer = Project().layers[layer]
|
||||||
if not layer.enable:
|
if not layer.enable:
|
||||||
return
|
return
|
||||||
self.clear()
|
# self.clear()
|
||||||
|
|
||||||
if not self.mapcanva1.is_main and not self.mapcanva2.is_main:
|
if not self.mapcanva1.is_main and not self.mapcanva2.is_main:
|
||||||
self.mapcanva1.is_main = True
|
self.mapcanva1.is_main = True
|
||||||
|
@ -9,4 +9,9 @@ def singleton(cls):
|
|||||||
_instance[cls] = cls(*args, **kargs)
|
_instance[cls] = cls(*args, **kargs)
|
||||||
cls.instance = _instance[cls]
|
cls.instance = _instance[cls]
|
||||||
return _instance[cls]
|
return _instance[cls]
|
||||||
return inner
|
return inner
|
||||||
|
|
||||||
|
|
||||||
|
# Project.__name__
|
||||||
|
|
||||||
|
# Projec
|
@ -1,3 +1,4 @@
|
|||||||
|
from collections import OrderedDict
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
@ -32,7 +33,7 @@ class Project(QObject):
|
|||||||
self.max_threads = Settings.Project().max_threads
|
self.max_threads = Settings.Project().max_threads
|
||||||
self.root = str(Path(Settings.General().root)/'default')
|
self.root = str(Path(Settings.General().root)/'default')
|
||||||
self.file_mode = Project.ABSOLUTE_MODE
|
self.file_mode = Project.ABSOLUTE_MODE
|
||||||
self.layers:Dict[str, PairLayer] = dict()
|
self.layers:Dict[str, PairLayer] = OrderedDict()
|
||||||
self.current_layer = None
|
self.current_layer = None
|
||||||
|
|
||||||
def connect(self, pair_canvas,
|
def connect(self, pair_canvas,
|
||||||
@ -72,6 +73,7 @@ class Project(QObject):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.load()
|
self.load()
|
||||||
|
self.cmi_dir = str(Path(self.root)/'cmi')
|
||||||
# self.project_created.emit()
|
# self.project_created.emit()
|
||||||
self.project_init.emit(True)
|
self.project_init.emit(True)
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ from typing import Tuple
|
|||||||
from PyQt5.QtCore import QSettings
|
from PyQt5.QtCore import QSettings
|
||||||
from rscder.utils.license import LicenseHelper
|
from rscder.utils.license import LicenseHelper
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
class Settings(QSettings):
|
class Settings(QSettings):
|
||||||
|
|
||||||
def __init__(self, key):
|
def __init__(self, key):
|
||||||
@ -42,6 +43,8 @@ class Settings(QSettings):
|
|||||||
with open(plugins_file, 'w') as f:
|
with open(plugins_file, 'w') as f:
|
||||||
yaml.safe_dump(value, f)
|
yaml.safe_dump(value, f)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Project:
|
class Project:
|
||||||
|
|
||||||
PRE= 'project'
|
PRE= 'project'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user