aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorBrianna2017-06-24 20:02:14 -0400
committerGitHub2017-06-24 20:02:14 -0400
commit1bb67d1513122ca7fb02e60a92339bd1a73dbee3 (patch)
treebd4497b3332f758da373393bfb58178f536b1b09 /src/components
parent68ac0cf755c6c3dbcef4abbb934cd1ead2d713c5 (diff)
parent4d955c5a06d8d77c968f594a85b71b516919bcfb (diff)
Merge pull request #34 from djfun/feature-newgui-qt5
Update to Qt5
Diffstat (limited to '')
-rw-r--r--src/components/__base__.py (renamed from components/__base__.py)6
-rw-r--r--src/components/__init__.py (renamed from components/__init__.py)0
-rw-r--r--src/components/color.py (renamed from components/color.py)4
-rw-r--r--src/components/color.ui (renamed from components/color.ui)0
-rw-r--r--src/components/image.py (renamed from components/image.py)4
-rw-r--r--src/components/image.ui (renamed from components/image.ui)0
-rw-r--r--src/components/original.py (renamed from components/original.py)4
-rw-r--r--src/components/original.ui (renamed from components/original.ui)0
-rw-r--r--src/components/text.py (renamed from components/text.py)6
-rw-r--r--src/components/text.ui (renamed from components/text.ui)0
-rw-r--r--src/components/video.py (renamed from components/video.py)4
-rw-r--r--src/components/video.ui (renamed from components/video.ui)0
12 files changed, 14 insertions, 14 deletions
diff --git a/components/__base__.py b/src/components/__base__.py
index a29d775..9b7b958 100644
--- a/components/__base__.py
+++ b/src/components/__base__.py
@@ -1,4 +1,4 @@
-from PyQt4 import QtGui, QtCore
+from PyQt5 import QtGui, QtCore, QtWidgets
from PIL import Image
import os
@@ -89,8 +89,8 @@ class Component(QtCore.QObject):
and return this as an RGB string and QPushButton stylesheet.
In a subclass apply stylesheet to any color selection widgets
'''
- dialog = QtGui.QColorDialog()
- dialog.setOption(QtGui.QColorDialog.ShowAlphaChannel, True)
+ dialog = QtWidgets.QColorDialog()
+ dialog.setOption(QtWidgets.QColorDialog.ShowAlphaChannel, True)
color = dialog.getColor()
if color.isValid():
RGBstring = '%s,%s,%s' % (
diff --git a/components/__init__.py b/src/components/__init__.py
index 8b13789..8b13789 100644
--- a/components/__init__.py
+++ b/src/components/__init__.py
diff --git a/components/color.py b/src/components/color.py
index 3b73458..f1fb2b2 100644
--- a/components/color.py
+++ b/src/components/color.py
@@ -1,6 +1,6 @@
from PIL import Image, ImageDraw
-from PyQt4 import uic, QtGui, QtCore
-from PyQt4.QtGui import QColor
+from PyQt5 import uic, QtGui, QtCore, QtWidgets
+from PyQt5.QtGui import QColor
from PIL.ImageQt import ImageQt
import os
from . import __base__
diff --git a/components/color.ui b/src/components/color.ui
index a9dacea..a9dacea 100644
--- a/components/color.ui
+++ b/src/components/color.ui
diff --git a/components/image.py b/src/components/image.py
index f8ae64e..3517af6 100644
--- a/components/image.py
+++ b/src/components/image.py
@@ -1,5 +1,5 @@
from PIL import Image, ImageDraw
-from PyQt4 import uic, QtGui, QtCore
+from PyQt5 import uic, QtGui, QtCore, QtWidgets
import os
from . import __base__
@@ -85,7 +85,7 @@ class Component(__base__.Component):
def pickImage(self):
imgDir = self.settings.value("backgroundDir", os.path.expanduser("~"))
- filename = QtGui.QFileDialog.getOpenFileName(
+ filename, _ = QtWidgets.QFileDialog.getOpenFileName(
self.page, "Choose Image", imgDir,
"Image Files (%s)" % " ".join(self.imageFormats))
if filename:
diff --git a/components/image.ui b/src/components/image.ui
index 6df03a5..6df03a5 100644
--- a/components/image.ui
+++ b/src/components/image.ui
diff --git a/components/original.py b/src/components/original.py
index 6222157..0d5001c 100644
--- a/components/original.py
+++ b/src/components/original.py
@@ -1,7 +1,7 @@
import numpy
from PIL import Image, ImageDraw
-from PyQt4 import uic, QtGui, QtCore
-from PyQt4.QtGui import QColor
+from PyQt5 import uic, QtGui, QtCore, QtWidgets
+from PyQt5.QtGui import QColor
import os
from . import __base__
import time
diff --git a/components/original.ui b/src/components/original.ui
index 5808653..5808653 100644
--- a/components/original.ui
+++ b/src/components/original.ui
diff --git a/components/text.py b/src/components/text.py
index 2375dcd..76961c9 100644
--- a/components/text.py
+++ b/src/components/text.py
@@ -1,6 +1,6 @@
from PIL import Image, ImageDraw
-from PyQt4.QtGui import QPainter, QColor, QFont
-from PyQt4 import uic, QtGui, QtCore
+from PyQt5.QtGui import QPainter, QColor, QFont
+from PyQt5 import uic, QtGui, QtCore, QtWidgets
from PIL.ImageQt import ImageQt
import os
import io
@@ -138,7 +138,7 @@ class Component(__base__.Component):
painter.drawText(x, y, self.title)
painter.end()
- imBytes = image.bits().asstring(image.numBytes())
+ imBytes = image.bits().asstring(image.byteCount())
return Image.frombytes('RGBA', (width, height), imBytes)
diff --git a/components/text.ui b/src/components/text.ui
index 05e7f8e..05e7f8e 100644
--- a/components/text.ui
+++ b/src/components/text.ui
diff --git a/components/video.py b/src/components/video.py
index 4fced4e..70247e1 100644
--- a/components/video.py
+++ b/src/components/video.py
@@ -1,5 +1,5 @@
from PIL import Image, ImageDraw
-from PyQt4 import uic, QtGui, QtCore
+from PyQt5 import uic, QtGui, QtCore, QtWidgets
import os
import subprocess
import threading
@@ -180,7 +180,7 @@ class Component(__base__.Component):
def pickVideo(self):
imgDir = self.settings.value("backgroundDir", os.path.expanduser("~"))
- filename = QtGui.QFileDialog.getOpenFileName(
+ filename, _ = QtWidgets.QFileDialog.getOpenFileName(
self.page, "Choose Video",
imgDir, "Video Files (%s)" % " ".join(self.videoFormats)
)
diff --git a/components/video.ui b/src/components/video.ui
index f05e8a5..f05e8a5 100644
--- a/components/video.ui
+++ b/src/components/video.ui