Esempio n. 1
0
Copyright (c) 2012 Ivano Ras, [email protected]

See the file license.txt for copying permission.

JADE mapping tool - Standalone client
'''

from PyQt4.QtCore import Qt, QCoreApplication
from PyQt4.QtGui import QApplication

import JADEview.MainView as mv
import JADEmodel.Graph as gr


# PyQt automatically swaps the key Ctrl with the Meta (Command) key when in Mac OS X. The line below should stop the swapping BUT it doesn't seem to work on the MacBookPro (Lion) although the attribute gets set to True correctly.
QCoreApplication.setAttribute (Qt.AA_MacDontSwapCtrlAndMeta, True)
#print QCoreApplication.testAttribute (Qt.AA_MacDontSwapCtrlAndMeta) # test the line above.


def main (argv):
    
    app = QApplication (argv)
    app.setAttribute (Qt.AA_DontUseNativeMenuBar)
    app.setAttribute (Qt.AA_MacDontSwapCtrlAndMeta) # this one doesn't seem to work, at least on the MacBookPro (Lion)
    
    window = mv.MainWindow (gr.Graph())
    #window.setWindowFlags (Qt.WindowStaysOnTopHint)
    window.show ()
    
    return app.exec_()
Esempio n. 2
0
import os
os.environ[
    'QT_API'] = 'pyqt'  #qt4 not 5 as is installed on most sytems running python 3!

debuglevels = {}
options = {}

import Timba.utils
import os
import sys
import traceback
import socket
import PyQt4.QtCore as QtCore
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads)
from PyQt4.QtCore import QCoreApplication as qca
qca.setAttribute(QtCore.Qt.AA_X11InitThreads)

# these don't like being re-imported in TDL, so try them here
try:
    import pyrap.tables
except ImportError:
    try:
        import pyrap_tables
    except ImportError:
        pass
try:
    import pyrap.measures
except ImportError:
    try:
        import pyrap_measures
    except ImportError: