from PyQt4 import QtCore
import constants
+import maeqt
from util import misc as misc_utils
import unit_data
class Gonvert(object):
- # @todo get subwindows working
- # @todo rotation support
-
_DATA_PATHS = [
os.path.dirname(__file__),
+ os.path.join(os.path.dirname(__file__), "../share"),
os.path.join(os.path.dirname(__file__), "../data"),
- os.path.join(os.path.dirname(__file__), "../lib"),
'/usr/share/gonvert',
- '/usr/lib/gonvert',
+ '/opt/gonvert/share',
]
def __init__(self, app):
self._window = QtGui.QMainWindow(parent)
self._window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
+ maeqt.set_autorient(self._window, True)
+ maeqt.set_stackable(self._window, True)
if parent is not None:
self._window.setWindowModality(QtCore.Qt.WindowModal)
self._window.setWindowTitle("%s - Quick Jump" % constants.__pretty_app_name__)
self._window = QtGui.QMainWindow(parent)
self._window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
+ maeqt.set_autorient(self._window, True)
+ maeqt.set_stackable(self._window, True)
if parent is not None:
self._window.setWindowModality(QtCore.Qt.WindowModal)
self._window.setWindowTitle("%s - Recent" % constants.__pretty_app_name__)
self._window = QtGui.QMainWindow(parent)
self._window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
+ maeqt.set_autorient(self._window, True)
+ maeqt.set_stackable(self._window, True)
if parent is not None:
self._window.setWindowModality(QtCore.Qt.WindowModal)
self._window.setWindowTitle("%s - Favorites" % constants.__pretty_app_name__)
self._window = QtGui.QMainWindow(parent)
self._window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
+ maeqt.set_autorient(self._window, True)
+ maeqt.set_stackable(self._window, True)
if parent is not None:
self._window.setWindowModality(QtCore.Qt.WindowModal)
self._window.setWindowTitle("%s - Categories" % constants.__pretty_app_name__)
self._selectedUnitName = QtGui.QLabel()
self._selectedUnitValue = QtGui.QLineEdit()
self._selectedUnitValue.textEdited.connect(self._on_value_edited)
+ maeqt.mark_numbers_preferred(self._selectedUnitValue)
self._selectedUnitSymbol = QtGui.QLabel()
self._selectedUnitLayout = QtGui.QHBoxLayout()
self._window = QtGui.QMainWindow(parent)
self._window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
+ maeqt.set_autorient(self._window, True)
+ maeqt.set_stackable(self._window, True)
if parent is not None:
self._window.setWindowModality(QtCore.Qt.WindowModal)
self._window.setWindowTitle("%s - %s" % (constants.__pretty_app_name__, category))