mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pamhyr: End switch print to logging.
This commit is contained in:
1 parent
a8bd871f94
commit
504ef7ec48
15 files changed
+71
-31
No files matched your search
@@ -1,5 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
|
||||
from datetime import date, time, datetime, timedelta
|
||||
|
||||
from tools import trace, timer
|
||||
@@ -32,6 +34,7 @@ from View.BoundaryCondition.Edit.translate import *
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
class ExtendedTimeEdit(AWidget):
|
||||
def __init__(self, parent=None):
|
||||
@@ -108,7 +111,7 @@ class ExTimeDelegate(QItemDelegate):
|
||||
self.editor = ExtendedDateTimeEdit(parent=parent)
|
||||
value = index.data(Qt.DisplayRole)
|
||||
self.editor.set_time(value)
|
||||
print(value)
|
||||
logger.debug(str(value))
|
||||
return self.editor
|
||||
|
||||
def setModelData(self, editor, model, index):
|
||||
@@ -116,7 +119,7 @@ class ExTimeDelegate(QItemDelegate):
|
||||
if self._mode == "time":
|
||||
model.setData(index, int(time.total_seconds()))
|
||||
else:
|
||||
print(time.timestamp())
|
||||
logger.debug(str(time.timestamp()))
|
||||
model.setData(index, int(time.timestamp()))
|
||||
editor.close()
|
||||
editor.deleteLater()
|
||||
|
||||
Reference in new issue
Block a user