import ConfigParser
import logging
-from PyQt4 import QtCore
+import util.qt_compat as qt_compat
+QtCore = qt_compat.QtCore
import dbus
import logging
-from PyQt4 import QtCore
+import util.qt_compat as qt_compat
+QtCore = qt_compat.QtCore
import dbus
try:
import telepathy as _telepathy
class _MissedCallWatcher(QtCore.QObject):
- callMissed = QtCore.pyqtSignal()
+ callMissed = qt_compat.Signal()
def __init__(self):
QtCore.QObject.__init__(self)
class _DummyMissedCallWatcher(QtCore.QObject):
- callMissed = QtCore.pyqtSignal()
+ callMissed = qt_compat.Signal()
def __init__(self):
QtCore.QObject.__init__(self)
import logging
import logging.handlers
-from PyQt4 import QtGui
-from PyQt4 import QtCore
+import util.qt_compat as qt_compat
+QtCore = qt_compat.QtCore
+QtGui = qt_compat.import_module("QtGui")
import constants
import alarm_handler
def _new_main_window(self):
return MainWindow(None, self)
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_about(self, checked = True):
with qui_utils.notify_error(self._errorLog):
else:
_moduleLogger.info("Unknown response")
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_new_message_alert(self):
with qui_utils.notify_error(self._errorLog):
else:
self._app.ledHandler.on()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_call_missed(self):
with qui_utils.notify_error(self._errorLog):
self._session.update_messages(self._session.MESSAGE_VOICEMAILS, force=True)
- @QtCore.pyqtSlot(str)
+ @qt_compat.Slot(str)
@misc_utils.log_exception(_moduleLogger)
def _on_session_error(self, message):
with qui_utils.notify_error(self._errorLog):
self._errorLog.push_error(message)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_login(self):
with qui_utils.notify_error(self._errorLog):
self._callHandler.callMissed.connect(self._voicemailRefreshDelay.start)
self._callHandler.start()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_logout(self):
with qui_utils.notify_error(self._errorLog):
if self._callHandler is not None:
self._callHandler.stop()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_app_alert(self):
with qui_utils.notify_error(self._errorLog):
}[(self._app.notifyOnSms, self._app.notifyOnVoicemail)]
self._session.update_messages(messageType, force=True)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_recipients_changed(self):
with qui_utils.notify_error(self._errorLog):
def _on_child_close(self, obj = None):
self._smsEntryDialog = None
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_login_requested(self, checked = True):
with qui_utils.notify_error(self._errorLog):
self._prompt_for_login()
- @QtCore.pyqtSlot(int)
+ @qt_compat.Slot(int)
@misc_utils.log_exception(_moduleLogger)
def _on_tab_changed(self, index):
with qui_utils.notify_error(self._errorLog):
if self._app.alarmHandler.alarmType == self._app.alarmHandler.ALARM_APPLICATION:
self._app.ledHandler.off()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_refresh(self, checked = True):
with qui_utils.notify_error(self._errorLog):
self._tabsContents[self._currentTab].refresh(force=True)
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_refresh_connection(self, checked = True):
with qui_utils.notify_error(self._errorLog):
self._session.refresh_connection()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_import(self, checked = True):
with qui_utils.notify_error(self._errorLog):
if self._tabsContents[self.CONTACTS_TAB].has_child:
self._tabsContents[self.CONTACTS_TAB].child.update_addressbooks()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_account(self, checked = True):
with qui_utils.notify_error(self._errorLog):
import copy
import logging
-from PyQt4 import QtGui
-from PyQt4 import QtCore
+import util.qt_compat as qt_compat
+QtCore = qt_compat.QtCore
+QtGui = qt_compat.import_module("QtGui")
import constants
from util import qwrappers
except RuntimeError:
_moduleLogger.exception("Oh well")
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_close_window(self, checked = True):
with qui_utils.notify_error(self._app.errorLog):
except RuntimeError:
_moduleLogger.exception("Oh well")
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_close_window(self, checked = True):
with qui_utils.notify_error(self._app.errorLog):
self._voicemailNotificationButton.setChecked(False)
self._smsNotificationButton.setChecked(False)
- @QtCore.pyqtSlot(int)
+ @qt_compat.Slot(int)
@misc_utils.log_exception(_moduleLogger)
def _on_notification_change(self, index):
with qui_utils.notify_error(self._app.errorLog):
self._update_notification_state()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_clear(self, checked = False):
with qui_utils.notify_error(self._app.errorLog):
self._doClear = True
self._dialog.accept()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_close_window(self, checked = True):
with qui_utils.notify_error(self._app.errorLog):
)
callback.__name__ = "thanks partials for not having names and pyqt for requiring them"
numberSelector.activated.connect(
- QtCore.pyqtSlot(int)(callback)
+ qt_compat.Slot(int)(callback)
)
if self._closeIcon is self._SENTINEL_ICON:
self._session.download_voicemail(messageId)
self._hide()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_recipients_changed(self):
with qui_utils.notify_error(self._app.errorLog):
self._update_state()
- @QtCore.pyqtSlot(str, str)
+ @qt_compat.Slot(str, str)
@misc_utils.log_exception(_moduleLogger)
def _on_voicemail_downloaded(self, messageId, filepath):
with qui_utils.notify_error(self._app.errorLog):
self._session.draft.message = message
self._session.draft.call()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_cancel_clicked(self, message):
with qui_utils.notify_error(self._app.errorLog):
number = numbers[index][0]
self._session.draft.set_selected_number(cid, number)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_refresh_history(self):
with qui_utils.notify_error(self._app.errorLog):
(cid, ) = self._session.draft.get_contacts()
self._update_history(cid)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_recipients_changed(self):
with qui_utils.notify_error(self._app.errorLog):
self._update_target_fields()
self._update_button_state()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_op_started(self):
with qui_utils.notify_error(self._app.errorLog):
self._dialButton.setVisible(False)
self.show()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_calling_started(self):
with qui_utils.notify_error(self._app.errorLog):
self._cancelButton.setVisible(True)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_op_finished(self):
with qui_utils.notify_error(self._app.errorLog):
self.close()
self.destroy()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_op_error(self, message):
with qui_utils.notify_error(self._app.errorLog):
self._errorLog.push_error(message)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_letter_count_changed(self):
with qui_utils.notify_error(self._app.errorLog):
self._update_letter_count()
self._update_button_state()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_window_resized(self, checked = True):
with qui_utils.notify_error(self._app.errorLog):
self._scroll_to_bottom()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_close_window(self, checked = True):
with qui_utils.notify_error(self._app.errorLog):
import itertools
import logging
-from PyQt4 import QtGui
-from PyQt4 import QtCore
+import util.qt_compat as qt_compat
+QtCore = qt_compat.QtCore
+QtGui = qt_compat.import_module("QtGui")
from util import qtpie
from util import qui_utils
with qui_utils.notify_error(self._errorLog):
self._entry.clear()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_sms_clicked(self, checked = False):
with qui_utils.notify_error(self._errorLog):
numbersWithDescriptions = [(number, "")]
self._session.draft.add_contact(contactId, None, title, description, numbersWithDescriptions)
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc_utils.log_exception(_moduleLogger)
def _on_call_clicked(self, checked = False):
with qui_utils.notify_error(self._errorLog):
self._categoryManager.add_row(event["time"], row)
self._itemView.expandAll()
- @QtCore.pyqtSlot(str)
+ @qt_compat.Slot(str)
@misc_utils.log_exception(_moduleLogger)
def _on_filter_changed(self, newItem):
with qui_utils.notify_error(self._errorLog):
self._selectedFilter = str(newItem)
self._populate_items()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_history_updated(self):
with qui_utils.notify_error(self._errorLog):
self._populate_items()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_refresh_clicked(self, arg = None):
with qui_utils.notify_error(self._errorLog):
self.refresh(force=True)
- @QtCore.pyqtSlot(QtCore.QModelIndex)
+ @qt_compat.Slot(QtCore.QModelIndex)
@misc_utils.log_exception(_moduleLogger)
def _on_row_activated(self, index):
with qui_utils.notify_error(self._errorLog):
self._categoryManager.add_row(item["time"], row)
self._itemView.expandAll()
- @QtCore.pyqtSlot(str)
+ @qt_compat.Slot(str)
@misc_utils.log_exception(_moduleLogger)
def _on_type_filter_changed(self, newItem):
with qui_utils.notify_error(self._errorLog):
self._selectedTypeFilter = str(newItem)
self._populate_items()
- @QtCore.pyqtSlot(str)
+ @qt_compat.Slot(str)
@misc_utils.log_exception(_moduleLogger)
def _on_status_filter_changed(self, newItem):
with qui_utils.notify_error(self._errorLog):
self._selectedStatusFilter = str(newItem)
self._populate_items()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_refresh_clicked(self, arg = None):
with qui_utils.notify_error(self._errorLog):
self.refresh(force=True)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_messages_updated(self):
with qui_utils.notify_error(self._errorLog):
self._populate_items()
- @QtCore.pyqtSlot(QtCore.QModelIndex)
+ @qt_compat.Slot(QtCore.QModelIndex)
@misc_utils.log_exception(_moduleLogger)
def _on_row_activated(self, index):
with qui_utils.notify_error(self._errorLog):
numbersWithDescriptions = [(number, "")]
self._session.draft.add_contact(contactId, messageId, title, description, numbersWithDescriptions)
- @QtCore.pyqtSlot(QtCore.QModelIndex)
+ @qt_compat.Slot(QtCore.QModelIndex)
@misc_utils.log_exception(_moduleLogger)
def _on_column_resized(self, index, oldSize, newSize):
self._htmlDelegate.setWidth(newSize, self._itemStore)
contacts.sort(key=lambda contact: contact["name"].lower())
return contacts
- @QtCore.pyqtSlot(str)
+ @qt_compat.Slot(str)
@misc_utils.log_exception(_moduleLogger)
def _on_filter_changed(self, newItem):
with qui_utils.notify_error(self._errorLog):
self.refresh(force=False)
self._populate_items()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_refresh_clicked(self, arg = None):
with qui_utils.notify_error(self._errorLog):
self.refresh(force=True)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc_utils.log_exception(_moduleLogger)
def _on_contacts_updated(self):
with qui_utils.notify_error(self._errorLog):
self._populate_items()
- @QtCore.pyqtSlot(QtCore.QModelIndex)
+ @qt_compat.Slot(QtCore.QModelIndex)
@misc_utils.log_exception(_moduleLogger)
def _on_row_activated(self, index):
with qui_utils.notify_error(self._errorLog):
except ImportError:
import pickle
-from PyQt4 import QtCore
+import util.qt_compat as qt_compat
+QtCore = qt_compat.QtCore
from util import qore_utils
from util import qui_utils
class Draft(QtCore.QObject):
- sendingMessage = QtCore.pyqtSignal()
- sentMessage = QtCore.pyqtSignal()
- calling = QtCore.pyqtSignal()
- called = QtCore.pyqtSignal()
- cancelling = QtCore.pyqtSignal()
- cancelled = QtCore.pyqtSignal()
- error = QtCore.pyqtSignal(str)
+ sendingMessage = qt_compat.Signal()
+ sentMessage = qt_compat.Signal()
+ calling = qt_compat.Signal()
+ called = qt_compat.Signal()
+ cancelling = qt_compat.Signal()
+ cancelled = qt_compat.Signal()
+ error = qt_compat.Signal(str)
- recipientsChanged = QtCore.pyqtSignal()
+ recipientsChanged = qt_compat.Signal()
def __init__(self, pool, backend, errorLog):
QtCore.QObject.__init__(self)
# @todo Somehow add support for csv contacts
- stateChange = QtCore.pyqtSignal(str)
- loggedOut = QtCore.pyqtSignal()
- loggedIn = QtCore.pyqtSignal()
- callbackNumberChanged = QtCore.pyqtSignal(str)
+ stateChange = qt_compat.Signal(str)
+ loggedOut = qt_compat.Signal()
+ loggedIn = qt_compat.Signal()
+ callbackNumberChanged = qt_compat.Signal(str)
- accountUpdated = QtCore.pyqtSignal()
- messagesUpdated = QtCore.pyqtSignal()
- newMessages = QtCore.pyqtSignal()
- historyUpdated = QtCore.pyqtSignal()
- dndStateChange = QtCore.pyqtSignal(bool)
- voicemailAvailable = QtCore.pyqtSignal(str, str)
+ accountUpdated = qt_compat.Signal()
+ messagesUpdated = qt_compat.Signal()
+ newMessages = qt_compat.Signal()
+ historyUpdated = qt_compat.Signal()
+ dndStateChange = qt_compat.Signal(bool)
+ voicemailAvailable = qt_compat.Signal(str, str)
- error = QtCore.pyqtSignal(str)
+ error = qt_compat.Signal(str)
LOGGEDOUT_STATE = "logged out"
LOGGINGIN_STATE = "logging in"
import logging
-from PyQt4 import QtCore
+import util.qt_compat as qt_compat
+QtCore = qt_compat.QtCore
import util.misc as misc_utils
try:
class StreamToken(QtCore.QObject):
- stateChange = QtCore.pyqtSignal(str)
- invalidated = QtCore.pyqtSignal()
- error = QtCore.pyqtSignal(str)
+ stateChange = qt_compat.Signal(str)
+ invalidated = qt_compat.Signal()
+ error = qt_compat.Signal(str)
STATE_PLAY = stream.Stream.STATE_PLAY
STATE_PAUSE = stream.Stream.STATE_PAUSE
import logging
-from PyQt4 import QtCore
+import qt_compat
+QtCore = qt_compat.QtCore
import misc
QtCore.QObject.__init__(self)
self._pool = pool
- @QtCore.pyqtSlot(object)
+ @qt_compat.Slot(object)
@misc.log_exception(_moduleLogger)
def _on_task_complete(self, taskResult):
on_success, on_error, isError, result = taskResult
class _WorkerThread(QtCore.QObject):
- taskComplete = QtCore.pyqtSignal(object)
+ taskComplete = qt_compat.Signal(object)
def __init__(self, pool):
QtCore.QObject.__init__(self)
self._pool = pool
- @QtCore.pyqtSlot(object)
+ @qt_compat.Slot(object)
@misc.log_exception(_moduleLogger)
def _on_task_added(self, task):
if not self._pool._isRunning:
taskResult = on_success, on_error, isError, result
self.taskComplete.emit(taskResult)
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc.log_exception(_moduleLogger)
def _on_stop_requested(self):
self._pool._thread.quit()
class AsyncPool(QtCore.QObject):
- _addTask = QtCore.pyqtSignal(object)
- _stopPool = QtCore.pyqtSignal()
+ _addTask = qt_compat.Signal(object)
+ _stopPool = qt_compat.Signal()
def __init__(self):
QtCore.QObject.__init__(self)
--- /dev/null
+#!/usr/bin/env python
+
+from __future__ import with_statement
+from __future__ import division
+
+try:
+ import PySide.QtCore as _QtCore
+ QtCore = _QtCore
+ USES_PYSIDE = True
+except ImportError:
+ import PyQt4.QtCore as _QtCore
+ QtCore = _QtCore
+ USES_PYSIDE = False
+
+
+def _pyside_import_module(moduleName):
+ pyside = __import__('PySide', globals(), locals(), [moduleName], -1)
+ return getattr(pyside, moduleName)
+
+
+def _pyqt4_import_module(moduleName):
+ pyside = __import__('PyQt4', globals(), locals(), [moduleName], -1)
+ return getattr(pyside, moduleName)
+
+
+if USES_PYSIDE:
+ import_module = _pyside_import_module
+
+ Signal = QtCore.Signal
+ Slot = QtCore.Slot
+ Property = QtCore.Property
+else:
+ import_module = _pyqt4_import_module
+
+ Signal = QtCore.pyqtSignal
+ Slot = QtCore.pyqtSlot
+ Property = QtCore.pyqtProperty
+
+
+if __name__ == "__main__":
+ pass
+
import math
import logging
-from PyQt4 import QtGui
-from PyQt4 import QtCore
+import qt_compat
+QtCore = qt_compat.QtCore
+QtGui = qt_compat.import_module("QtGui")
import misc as misc_utils
class QPieButton(QtGui.QWidget):
- activated = QtCore.pyqtSignal(int)
- highlighted = QtCore.pyqtSignal(int)
- canceled = QtCore.pyqtSignal()
- aboutToShow = QtCore.pyqtSignal()
- aboutToHide = QtCore.pyqtSignal()
+ activated = qt_compat.Signal(int)
+ highlighted = qt_compat.Signal(int)
+ canceled = qt_compat.Signal()
+ aboutToShow = qt_compat.Signal()
+ aboutToHide = qt_compat.Signal()
BUTTON_RADIUS = 24
DELAY = 250
class QPieMenu(QtGui.QWidget):
- activated = QtCore.pyqtSignal(int)
- highlighted = QtCore.pyqtSignal(int)
- canceled = QtCore.pyqtSignal()
- aboutToShow = QtCore.pyqtSignal()
- aboutToHide = QtCore.pyqtSignal()
+ activated = qt_compat.Signal(int)
+ highlighted = qt_compat.Signal(int)
+ canceled = qt_compat.Signal()
+ aboutToShow = qt_compat.Signal()
+ aboutToHide = qt_compat.Signal()
def __init__(self, parent = None):
QtGui.QWidget.__init__(self, parent)
import os
import warnings
-from PyQt4 import QtGui
+import qt_compat
+QtGui = qt_compat.import_module("QtGui")
import qtpie
import datetime
import logging
-from PyQt4 import QtCore
-from PyQt4 import QtGui
+import qt_compat
+QtCore = qt_compat.QtCore
+QtGui = qt_compat.import_module("QtGui")
import misc
class QErrorLog(QtCore.QObject):
- messagePushed = QtCore.pyqtSignal()
- messagePopped = QtCore.pyqtSignal()
+ messagePushed = qt_compat.Signal()
+ messagePopped = qt_compat.Signal()
def __init__(self):
QtCore.QObject.__init__(self)
self._severityLabel.setPixmap(self._icons[error.level])
self._widget.show()
- @QtCore.pyqtSlot()
- @QtCore.pyqtSlot(bool)
+ @qt_compat.Slot()
+ @qt_compat.Slot(bool)
@misc.log_exception(_moduleLogger)
def _on_close(self, checked = False):
self._errorLog.pop()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc.log_exception(_moduleLogger)
def _on_message_pushed(self):
self._show_error()
- @QtCore.pyqtSlot()
+ @qt_compat.Slot()
@misc.log_exception(_moduleLogger)
def _on_message_popped(self):
if len(self._errorLog) == 0:
class QSignalingMainWindow(QtGui.QMainWindow):
- closed = QtCore.pyqtSignal()
- hidden = QtCore.pyqtSignal()
- shown = QtCore.pyqtSignal()
- resized = QtCore.pyqtSignal()
+ closed = qt_compat.Signal()
+ hidden = qt_compat.Signal()
+ shown = qt_compat.Signal()
+ resized = qt_compat.Signal()
def __init__(self, *args, **kwd):
QtGui.QMainWindow.__init__(*((self, )+args), **kwd)
import logging
-from PyQt4 import QtGui
-from PyQt4 import QtCore
+import qt_compat
+QtCore = qt_compat.QtCore
+QtGui = qt_compat.import_module("QtGui")
from util import qui_utils
from util import misc as misc_utils