Skip to content

Commit

Permalink
remove anyqt
Browse files Browse the repository at this point in the history
  • Loading branch information
UmSenhorQualquer committed Feb 26, 2018
1 parent 917140e commit 3e00abe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# !/usr/bin/python3
# -*- coding: utf-8 -*-
from pyforms import conf
if conf.PYFORMS_USE_QT5:
from PyQt5.QtGui import QIcon
else:
from PyQt4.QtGui import QIcon
from AnyQt.QtGui import QIcon


from pybpod_rotaryencoder_module.module_gui import RotaryEncoderModuleGUI

Expand Down
15 changes: 5 additions & 10 deletions pybpod_rotaryencoder_module/module_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@
from pyforms.controls import ControlMatplotlib
from pybpod_rotaryencoder_module.module_api import RotaryEncoderModule
from sca.formats import csv
from datetime import datetime
from datetime import datetime as datetime_now
from pyforms import conf

if conf.PYFORMS_USE_QT5:
from PyQt5.QtCore import QTimer, QEventLoop
from PyQt5.QtWidgets import QMessageBox, QFileDialog
else:
from PyQt4.QtCore import QTimer, QEventLoop
from PyQt4.QtGui import QMessageBox, QFileDialog

from AnyQt.QtCore import QTimer
from AnyQt.QtWidgets import QFileDialog

class RotaryEncoderModuleGUI(RotaryEncoderModule, BaseWidget):

Expand Down Expand Up @@ -183,7 +178,7 @@ def __write_to_file(self,readings):
'''
Write new readings to the file
'''
now = datetime.now()
now = datetime_now.now()
for data in readings:
self._csvwriter.writerow([now.strftime('%Y%m%d%H%M%S')]+data)

Expand Down Expand Up @@ -240,7 +235,7 @@ def __toggle_connection_evt(self):
self._stream_file.value = False
self._stream_file.enabled = False
except Exception as err:
QMessageBox.critical(self, "Error", str(err))
self.critical(str(err), "Error")
self._connect_btn.checked = False


Expand Down

0 comments on commit 3e00abe

Please sign in to comment.