ok-script 1.0.136__tar.gz → 1.0.138__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ok_script-1.0.136 → ok_script-1.0.138}/PKG-INFO +1 -1
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/StartController.py +53 -16
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/ModifyListDialog.py +170 -162
- {ok_script-1.0.136 → ok_script-1.0.138}/ok_script.egg-info/PKG-INFO +1 -1
- {ok_script-1.0.136 → ok_script-1.0.138}/MANIFEST.in +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/README.md +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/__init__.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/__main__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/_geometry.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/alas/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/alas/emulator_base.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/alas/emulator_windows.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/alas/platform_windows.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/alas/utils.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/deep.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/minitouch.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/nemu_ipc.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/nemu_utils.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/pool.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/timer.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/adb/util.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/windows/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/windows/d3d11.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/capture/windows/dump.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/cli.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/DeviceManager.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/adb.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/base.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/bitblt.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/bitblt_utils.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/browser.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/desktop_duplication.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/hwnd_window.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/image.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/nemu_ipc.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/types.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/update.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/capture_methods/windows_graphics.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/adb.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/base.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/browser.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/do_nothing.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/foreground_post_message.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/genshin.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/keys.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/post_message.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/pydirect.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/pynput.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/swipe.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/device/intercation.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/feature/Box.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/feature/Box.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/feature/Feature.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/feature/FeatureSet.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/feature/FeatureSet.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/feature/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/Communicate.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/MainWindow.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/MessageWindow.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/TabTitles.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/about/AboutTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/about/HttpTextEdit.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/about/ProjectCard.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/about/VersionCard.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/about/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/common/OKIcon.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/common/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/common/config.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/common/style_sheet.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/DebugTab.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/DebugTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/FrameWidget.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/LogWindow.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/OverlayWidget.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/RunCodeTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/Screenshot.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/Screenshot.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/debug/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/GettextTranslator.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/GettextTranslator.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/en_US.qm +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/en_US.ts +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/es_ES.qm +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/es_ES.ts +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/ja_JP.qm +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/ja_JP.ts +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/ko_KR.qm +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/ko_KR.ts +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/path.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/path.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/update.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/update.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/zh_CN.qm +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/zh_CN.ts +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/zh_TW.qm +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/i18n/zh_TW.ts +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/DownloadBar.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/DownloadBar.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/LauncherWindow.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/LauncherWindow.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/LinksBar.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/LinksBar.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/RunBar.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/RunBar.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/UpdateBar.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/UpdateBar.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/launcher/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/overlay/OverlayWindow.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/overlay/OverlayWindow.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/overlay/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/card.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/discord.svg +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/heart.svg +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/message_window.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/setting_interface.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/status_bar.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/stop.svg +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/dark/tab.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/card.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/discord.svg +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/heart.svg +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/message_window.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/setting_interface.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/status_bar.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/stop.svg +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qss/light/tab.qss +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/qt.qrc +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/resources.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/settings/GlobalConfigCard.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/settings/GlobalConfigCard.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/settings/SettingTab.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/settings/SettingTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/settings/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/SelectCaptureListView.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/SelectCaptureListView.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/SelectInteractionListView.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/StartCard.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/StartCard.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/StartTab.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/StartTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/start/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/ConfigCard.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/ConfigItemFactory.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/ConfigLabelAndWidget.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/EditTaskTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndButtons.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndDoubleSpinBox.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndDropDown.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndGlobal.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndLineEdit.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndList.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndMultiSelection.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndSpinBox.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndSwitchButton.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndTextEdit.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/LabelAndWidget.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/MarkUpWindow.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/ModifyListItem.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/OneTimeTaskTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/RecordScript.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/ScheduleTaskTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/ScriptPackager.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/StartButton.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TaskCard.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TaskManger.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TaskOpButton.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TaskTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TemplateFactory.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TemplateTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TooltipTableWidget.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/TriggerTaskTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/tasks/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/Alert.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/Alert.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/InitWorker.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/InitWorker.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/app.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/app.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/download.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/pip_util.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/util/pip_util.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/BaseLoading.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/BaseWindow.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/BaseWindow.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/Card.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/Card.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/CustomTab.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/CustomTab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/EmptyCard.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/EmptyCard.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/FlowLayout.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/FlowLayout.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/FramelessDialog.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/FramelessDialog.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/ImageWidget.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/ListTableWidgetItem.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/ListTableWidgetItem.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/NumericTableWidgetItem.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/NumericTableWidgetItem.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/OkCompactSpinBox.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/OkCompactSpinBox.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/SortingTableWidgetItem.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/SortingTableWidgetItem.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/StartLoadingDialog.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/StartLoadingDialog.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/StatusBar.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/StatusBar.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/Tab.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/Tab.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/TabWidget.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/TabWidget.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/UpdateConfigWidgetItem.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/UpdateConfigWidgetItem.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/WidgetWithVLabel.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/WidgetWithVLabel.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/YesNonWidgetItem.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/YesNonWidgetItem.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/gui/widget/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/ocr/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/ocr/download_paddle_model.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/ok.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Foundation/Collections.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/Windows/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/delegate.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/export.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/idldsl.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/inspectable.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/roapi.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/types.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/rotypes/winstring.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/task/DiagnosisTask.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/task/TaskExecutor.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/task/TaskExecutor.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/task/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/task/exceptions.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/task/task.cpp +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/task/task.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/test/OKTestRunner.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/test/RunTests.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/test/TaskTestCase.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/test/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/third_party/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/third_party/paperclip.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/update/GitUpdater.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/update/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/update/copy_ok_folder.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/update/gen_md5.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/update/init_launcher_env.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/update/inline_ok_requirements.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/Analytics.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/GlobalConfig.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/__init__.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/clazz.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/collection.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/color.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/config.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/file.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/gpu_driver_settings.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/handler.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/i18n.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/logger.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/logs/ok-script.log +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/partial_sync_repo.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/print_hwnd.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/process.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/window.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok/util/windows_schedule.py +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok_script.egg-info/SOURCES.txt +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok_script.egg-info/entry_points.txt +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok_script.egg-info/not-zip-safe +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok_script.egg-info/requires.txt +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/ok_script.egg-info/top_level.txt +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/setup.cfg +0 -0
- {ok_script-1.0.136 → ok_script-1.0.138}/setup.py +0 -0
|
@@ -13,9 +13,13 @@ logger = Logger.get_logger(__name__)
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class StartController(QObject):
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
STARTED_WINDOW_MIN_SIZE = (100, 100)
|
|
17
|
+
STARTED_WINDOW_STABLE_SECONDS = 10
|
|
18
|
+
STARTED_WINDOW_POLL_INTERVAL = 0.2
|
|
19
|
+
|
|
20
|
+
def __init__(self, app_config, exit_event):
|
|
21
|
+
super().__init__()
|
|
22
|
+
self.config = app_config
|
|
19
23
|
self.exit_event = exit_event
|
|
20
24
|
self.handler = Handler(exit_event, __name__)
|
|
21
25
|
self.start_timeout = app_config.get('start_timeout', 60)
|
|
@@ -103,9 +107,9 @@ class StartController(QObject):
|
|
|
103
107
|
communicate.starting_emulator.emit(True, self.tr(f'Start failed: {e}'), 0)
|
|
104
108
|
return False
|
|
105
109
|
|
|
106
|
-
def _wait_until_device_ready(self):
|
|
107
|
-
wait_until = time.time() + self.start_timeout
|
|
108
|
-
while not self.exit_event.is_set():
|
|
110
|
+
def _wait_until_device_ready(self):
|
|
111
|
+
wait_until = time.time() + self.start_timeout
|
|
112
|
+
while not self.exit_event.is_set():
|
|
109
113
|
og.device_manager.do_refresh(True)
|
|
110
114
|
error = self.check_device_error()
|
|
111
115
|
if error is None:
|
|
@@ -116,11 +120,42 @@ class StartController(QObject):
|
|
|
116
120
|
communicate.starting_emulator.emit(True, self.tr('Start game timeout!'), 0)
|
|
117
121
|
return False
|
|
118
122
|
communicate.starting_emulator.emit(False, None, int(remaining_time))
|
|
119
|
-
time.sleep(2)
|
|
120
|
-
return False
|
|
121
|
-
|
|
122
|
-
def
|
|
123
|
-
|
|
123
|
+
time.sleep(2)
|
|
124
|
+
return False
|
|
125
|
+
|
|
126
|
+
def _wait_until_started_window_stable(self):
|
|
127
|
+
wait_until = time.monotonic() + self.start_timeout
|
|
128
|
+
stable_size = None
|
|
129
|
+
stable_since = None
|
|
130
|
+
min_width, min_height = self.STARTED_WINDOW_MIN_SIZE
|
|
131
|
+
|
|
132
|
+
while not self.exit_event.is_set():
|
|
133
|
+
hwnd_window = getattr(og.device_manager, 'hwnd_window', None)
|
|
134
|
+
if hwnd_window is not None:
|
|
135
|
+
hwnd_window.do_update_window_size()
|
|
136
|
+
size = (hwnd_window.width, hwnd_window.height)
|
|
137
|
+
if hwnd_window.hwnd and size[0] >= min_width and size[1] >= min_height:
|
|
138
|
+
now = time.monotonic()
|
|
139
|
+
if size != stable_size:
|
|
140
|
+
logger.info(f'waiting for started window to stabilize, current size {size[0]}x{size[1]}')
|
|
141
|
+
stable_size = size
|
|
142
|
+
stable_since = now
|
|
143
|
+
elif now - stable_since >= self.STARTED_WINDOW_STABLE_SECONDS:
|
|
144
|
+
logger.info(f'started window size stable for {self.STARTED_WINDOW_STABLE_SECONDS}s: {size[0]}x{size[1]}')
|
|
145
|
+
return True
|
|
146
|
+
else:
|
|
147
|
+
stable_size = None
|
|
148
|
+
stable_since = None
|
|
149
|
+
|
|
150
|
+
remaining_time = wait_until - time.monotonic()
|
|
151
|
+
if remaining_time <= 0:
|
|
152
|
+
communicate.starting_emulator.emit(True, self.tr('Start game timeout!'), 0)
|
|
153
|
+
return False
|
|
154
|
+
time.sleep(self.STARTED_WINDOW_POLL_INTERVAL)
|
|
155
|
+
return False
|
|
156
|
+
|
|
157
|
+
def start_device(self):
|
|
158
|
+
device = og.device_manager.get_preferred_device()
|
|
124
159
|
logger.info(f'start_device: {device}')
|
|
125
160
|
|
|
126
161
|
if device and not device['connected']:
|
|
@@ -137,11 +172,13 @@ class StartController(QObject):
|
|
|
137
172
|
dx11_config = og.global_config.get_config('Launch with DX11')
|
|
138
173
|
if dx11_config and dx11_config.get('Launch with DX11'):
|
|
139
174
|
args = "-dx11 -d3d11 -force-d3d11"
|
|
140
|
-
if not execute(path, arguments=args):
|
|
141
|
-
communicate.starting_emulator.emit(True, self.tr("Start game failed, please start game first"), 0)
|
|
142
|
-
return False
|
|
143
|
-
if not self.
|
|
144
|
-
return False
|
|
175
|
+
if not execute(path, arguments=args):
|
|
176
|
+
communicate.starting_emulator.emit(True, self.tr("Start game failed, please start game first"), 0)
|
|
177
|
+
return False
|
|
178
|
+
if device['device'] == "windows" and not self._wait_until_started_window_stable():
|
|
179
|
+
return False
|
|
180
|
+
if not self._wait_until_device_ready():
|
|
181
|
+
return False
|
|
145
182
|
else:
|
|
146
183
|
communicate.starting_emulator.emit(True,
|
|
147
184
|
self.tr('Game path does not exist, Please open game manually!'), 0)
|
|
@@ -1,142 +1,150 @@
|
|
|
1
|
-
from PySide6.QtCore import Signal
|
|
2
|
-
from PySide6.QtWidgets import QHBoxLayout, QVBoxLayout, QWidget
|
|
3
|
-
from qfluentwidgets import (
|
|
4
|
-
BodyLabel, FlowLayout, MessageBoxBase, SubtitleLabel, ListWidget, PushButton, FluentIcon,
|
|
5
|
-
LineEdit
|
|
6
|
-
)
|
|
7
|
-
|
|
8
|
-
from ok import og
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class ModifyListDialog(MessageBoxBase):
|
|
12
|
-
list_modified = Signal(list)
|
|
13
|
-
|
|
14
|
-
def __init__(self, items, parent, options_available=None, allow_duplication=False):
|
|
15
|
-
super().__init__(parent)
|
|
16
|
-
self.original_items = list(items)
|
|
17
|
-
self.options_available = list(options_available) if options_available is not None else None
|
|
18
|
-
self.allow_duplication = allow_duplication
|
|
19
|
-
self.list_widget = ListWidget()
|
|
20
|
-
self.option_buttons = {}
|
|
21
|
-
self.source_by_display = {}
|
|
22
|
-
|
|
23
|
-
if self.options_available is None:
|
|
24
|
-
self.list_widget.addItems(self.original_items)
|
|
25
|
-
else:
|
|
26
|
-
self.source_by_display = {
|
|
27
|
-
og.app.tr(option): option for option in self.options_available
|
|
28
|
-
}
|
|
29
|
-
self.list_widget.addItems([
|
|
30
|
-
og.app.tr(item) for item in self.original_items if item in self.options_available
|
|
31
|
-
])
|
|
32
|
-
|
|
33
|
-
self.move_up_button = PushButton(FluentIcon.UP, self.tr("Move Up"))
|
|
34
|
-
self.move_up_button.clicked.connect(self.move_up)
|
|
1
|
+
from PySide6.QtCore import Signal, Qt
|
|
2
|
+
from PySide6.QtWidgets import QHBoxLayout, QScrollArea, QVBoxLayout, QWidget
|
|
3
|
+
from qfluentwidgets import (
|
|
4
|
+
BodyLabel, FlowLayout, MessageBoxBase, SubtitleLabel, ListWidget, PushButton, FluentIcon,
|
|
5
|
+
LineEdit
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
from ok import og
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ModifyListDialog(MessageBoxBase):
|
|
12
|
+
list_modified = Signal(list)
|
|
13
|
+
|
|
14
|
+
def __init__(self, items, parent, options_available=None, allow_duplication=False):
|
|
15
|
+
super().__init__(parent)
|
|
16
|
+
self.original_items = list(items)
|
|
17
|
+
self.options_available = list(options_available) if options_available is not None else None
|
|
18
|
+
self.allow_duplication = allow_duplication
|
|
19
|
+
self.list_widget = ListWidget()
|
|
20
|
+
self.option_buttons = {}
|
|
21
|
+
self.source_by_display = {}
|
|
22
|
+
|
|
23
|
+
if self.options_available is None:
|
|
24
|
+
self.list_widget.addItems(self.original_items)
|
|
25
|
+
else:
|
|
26
|
+
self.source_by_display = {
|
|
27
|
+
og.app.tr(option): option for option in self.options_available
|
|
28
|
+
}
|
|
29
|
+
self.list_widget.addItems([
|
|
30
|
+
og.app.tr(item) for item in self.original_items if item in self.options_available
|
|
31
|
+
])
|
|
32
|
+
|
|
33
|
+
self.move_up_button = PushButton(FluentIcon.UP, self.tr("Move Up"))
|
|
34
|
+
self.move_up_button.clicked.connect(self.move_up)
|
|
35
35
|
|
|
36
36
|
self.move_down_button = PushButton(FluentIcon.DOWN, self.tr("Move Down"))
|
|
37
37
|
self.move_down_button.clicked.connect(self.move_down)
|
|
38
38
|
|
|
39
|
-
self.add_button = None
|
|
40
|
-
if self.options_available is None:
|
|
41
|
-
self.add_button = PushButton(FluentIcon.ADD, self.tr("Add"))
|
|
42
|
-
self.add_button.clicked.connect(self.add_item)
|
|
43
|
-
|
|
44
|
-
self.remove_button = PushButton(FluentIcon.REMOVE, self.tr("Remove"))
|
|
45
|
-
self.remove_button.clicked.connect(self.remove_item)
|
|
46
|
-
self.list_widget.itemSelectionChanged.connect(self.update_list_actions)
|
|
47
|
-
self._match_list_action_widths()
|
|
48
|
-
|
|
49
|
-
self.yesButton.clicked.connect(self.confirm)
|
|
39
|
+
self.add_button = None
|
|
40
|
+
if self.options_available is None:
|
|
41
|
+
self.add_button = PushButton(FluentIcon.ADD, self.tr("Add"))
|
|
42
|
+
self.add_button.clicked.connect(self.add_item)
|
|
43
|
+
|
|
44
|
+
self.remove_button = PushButton(FluentIcon.REMOVE, self.tr("Remove"))
|
|
45
|
+
self.remove_button.clicked.connect(self.remove_item)
|
|
46
|
+
self.list_widget.itemSelectionChanged.connect(self.update_list_actions)
|
|
47
|
+
self._match_list_action_widths()
|
|
48
|
+
|
|
49
|
+
self.yesButton.clicked.connect(self.confirm)
|
|
50
50
|
|
|
51
51
|
self.cancelButton.clicked.connect(self.cancel)
|
|
52
52
|
|
|
53
|
-
list_layout = self._create_selected_list_layout()
|
|
54
|
-
|
|
55
|
-
if self.options_available is None:
|
|
56
|
-
self.viewLayout.addLayout(list_layout)
|
|
57
|
-
else:
|
|
58
|
-
available_layout = QVBoxLayout()
|
|
59
|
-
available_layout.addWidget(SubtitleLabel(self.tr("Available Options"), self))
|
|
60
|
-
available_layout.addWidget(BodyLabel(self.tr("Click an option to add it."), self))
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
self.
|
|
80
|
-
self.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
def
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
53
|
+
list_layout = self._create_selected_list_layout()
|
|
54
|
+
|
|
55
|
+
if self.options_available is None:
|
|
56
|
+
self.viewLayout.addLayout(list_layout)
|
|
57
|
+
else:
|
|
58
|
+
available_layout = QVBoxLayout()
|
|
59
|
+
available_layout.addWidget(SubtitleLabel(self.tr("Available Options"), self))
|
|
60
|
+
available_layout.addWidget(BodyLabel(self.tr("Click an option to add it."), self))
|
|
61
|
+
available_scroll_area = QScrollArea(self)
|
|
62
|
+
available_scroll_area.setWidgetResizable(True)
|
|
63
|
+
available_scroll_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
|
64
|
+
available_scroll_area.setFrameShape(QScrollArea.NoFrame)
|
|
65
|
+
available_scroll_area.setStyleSheet("QScrollArea { background-color: transparent; border: none; }")
|
|
66
|
+
available_scroll_area.viewport().setStyleSheet("background-color: transparent;")
|
|
67
|
+
available_scroll_area.setWidget(self._create_available_options_widget())
|
|
68
|
+
available_layout.addWidget(available_scroll_area, stretch=1)
|
|
69
|
+
|
|
70
|
+
selected_layout = QVBoxLayout()
|
|
71
|
+
selected_layout.addWidget(SubtitleLabel(self.tr("Selected Options"), self))
|
|
72
|
+
selected_layout.addLayout(list_layout)
|
|
73
|
+
|
|
74
|
+
options_layout = QHBoxLayout()
|
|
75
|
+
options_layout.addLayout(available_layout, stretch=2)
|
|
76
|
+
options_layout.addLayout(selected_layout, stretch=1)
|
|
77
|
+
self.viewLayout.addLayout(options_layout)
|
|
78
|
+
|
|
79
|
+
self.yesButton.setText(self.tr("Confirm"))
|
|
80
|
+
self.cancelButton.setText(self.tr("Cancel"))
|
|
81
|
+
self._wrap_dialog_buttons()
|
|
82
|
+
if self.options_available is None:
|
|
83
|
+
self.widget.setMinimumHeight(520)
|
|
84
|
+
else:
|
|
85
|
+
self.widget.setMinimumSize(840, 600)
|
|
86
|
+
self.update_list_actions()
|
|
87
|
+
self.update_option_buttons()
|
|
88
|
+
|
|
89
|
+
def _create_selected_list_layout(self):
|
|
90
|
+
actions_layout = QVBoxLayout()
|
|
91
|
+
actions_layout.addWidget(self.move_up_button)
|
|
92
|
+
actions_layout.addWidget(self.move_down_button)
|
|
93
|
+
if self.options_available is None:
|
|
94
|
+
actions_layout.addWidget(self.add_button)
|
|
95
|
+
actions_layout.addWidget(self.remove_button)
|
|
96
|
+
actions_layout.addStretch(1)
|
|
97
|
+
|
|
98
|
+
list_layout = QHBoxLayout()
|
|
99
|
+
list_layout.addWidget(self.list_widget)
|
|
100
|
+
list_layout.addLayout(actions_layout)
|
|
101
|
+
return list_layout
|
|
102
|
+
|
|
103
|
+
def _create_available_options_widget(self):
|
|
104
|
+
widget = QWidget()
|
|
105
|
+
widget.setStyleSheet("background-color: transparent;")
|
|
106
|
+
layout = FlowLayout(widget, False)
|
|
107
|
+
layout.setContentsMargins(0, 0, 0, 0)
|
|
108
|
+
layout.setHorizontalSpacing(10)
|
|
109
|
+
layout.setVerticalSpacing(10)
|
|
110
|
+
for option in self.options_available:
|
|
111
|
+
button = PushButton(FluentIcon.ADD, og.app.tr(option))
|
|
112
|
+
button.clicked.connect(lambda checked=False, value=option: self.add_available_item(value))
|
|
113
|
+
layout.addWidget(button)
|
|
114
|
+
self.option_buttons[option] = button
|
|
115
|
+
return widget
|
|
116
|
+
|
|
117
|
+
def _match_list_action_widths(self):
|
|
118
|
+
buttons = [self.move_up_button, self.move_down_button, self.remove_button]
|
|
119
|
+
if self.options_available is None:
|
|
120
|
+
buttons.append(self.add_button)
|
|
121
|
+
width = max(button.sizeHint().width() for button in buttons)
|
|
122
|
+
for button in buttons:
|
|
123
|
+
button.setFixedWidth(width)
|
|
124
|
+
|
|
125
|
+
def update_list_actions(self):
|
|
126
|
+
row = self.list_widget.currentRow()
|
|
127
|
+
has_selection = row >= 0
|
|
128
|
+
self.move_up_button.setEnabled(has_selection and row > 0)
|
|
129
|
+
self.move_down_button.setEnabled(has_selection and row < self.list_widget.count() - 1)
|
|
130
|
+
self.remove_button.setEnabled(has_selection)
|
|
131
|
+
self.update_option_buttons()
|
|
132
|
+
|
|
133
|
+
def update_option_buttons(self):
|
|
134
|
+
if self.options_available is None:
|
|
135
|
+
return
|
|
136
|
+
|
|
137
|
+
selected_options = {
|
|
138
|
+
self.list_widget.item(i).text() for i in range(self.list_widget.count())
|
|
139
|
+
}
|
|
140
|
+
for option, button in self.option_buttons.items():
|
|
141
|
+
button.setEnabled(self.allow_duplication or og.app.tr(option) not in selected_options)
|
|
142
|
+
|
|
143
|
+
def _wrap_dialog_buttons(self):
|
|
144
|
+
self.yesButton.setFixedWidth(self.yesButton.sizeHint().width() * 2)
|
|
145
|
+
self.cancelButton.setFixedWidth(self.cancelButton.sizeHint().width() * 2)
|
|
146
|
+
|
|
147
|
+
def move_up(self):
|
|
140
148
|
current_row = self.list_widget.currentRow()
|
|
141
149
|
if current_row >= 1:
|
|
142
150
|
item = self.list_widget.takeItem(current_row)
|
|
@@ -150,32 +158,32 @@ class ModifyListDialog(MessageBoxBase):
|
|
|
150
158
|
self.list_widget.insertItem(current_row + 1, item)
|
|
151
159
|
self.list_widget.setCurrentRow(current_row + 1)
|
|
152
160
|
|
|
153
|
-
def add_item(self):
|
|
154
|
-
w = AddTextMessageBox(self.window())
|
|
155
|
-
if w.exec():
|
|
156
|
-
self.list_widget.addItem(w.add_text_edit.text())
|
|
157
|
-
self.list_widget.setCurrentRow(self.list_widget.count() - 1)
|
|
158
|
-
|
|
159
|
-
def add_available_item(self, option):
|
|
160
|
-
text = og.app.tr(option)
|
|
161
|
-
if self.allow_duplication or all(
|
|
162
|
-
self.list_widget.item(i).text() != text for i in range(self.list_widget.count())
|
|
163
|
-
):
|
|
164
|
-
self.list_widget.addItem(text)
|
|
165
|
-
self.list_widget.setCurrentRow(self.list_widget.count() - 1)
|
|
166
|
-
self.update_option_buttons()
|
|
167
|
-
|
|
168
|
-
def remove_item(self):
|
|
169
|
-
current_row = self.list_widget.currentRow()
|
|
170
|
-
if current_row >= 0:
|
|
171
|
-
self.list_widget.takeItem(current_row)
|
|
172
|
-
self.update_list_actions()
|
|
173
|
-
|
|
174
|
-
def confirm(self):
|
|
175
|
-
items_text = [self.list_widget.item(i).text() for i in range(self.list_widget.count())]
|
|
176
|
-
if self.options_available is not None:
|
|
177
|
-
items_text = [self.source_by_display[text] for text in items_text]
|
|
178
|
-
self.list_modified.emit(items_text)
|
|
161
|
+
def add_item(self):
|
|
162
|
+
w = AddTextMessageBox(self.window())
|
|
163
|
+
if w.exec():
|
|
164
|
+
self.list_widget.addItem(w.add_text_edit.text())
|
|
165
|
+
self.list_widget.setCurrentRow(self.list_widget.count() - 1)
|
|
166
|
+
|
|
167
|
+
def add_available_item(self, option):
|
|
168
|
+
text = og.app.tr(option)
|
|
169
|
+
if self.allow_duplication or all(
|
|
170
|
+
self.list_widget.item(i).text() != text for i in range(self.list_widget.count())
|
|
171
|
+
):
|
|
172
|
+
self.list_widget.addItem(text)
|
|
173
|
+
self.list_widget.setCurrentRow(self.list_widget.count() - 1)
|
|
174
|
+
self.update_option_buttons()
|
|
175
|
+
|
|
176
|
+
def remove_item(self):
|
|
177
|
+
current_row = self.list_widget.currentRow()
|
|
178
|
+
if current_row >= 0:
|
|
179
|
+
self.list_widget.takeItem(current_row)
|
|
180
|
+
self.update_list_actions()
|
|
181
|
+
|
|
182
|
+
def confirm(self):
|
|
183
|
+
items_text = [self.list_widget.item(i).text() for i in range(self.list_widget.count())]
|
|
184
|
+
if self.options_available is not None:
|
|
185
|
+
items_text = [self.source_by_display[text] for text in items_text]
|
|
186
|
+
self.list_modified.emit(items_text)
|
|
179
187
|
self.close()
|
|
180
188
|
|
|
181
189
|
def cancel(self):
|
|
@@ -198,10 +206,10 @@ class AddTextMessageBox(MessageBoxBase):
|
|
|
198
206
|
self.viewLayout.addWidget(self.add_text_edit)
|
|
199
207
|
|
|
200
208
|
# change the text of button
|
|
201
|
-
self.yesButton.setText(self.tr('Confirm'))
|
|
202
|
-
self.cancelButton.setText(self.tr('Cancel'))
|
|
203
|
-
self.yesButton.setFixedWidth(self.yesButton.sizeHint().width() * 2)
|
|
204
|
-
self.cancelButton.setFixedWidth(self.cancelButton.sizeHint().width() * 2)
|
|
209
|
+
self.yesButton.setText(self.tr('Confirm'))
|
|
210
|
+
self.cancelButton.setText(self.tr('Cancel'))
|
|
211
|
+
self.yesButton.setFixedWidth(self.yesButton.sizeHint().width() * 2)
|
|
212
|
+
self.cancelButton.setFixedWidth(self.cancelButton.sizeHint().width() * 2)
|
|
205
213
|
|
|
206
214
|
self.widget.setMinimumWidth(360)
|
|
207
215
|
self.yesButton.setDisabled(True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ok_script-1.0.136 → ok_script-1.0.138}/ok/device/interaction_methods/foreground_post_message.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|