Exemple #1
0
    def __init__(self):
        QQuickView.__init__(self)

        surface_format = QSurfaceFormat()
        surface_format.setAlphaBufferSize(8)

        self.setColor(QColor(0, 0, 0, 0))
        self.setFlags(
                Qt.Tool
                | Qt.FramelessWindowHint
                | Qt.WindowStaysOnTopHint
                | Qt.X11BypassWindowManagerHint
                )
        self.setResizeMode(QQuickView.SizeRootObjectToView)
        self.setFormat(surface_format)
        self.set_all_contexts()
        self.setSource(QUrl.fromLocalFile(os.path.join(
            ROOT_LOCATION, 'frame', 'views', 'Main.qml')))
        self.connect_all_object_function()

        self.engine_obj = self.engine()
        connect_to_primary_changed(self.display_primary_changed)

        self._dbus_adptor = DssDbusAdptor(self)
        qApp.focusWindowChanged.connect(self.onFocusWindowChanged)
    def __init__(self, settings, windowInfo):
        QQuickView.__init__(self)
        self._settings = settings

        surface_format = QSurfaceFormat()
        surface_format.setAlphaBufferSize(8)

        self.set_cursor_shape("shape_start_cursor")
        self.setColor(QColor(0, 0, 0, 0))
        self.setFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint)
        self.setResizeMode(QQuickView.SizeRootObjectToView)
        self.setFormat(surface_format)
        self.setTitle(_("Deepin screenshot"))

        self.qimage = QImage(self._settings.tmpImageFile)
        self.qpixmap = QPixmap()
        self.qpixmap.convertFromImage(self.qimage)

        self.window_info = windowInfo

        self._grabPointerStatus = False
        self._grabKeyboardStatus = False
        self._grabFocusTimer = self._getGrabFocusTimer()

        self._osdShowed = False
        self._osdShowing = False
        self._quitOnOsdTimeout = False
Exemple #3
0
    def __init__(self, x, y, menuJsonContent, withCorner):
        QQuickView.__init__(self)

        self.__x = x
        self.__y = y
        self.__menuJsonContent = menuJsonContent
        self.__withCorner = withCorner
        self._cornerDirection = "down"
Exemple #4
0
    def __init__(self, parent=None):
        QQuickView.__init__(self, parent)

        self.parent = parent
        self.setSource(QUrl('QML/PreviewWindow.qml'))
        self.previewContext = CP.ContextPreview(self)
        self.rootContext().setContextProperty("previewContext",
                                              self.previewContext)
Exemple #5
0
 def __init__(self, mainForm):
     QQuickView.__init__(self)
     self.mainForm = mainForm
     self.setMinimumWidth(600)
     self.setMinimumHeight(600)
     self.rootContext().setContextProperty('dbView', self)
     self.setSource(QUrl("qml/intro.qml"))
     self.setTitle("Logging")
     self.show()
Exemple #6
0
 def __init__(self):
     QQuickView.__init__(self)
     surface_format = QSurfaceFormat()
     surface_format.setAlphaBufferSize(8)
     
     self.setColor(QColor(0, 0, 0, 0))
     self.setFlags(QtCore.Qt.FramelessWindowHint)
     self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
     self.setFormat(surface_format)
     
     self.qml_context = self.rootContext()
Exemple #7
0
    def __init__(self, center=False):
        QQuickView.__init__(self)
        self._center_request_count = 1 if center else 0
        surface_format = QSurfaceFormat()
        surface_format.setAlphaBufferSize(8)

        self.setColor(QColor(0, 0, 0, 0))
        self.setMinimumSize(QSize(MINIMIZE_WIDTH, MINIMIZE_HEIGHT))
        self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
        self.setFormat(surface_format)

        self.staysOnTop = False
        self.qml_context = self.rootContext()
        self.setTitle(_("Deepin Movie"))
        self.setIcon(icon_from_theme("Deepin", "deepin-movie"))

        self.setDeepinWindowShadowHint(self.windowGlowRadius)
