projects
/
lilass.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
10076cc
)
port to Qt5
author
Ralf Jung
<post@ralfj.de>
Mon, 21 Sep 2015 15:03:51 +0000
(17:03 +0200)
committer
Ralf Jung
<post@ralfj.de>
Mon, 21 Sep 2015 15:03:51 +0000
(17:03 +0200)
README.rst
patch
|
blob
|
history
qt_frontend.py
patch
|
blob
|
history
diff --git
a/README.rst
b/README.rst
index 56ae9d28da4236b5a6b878989d72c001ea023d18..0e06f63a46d6943598b0cc20b9aaba5e85bf460c 100644
(file)
--- a/
README.rst
+++ b/
README.rst
@@
-29,8
+29,8
@@
Simply run ``lilass`` to start the interactive mode. A window will pop up,
allowing you to select which screens are enabled, their resolution, and how they
are positioned relatively to each other. The option ``--frontend`` (or ``-f``)
can be used to choose the frontend which opens the window. Currently, the
allowing you to select which screens are enabled, their resolution, and how they
are positioned relatively to each other. The option ``--frontend`` (or ``-f``)
can be used to choose the frontend which opens the window. Currently, the
-frontends ``qt``
and ``zenity`` are available. LiLaSS attempts to choose an
-adequate frontend automatically.
+frontends ``qt``
(using Qt5) and ``zenity`` are available. LiLaSS attempts to
+
choose an
adequate frontend automatically.
The option ``--relative-position`` (``-r``) suppresses the interactive
configuration. Instead, the given given option (``left``, ``right``, ``above``,
The option ``--relative-position`` (``-r``) suppresses the interactive
configuration. Instead, the given given option (``left``, ``right``, ``above``,
diff --git
a/qt_frontend.py
b/qt_frontend.py
index 62e3b842054ce3760668ed8c263314e0d04835cd..6e41d551be0352f2741188a4431e976bd6b5391c 100644
(file)
--- a/
qt_frontend.py
+++ b/
qt_frontend.py
@@
-19,9
+19,9
@@
from screen import RelativeScreenPosition, ScreenSetup
try:
# Be fine with PyQt4 not being installed
try:
# Be fine with PyQt4 not being installed
- from PyQt
4 import QtCore, QtGui
, uic
+ from PyQt
5 import QtCore, QtWidgets
, uic
- class PositionSelection(Qt
Gui
.QDialog):
+ class PositionSelection(Qt
Widgets
.QDialog):
def __init__(self, situation):
# set up main window
super(PositionSelection, self).__init__()
def __init__(self, situation):
# set up main window
super(PositionSelection, self).__init__()
@@
-95,7
+95,7
@@
try:
self.posLabel2.setEnabled(bothEnabled)
self.relPos.setEnabled(bothEnabled)
# avoid having no screen
self.posLabel2.setEnabled(bothEnabled)
self.relPos.setEnabled(bothEnabled)
# avoid having no screen
- self.buttonBox.button(Qt
Gui
.QDialogButtonBox.Ok).setEnabled(intEnabled or extEnabled)
+ self.buttonBox.button(Qt
Widgets
.QDialogButtonBox.Ok).setEnabled(intEnabled or extEnabled)
def run(self):
self.exec_()
def run(self):
self.exec_()
@@
-109,13
+109,13
@@
except ImportError:
# Qt frontend
class QtFrontend:
def __init__(self):
# Qt frontend
class QtFrontend:
def __init__(self):
- from PyQt
4 import QtGui
- self.app = Qt
Gui
.QApplication(sys.argv)
+ from PyQt
5 import QtWidgets
+ self.app = Qt
Widgets
.QApplication(sys.argv)
print("Qt loaded")
def error(self, message):
print("Qt loaded")
def error(self, message):
- from PyQt
4 import QtGui
- Qt
Gui
.QMessageBox.critical(None, 'Fatal error', message)
+ from PyQt
5 import QtWidgets
+ Qt
Widgets
.QMessageBox.critical(None, 'Fatal error', message)
def setup(self, situation):
return PositionSelection(situation).run()
def setup(self, situation):
return PositionSelection(situation).run()
@@
-123,7
+123,7
@@
class QtFrontend:
@staticmethod
def isAvailable():
try:
@staticmethod
def isAvailable():
try:
- import PyQt
4
+ import PyQt
5
return True
except ImportError:
return False
return True
except ImportError:
return False