qtpy
This commit is contained in:
parent
7cebe9cd9f
commit
f62e28f5b4
@ -1,5 +1,6 @@
|
|||||||
# the versions are the current ones tested - may work with earlier versions
|
# the versions are the current ones tested - may work with earlier versions
|
||||||
# choose one of PyQt5 PyQt6 PySide2 PySide6
|
# choose one of PyQt5 PyQt6 PySide2 PySide6
|
||||||
|
QtPy >= 2.4.1
|
||||||
PyAudio >= 0.2.13
|
PyAudio >= 0.2.13
|
||||||
numpy >= 1.26.1
|
numpy >= 1.26.1
|
||||||
opencv_python >= 4.8.0
|
opencv_python >= 4.8.0
|
||||||
|
@ -12,6 +12,7 @@ faulthandler.enable()
|
|||||||
import warnings
|
import warnings
|
||||||
warnings.filterwarnings('ignore')
|
warnings.filterwarnings('ignore')
|
||||||
|
|
||||||
|
import tox_wrapper.tests.support_testing as ts
|
||||||
try:
|
try:
|
||||||
from trepan.interfaces import server as Mserver
|
from trepan.interfaces import server as Mserver
|
||||||
from trepan.api import debug
|
from trepan.api import debug
|
||||||
@ -28,15 +29,16 @@ from user_data.settings import *
|
|||||||
from user_data.settings import Settings
|
from user_data.settings import Settings
|
||||||
from user_data import settings
|
from user_data import settings
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import tox_wrapper.tests.support_testing as ts
|
|
||||||
with ts.ignoreStderr():
|
with ts.ignoreStderr():
|
||||||
import pyaudio
|
import pyaudio
|
||||||
|
|
||||||
__maintainer__ = 'Ingvar'
|
__maintainer__ = 'Ingvar'
|
||||||
__version__ = '0.5.0+'
|
__version__ = '1.0.0' # was 0.5.0+
|
||||||
|
|
||||||
sleep = time.sleep
|
sleep = time.sleep
|
||||||
|
|
||||||
|
os.environ['QT_API'] = 'pyqt5'
|
||||||
|
|
||||||
def reset():
|
def reset():
|
||||||
Settings.reset_auto_profile()
|
Settings.reset_auto_profile()
|
||||||
|
|
||||||
@ -46,7 +48,7 @@ def clean():
|
|||||||
util.remove(directory)
|
util.remove(directory)
|
||||||
|
|
||||||
def print_toxygen_version():
|
def print_toxygen_version():
|
||||||
print('Toxygen ' + __version__)
|
print('toxygen ' + __version__)
|
||||||
|
|
||||||
def setup_default_audio():
|
def setup_default_audio():
|
||||||
# need:
|
# need:
|
||||||
|
@ -10,7 +10,7 @@ from copy import deepcopy
|
|||||||
from gevent import monkey; monkey.patch_all(); del monkey # noqa
|
from gevent import monkey; monkey.patch_all(); del monkey # noqa
|
||||||
import gevent
|
import gevent
|
||||||
|
|
||||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
from qtpy import QtWidgets, QtGui, QtCore
|
||||||
from qtpy.QtCore import QTimer
|
from qtpy.QtCore import QTimer
|
||||||
from qtpy.QtWidgets import QApplication
|
from qtpy.QtWidgets import QApplication
|
||||||
|
|
||||||
@ -85,6 +85,7 @@ LOG = logging.getLogger('app')
|
|||||||
|
|
||||||
IDLE_PERIOD = 0.10
|
IDLE_PERIOD = 0.10
|
||||||
iNODES=8
|
iNODES=8
|
||||||
|
bSHOW_TRAY=False
|
||||||
|
|
||||||
def setup_logging(oArgs):
|
def setup_logging(oArgs):
|
||||||
global LOG
|
global LOG
|
||||||
@ -740,7 +741,7 @@ class App:
|
|||||||
self._groups_service,
|
self._groups_service,
|
||||||
history,
|
history,
|
||||||
self._contacts_provider)
|
self._contacts_provider)
|
||||||
if True: # try it
|
if bSHOW_TRAY:
|
||||||
self._tray = tray.init_tray(self._profile,
|
self._tray = tray.init_tray(self._profile,
|
||||||
self._settings,
|
self._settings,
|
||||||
self._ms, self._toxes)
|
self._ms, self._toxes)
|
||||||
@ -755,7 +756,7 @@ class App:
|
|||||||
self._calls_manager,
|
self._calls_manager,
|
||||||
self._groups_service, self._toxes, self)
|
self._groups_service, self._toxes, self)
|
||||||
|
|
||||||
if True: # try it
|
if bSHOW_TRAY: # broken
|
||||||
# the tray icon does not die with the app
|
# the tray icon does not die with the app
|
||||||
self._tray.show()
|
self._tray.show()
|
||||||
self._ms.show()
|
self._ms.show()
|
||||||
|
@ -16,7 +16,7 @@ import common.tox_save
|
|||||||
from utils import ui as util_ui
|
from utils import ui as util_ui
|
||||||
import tox_wrapper.tests.support_testing as ts
|
import tox_wrapper.tests.support_testing as ts
|
||||||
from middleware.threads import invoke_in_main_thread
|
from middleware.threads import invoke_in_main_thread
|
||||||
from main import sleep
|
from __main__ import sleep
|
||||||
from middleware.threads import BaseThread
|
from middleware.threads import BaseThread
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from PyQt5 import QtWidgets
|
from qtpy import QtWidgets
|
||||||
|
|
||||||
|
|
||||||
class DesktopGrabber:
|
class DesktopGrabber:
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
import random
|
import random
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from utils.util import *
|
from utils.util import *
|
||||||
from PyQt5 import QtNetwork
|
from qtpy import QtNetwork
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
try:
|
try:
|
||||||
import certifi
|
import certifi
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
||||||
from user_data.settings import *
|
from user_data.settings import *
|
||||||
from PyQt5 import QtCore, QtGui
|
from qtpy import QtCore, QtGui
|
||||||
from tox_wrapper.toxcore_enums_and_consts import TOX_PUBLIC_KEY_SIZE
|
from tox_wrapper.toxcore_enums_and_consts import TOX_PUBLIC_KEY_SIZE
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import common.event as event
|
import common.event as event
|
||||||
@ -165,7 +165,7 @@ class BaseContact:
|
|||||||
# contact.set_widget(item_widget)
|
# contact.set_widget(item_widget)
|
||||||
# File "/mnt/o/var/local/src/toxygen/toxygen/contacts/contact.py", line 320, in set_widget
|
# File "/mnt/o/var/local/src/toxygen/toxygen/contacts/contact.py", line 320, in set_widget
|
||||||
if not self._widget:
|
if not self._widget:
|
||||||
LOG_WARN("BC.init_widget self._widget is NULL")
|
LOG.warn("BC.init_widget self._widget is NULL")
|
||||||
return
|
return
|
||||||
self._widget.name.setText(self._name)
|
self._widget.name.setText(self._name)
|
||||||
self._widget.status_message.setText(self._status_message)
|
self._widget.status_message.setText(self._status_message)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
||||||
from PyQt5 import QtWidgets
|
from qtpy import QtWidgets
|
||||||
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
from tox_wrapper.toxcore_enums_and_consts import *
|
from tox_wrapper.toxcore_enums_and_consts import *
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import threading
|
import threading
|
||||||
from PyQt5 import QtGui
|
from qtpy import QtGui
|
||||||
from tox_wrapper.toxcore_enums_and_consts import *
|
from tox_wrapper.toxcore_enums_and_consts import *
|
||||||
from tox_wrapper.toxav_enums import *
|
from tox_wrapper.toxav_enums import *
|
||||||
from tox_wrapper.tox import bin_to_string
|
from tox_wrapper.tox import bin_to_string
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import queue
|
import queue
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
|
|
||||||
from bootstrap.bootstrap import *
|
from bootstrap.bootstrap import *
|
||||||
from bootstrap.bootstrap import download_nodes_list
|
from bootstrap.bootstrap import download_nodes_list
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import json
|
import json
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from PyQt5 import QtNetwork, QtCore
|
from qtpy import QtNetwork, QtCore
|
||||||
try:
|
try:
|
||||||
import requests
|
import requests
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from PyQt5 import QtCore, QtWidgets
|
from qtpy import QtCore, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
def tray_notification(title, text, tray, window):
|
def tray_notification(title, text, tray, window):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from qtpy import QtCore, QtWidgets
|
||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
from PyQt5 import QtWidgets, QtCore
|
from qtpy import QtWidgets, QtCore
|
||||||
import json
|
import json
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ import re
|
|||||||
import math
|
import math
|
||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
from qtpy.QtCore import *
|
||||||
from PyQt5.QtWidgets import *
|
from qtpy.QtWidgets import *
|
||||||
from PyQt5.QtGui import *
|
from qtpy.QtGui import *
|
||||||
from PyQt5.QtSvg import *
|
from qtpy.QtSvg import *
|
||||||
|
|
||||||
|
|
||||||
START_FEN = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
|
START_FEN = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
|
|
||||||
|
|
||||||
class InvokeEvent(QtCore.QEvent):
|
class InvokeEvent(QtCore.QEvent):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
|
|
||||||
|
|
||||||
class InvokeEvent(QtCore.QEvent):
|
class InvokeEvent(QtCore.QEvent):
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from qtpy import QtCore, QtWidgets
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import common.tox_save as tox_save
|
import common.tox_save as tox_save
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
from qtpy import QtGui, QtCore, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
class SearchPlugin(plugin_super_class.PluginSuperClass):
|
class SearchPlugin(plugin_super_class.PluginSuperClass):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import plugin_super_class
|
import plugin_super_class
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from qtpy import QtCore, QtWidgets
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ from utils import util
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
|
|
||||||
# LOG=util.log
|
# LOG=util.log
|
||||||
global LOG
|
global LOG
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PyQt5 import QtCore
|
from qtpy import QtCore
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
bIS_NOT_TOXYGEN = True
|
bIS_NOT_TOXYGEN = True
|
||||||
|
|
||||||
# from PyQt5 import QtCore
|
# from qtpy import QtCore
|
||||||
import time
|
import time
|
||||||
|
|
||||||
sleep = time.sleep
|
sleep = time.sleep
|
||||||
|
2
toxygen/third_party/qweechat/about.py
vendored
2
toxygen/third_party/qweechat/about.py
vendored
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
"""About dialog box."""
|
"""About dialog box."""
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets as QtGui
|
from qtpy import QtCore, QtWidgets as QtGui
|
||||||
|
|
||||||
from third_party.qweechat.version import qweechat_version
|
from third_party.qweechat.version import qweechat_version
|
||||||
|
|
||||||
|
4
toxygen/third_party/qweechat/buffer.py
vendored
4
toxygen/third_party/qweechat/buffer.py
vendored
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
from pkg_resources import resource_filename
|
from pkg_resources import resource_filename
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
from PyQt5.QtCore import pyqtSignal
|
from qtpy.QtCore import pyqtSignal
|
||||||
Signal = pyqtSignal
|
Signal = pyqtSignal
|
||||||
|
|
||||||
from third_party.qweechat.chat import ChatTextEdit
|
from third_party.qweechat.chat import ChatTextEdit
|
||||||
|
2
toxygen/third_party/qweechat/chat.py
vendored
2
toxygen/third_party/qweechat/chat.py
vendored
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
from qtpy import QtCore, QtWidgets, QtGui
|
||||||
|
|
||||||
from third_party.qweechat import config
|
from third_party.qweechat import config
|
||||||
from third_party.qweechat.weechat import color
|
from third_party.qweechat.weechat import color
|
||||||
|
2
toxygen/third_party/qweechat/connection.py
vendored
2
toxygen/third_party/qweechat/connection.py
vendored
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
"""Connection window."""
|
"""Connection window."""
|
||||||
|
|
||||||
from PyQt5 import QtGui, QtWidgets
|
from qtpy import QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
class ConnectionDialog(QtWidgets.QDialog):
|
class ConnectionDialog(QtWidgets.QDialog):
|
||||||
|
2
toxygen/third_party/qweechat/debug.py
vendored
2
toxygen/third_party/qweechat/debug.py
vendored
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
"""Debug window."""
|
"""Debug window."""
|
||||||
|
|
||||||
from PyQt5 import QtWidgets
|
from qtpy import QtWidgets
|
||||||
|
|
||||||
from third_party.qweechat.chat import ChatTextEdit
|
from third_party.qweechat.chat import ChatTextEdit
|
||||||
from third_party.qweechat.input import InputLineEdit
|
from third_party.qweechat.input import InputLineEdit
|
||||||
|
4
toxygen/third_party/qweechat/input.py
vendored
4
toxygen/third_party/qweechat/input.py
vendored
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
"""Input line for chat and debug window."""
|
"""Input line for chat and debug window."""
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from qtpy import QtCore, QtWidgets
|
||||||
from PyQt5.QtCore import pyqtSignal
|
from qtpy.QtCore import pyqtSignal
|
||||||
Signal = pyqtSignal
|
Signal = pyqtSignal
|
||||||
|
|
||||||
class InputLineEdit(QtWidgets.QLineEdit):
|
class InputLineEdit(QtWidgets.QLineEdit):
|
||||||
|
4
toxygen/third_party/qweechat/network.py
vendored
4
toxygen/third_party/qweechat/network.py
vendored
@ -26,8 +26,8 @@ import hashlib
|
|||||||
import secrets
|
import secrets
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtNetwork
|
from qtpy import QtCore, QtNetwork
|
||||||
from PyQt5.QtCore import pyqtSignal
|
from qtpy.QtCore import pyqtSignal
|
||||||
Signal = pyqtSignal
|
Signal = pyqtSignal
|
||||||
|
|
||||||
from third_party.qweechat import config
|
from third_party.qweechat import config
|
||||||
|
2
toxygen/third_party/qweechat/preferences.py
vendored
2
toxygen/third_party/qweechat/preferences.py
vendored
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
"""Preferences dialog box."""
|
"""Preferences dialog box."""
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets as QtGui
|
from qtpy import QtCore, QtWidgets as QtGui
|
||||||
|
|
||||||
|
|
||||||
class PreferencesDialog(QtGui.QDialog):
|
class PreferencesDialog(QtGui.QDialog):
|
||||||
|
2
toxygen/third_party/qweechat/qweechat.py
vendored
2
toxygen/third_party/qweechat/qweechat.py
vendored
@ -37,7 +37,7 @@ import sys
|
|||||||
import traceback
|
import traceback
|
||||||
from pkg_resources import resource_filename
|
from pkg_resources import resource_filename
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from third_party.qweechat import config
|
from third_party.qweechat import config
|
||||||
from third_party.qweechat.about import AboutDialog
|
from third_party.qweechat.about import AboutDialog
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
import wave
|
import wave
|
||||||
|
|
||||||
from ui import widgets
|
from ui import widgets
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from tox_wrapper.toxcore_enums_and_consts import *
|
from tox_wrapper.toxcore_enums_and_consts import *
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
from utils.util import *
|
from utils.util import *
|
||||||
from ui.widgets import DataLabel
|
from ui.widgets import DataLabel
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
from PyQt5 import uic
|
from qtpy import uic
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ui.widgets import CenteredWidget
|
from ui.widgets import CenteredWidget
|
||||||
from PyQt5 import uic, QtWidgets, QtCore
|
from qtpy import uic, QtWidgets, QtCore
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from PyQt5 import uic, QtWidgets
|
from qtpy import uic, QtWidgets
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ui.widgets import CenteredWidget
|
from ui.widgets import CenteredWidget
|
||||||
from PyQt5 import uic
|
from qtpy import uic
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from PyQt5 import uic
|
from qtpy import uic
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
from tox_wrapper.toxcore_enums_and_consts import *
|
from tox_wrapper.toxcore_enums_and_consts import *
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
from PyQt5 import uic
|
from qtpy import uic
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import os.path
|
import os.path
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from PyQt5 import uic
|
from qtpy import uic
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
from qtpy.QtGui import (QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QFontMetrics)
|
from qtpy.QtGui import (QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QFontMetrics)
|
||||||
|
|
||||||
from ui.contact_items import *
|
from ui.contact_items import *
|
||||||
@ -146,6 +146,7 @@ class LogDialog(QtWidgets.QDialog, QtWidgets.QPlainTextEdit):
|
|||||||
def test(self):
|
def test(self):
|
||||||
# FixMe: 65:8: E1101: Instance of 'QTextEditLogger' has no 'selectAll' member (no-member)
|
# FixMe: 65:8: E1101: Instance of 'QTextEditLogger' has no 'selectAll' member (no-member)
|
||||||
# :66:8: E1101: Instance of 'QTextEditLogger' has no 'copy' member (no-member)
|
# :66:8: E1101: Instance of 'QTextEditLogger' has no 'copy' member (no-member)
|
||||||
|
if hasattr(self._logTextBox, 'selectAll'):
|
||||||
self._logTextBox.selectAll()
|
self._logTextBox.selectAll()
|
||||||
self._logTextBox.copy()
|
self._logTextBox.copy()
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import urllib
|
import urllib
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from ui.widgets import RubberBandWindow, create_menu, QRightClickButton, CenteredWidget, LineEdit
|
from ui.widgets import RubberBandWindow, create_menu, QRightClickButton, CenteredWidget, LineEdit
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets, uic
|
from qtpy import QtCore, QtGui, QtWidgets, uic
|
||||||
|
|
||||||
|
|
||||||
from user_data.settings import *
|
from user_data.settings import *
|
||||||
|
@ -7,7 +7,7 @@ import re
|
|||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
from messenger.messages import MESSAGE_AUTHOR
|
from messenger.messages import MESSAGE_AUTHOR
|
||||||
from file_transfers.file_transfers import *
|
from file_transfers.file_transfers import *
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
class MessageBrowser(QtWidgets.QTextBrowser):
|
class MessageBrowser(QtWidgets.QTextBrowser):
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ui.widgets import CenteredWidget, LineEdit, DialogWithResult
|
from ui.widgets import CenteredWidget, LineEdit, DialogWithResult
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from qtpy import QtCore, QtWidgets
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ui.widgets import CenteredWidget
|
from ui.widgets import CenteredWidget
|
||||||
from PyQt5 import uic
|
from qtpy import uic
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
from ui.contact_items import *
|
from ui.contact_items import *
|
||||||
|
@ -2,7 +2,7 @@ from ui.widgets import CenteredWidget
|
|||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
from utils.util import join_path, get_images_directory, get_views_path
|
from utils.util import join_path, get_images_directory, get_views_path
|
||||||
from user_data.settings import Settings
|
from user_data.settings import Settings
|
||||||
from PyQt5 import QtGui, QtCore, uic
|
from qtpy import QtGui, QtCore, uic
|
||||||
|
|
||||||
|
|
||||||
class ProfileSettings(CenteredWidget):
|
class ProfileSettings(CenteredWidget):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from ui.widgets import CenteredWidget, LineEdit
|
from ui.widgets import CenteredWidget, LineEdit
|
||||||
from PyQt5 import uic
|
from qtpy import uic
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
from ui.contact_items import *
|
from ui.contact_items import *
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
from qtpy import QtWidgets, QtGui, QtCore
|
||||||
from utils.ui import tr
|
from utils.ui import tr
|
||||||
from utils.util import *
|
from utils.util import *
|
||||||
from ui.password_screen import UnlockAppScreen
|
from ui.password_screen import UnlockAppScreen
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from qtpy import QtCore, QtGui, QtWidgets
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import utils.ui as util_ui
|
|||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import urllib
|
import urllib
|
||||||
from PyQt5 import QtNetwork, QtCore
|
from qtpy import QtNetwork, QtCore
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
|
@ -10,6 +10,7 @@ from common.event import Event
|
|||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import utils.util as util_utils
|
import utils.util as util_utils
|
||||||
import user_data
|
import user_data
|
||||||
|
from toxygen_wrapper.tests import support_testing as ts
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
@ -259,7 +260,9 @@ class Settings(dict):
|
|||||||
# Static methods
|
# Static methods
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_auto_profile(appdir):
|
def get_auto_profile(appdir=None):
|
||||||
|
if appdir is None:
|
||||||
|
appdir = ts.get_user_config_path()
|
||||||
# self._path =
|
# self._path =
|
||||||
p = os.path.join(appdir, 'toxygen.json')
|
p = os.path.join(appdir, 'toxygen.json')
|
||||||
if not os.path.isfile(p):
|
if not os.path.isfile(p):
|
||||||
@ -299,7 +302,8 @@ class Settings(dict):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def reset_auto_profile():
|
def reset_auto_profile():
|
||||||
p = os.path.join(os.path.dirname(app._path), 'toxygen.json')
|
appdir = ts.get_user_config_path()
|
||||||
|
p = os.path.join(appdir, 'toxygen.json')
|
||||||
if os.path.isfile(p):
|
if os.path.isfile(p):
|
||||||
with open(p) as fl:
|
with open(p) as fl:
|
||||||
data = fl.read()
|
data = fl.read()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from PyQt5 import QtWidgets
|
from qtpy import QtWidgets
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user