Exemple #8
0
    def __init__(self, emacs_xid, init_width, init_height):
        QQuickView.__init__(self)

        surface_format = QSurfaceFormat()
        surface_format.setAlphaBufferSize(8)

        self.setColor(QColor(0, 0, 0, 0))
        self.setFlags(QtCore.Qt.FramelessWindowHint)
        self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
        self.setFormat(surface_format)

        self.qml_context = self.rootContext()

        self.emacs_xid = int(emacs_xid)
        self.emacs_width = int(init_width)
        self.emacs_height = int(init_height)

        self.show()
Exemple #9
0
 def __init__(self, emacs_xid, init_width, init_height):
     QQuickView.__init__(self)
     
     surface_format = QSurfaceFormat()
     surface_format.setAlphaBufferSize(8)
     
     self.setColor(QColor(0, 0, 0, 0))
     self.setFlags(QtCore.Qt.FramelessWindowHint)
     self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
     self.setFormat(surface_format)
     
     self.qml_context = self.rootContext()
     
     self.emacs_xid = int(emacs_xid)
     self.emacs_width = int(init_width)
     self.emacs_height = int(init_height)
     
     self.show()
    def __init__(self, parent=None):
        QQuickView.__init__(self, parent)
        if getattr(sys, "frozen", ""):
            qml_path = os.path.join(app.executable_dir(), "qml")
        else:
            qml_path = os.path.expanduser("~/git/fs-uae/fs-uae-launcher/qml")

        engine = self.engine()
        print(engine.importPathList())
        print(engine.pluginPathList())
        # engine.setPluginPathList([qml_path, "."])

        # engine.addPluginPath(qml_path)
        # engine.addImportPath(qml_path)

        # engine.setPluginPathList([qml_path, "."])
        # engine.setImportPathList([qml_path])

        # engine.addPluginPath(qml_path)
        # print("setImportPathList", [QUrl.fromLocalFile(qml_path)])
        self.setSource(QUrl.fromLocalFile(
            os.path.join(qml_path, "ScaledUserInterface.qml")))
Exemple #11
0
 def __init__(self, qml_file):
     QQuickView.__init__(self)
     
     surface_format = QSurfaceFormat()
     surface_format.setAlphaBufferSize(8)
     
     self.setColor(QColor(0, 0, 0, 0))
     self.setResizeMode(QtQuick.QQuickView.SizeRootObjectToView)
     self.setFormat(surface_format)
     
     self.setFlags(QtCore.Qt.Popup)
     
     self.qml_context = self.rootContext()
     
     self.init_translate_info()
     
     self.qml_context.setContextProperty("translateInfo", self.translate_info)
     self.qml_context.setContextProperty("windowView", self)
     self.qml_context.setContextProperty("settingConfig", setting_config)
     self.qml_context.setContextProperty("qApp", qApp)
     
     self.setSource(QtCore.QUrl.fromLocalFile(os.path.join(get_parent_dir(__file__), qml_file)))
Exemple #12
0
    def __init__(self, parent=None):

        QQuickView.__init__(self)
        self.setParent(parent)
        self.value = ""

        json_init = json.dumps(
            {
                'OnRightHand': 0,
                'ColorRightHand': 0,
                'OnLeftHand': 0,
                'ColorLeftHand': 0,
                'OnRightArm': 0,
                'ColorRightArm': 0,
                'OnLeftArm': 0,
                'ColorLeftArm': 0,
                'OnHead': 0,
                'ColorHead': 0
            },
            sort_keys=True,
            indent=4,
            separators=(',', ': '))
        self.AnalyzeJsonFile(json_init)
        self.UpdateFigure()
Exemple #13
0
 def __init__(self):
     QQuickView.__init__(self)
Exemple #14
0
    def __init__(self, parent=None):
        QQuickView.__init__(self, parent)

        self.setSource(QUrl('QML/MainWindow.qml'))
        self.mainContext = MC.Context(self)
        self.rootContext().setContextProperty("mainContext", self.mainContext)