Exemplo n.º 1
0
def test_view(qtbot):
    from PyQt5.QtWidgets import QWidget
    from feeluown.ui import UiMainWidget
    w = QWidget()
    ui = UiMainWidget()
    ui.setup_ui(w)
    w.show()
    qtbot.addWidget(w)
Exemplo n.º 2
0
def test_view(qtbot):
    from PyQt5.QtWidgets import QWidget
    from feeluown.ui import UiMainWidget

    w = QWidget()
    ui = UiMainWidget()
    ui.setup_ui(w)
    w.show()
    qtbot.addWidget(w)
Exemplo n.º 3
0
    def __init__(self, parent=None):
        super().__init__(parent)
        ControllerApi.player = Player(self)

        ui = UiMainWidget()
        ViewOp.ui = ui
        ViewOp.controller = ControllerApi
        ui.setup_ui(self)

        engine = create_engine(
            'sqlite:////%s' % DATABASE_SQLITE,
            connect_args={'check_same_thread': False},
            echo=False)
        Base.metadata.create_all(engine)
        Session = sessionmaker()
        Session.configure(bind=engine)
        session = Session()
        LOG.info('db connected: %s' % DATABASE_SQLITE)

        ControllerApi.session = session
        ControllerApi.view = ViewOp
        ControllerApi.desktop_mini = DesktopMiniLayer()
        ControllerApi.lyric_widget = LyricWidget()
        ControllerApi.notify_widget = NotifyWidget()

        ControllerApi.network_manager = NetworkManager(self)
        ControllerApi.current_playlist_widget = CurrentMusicTable()

        self._search_shortcut = QShortcut(QKeySequence('Ctrl+F'), self)
        self._minimize_shortcut = QShortcut(QKeySequence('Ctrl+M'), self)
        self._pre_focus = QShortcut(QKeySequence('Ctrl+['), self)
        self._next_focus = QShortcut(QKeySequence('Ctrl+]'), self)

        self.setAttribute(Qt.WA_MacShowFocusRect, False)
        self.setWindowIcon(QIcon(WINDOW_ICON))
        self.setWindowTitle('FeelUOwn')

        self.mode_manager = ModesManger()
        self._init_signal_binding()
        self.load_config()

        app_event_loop = asyncio.get_event_loop()
        app_event_loop.call_later(1, self._init_plugins)
        app_event_loop.call_later(6, TipsManager.show_start_tip)
        asyncio.Task(VersionManager.check_release())
Exemplo n.º 4
0
    def __init__(self, parent=None):
        super().__init__(parent)
        ControllerApi.player = Player(self)

        ui = UiMainWidget()
        ViewOp.ui = ui
        ViewOp.controller = ControllerApi
        ui.setup_ui(self)

        engine = create_engine(
            'sqlite:////%s' % DATABASE_SQLITE,
            connect_args={'check_same_thread': False},
            echo=False)
        Base.metadata.create_all(engine)
        Session = sessionmaker()
        Session.configure(bind=engine)
        session = Session()
        LOG.info('db connected: %s' % DATABASE_SQLITE)

        ControllerApi.session = session
        ControllerApi.view = ViewOp
        ControllerApi.desktop_mini = DesktopMiniLayer()
        ControllerApi.lyric_widget = LyricWidget()
        ControllerApi.notify_widget = NotifyWidget()

        ControllerApi.network_manager = NetworkManager(self)
        ControllerApi.current_playlist_widget = CurrentMusicTable()

        self._search_shortcut = QShortcut(QKeySequence('Ctrl+F'), self)
        self._minimize_shortcut = QShortcut(QKeySequence('Ctrl+M'), self)
        self._pre_focus = QShortcut(QKeySequence('Ctrl+['), self)
        self._next_focus = QShortcut(QKeySequence('Ctrl+]'), self)

        self.setAttribute(Qt.WA_MacShowFocusRect, False)
        self.setWindowIcon(QIcon(WINDOW_ICON))
        self.setWindowTitle('FeelUOwn')

        self.mode_manager = ModesManger()
        self._init_signal_binding()
        self.load_config()

        app_event_loop = asyncio.get_event_loop()
        app_event_loop.call_later(1, self._init_plugins)
        app_event_loop.call_later(6, TipsManager.show_start_tip)
        asyncio.Task(VersionManager.check_release())