pyqt4 support

This commit is contained in:
ingvar1995 2016-05-24 21:22:21 +03:00
parent 948776c31c
commit cfdf145160
12 changed files with 52 additions and 20 deletions

View File

@ -1,4 +1,7 @@
from PySide import QtCore, QtGui try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
import widgets import widgets
import profile import profile
import util import util

View File

@ -1,4 +1,7 @@
from PySide import QtCore try:
from PySide import QtCore
except ImportError:
from PyQt4 import QtCore
from notifications import * from notifications import *
from settings import Settings from settings import Settings
from profile import Profile from profile import Profile

View File

@ -4,7 +4,10 @@ from os import remove, rename
from time import time, sleep from time import time, sleep
from tox import Tox from tox import Tox
import settings import settings
from PySide import QtCore try:
from PySide import QtCore
except ImportError:
from PyQt4 import QtCore
TOX_FILE_TRANSFER_STATE = { TOX_FILE_TRANSFER_STATE = {
@ -17,7 +20,10 @@ TOX_FILE_TRANSFER_STATE = {
class StateSignal(QtCore.QObject): class StateSignal(QtCore.QObject):
try:
signal = QtCore.Signal(int, float) # state and progress signal = QtCore.Signal(int, float) # state and progress
except:
signal = QtCore.pyqtSignal(int, float) # state and progress - pyqt4
class FileTransfer(QtCore.QObject): class FileTransfer(QtCore.QObject):

View File

@ -1,5 +1,8 @@
from toxcore_enums_and_consts import * from toxcore_enums_and_consts import *
from PySide import QtGui, QtCore try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
import profile import profile
from file_transfers import TOX_FILE_TRANSFER_STATE from file_transfers import TOX_FILE_TRANSFER_STATE
from util import curr_directory, convert_time from util import curr_directory, convert_time

View File

@ -1,6 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from PySide import QtCore, QtGui try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
from widgets import * from widgets import *

View File

@ -1,7 +1,10 @@
import sys import sys
from loginscreen import LoginScreen from loginscreen import LoginScreen
from settings import * from settings import *
from PySide import QtCore, QtGui try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
from bootstrap import node_generator from bootstrap import node_generator
from mainscreen import MainWindow from mainscreen import MainWindow
from profile import tox_factory from profile import tox_factory

View File

@ -1,4 +1,7 @@
from PySide import QtCore, QtGui try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
from settings import * from settings import *
from profile import Profile from profile import Profile
from util import get_style, curr_directory from util import get_style, curr_directory

View File

@ -1,4 +1,7 @@
from PySide import QtGui, QtCore try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
from util import curr_directory from util import curr_directory
import wave import wave
import pyaudio import pyaudio

View File

@ -1,5 +1,8 @@
from widgets import CenteredWidget from widgets import CenteredWidget
from PySide import QtCore, QtGui try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
class PasswordArea(QtGui.QLineEdit): class PasswordArea(QtGui.QLineEdit):

View File

@ -1,5 +1,8 @@
from list_items import MessageItem, ContactItem, FileTransferItem, InlineImageItem from list_items import MessageItem, ContactItem, FileTransferItem, InlineImageItem
from PySide import QtCore, QtGui try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
from tox import Tox from tox import Tox
import os import os
from messages import * from messages import *

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,7 @@
from PySide import QtGui, QtCore try:
from PySide import QtCore, QtGui
except ImportError:
from PyQt4 import QtCore, QtGui
class DataLabel(QtGui.QLabel): class DataLabel(QtGui.QLabel):