From 78f18854ead804b677ef38fc0e322051ee1ca1d1 Mon Sep 17 00:00:00 2001 From: chenyuanbo Date: Sat, 10 Oct 2026 15:42:15 +0800 Subject: [PATCH] refactor: move dock plugins to dde-control-center MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove bluetooth/sound/brightness/eye-comfort-mode/wirelesscasting from build and packaging; their .so are still loaded from system-trays. Load the merged dcc-dock-plugins translation domain to keep texts translated. 移除蓝牙/声音/亮度/护眼/无线投屏插件的构建与打包,产物改由 dde-control-center 提供;loader 新增加载 dcc-dock-plugins 合并翻译域, 保证插件文案翻译不丢失。 Log: 移除已迁移插件并加载 dcc-dock-plugins 翻译 PMS: TASK-396375 Influence: 本仓库不再提供上述插件,改用 dde-control-center 提供的同名 .so;需与 dde-control-center 配套升级,否则托盘插件缺失 --- debian/control | 6 - debian/dde-tray-loader.install | 7 - debian/dde-wirelesscasting-plugin.install | 3 - plugins/CMakeLists.txt | 1 - plugins/dde-dock/CMakeLists.txt | 4 - plugins/dde-dock/bluetooth/CMakeLists.txt | 66 -- plugins/dde-dock/bluetooth/bluetooth.json | 4 - plugins/dde-dock/bluetooth/bluetoothitem.cpp | 214 ------- plugins/dde-dock/bluetooth/bluetoothitem.h | 60 -- .../dde-dock/bluetooth/bluetoothplugin.cpp | 209 ------- plugins/dde-dock/bluetooth/bluetoothplugin.h | 54 -- .../bluetooth/componments/adapter.cpp | 170 ----- .../dde-dock/bluetooth/componments/adapter.h | 59 -- .../bluetooth/componments/adaptersmanager.cpp | 269 -------- .../bluetooth/componments/adaptersmanager.h | 50 -- .../componments/bluetoothadapteritem.cpp | 569 ----------------- .../componments/bluetoothadapteritem.h | 208 ------- .../bluetooth/componments/bluetoothapplet.cpp | 377 ------------ .../bluetooth/componments/bluetoothapplet.h | 117 ---- .../componments/bluetoothconstants.h | 14 - .../dde-dock/bluetooth/componments/device.cpp | 127 ---- .../dde-dock/bluetooth/componments/device.h | 90 --- .../bluetooth/componments/refreshbutton.cpp | 78 --- .../bluetooth/componments/refreshbutton.h | 38 -- .../dde-dock/bluetooth/quickpanelwidget.cpp | 174 ------ plugins/dde-dock/bluetooth/quickpanelwidget.h | 51 -- .../bluetooth/resources/bluetooth.qrc | 105 ---- .../dark/actions/bluetooth_disable_96px.svg | 64 -- .../resources/dark/buletooth_camera_dark.svg | 7 - .../resources/dark/buletooth_clang_dark.svg | 7 - .../dark/buletooth_keyboard_dark.svg | 7 - .../resources/dark/buletooth_lan_dark.svg | 7 - .../resources/dark/buletooth_laptop_dark.svg | 7 - .../dark/buletooth_microphone_dark.svg | 7 - .../resources/dark/buletooth_mouse_dark.svg | 7 - .../resources/dark/buletooth_other_dark.svg | 7 - .../resources/dark/buletooth_pad_dark.svg | 7 - .../resources/dark/buletooth_pc_dark.svg | 9 - .../resources/dark/buletooth_pen_dark.svg | 7 - .../dark/buletooth_pheadset_dark.svg | 7 - .../resources/dark/buletooth_phone_dark.svg | 7 - .../resources/dark/buletooth_print_dark.svg | 7 - .../resources/dark/buletooth_scaner_dark.svg | 7 - .../dark/buletooth_touchpad_dark.svg | 7 - .../resources/dark/buletooth_tv_dark.svg | 8 - .../resources/dark/buletooth_vidicon_dark.svg | 7 - .../dark/icons/battery-000-symbolic_16px.svg | 7 - .../dark/icons/battery-010-symbolic_16px.svg | 8 - .../dark/icons/battery-020-symbolic_16px.svg | 8 - .../dark/icons/battery-030-symbolic_16px.svg | 8 - .../dark/icons/battery-040-symbolic_16px.svg | 8 - .../dark/icons/battery-050-symbolic_16px.svg | 8 - .../dark/icons/battery-060-symbolic_16px.svg | 8 - .../dark/icons/battery-070-symbolic_16px.svg | 8 - .../dark/icons/battery-080-symbolic_16px.svg | 8 - .../dark/icons/battery-090-symbolic_16px.svg | 8 - .../dark/icons/battery-100-symbolic_16px.svg | 8 - .../bluetooth/resources/dcc-bluetooth.dci | Bin 2978 -> 0 bytes .../bluetooth/resources/disconnect.svg | 3 - .../bluetooth/resources/disconnect_dark.svg | 3 - .../light/actions/bluetooth_disable_96px.svg | 64 -- .../light/buletooth_camera_light.svg | 7 - .../resources/light/buletooth_clang_light.svg | 7 - .../light/buletooth_keyboard_light.svg | 7 - .../resources/light/buletooth_lan_light.svg | 7 - .../light/buletooth_laptop_light.svg | 7 - .../light/buletooth_microphone_light.svg | 7 - .../resources/light/buletooth_mouse_light.svg | 7 - .../resources/light/buletooth_other_light.svg | 7 - .../resources/light/buletooth_pad_light.svg | 7 - .../resources/light/buletooth_pc_light.svg | 9 - .../resources/light/buletooth_pen_light.svg | 7 - .../light/buletooth_pheadset_light.svg | 7 - .../resources/light/buletooth_phone_light.svg | 7 - .../resources/light/buletooth_print_light.svg | 7 - .../light/buletooth_scaner_light.svg | 7 - .../light/buletooth_touchpad_light.svg | 7 - .../resources/light/buletooth_tv_light.svg | 8 - .../light/buletooth_vidicon_light.svg | 7 - .../light/icons/battery-000-symbolic_16px.svg | 7 - .../light/icons/battery-010-symbolic_16px.svg | 8 - .../light/icons/battery-020-symbolic_16px.svg | 8 - .../light/icons/battery-030-symbolic_16px.svg | 8 - .../light/icons/battery-040-symbolic_16px.svg | 8 - .../light/icons/battery-050-symbolic_16px.svg | 8 - .../light/icons/battery-060-symbolic_16px.svg | 8 - .../light/icons/battery-070-symbolic_16px.svg | 8 - .../light/icons/battery-080-symbolic_16px.svg | 8 - .../light/icons/battery-090-symbolic_16px.svg | 8 - .../light/icons/battery-100-symbolic_16px.svg | 8 - .../bluetooth/resources/list_select.png | Bin 508 -> 0 bytes .../bluetooth/resources/list_select@2x.png | Bin 1176 -> 0 bytes .../resources/notify_close_press.png | Bin 398 -> 0 bytes .../resources/notify_close_press@2x.png | Bin 749 -> 0 bytes .../dde-dock/bluetooth/resources/refresh.svg | 3 - .../bluetooth/resources/refresh_dark.svg | 3 - .../dde-dock/bluetooth/resources/select.svg | 3 - .../bluetooth/resources/select_dark.svg | 3 - .../resources/texts/arrow-up_12px.svg | 9 - .../texts/bluetooth-active-symbolic_16px.svg | 7 - .../texts/bluetooth-active-symbolic_24px.svg | 7 - .../texts/bluetooth-disable-symbolic_16px.svg | 7 - .../texts/bluetooth-disable-symbolic_24px.svg | 7 - .../bluetooth-disconnect-symbolic_16px.svg | 8 - .../bluetooth-disconnect-symbolic_24px.svg | 8 - .../resources/texts/bluetooth-open_16px.svg | 9 - .../resources/texts/bluetooth_camera_16px.svg | 9 - .../resources/texts/bluetooth_clang_16px.svg | 9 - .../texts/bluetooth_keyboard_16px.svg | 9 - .../resources/texts/bluetooth_lan_16px.svg | 9 - .../resources/texts/bluetooth_laptop_16px.svg | 9 - .../texts/bluetooth_microphone_16px.svg | 9 - .../resources/texts/bluetooth_mouse_16px.svg | 9 - .../resources/texts/bluetooth_other_16px.svg | 9 - .../resources/texts/bluetooth_pad_16px.svg | 9 - .../resources/texts/bluetooth_pc_16px.svg | 9 - .../resources/texts/bluetooth_pen_16px.svg | 9 - .../texts/bluetooth_pheadset_16px.svg | 9 - .../resources/texts/bluetooth_phone_16px.svg | 9 - .../resources/texts/bluetooth_print_16px.svg | 9 - .../resources/texts/bluetooth_scaner_16px.svg | 9 - .../texts/bluetooth_touchpad_16px.svg | 9 - .../resources/texts/bluetooth_tv_16px.svg | 9 - .../resources/texts/bluetooth_video_16px.svg | 11 - .../texts/bluetooth_vidicon_16px.svg | 7 - .../texts/plugin_item_disconnect_16px.svg | 7 - .../texts/plugin_item_select_16px.svg | 11 - .../resources/texts/refresh_16px.svg | 19 - plugins/dde-dock/brightness/CMakeLists.txt | 58 -- .../brightness/brightness-constants.h | 22 - plugins/dde-dock/brightness/brightness.json | 3 - .../dde-dock/brightness/brightnessapplet.cpp | 200 ------ .../dde-dock/brightness/brightnessapplet.h | 47 -- .../brightness/brightnesscontroller.cpp | 233 ------- .../brightness/brightnesscontroller.h | 64 -- .../dde-dock/brightness/brightnessitem.cpp | 119 ---- plugins/dde-dock/brightness/brightnessitem.h | 42 -- .../dde-dock/brightness/brightnessmodel.cpp | 149 ----- plugins/dde-dock/brightness/brightnessmodel.h | 67 -- .../dde-dock/brightness/brightnessplugin.cpp | 162 ----- .../dde-dock/brightness/brightnessplugin.h | 41 -- .../brightness/brightnessquickpanel.cpp | 112 ---- .../brightness/brightnessquickpanel.h | 43 -- plugins/dde-dock/brightness/monitor.cpp | 62 -- plugins/dde-dock/brightness/monitor.h | 71 --- .../brightness/resources/brightness.qrc | 12 - .../resources/dcc-dde-brightness.dci | Bin 1529 -> 0 bytes .../resources/texts/Brightness+_24px.svg | 7 - .../resources/texts/Brightness-_24px.svg | 7 - .../texts/display-brightness-control_16px.svg | 7 - .../resources/texts/external-display_16px.svg | 9 - .../resources/texts/external-display_24px.svg | 9 - .../resources/texts/laptop_16px.svg | 9 - .../resources/texts/laptop_24px.svg | 9 - .../resources/texts/open-arrow_16px.svg | 9 - plugins/dde-dock/common/chameleonwidget.cpp | 148 ----- plugins/dde-dock/common/chameleonwidget.h | 41 -- plugins/dde-dock/common/dconfig_helper.cpp | 231 ------- plugins/dde-dock/common/dconfig_helper.h | 81 --- plugins/dde-dock/common/dockslider.cpp | 77 --- plugins/dde-dock/common/dockslider.h | 37 -- plugins/dde-dock/common/mousestatewidget.cpp | 51 -- plugins/dde-dock/common/mousestatewidget.h | 40 -- plugins/dde-dock/common/settingmanager.cpp | 149 ----- plugins/dde-dock/common/settingmanager.h | 57 -- plugins/dde-dock/common/settingsitem.cpp | 55 -- plugins/dde-dock/common/settingsitem.h | 29 - plugins/dde-dock/common/slidercontainer.cpp | 434 ------------- plugins/dde-dock/common/slidercontainer.h | 146 ----- plugins/dde-dock/common/touchscrollfilter.cpp | 94 --- plugins/dde-dock/common/touchscrollfilter.h | 27 - .../org.deepin.dde.dock.plugin.bluetooth.json | 17 - .../org.deepin.dde.dock.plugin.sound.json | 28 - plugins/dde-dock/dbus/types/audioport.cpp | 13 - plugins/dde-dock/dbus/types/audioport.h | 55 -- plugins/dde-dock/dbus/types/audioportlist.cpp | 11 - plugins/dde-dock/dbus/types/audioportlist.h | 19 - plugins/dde-dock/dbus/types/brightnessmap.cpp | 11 - plugins/dde-dock/dbus/types/brightnessmap.h | 15 - plugins/dde-dock/dbus/types/reflectlist.cpp | 11 - plugins/dde-dock/dbus/types/reflectlist.h | 15 - plugins/dde-dock/dbus/types/resolution.cpp | 55 -- plugins/dde-dock/dbus/types/resolution.h | 44 -- .../dde-dock/dbus/types/resolutionlist.cpp | 13 - plugins/dde-dock/dbus/types/resolutionlist.h | 16 - plugins/dde-dock/dbus/types/rotationlist.cpp | 11 - plugins/dde-dock/dbus/types/rotationlist.h | 15 - plugins/dde-dock/dbus/types/screenrect.cpp | 53 -- plugins/dde-dock/dbus/types/screenrect.h | 36 -- .../dbus/types/touchscreeninfolist.cpp | 47 -- .../dde-dock/dbus/types/touchscreeninfolist.h | 45 -- .../dbus/types/touchscreeninfolist_v2.cpp | 47 -- .../dbus/types/touchscreeninfolist_v2.h | 45 -- .../dde-dock/dbus/types/touchscreenmap.cpp | 11 - plugins/dde-dock/dbus/types/touchscreenmap.h | 15 - .../dbus/xml/org.deepin.dde.Appearance1.xml | 56 -- .../dbus/xml/org.deepin.dde.Audio1.Sink.xml | 38 -- .../dbus/xml/org.deepin.dde.Audio1.xml | 46 -- .../xml/org.deepin.dde.Display1.Monitor.xml | 55 -- .../dbus/xml/org.deepin.dde.Display1.xml | 83 --- .../dde-dock/eye-comfort-mode/CMakeLists.txt | 47 -- .../eye-comfort-mode/eye-comfort-mode.json | 4 - .../eye-comfort-mode/eyecomfortmodeapplet.cpp | 178 ------ .../eye-comfort-mode/eyecomfortmodeapplet.h | 62 -- .../eyecomfortmodecontroller.cpp | 75 --- .../eyecomfortmodecontroller.h | 56 -- .../eye-comfort-mode/eyecomfortmodeitem.cpp | 272 -------- .../eye-comfort-mode/eyecomfortmodeitem.h | 68 -- .../eye-comfort-mode/eyecomfortmodeplugin.cpp | 153 ----- .../eye-comfort-mode/eyecomfortmodeplugin.h | 48 -- .../eye-comfort-mode/quickpanelwidget.cpp | 176 ------ .../eye-comfort-mode/quickpanelwidget.h | 85 --- .../resources/dcc-eye-comfort-mode.dci | Bin 2804 -> 0 bytes .../resources/eye-comfort-mode.qrc | 9 - .../resources/texts/eyeshield-on_24px.svg | 7 - .../resources/texts/open-arrow_16px.svg | 9 - .../resources/texts/theme-auto_16px.svg | 10 - .../resources/texts/theme-dark_16px.svg | 7 - .../resources/texts/theme-light_16px.svg | 7 - plugins/dde-dock/sound/CMakeLists.txt | 67 -- .../dde-dock/sound/resources/slider_bg.png | Bin 117 -> 0 bytes .../sound/resources/slider_handle.svg | 37 -- plugins/dde-dock/sound/resources/sound.qrc | 31 - plugins/dde-dock/sound/resources/sound.svg | 7 - .../texts/audio-volume-high-symbolic_16px.svg | 7 - .../texts/audio-volume-high-symbolic_24px.svg | 7 - .../texts/audio-volume-low-symbolic_16px.svg | 8 - .../texts/audio-volume-low-symbolic_24px.svg | 8 - .../audio-volume-medium-symbolic_16px.svg | 8 - .../audio-volume-medium-symbolic_24px.svg | 8 - .../audio-volume-muted-symbolic_16px.svg | 7 - .../audio-volume-muted-symbolic_24px.svg | 7 - .../texts/audio-volume-off-symbolic_16px.svg | 8 - .../texts/audio-volume-off-symbolic_24px.svg | 8 - .../sound/resources/texts/open-arrow_16px.svg | 9 - .../resources/texts/sound_bluetooth_16px.svg | 9 - .../resources/texts/sound_bluetooth_24px.svg | 7 - .../sound/resources/texts/sound_hdmi_16px.svg | 9 - .../sound/resources/texts/sound_hdmi_24px.svg | 9 - .../resources/texts/sound_headphone_16px.svg | 9 - .../resources/texts/sound_headphone_24px.svg | 9 - .../resources/texts/sound_other_16px.svg | 7 - .../resources/texts/sound_other_24px.svg | 7 - .../resources/texts/sound_speaker_16px.svg | 7 - .../resources/texts/sound_speaker_24px.svg | 11 - plugins/dde-dock/sound/sound.json | 4 - plugins/dde-dock/sound/soundapplet.cpp | 359 ----------- plugins/dde-dock/sound/soundapplet.h | 96 --- plugins/dde-dock/sound/soundcardport.cpp | 84 --- plugins/dde-dock/sound/soundcardport.h | 109 ---- plugins/dde-dock/sound/soundcontroller.cpp | 129 ---- plugins/dde-dock/sound/soundcontroller.h | 54 -- plugins/dde-dock/sound/soundmodel.cpp | 147 ----- plugins/dde-dock/sound/soundmodel.h | 63 -- plugins/dde-dock/sound/soundplugin.cpp | 145 ----- plugins/dde-dock/sound/soundplugin.h | 45 -- plugins/dde-dock/sound/soundquickpanel.cpp | 162 ----- plugins/dde-dock/sound/soundquickpanel.h | 48 -- plugins/dde-dock/sound/soundview.cpp | 196 ------ plugins/dde-dock/sound/soundview.h | 58 -- plugins/dde-dock/util/horizontalseparator.cpp | 34 - plugins/dde-dock/util/horizontalseparator.h | 23 - plugins/dde-dock/util/statebutton.cpp | 100 --- plugins/dde-dock/util/statebutton.h | 43 -- plugins/dde-network-display-ui/CMakeLists.txt | 5 - .../plugins/CMakeLists.txt | 84 --- .../plugins/common/wirelesscastingmodel.cpp | 437 ------------- .../plugins/common/wirelesscastingmodel.h | 137 ----- .../dbus/types/brightnessmap.cpp | 11 - .../dbus/types/brightnessmap.h | 15 - .../dbus/types/resolution.cpp | 55 -- .../dbus/types/resolution.h | 44 -- .../dbus/types/resolutionlist.cpp | 13 - .../dbus/types/resolutionlist.h | 16 - .../dbus/types/screenrect.cpp | 53 -- .../dbus/types/screenrect.h | 36 -- .../dbus/types/touchscreeninfolist.cpp | 47 -- .../dbus/types/touchscreeninfolist.h | 45 -- .../dbus/types/touchscreeninfolist_v2.cpp | 47 -- .../dbus/types/touchscreeninfolist_v2.h | 45 -- .../dbus/types/touchscreenmap.cpp | 11 - .../dbus/types/touchscreenmap.h | 15 - .../dbus/xml/org.deepin.dde.Display1.xml | 83 --- .../res/dark/icons/none_128px.svg | 230 ------- .../res/dark/icons/success_128px.svg | 183 ------ .../res/dcc-wireless-casting.dci | Bin 1428 -> 0 bytes .../res/light/icons/none_128px.svg | 268 -------- .../res/light/icons/success_128px.svg | 192 ------ .../res/resources.qrc | 21 - .../res/texts/duplicate_16px.svg | 7 - .../res/texts/extend_16px.svg | 7 - .../res/texts/monitor_16px.svg | 19 - .../network-display-failed-symbolic_16px.svg | 7 - .../network-display-failed-symbolic_24px.svg | 7 - .../network-display-off-symbolic_16px.svg | 8 - .../network-display-off-symbolic_24px.svg | 8 - .../network-display-succeed-symbolic_16px.svg | 7 - .../network-display-succeed-symbolic_24px.svg | 7 - .../res/texts/onlyone-f_16px.svg | 10 - .../res/texts/onlyone-s_16px.svg | 10 - .../res/texts/open-display-settings_16px.svg | 9 - .../res/texts/refresh_16px.svg | 19 - .../res/texts/select_16px.svg | 11 - .../src/displaymodel.cpp | 89 --- .../src/displaymodel.h | 49 -- .../src/quickpanelwidget.cpp | 171 ----- .../src/quickpanelwidget.h | 54 -- .../src/widget/commoniconbutton.cpp | 211 ------- .../src/widget/commoniconbutton.h | 71 --- .../src/widget/jumpsettingbutton.cpp | 144 ----- .../src/widget/jumpsettingbutton.h | 48 -- .../src/widget/monitoritemdelegate.cpp | 511 --------------- .../src/widget/monitoritemdelegate.h | 301 --------- .../src/widget/monitorlistview.cpp | 92 --- .../src/widget/monitorlistview.h | 30 - .../src/wirelesscastingapplet.cpp | 582 ------------------ .../src/wirelesscastingapplet.h | 129 ---- .../src/wirelesscastingitem.cpp | 231 ------- .../src/wirelesscastingitem.h | 64 -- .../src/wirelesscastingplugin.cpp | 169 ----- .../src/wirelesscastingplugin.h | 52 -- .../dock-wirelesscasting-plugin.ts | 119 ---- .../dock-wirelesscasting-plugin_ady.ts | 117 ---- .../dock-wirelesscasting-plugin_af.ts | 117 ---- .../dock-wirelesscasting-plugin_af_ZA.ts | 117 ---- .../dock-wirelesscasting-plugin_ak.ts | 117 ---- .../dock-wirelesscasting-plugin_am.ts | 117 ---- .../dock-wirelesscasting-plugin_am_ET.ts | 117 ---- .../dock-wirelesscasting-plugin_ar.ts | 117 ---- .../dock-wirelesscasting-plugin_ast.ts | 117 ---- .../dock-wirelesscasting-plugin_az.ts | 117 ---- .../dock-wirelesscasting-plugin_bg.ts | 117 ---- .../dock-wirelesscasting-plugin_bn.ts | 117 ---- .../dock-wirelesscasting-plugin_bo.ts | 117 ---- .../dock-wirelesscasting-plugin_bqi.ts | 117 ---- .../dock-wirelesscasting-plugin_br.ts | 117 ---- .../dock-wirelesscasting-plugin_ca.ts | 117 ---- .../dock-wirelesscasting-plugin_cgg.ts | 117 ---- .../dock-wirelesscasting-plugin_cs.ts | 117 ---- .../dock-wirelesscasting-plugin_da.ts | 117 ---- .../dock-wirelesscasting-plugin_de.ts | 117 ---- .../dock-wirelesscasting-plugin_el.ts | 117 ---- .../dock-wirelesscasting-plugin_el_GR.ts | 117 ---- .../dock-wirelesscasting-plugin_en_AU.ts | 117 ---- .../dock-wirelesscasting-plugin_en_GB.ts | 117 ---- .../dock-wirelesscasting-plugin_en_NO.ts | 117 ---- .../dock-wirelesscasting-plugin_en_US.ts | 117 ---- .../dock-wirelesscasting-plugin_eo.ts | 117 ---- .../dock-wirelesscasting-plugin_es.ts | 117 ---- .../dock-wirelesscasting-plugin_et.ts | 117 ---- .../dock-wirelesscasting-plugin_eu.ts | 117 ---- .../dock-wirelesscasting-plugin_fa.ts | 117 ---- .../dock-wirelesscasting-plugin_fi.ts | 117 ---- .../dock-wirelesscasting-plugin_fil.ts | 117 ---- .../dock-wirelesscasting-plugin_fr.ts | 117 ---- .../dock-wirelesscasting-plugin_gl.ts | 117 ---- .../dock-wirelesscasting-plugin_gl_ES.ts | 117 ---- .../dock-wirelesscasting-plugin_he.ts | 117 ---- .../dock-wirelesscasting-plugin_hi_IN.ts | 117 ---- .../dock-wirelesscasting-plugin_hr.ts | 117 ---- .../dock-wirelesscasting-plugin_hu.ts | 117 ---- .../dock-wirelesscasting-plugin_hy.ts | 117 ---- .../dock-wirelesscasting-plugin_id.ts | 117 ---- .../dock-wirelesscasting-plugin_id_ID.ts | 117 ---- .../dock-wirelesscasting-plugin_it.ts | 117 ---- .../dock-wirelesscasting-plugin_ja.ts | 117 ---- .../dock-wirelesscasting-plugin_ka.ts | 117 ---- .../dock-wirelesscasting-plugin_kab.ts | 117 ---- .../dock-wirelesscasting-plugin_kk.ts | 117 ---- .../dock-wirelesscasting-plugin_km_KH.ts | 117 ---- .../dock-wirelesscasting-plugin_kn_IN.ts | 117 ---- .../dock-wirelesscasting-plugin_ko.ts | 117 ---- .../dock-wirelesscasting-plugin_ku.ts | 117 ---- .../dock-wirelesscasting-plugin_ku_IQ.ts | 117 ---- .../dock-wirelesscasting-plugin_ky.ts | 117 ---- .../dock-wirelesscasting-plugin_ky@Arab.ts | 117 ---- .../dock-wirelesscasting-plugin_la.ts | 117 ---- .../dock-wirelesscasting-plugin_lo.ts | 117 ---- .../dock-wirelesscasting-plugin_lt.ts | 117 ---- .../dock-wirelesscasting-plugin_lv.ts | 117 ---- .../dock-wirelesscasting-plugin_ml.ts | 117 ---- .../dock-wirelesscasting-plugin_mn.ts | 117 ---- .../dock-wirelesscasting-plugin_mr.ts | 117 ---- .../dock-wirelesscasting-plugin_ms.ts | 117 ---- .../dock-wirelesscasting-plugin_nb.ts | 117 ---- .../dock-wirelesscasting-plugin_ne.ts | 117 ---- .../dock-wirelesscasting-plugin_nl.ts | 117 ---- .../dock-wirelesscasting-plugin_pa.ts | 117 ---- .../dock-wirelesscasting-plugin_pam.ts | 117 ---- .../dock-wirelesscasting-plugin_pl.ts | 117 ---- .../dock-wirelesscasting-plugin_ps.ts | 117 ---- .../dock-wirelesscasting-plugin_pt.ts | 117 ---- .../dock-wirelesscasting-plugin_pt_BR.ts | 117 ---- .../dock-wirelesscasting-plugin_ro.ts | 117 ---- .../dock-wirelesscasting-plugin_ru.ts | 117 ---- .../dock-wirelesscasting-plugin_ru_UA.ts | 117 ---- .../dock-wirelesscasting-plugin_sc.ts | 117 ---- .../dock-wirelesscasting-plugin_si.ts | 117 ---- .../dock-wirelesscasting-plugin_sk.ts | 117 ---- .../dock-wirelesscasting-plugin_sl.ts | 117 ---- .../dock-wirelesscasting-plugin_sq.ts | 117 ---- .../dock-wirelesscasting-plugin_sr.ts | 117 ---- .../dock-wirelesscasting-plugin_sv.ts | 117 ---- .../dock-wirelesscasting-plugin_sv_SE.ts | 117 ---- .../dock-wirelesscasting-plugin_sw.ts | 117 ---- .../dock-wirelesscasting-plugin_ta.ts | 117 ---- .../dock-wirelesscasting-plugin_te.ts | 117 ---- .../dock-wirelesscasting-plugin_th.ts | 117 ---- .../dock-wirelesscasting-plugin_tr.ts | 117 ---- .../dock-wirelesscasting-plugin_tzm.ts | 117 ---- .../dock-wirelesscasting-plugin_ug.ts | 117 ---- .../dock-wirelesscasting-plugin_uk.ts | 117 ---- .../dock-wirelesscasting-plugin_ur.ts | 117 ---- .../dock-wirelesscasting-plugin_uz.ts | 117 ---- .../dock-wirelesscasting-plugin_vi.ts | 117 ---- .../dock-wirelesscasting-plugin_zh_CN.ts | 117 ---- .../dock-wirelesscasting-plugin_zh_HK.ts | 117 ---- .../dock-wirelesscasting-plugin_zh_TW.ts | 117 ---- .../translations/translations.qrc | 2 - .../wirelesscasting.json | 3 - src/loader/main.cpp | 2 + tests/at/spi/expected_names.yaml | 54 -- .../org_deepin_dde_dock_plugin_bluetooth.hpp | 180 ------ .../org_deepin_dde_dock_plugin_sound.hpp | 214 ------- .../org.deepin.dde.Appearance1Adaptor.cpp | 225 ------- .../org.deepin.dde.Appearance1Adaptor.h | 155 ----- .../org.deepin.dde.Audio1.SinkAdaptor.cpp | 145 ----- .../org.deepin.dde.Audio1.SinkAdaptor.h | 125 ---- .../org.deepin.dde.Audio1Adaptor.cpp | 163 ----- .../org.deepin.dde.Audio1Adaptor.h | 137 ----- ...org.deepin.dde.Display1.MonitorAdaptor.cpp | 209 ------- .../org.deepin.dde.Display1.MonitorAdaptor.h | 172 ------ .../org.deepin.dde.Display1Adaptor.cpp | 251 -------- .../org.deepin.dde.Display1Adaptor.h | 194 ------ 434 files changed, 2 insertions(+), 30458 deletions(-) delete mode 100644 debian/dde-wirelesscasting-plugin.install delete mode 100644 plugins/dde-dock/bluetooth/CMakeLists.txt delete mode 100644 plugins/dde-dock/bluetooth/bluetooth.json delete mode 100644 plugins/dde-dock/bluetooth/bluetoothitem.cpp delete mode 100644 plugins/dde-dock/bluetooth/bluetoothitem.h delete mode 100644 plugins/dde-dock/bluetooth/bluetoothplugin.cpp delete mode 100644 plugins/dde-dock/bluetooth/bluetoothplugin.h delete mode 100644 plugins/dde-dock/bluetooth/componments/adapter.cpp delete mode 100644 plugins/dde-dock/bluetooth/componments/adapter.h delete mode 100644 plugins/dde-dock/bluetooth/componments/adaptersmanager.cpp delete mode 100644 plugins/dde-dock/bluetooth/componments/adaptersmanager.h delete mode 100644 plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp delete mode 100644 plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.h delete mode 100644 plugins/dde-dock/bluetooth/componments/bluetoothapplet.cpp delete mode 100644 plugins/dde-dock/bluetooth/componments/bluetoothapplet.h delete mode 100644 plugins/dde-dock/bluetooth/componments/bluetoothconstants.h delete mode 100644 plugins/dde-dock/bluetooth/componments/device.cpp delete mode 100644 plugins/dde-dock/bluetooth/componments/device.h delete mode 100644 plugins/dde-dock/bluetooth/componments/refreshbutton.cpp delete mode 100644 plugins/dde-dock/bluetooth/componments/refreshbutton.h delete mode 100644 plugins/dde-dock/bluetooth/quickpanelwidget.cpp delete mode 100644 plugins/dde-dock/bluetooth/quickpanelwidget.h delete mode 100644 plugins/dde-dock/bluetooth/resources/bluetooth.qrc delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/actions/bluetooth_disable_96px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_camera_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_clang_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_keyboard_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_lan_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_laptop_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_microphone_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_mouse_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_other_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_pad_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_pc_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_pen_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_pheadset_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_phone_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_print_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_scaner_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_touchpad_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_tv_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/buletooth_vidicon_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-000-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-010-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-020-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-030-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-040-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-050-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-060-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-070-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-080-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-090-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dark/icons/battery-100-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/dcc-bluetooth.dci delete mode 100644 plugins/dde-dock/bluetooth/resources/disconnect.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/disconnect_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/actions/bluetooth_disable_96px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_camera_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_clang_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_keyboard_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_lan_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_laptop_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_microphone_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_mouse_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_other_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_pad_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_pc_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_pen_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_pheadset_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_phone_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_print_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_scaner_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_touchpad_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_tv_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/buletooth_vidicon_light.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-000-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-010-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-020-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-030-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-040-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-050-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-060-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-070-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-080-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-090-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/light/icons/battery-100-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/list_select.png delete mode 100644 plugins/dde-dock/bluetooth/resources/list_select@2x.png delete mode 100644 plugins/dde-dock/bluetooth/resources/notify_close_press.png delete mode 100644 plugins/dde-dock/bluetooth/resources/notify_close_press@2x.png delete mode 100644 plugins/dde-dock/bluetooth/resources/refresh.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/refresh_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/select.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/select_dark.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/arrow-up_12px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_24px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_24px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_24px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth-open_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_camera_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_clang_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_keyboard_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_lan_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_laptop_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_microphone_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_mouse_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_other_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_pad_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_pc_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_pen_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_pheadset_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_phone_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_print_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_scaner_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_touchpad_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_tv_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_video_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/bluetooth_vidicon_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/plugin_item_disconnect_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/plugin_item_select_16px.svg delete mode 100644 plugins/dde-dock/bluetooth/resources/texts/refresh_16px.svg delete mode 100644 plugins/dde-dock/brightness/CMakeLists.txt delete mode 100644 plugins/dde-dock/brightness/brightness-constants.h delete mode 100644 plugins/dde-dock/brightness/brightness.json delete mode 100644 plugins/dde-dock/brightness/brightnessapplet.cpp delete mode 100644 plugins/dde-dock/brightness/brightnessapplet.h delete mode 100644 plugins/dde-dock/brightness/brightnesscontroller.cpp delete mode 100644 plugins/dde-dock/brightness/brightnesscontroller.h delete mode 100644 plugins/dde-dock/brightness/brightnessitem.cpp delete mode 100644 plugins/dde-dock/brightness/brightnessitem.h delete mode 100644 plugins/dde-dock/brightness/brightnessmodel.cpp delete mode 100644 plugins/dde-dock/brightness/brightnessmodel.h delete mode 100644 plugins/dde-dock/brightness/brightnessplugin.cpp delete mode 100644 plugins/dde-dock/brightness/brightnessplugin.h delete mode 100644 plugins/dde-dock/brightness/brightnessquickpanel.cpp delete mode 100644 plugins/dde-dock/brightness/brightnessquickpanel.h delete mode 100644 plugins/dde-dock/brightness/monitor.cpp delete mode 100644 plugins/dde-dock/brightness/monitor.h delete mode 100644 plugins/dde-dock/brightness/resources/brightness.qrc delete mode 100644 plugins/dde-dock/brightness/resources/dcc-dde-brightness.dci delete mode 100644 plugins/dde-dock/brightness/resources/texts/Brightness+_24px.svg delete mode 100644 plugins/dde-dock/brightness/resources/texts/Brightness-_24px.svg delete mode 100644 plugins/dde-dock/brightness/resources/texts/display-brightness-control_16px.svg delete mode 100644 plugins/dde-dock/brightness/resources/texts/external-display_16px.svg delete mode 100644 plugins/dde-dock/brightness/resources/texts/external-display_24px.svg delete mode 100644 plugins/dde-dock/brightness/resources/texts/laptop_16px.svg delete mode 100644 plugins/dde-dock/brightness/resources/texts/laptop_24px.svg delete mode 100644 plugins/dde-dock/brightness/resources/texts/open-arrow_16px.svg delete mode 100644 plugins/dde-dock/common/chameleonwidget.cpp delete mode 100644 plugins/dde-dock/common/chameleonwidget.h delete mode 100644 plugins/dde-dock/common/dconfig_helper.cpp delete mode 100644 plugins/dde-dock/common/dconfig_helper.h delete mode 100644 plugins/dde-dock/common/dockslider.cpp delete mode 100644 plugins/dde-dock/common/dockslider.h delete mode 100644 plugins/dde-dock/common/mousestatewidget.cpp delete mode 100644 plugins/dde-dock/common/mousestatewidget.h delete mode 100644 plugins/dde-dock/common/settingmanager.cpp delete mode 100644 plugins/dde-dock/common/settingmanager.h delete mode 100644 plugins/dde-dock/common/settingsitem.cpp delete mode 100644 plugins/dde-dock/common/settingsitem.h delete mode 100644 plugins/dde-dock/common/slidercontainer.cpp delete mode 100644 plugins/dde-dock/common/slidercontainer.h delete mode 100644 plugins/dde-dock/common/touchscrollfilter.cpp delete mode 100644 plugins/dde-dock/common/touchscrollfilter.h delete mode 100644 plugins/dde-dock/configs/org.deepin.dde.dock.plugin.bluetooth.json delete mode 100644 plugins/dde-dock/configs/org.deepin.dde.dock.plugin.sound.json delete mode 100644 plugins/dde-dock/dbus/types/audioport.cpp delete mode 100644 plugins/dde-dock/dbus/types/audioport.h delete mode 100644 plugins/dde-dock/dbus/types/audioportlist.cpp delete mode 100644 plugins/dde-dock/dbus/types/audioportlist.h delete mode 100644 plugins/dde-dock/dbus/types/brightnessmap.cpp delete mode 100644 plugins/dde-dock/dbus/types/brightnessmap.h delete mode 100644 plugins/dde-dock/dbus/types/reflectlist.cpp delete mode 100644 plugins/dde-dock/dbus/types/reflectlist.h delete mode 100644 plugins/dde-dock/dbus/types/resolution.cpp delete mode 100644 plugins/dde-dock/dbus/types/resolution.h delete mode 100644 plugins/dde-dock/dbus/types/resolutionlist.cpp delete mode 100644 plugins/dde-dock/dbus/types/resolutionlist.h delete mode 100644 plugins/dde-dock/dbus/types/rotationlist.cpp delete mode 100644 plugins/dde-dock/dbus/types/rotationlist.h delete mode 100644 plugins/dde-dock/dbus/types/screenrect.cpp delete mode 100644 plugins/dde-dock/dbus/types/screenrect.h delete mode 100644 plugins/dde-dock/dbus/types/touchscreeninfolist.cpp delete mode 100644 plugins/dde-dock/dbus/types/touchscreeninfolist.h delete mode 100644 plugins/dde-dock/dbus/types/touchscreeninfolist_v2.cpp delete mode 100644 plugins/dde-dock/dbus/types/touchscreeninfolist_v2.h delete mode 100644 plugins/dde-dock/dbus/types/touchscreenmap.cpp delete mode 100644 plugins/dde-dock/dbus/types/touchscreenmap.h delete mode 100644 plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml delete mode 100644 plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml delete mode 100644 plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml delete mode 100644 plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml delete mode 100644 plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml delete mode 100644 plugins/dde-dock/eye-comfort-mode/CMakeLists.txt delete mode 100644 plugins/dde-dock/eye-comfort-mode/eye-comfort-mode.json delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.cpp delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.h delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.cpp delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.h delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.cpp delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.h delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.cpp delete mode 100644 plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.h delete mode 100644 plugins/dde-dock/eye-comfort-mode/quickpanelwidget.cpp delete mode 100644 plugins/dde-dock/eye-comfort-mode/quickpanelwidget.h delete mode 100644 plugins/dde-dock/eye-comfort-mode/resources/dcc-eye-comfort-mode.dci delete mode 100644 plugins/dde-dock/eye-comfort-mode/resources/eye-comfort-mode.qrc delete mode 100644 plugins/dde-dock/eye-comfort-mode/resources/texts/eyeshield-on_24px.svg delete mode 100644 plugins/dde-dock/eye-comfort-mode/resources/texts/open-arrow_16px.svg delete mode 100644 plugins/dde-dock/eye-comfort-mode/resources/texts/theme-auto_16px.svg delete mode 100644 plugins/dde-dock/eye-comfort-mode/resources/texts/theme-dark_16px.svg delete mode 100644 plugins/dde-dock/eye-comfort-mode/resources/texts/theme-light_16px.svg delete mode 100644 plugins/dde-dock/sound/CMakeLists.txt delete mode 100644 plugins/dde-dock/sound/resources/slider_bg.png delete mode 100644 plugins/dde-dock/sound/resources/slider_handle.svg delete mode 100644 plugins/dde-dock/sound/resources/sound.qrc delete mode 100644 plugins/dde-dock/sound/resources/sound.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/open-arrow_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_bluetooth_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_bluetooth_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_hdmi_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_hdmi_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_headphone_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_headphone_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_other_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_other_24px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_speaker_16px.svg delete mode 100644 plugins/dde-dock/sound/resources/texts/sound_speaker_24px.svg delete mode 100644 plugins/dde-dock/sound/sound.json delete mode 100644 plugins/dde-dock/sound/soundapplet.cpp delete mode 100644 plugins/dde-dock/sound/soundapplet.h delete mode 100644 plugins/dde-dock/sound/soundcardport.cpp delete mode 100644 plugins/dde-dock/sound/soundcardport.h delete mode 100644 plugins/dde-dock/sound/soundcontroller.cpp delete mode 100644 plugins/dde-dock/sound/soundcontroller.h delete mode 100644 plugins/dde-dock/sound/soundmodel.cpp delete mode 100644 plugins/dde-dock/sound/soundmodel.h delete mode 100644 plugins/dde-dock/sound/soundplugin.cpp delete mode 100644 plugins/dde-dock/sound/soundplugin.h delete mode 100644 plugins/dde-dock/sound/soundquickpanel.cpp delete mode 100644 plugins/dde-dock/sound/soundquickpanel.h delete mode 100644 plugins/dde-dock/sound/soundview.cpp delete mode 100644 plugins/dde-dock/sound/soundview.h delete mode 100644 plugins/dde-dock/util/horizontalseparator.cpp delete mode 100644 plugins/dde-dock/util/horizontalseparator.h delete mode 100644 plugins/dde-dock/util/statebutton.cpp delete mode 100644 plugins/dde-dock/util/statebutton.h delete mode 100644 plugins/dde-network-display-ui/CMakeLists.txt delete mode 100644 plugins/dde-network-display-ui/plugins/CMakeLists.txt delete mode 100644 plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/xml/org.deepin.dde.Display1.xml delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/none_128px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/success_128px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dcc-wireless-casting.dci delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/light/icons/none_128px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/light/icons/success_128px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/resources.qrc delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/duplicate_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/extend_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/monitor_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_24px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_24px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_24px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-f_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-s_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/open-display-settings_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/refresh_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/select_16px.svg delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.cpp delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.h delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ady.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af_ZA.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ak.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am_ET.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ar.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ast.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_az.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bg.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bn.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bo.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bqi.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_br.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ca.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cgg.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cs.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_da.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_de.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el_GR.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_AU.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_GB.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_NO.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_US.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eo.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_es.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_et.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eu.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fa.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fi.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fil.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fr.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl_ES.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_he.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hi_IN.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hr.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hu.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hy.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id_ID.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_it.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ja.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ka.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kab.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kk.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_km_KH.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kn_IN.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ko.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku_IQ.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky@Arab.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_la.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lo.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lt.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lv.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ml.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mn.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mr.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ms.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nb.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ne.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nl.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pa.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pam.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pl.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ps.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt_BR.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ro.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru_UA.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sc.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_si.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sk.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sl.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sq.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sr.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv_SE.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sw.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ta.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_te.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_th.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tr.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tzm.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ug.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uk.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ur.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uz.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_vi.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_CN.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_HK.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_TW.ts delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/translations.qrc delete mode 100644 plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/wirelesscasting.json delete mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp delete mode 100644 toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp delete mode 100644 toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h diff --git a/debian/control b/debian/control index 165ab13cb..b47b4a3d3 100644 --- a/debian/control +++ b/debian/control @@ -68,9 +68,3 @@ Provides: dde-dock-dev (=6.1.0) Description: deepin desktop-environment - tray plugins module development files Tray plugins module development files of deepin desktop-environment - -Package: dde-wirelesscasting-plugin -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: deepin desktop-environment - wireless casting plugin for dde-dock - wireless casting plugin module diff --git a/debian/dde-tray-loader.install b/debian/dde-tray-loader.install index a00299dc4..6d1cd7ca1 100644 --- a/debian/dde-tray-loader.install +++ b/debian/dde-tray-loader.install @@ -8,27 +8,20 @@ usr/share/trayplugin-loader/translations usr/share/dsg/configs/*/*.json usr/lib/*/qt6/plugins/wayland-shell-integration/libplugin-shell.so usr/lib/dde-dock/plugins/libapplication-tray.so -usr/lib/dde-dock/plugins/libbrightness.so usr/lib/dde-dock/plugins/libdatetime.so usr/lib/dde-dock/plugins/libdnd-mode.so -usr/lib/dde-dock/plugins/libeye-comfort-mode.so usr/lib/dde-dock/plugins/libmedia.so usr/lib/dde-dock/plugins/libnotification.so usr/lib/dde-dock/plugins/libonboard.so usr/lib/dde-dock/plugins/libshutdown.so usr/lib/dde-dock/plugins/system-trays/ usr/lib/dde-dock/plugins/system-trays/libairplane-mode.so -usr/lib/dde-dock/plugins/system-trays/libbluetooth.so usr/lib/dde-dock/plugins/system-trays/libkeyboard-layout.so usr/lib/dde-dock/plugins/system-trays/libpower.so -usr/lib/dde-dock/plugins/system-trays/libsound.so usr/share/dde-dock/icons/dcc-setting/dcc-airplane-mode.dci usr/share/dde-dock/icons/dcc-setting/dcc-battery.dci -usr/share/dde-dock/icons/dcc-setting/dcc-bluetooth.dci usr/share/dde-dock/icons/dcc-setting/dcc-datetime.dci -usr/share/dde-dock/icons/dcc-setting/dcc-dde-brightness.dci usr/share/dde-dock/icons/dcc-setting/dcc-dnd-mode.dci -usr/share/dde-dock/icons/dcc-setting/dcc-eye-comfort-mode.dci usr/share/dde-dock/icons/dcc-setting/dcc-notification.dci usr/share/dde-dock/icons/dcc-setting/dcc-onboard.dci usr/share/dde-dock/icons/dcc-setting/dcc-shutdown.dci diff --git a/debian/dde-wirelesscasting-plugin.install b/debian/dde-wirelesscasting-plugin.install deleted file mode 100644 index de97d69ad..000000000 --- a/debian/dde-wirelesscasting-plugin.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib/dde-dock/plugins/libdock-wirelesscasting-plugin.so -usr/share/dde-dock/icons/dcc-setting/dcc-wireless-casting.dci -usr/share/dock-wirelesscasting-plugin/translations diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index c83225415..46422cd6c 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -18,4 +18,3 @@ find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} COMPONENTS Core Widget add_subdirectory(application-tray) add_subdirectory(dde-dock) add_subdirectory(libdbusmenuqt) -add_subdirectory(dde-network-display-ui) diff --git a/plugins/dde-dock/CMakeLists.txt b/plugins/dde-dock/CMakeLists.txt index 02f5a2644..ead0a22cb 100644 --- a/plugins/dde-dock/CMakeLists.txt +++ b/plugins/dde-dock/CMakeLists.txt @@ -3,17 +3,13 @@ # SPDX-License-Identifier: CC0-1.0 add_subdirectory("airplane-mode") -add_subdirectory("bluetooth") -add_subdirectory("brightness") add_subdirectory("datetime") add_subdirectory("dnd-mode") -add_subdirectory("eye-comfort-mode") add_subdirectory("keyboard-layout") add_subdirectory("media") add_subdirectory("onboard") add_subdirectory("power") add_subdirectory("shutdown") -add_subdirectory("sound") add_subdirectory("notification") if (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug")) diff --git a/plugins/dde-dock/bluetooth/CMakeLists.txt b/plugins/dde-dock/bluetooth/CMakeLists.txt deleted file mode 100644 index 88f93db9e..000000000 --- a/plugins/dde-dock/bluetooth/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -# SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. -# -# SPDX-License-Identifier: CC0-1.0 - -set(PLUGIN_NAME "bluetooth") - -project(${PLUGIN_NAME}) - -# Sources files -file(GLOB_RECURSE SRCS - "*.h" - "*.cpp" - "../widgets/*.h" - "../widgets/*.cpp" - "../util/imageutil.h" - "../util/imageutil.cpp" - "../util/statebutton.h" - "../util/statebutton.cpp" - "../util/horizontalseparator.h" - "../util/horizontalseparator.cpp" - "../common/*.h" - "../common/*.cpp" -) - -find_package(PkgConfig REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Widgets Svg DBus) -find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED COMPONENTS Widget Core Gui Tools) - -pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11 xcursor) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/xml/org.deepin.dde.Bluetooth1.xml - bluetooth1interface -) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/xml/org.deepin.dde.AirplaneMode1.xml - airplanemode1interface -) - -add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN") -add_library(${PLUGIN_NAME} SHARED ${DBUS_INTERFACES} ${SRCS} resources/bluetooth.qrc) -set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../) -target_include_directories(${PLUGIN_NAME} PUBLIC - ../../../interfaces - ../common - ../util - ../widgets - componments -) - -target_link_libraries(${PLUGIN_NAME} PRIVATE - ${XCB_EWMH_LIBRARIES} - Dtk${DTK_VERSION_MAJOR}::Widget - Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Gui - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::Svg - Qt${QT_VERSION_MAJOR}::DBus - dockpluginmanager-interface -) - -install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays) -install(FILES "resources/dcc-bluetooth.dci" DESTINATION share/dde-dock/icons/dcc-setting) diff --git a/plugins/dde-dock/bluetooth/bluetooth.json b/plugins/dde-dock/bluetooth/bluetooth.json deleted file mode 100644 index eb60829b1..000000000 --- a/plugins/dde-dock/bluetooth/bluetooth.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "api": "2.0.0", - "depends-daemon-dbus-service": "org.deepin.dde.Bluetooth1" -} diff --git a/plugins/dde-dock/bluetooth/bluetoothitem.cpp b/plugins/dde-dock/bluetooth/bluetoothitem.cpp deleted file mode 100644 index 5ca36ef2f..000000000 --- a/plugins/dde-dock/bluetooth/bluetoothitem.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "bluetoothitem.h" - -#include "imageutil.h" -#include "tipswidget.h" -#include "componments/bluetoothapplet.h" -#include "constants.h" -#include "quickpanelwidget.h" - - -#include -#include - -#include -#include - -// menu actions -#define SHIFT "shift" -#define SETTINGS "settings" - -DWIDGET_USE_NAMESPACE -DGUI_USE_NAMESPACE - -using namespace Dock; - -BluetoothItem::BluetoothItem(AdaptersManager *adapterManager, QWidget *parent) - : QWidget(parent) - , m_tipsLabel(new TipsWidget(this)) - , m_applet(new BluetoothApplet(adapterManager, this)) - , m_quickPanel(new QuickPanelWidget(this)) - , m_iconWidget(new CommonIconButton(this)) - , m_devState(Device::State::StateUnavailable) - , m_adapterPowered(m_applet->poweredInitState()) -{ - setAccessibleName("BluetoothPluginItem"); - m_applet->setVisible(false); - m_tipsLabel->setVisible(false); - m_quickPanel->setVisible(false); - m_quickPanel->setText(tr("Bluetooth")); - m_iconWidget->setFixedSize(Dock::DOCK_PLUGIN_ITEM_FIXED_SIZE); - refreshIcon(); - refreshTips(); - - connect(m_applet, &BluetoothApplet::powerChanged, this, [ & ](bool powered) { - m_adapterPowered = powered; - refreshIcon(); - refreshTips(); - }); - connect(m_applet, &BluetoothApplet::deviceStateChanged, this, [ & ](const Device *device) { - m_devState = device->state(); - refreshIcon(); - refreshTips(); - }); - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &BluetoothItem::refreshIcon); - connect(m_applet, &BluetoothApplet::noAdapter, this, [this] { - if (m_applet->isVisible()) { - m_applet->setVisible(false); - } - Q_EMIT noAdapter(); - }); - connect(m_applet, &BluetoothApplet::justHasAdapter, this, &BluetoothItem::justHasAdapter); - connect(m_applet, &BluetoothApplet::requestHideApplet, this, &BluetoothItem::requestHideApplet); - connect(m_quickPanel, &QuickPanelWidget::panelClicked, this, &BluetoothItem::requestExpand); - connect(m_quickPanel, &QuickPanelWidget::iconClicked, this, [this]() { - invokeMenuItem(SHIFT, true); - }); -} - -QWidget *BluetoothItem::tipsWidget() -{ - refreshTips(); - return m_tipsLabel; -} - -BluetoothApplet *BluetoothItem::popupApplet() -{ - if (m_applet && m_applet->hasAdapter()) - m_applet->setAdapterRefresh(); - return m_applet->hasAdapter() ? m_applet : nullptr; -} - -QWidget *BluetoothItem::quickPanel() -{ - return m_quickPanel; -} - -const QString BluetoothItem::contextMenu() const -{ - QList items; - if (m_applet->hasAdapter()) { - items.reserve(2); - - QMap shift; - shift["itemId"] = SHIFT; - if (m_adapterPowered) - shift["itemText"] = tr("Turn off"); - else - shift["itemText"] = tr("Turn on"); - shift["isActive"] = !m_applet->airplaneModeEnable(); - items.push_back(shift); - - QMap settings; - settings["itemId"] = SETTINGS; - settings["itemText"] = tr("Bluetooth settings"); - settings["isActive"] = true; - items.push_back(settings); - - QMap menu; - menu["items"] = items; - menu["checkableMenu"] = false; - menu["singleCheck"] = false; - return QJsonDocument::fromVariant(menu).toJson(); - } - return QByteArray(); -} - -void BluetoothItem::invokeMenuItem(const QString menuId, const bool checked) -{ - Q_UNUSED(checked); - - if (menuId == SHIFT) { - if (m_applet->airplaneModeEnable()) { - return; - } - m_applet->setAdapterPowered(!m_adapterPowered); - } else if (menuId == SETTINGS) { - QStringList args {"--by-user", "org.deepin.dde.control-center", "--", "-p", "device/bluetooth"}; - QProcess::startDetached("dde-am", args); - Q_EMIT requestHideApplet(); - } -} - -void BluetoothItem::refreshIcon() -{ - QString stateString; - QString iconString; - - if (m_adapterPowered) { - if (m_applet->connectedDevicesName().isEmpty()) { - stateString = "disconnect"; - } else { - stateString = "active"; - } - } else { - stateString = "disable"; - } - - auto icon = QIcon::fromTheme(QString("bluetooth-%1-symbolic").arg(stateString)); - m_quickPanel->setIcon(icon); - m_iconWidget->setIcon(icon); - m_quickPanel->setActive(m_adapterPowered); - update(); -} - -void BluetoothItem::refreshTips() -{ - QString tipsText; - QString description; - - if (m_adapterPowered) { - if (!m_applet->connectedDevicesName().isEmpty() && m_devState != Device::StateAvailable) { - QStringList textList; - const auto &connectedNames = m_applet->connectedDevicesName(); - for (const QString &devName : connectedNames) { - textList << tr("%1 connected").arg(devName); - } - m_tipsLabel->setTextList(textList); - if (connectedNames.size() == 1) { - m_quickPanel->setDescription(connectedNames.first()); - } else { - m_quickPanel->setDescription(tr("Connected %1").arg(connectedNames.size())); - } - return; - } - if (m_devState == Device::StateAvailable) { - tipsText = tr("Connecting..."); - description = tipsText; - } else { - tipsText = tr("Not connected"); - description = tipsText; - } - } else { - tipsText = tr("Turned off"); - description = tr("Off"); - } - - m_tipsLabel->setText(tipsText); - m_quickPanel->setDescription(description); -} - -bool BluetoothItem::hasAdapter() -{ - return m_applet->hasAdapter(); -} - -void BluetoothItem::resizeEvent(QResizeEvent *event) -{ - QWidget::resizeEvent(event); - - const Dock::Position position = qApp->property(PROP_POSITION).value(); - // 保持横纵比 - if (position == Dock::Bottom || position == Dock::Top) { - setMaximumWidth(height()); - setMaximumHeight(QWIDGETSIZE_MAX); - } else { - setMaximumHeight(width()); - setMaximumWidth(QWIDGETSIZE_MAX); - } - - refreshIcon(); -} diff --git a/plugins/dde-dock/bluetooth/bluetoothitem.h b/plugins/dde-dock/bluetooth/bluetoothitem.h deleted file mode 100644 index de1e359b0..000000000 --- a/plugins/dde-dock/bluetooth/bluetoothitem.h +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef BLUETOOTHITEM_H -#define BLUETOOTHITEM_H - -#include "componments/device.h" -#include "componments/adaptersmanager.h" -#include "commoniconbutton.h" - -#include - -#define BLUETOOTH_KEY "bluetooth-item-key" - -class BluetoothApplet; -class QuickPanelWidget; - -namespace Dock { -class TipsWidget; -} -class BluetoothItem : public QWidget -{ - Q_OBJECT - -public: - explicit BluetoothItem(AdaptersManager *adapterManager, QWidget *parent = nullptr); - - QWidget *tipsWidget(); - BluetoothApplet *popupApplet(); - QWidget *quickPanel(); - QWidget *dockItemWidget() const { return m_iconWidget; }; - - const QString contextMenu() const; - void invokeMenuItem(const QString menuId, const bool checked); - - void refreshIcon(); - void refreshTips(); - - bool hasAdapter(); - -protected: - void resizeEvent(QResizeEvent *event); - -signals: - void noAdapter(); - void justHasAdapter(); - void requestExpand(); - void requestHideApplet(); - -private: - Dock::TipsWidget *m_tipsLabel; - BluetoothApplet *m_applet; - QuickPanelWidget *m_quickPanel; - CommonIconButton *m_iconWidget; - Device::State m_devState; - bool m_adapterPowered; -}; - -#endif // BLUETOOTHITEM_H diff --git a/plugins/dde-dock/bluetooth/bluetoothplugin.cpp b/plugins/dde-dock/bluetooth/bluetoothplugin.cpp deleted file mode 100644 index 188b90571..000000000 --- a/plugins/dde-dock/bluetooth/bluetoothplugin.cpp +++ /dev/null @@ -1,209 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "bluetoothplugin.h" -#include "utils.h" -#include "componments/bluetoothapplet.h" -#include "plugins-logging-category.h" - -#define STATE_KEY "enable" - -Q_LOGGING_CATEGORY(BLUETOOTH, "org.deepin.dde.dock.bluetooth") - -BluetoothPlugin::BluetoothPlugin(QObject *parent) - : QObject(parent) - , m_adapterManager(nullptr) - , m_bluetoothItem(nullptr) - , m_messageCallback(nullptr) - , m_enableState(true) -{ -} - -const QString BluetoothPlugin::pluginName() const -{ - return "bluetooth"; -} - -const QString BluetoothPlugin::pluginDisplayName() const -{ - return tr("Bluetooth"); -} - -void BluetoothPlugin::init(PluginProxyInterface *proxyInter) -{ - m_proxyInter = proxyInter; - - if (m_bluetoothItem) - return; - - m_adapterManager = new AdaptersManager(this); - m_bluetoothItem.reset(new BluetoothItem(m_adapterManager)); - - connect(m_bluetoothItem.data(), &BluetoothItem::justHasAdapter, this, [&] { - setEnableState(true); - refreshPluginItemsVisible(); - }); - connect(m_bluetoothItem.data(), &BluetoothItem::noAdapter, this, [&] { - setEnableState(false); - refreshPluginItemsVisible(); - }); - connect(m_bluetoothItem.data(), &BluetoothItem::requestExpand, this, [this] { - m_proxyInter->requestSetAppletVisible(this, BLUETOOTH_KEY, true); - }); - connect(m_bluetoothItem.data(), &BluetoothItem::requestHideApplet, this, [this] { - m_proxyInter->requestSetAppletVisible(this, BLUETOOTH_KEY, false); - }); - setEnableState(m_bluetoothItem->hasAdapter()); - refreshPluginItemsVisible(); -} - -void BluetoothPlugin::pluginStateSwitched() -{ - if(!m_proxyInter) - return; - - m_proxyInter->saveValue(this, STATE_KEY, pluginIsDisable()); - - refreshPluginItemsVisible(); -} - -bool BluetoothPlugin::pluginIsDisable() -{ - if(!m_proxyInter) - return false; - - return !m_proxyInter->getValue(this, STATE_KEY, m_enableState).toBool(); -} - -QWidget *BluetoothPlugin::itemWidget(const QString &itemKey) -{ - if (itemKey == BLUETOOTH_KEY) { - return m_bluetoothItem->dockItemWidget(); - } - - if (itemKey == Dock::QUICK_ITEM_KEY) { - return m_bluetoothItem->quickPanel(); - } - - return nullptr; -} - -QWidget *BluetoothPlugin::itemTipsWidget(const QString &itemKey) -{ - if (itemKey == BLUETOOTH_KEY) { - return m_bluetoothItem->tipsWidget(); - } - - return nullptr; -} - -QWidget *BluetoothPlugin::itemPopupApplet(const QString &itemKey) -{ - if (itemKey == BLUETOOTH_KEY) { - return m_bluetoothItem->popupApplet(); - } - - return nullptr; -} - -const QString BluetoothPlugin::itemContextMenu(const QString &itemKey) -{ - if (itemKey == BLUETOOTH_KEY) { - return m_bluetoothItem->contextMenu(); - } - - return QString(); -} - -void BluetoothPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) -{ - if (itemKey == BLUETOOTH_KEY) { - m_bluetoothItem->invokeMenuItem(menuId, checked); - } -} - -int BluetoothPlugin::itemSortKey(const QString &itemKey) -{ - if(!m_proxyInter) - return -1; - - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - return m_proxyInter->getValue(this, key, -1).toInt(); -} - -void BluetoothPlugin::setSortKey(const QString &itemKey, const int order) -{ - if(!m_proxyInter) - return; - - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - m_proxyInter->saveValue(this, key, order); -} - -void BluetoothPlugin::refreshIcon(const QString &itemKey) -{ - if (itemKey == BLUETOOTH_KEY) { - m_bluetoothItem->refreshIcon(); - } -} - -void BluetoothPlugin::pluginSettingsChanged() -{ - refreshPluginItemsVisible(); -} - -void BluetoothPlugin::refreshPluginItemsVisible() -{ - if(!m_proxyInter) - return; - - if (pluginIsDisable() || !m_enableState) - m_proxyInter->itemRemoved(this, BLUETOOTH_KEY); - else - m_proxyInter->itemAdded(this, BLUETOOTH_KEY); -} - -QString BluetoothPlugin::message(const QString &message) -{ - QJsonObject msgObj = Utils::getRootObj(message); - if (msgObj.isEmpty()) { - return "{}"; - } - - QJsonObject retObj; - QString cmdType = msgObj.value(Dock::MSG_TYPE).toString(); - if (cmdType == Dock::MSG_GET_SUPPORT_FLAG) { - retObj[Dock::MSG_SUPPORT_FLAG] = m_enableState; - } else if (cmdType == Dock::MSG_SET_APPLET_MIN_HEIGHT) { - const int minHeight = msgObj.value(Dock::MSG_DATA).toInt(-1); - if (m_bluetoothItem && m_bluetoothItem->popupApplet()) { - m_bluetoothItem->popupApplet()->updateMinHeight(minHeight); - } - } - - return Utils::toJson(retObj); -} - -void BluetoothPlugin::notifySupportFlagChanged(bool supportFlag) -{ - if (!m_messageCallback) { - return; - } - - QJsonObject msg; - msg[Dock::MSG_TYPE] = Dock::MSG_SUPPORT_FLAG_CHANGED; - msg[Dock::MSG_DATA] = supportFlag; - m_messageCallback(this, Utils::toJson(msg)); -} - -void BluetoothPlugin::setEnableState(bool enable) -{ - if (m_enableState != enable) { - m_enableState = enable; - notifySupportFlagChanged(m_enableState); - } -} - diff --git a/plugins/dde-dock/bluetooth/bluetoothplugin.h b/plugins/dde-dock/bluetooth/bluetoothplugin.h deleted file mode 100644 index ce3ad677c..000000000 --- a/plugins/dde-dock/bluetooth/bluetoothplugin.h +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef BLUETOOTHPLUGIN_H -#define BLUETOOTHPLUGIN_H - -#include "bluetoothitem.h" -#include "quickpanelwidget.h" -#include "pluginsiteminterface_v2.h" - -#include - -class BluetoothPlugin : public QObject, public PluginsItemInterfaceV2 -{ - Q_OBJECT - Q_INTERFACES(PluginsItemInterfaceV2) - Q_PLUGIN_METADATA(IID ModuleInterface_iid_V2 FILE "bluetooth.json") - -public: - explicit BluetoothPlugin(QObject* parent = nullptr); - - const QString pluginName() const override; - const QString pluginDisplayName() const override; - void init(PluginProxyInterface* proxyInter) override; - void pluginStateSwitched() override; - bool pluginIsAllowDisable() override { return true; } - bool pluginIsDisable() override; - QWidget* itemWidget(const QString& itemKey) override; - QWidget* itemTipsWidget(const QString& itemKey) override; - QWidget* itemPopupApplet(const QString& itemKey) override; - const QString itemContextMenu(const QString& itemKey) override; - void invokedMenuItem(const QString& itemKey, const QString& menuId, const bool checked) override; - int itemSortKey(const QString& itemKey) override; - void setSortKey(const QString& itemKey, const int order) override; - void refreshIcon(const QString& itemKey) override; - void pluginSettingsChanged() override; - Dock::PluginFlags flags() const override { return Dock::Type_Quick | Dock::Quick_Panel_Multi | Dock::Attribute_Normal; } - virtual void setMessageCallback(MessageCallbackFunc cb) override { m_messageCallback = cb; } - virtual QString message(const QString &message) override; - -private: - void refreshPluginItemsVisible(); - void setEnableState(bool enable); - void notifySupportFlagChanged(bool supportFlag); - -private: - AdaptersManager* m_adapterManager; - QScopedPointer m_bluetoothItem; - MessageCallbackFunc m_messageCallback; - bool m_enableState; -}; - -#endif // BLUETOOTHPLUGIN_H diff --git a/plugins/dde-dock/bluetooth/componments/adapter.cpp b/plugins/dde-dock/bluetooth/componments/adapter.cpp deleted file mode 100644 index 34bc1de6d..000000000 --- a/plugins/dde-dock/bluetooth/componments/adapter.cpp +++ /dev/null @@ -1,170 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "adapter.h" -#include "device.h" - -#include -#include -#include -#include - -Adapter::Adapter(QObject *parent) - : QObject(parent) - , m_id("") - , m_name("") - , m_powered(false) - , m_current(false) - , m_discover(false) -{ -} - -void Adapter::setName(const QString &name) -{ - if (name != m_name) { - m_name = name; - Q_EMIT nameChanged(name); - } -} - -void Adapter::addDevice(const QJsonObject &deviceObj) -{ - const QString id = deviceObj["Path"].toString(); - const QString name = deviceObj["Name"].toString(); - const QString alias = deviceObj["Alias"].toString(); - const bool paired = deviceObj["Paired"].toBool(); - const int rssi = deviceObj["RSSI"].toInt(); - const Device::State state = Device::State(deviceObj["State"].toInt()); - const bool connectState = deviceObj["ConnectState"].toBool(); - const QString bluetoothDeviceType = deviceObj["Icon"].toString(); - const int battery = deviceObj["Battery"].toInt(); - - removeDevice(id); - - auto device = new Device(this); - - device->setId(id); - device->setName(name); - device->setAlias(alias); - device->setPaired(paired); - device->setState(state); - device->setConnectState(connectState); - device->setRssi(rssi); - device->setAdapterId(m_id); - device->setDeviceType(bluetoothDeviceType); - device->setBattery(battery); - - m_devices[id] = device; - - emit deviceAdded(device); -} - -void Adapter::removeDevice(const QString &deviceId) -{ - const Device *constDevice = m_devices.value(deviceId); - auto device = const_cast(constDevice); - if (device) { - m_devices.remove(deviceId); - emit deviceRemoved(device); - delete device; - } -} - -void Adapter::updateDevice(const QJsonObject &dviceJson) -{ - const QString id = dviceJson["Path"].toString(); - const QString name = dviceJson["Name"].toString(); - const QString alias = dviceJson["Alias"].toString(); - const bool paired = dviceJson["Paired"].toBool(); - const int rssi = dviceJson["RSSI"].toInt(); - const Device::State state = Device::State(dviceJson["State"].toInt()); - const bool connectState = dviceJson["ConnectState"].toBool(); - const QString bluetoothDeviceType = dviceJson["Icon"].toString(); - const int battery = dviceJson["Battery"].toInt(); - - // FIXME: Solve the problem that the device name in the Bluetooth list is blank - if (name.isEmpty() && alias.isEmpty()) - return ; - - const Device *constdevice = m_devices.value(id); - auto device = const_cast(constdevice); - if (device) { - device->setId(id); - device->setName(name); - device->setAlias(alias); - device->setPaired(paired); - device->setRssi(rssi); - //setState放后面,是因为用到了connectState,fix bug 55245 - device->setConnectState(connectState); - device->setState(state); - device->setDeviceType(bluetoothDeviceType); - device->setBattery(battery); - emit deviceNameUpdated(device); - } -} - -void Adapter::setPowered(bool powered) -{ - if (powered != m_powered) { - m_powered = powered; - Q_EMIT poweredChanged(powered); - } -} - -void Adapter::initDevicesList(const QJsonDocument &doc) -{ - const QJsonArray &arr = doc.array(); - for (const QJsonValue &val : arr) { - QJsonObject deviceObj = val.toObject(); - const QString adapterId = deviceObj["AdapterPath"].toString(); - const QString id = deviceObj["Path"].toString(); - const QString name = deviceObj["Name"].toString(); - const QString alias = deviceObj["Alias"].toString(); - const bool paired = deviceObj["Paired"].toBool(); - const int rssi = deviceObj["RSSI"].toInt(); - const Device::State state = Device::State(deviceObj["State"].toInt()); - const bool connectState = deviceObj["ConnectState"].toBool(); - const QString bluetoothDeviceType = deviceObj["Icon"].toString(); - const int battery = deviceObj["Battery"].toInt(); - - auto device = new Device(this); - device->setId(id); - device->setName(name); - device->setAlias(alias); - device->setPaired(paired); - device->setState(state); - device->setConnectState(connectState); - device->setRssi(rssi); - device->setAdapterId(adapterId); - device->setDeviceType(bluetoothDeviceType); - device->setBattery(battery); - - m_devices[id] = device; - } -} - -QMap Adapter::devices() const -{ - return m_devices; -} - -const Device *Adapter::deviceById(const QString &id) const -{ - const auto &ids = m_devices.keys(); - return ids.contains(id) ? m_devices[id] : nullptr; -} - -void Adapter::setId(const QString &id) -{ - m_id = id; -} - -void Adapter::setDiscover(bool discover) -{ - if (discover != m_discover) { - m_discover = discover; - Q_EMIT discoveringChanged(discover); - } -} - diff --git a/plugins/dde-dock/bluetooth/componments/adapter.h b/plugins/dde-dock/bluetooth/componments/adapter.h deleted file mode 100644 index 22d6bb729..000000000 --- a/plugins/dde-dock/bluetooth/componments/adapter.h +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef ADAPTER_H -#define ADAPTER_H - -#include -#include - -class Device; -class Adapter : public QObject -{ - Q_OBJECT -public: - explicit Adapter(QObject *parent = nullptr); - - inline QString name() const { return m_name; } - void setName(const QString &name); - - inline QString id() const { return m_id; } - void setId(const QString &id); - - QMap devices() const; - const Device *deviceById(const QString &id) const; - - inline bool powered() const { return m_powered; } - void setPowered(bool powered); - - inline bool isCurrent() { return m_current; } - inline void setCurrent(bool c) { m_current = c; } - - inline bool discover() {return m_discover;} - void setDiscover(bool discover); - - void initDevicesList(const QJsonDocument &doc); - void addDevice(const QJsonObject &deviceObj); - void removeDevice(const QString &deviceId); - void updateDevice(const QJsonObject &dviceJson); - -Q_SIGNALS: - void nameChanged(const QString &name) const; - void deviceAdded(const Device *device) const; - void deviceRemoved(const Device *device) const; - void deviceNameUpdated(const Device *device) const; - void poweredChanged(const bool powered) const; - void discoveringChanged(const bool discover) const; - -private: - QString m_id; - QString m_name; - bool m_powered; - bool m_current; - bool m_discover; - - QMap m_devices; -}; - -#endif // ADAPTER_H diff --git a/plugins/dde-dock/bluetooth/componments/adaptersmanager.cpp b/plugins/dde-dock/bluetooth/componments/adaptersmanager.cpp deleted file mode 100644 index 924925333..000000000 --- a/plugins/dde-dock/bluetooth/componments/adaptersmanager.cpp +++ /dev/null @@ -1,269 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "adaptersmanager.h" -#include "adapter.h" -#include "device.h" -#include "plugins-logging-category.h" - -#include -#include -#include -#include - -AdaptersManager::AdaptersManager(QObject *parent) - : QObject(parent) - , m_bluetoothInter(new DBusBluetooth("org.deepin.dde.Bluetooth1", - "/org/deepin/dde/Bluetooth1", - QDBusConnection::sessionBus(), - this)) -{ - connect(m_bluetoothInter, &DBusBluetooth::AdapterAdded, this, &AdaptersManager::onAddAdapter); - connect(m_bluetoothInter, &DBusBluetooth::AdapterRemoved, this, &AdaptersManager::onRemoveAdapter); - connect(m_bluetoothInter, &DBusBluetooth::AdapterPropertiesChanged, this, &AdaptersManager::onAdapterPropertiesChanged); - connect(m_bluetoothInter, &DBusBluetooth::DeviceAdded, this, &AdaptersManager::onAddDevice); - connect(m_bluetoothInter, &DBusBluetooth::DeviceRemoved, this, &AdaptersManager::onRemoveDevice); - connect(m_bluetoothInter, &DBusBluetooth::DevicePropertiesChanged, this, &AdaptersManager::onDevicePropertiesChanged); - -#ifdef QT_DEBUG - connect(m_bluetoothInter, &DBusBluetooth::RequestAuthorization, this, [](const QDBusObjectPath & in0) { - qCDebug(BLUETOOTH) << "DBus bluetooth: request authorization: " << in0.path(); - }); - - connect(m_bluetoothInter, &DBusBluetooth::RequestPasskey, this, [](const QDBusObjectPath & in0) { - qCDebug(BLUETOOTH) << "DBus bluetooth: request passkey: " << in0.path(); - }); - - connect(m_bluetoothInter, &DBusBluetooth::RequestPinCode, this, [](const QDBusObjectPath & in0) { - qCDebug(BLUETOOTH) << "DBus bluetooth: request pincode: " << in0.path(); - }); - - connect(m_bluetoothInter, &DBusBluetooth::DisplayPasskey, this, [](const QDBusObjectPath & in0, uint in1, uint in2) { - qCDebug(BLUETOOTH) << "DBus bluetooth: request display passkey: " << in0.path() << in1 << in2; - }); - - connect(m_bluetoothInter, &DBusBluetooth::DisplayPinCode, this, [](const QDBusObjectPath & in0, const QString & in1) { - qCDebug(BLUETOOTH) << "DBus bluetooth: request display pincode: " << in0.path() << in1; - }); -#endif - - QDBusInterface inter("org.deepin.dde.Bluetooth1", - "/org/deepin/dde/Bluetooth1", - "org.deepin.dde.Bluetooth1", - QDBusConnection::sessionBus()); - QDBusReply reply = inter.call(QDBus::Block, "GetAdapters"); - const QString replyStr = reply.value(); - QJsonDocument doc = QJsonDocument::fromJson(replyStr.toUtf8()); - QJsonArray arr = doc.array(); - - for (int index = 0; index < arr.size(); index++) { - auto *adapter = new Adapter(this); - adapterAdd(adapter, arr[index].toObject()); - } -} - -void AdaptersManager::setAdapterPowered(const Adapter *adapter, bool powered) -{ - if (!adapter) - return; - - setAdapterPowered(adapter->id(), powered); -} - -void AdaptersManager::setAdapterPowered(const QString &adapterId, bool powered) -{ - QDBusPendingCall call = m_bluetoothInter->SetAdapterPowered(QDBusObjectPath(adapterId), powered); - - if (!powered) { - QDBusPendingCall clearUnpairedCall = m_bluetoothInter->ClearUnpairedDevice(); - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(clearUnpairedCall, this); - connect(watcher, &QDBusPendingCallWatcher::finished, [ = ] { - if (clearUnpairedCall.isError()) - qCWarning(BLUETOOTH) << "Set adapter powered error: " << clearUnpairedCall.error().message(); - }); - } -} - -void AdaptersManager::connectDevice(const Device *device, Adapter *adapter) -{ - if (device) { - QDBusObjectPath path(device->id()); - switch (device->state()) { - case Device::StateUnavailable: { - m_bluetoothInter->ConnectDevice(path, QDBusObjectPath(adapter->id())); - qCDebug(BLUETOOTH) << "Connect to device: " << device->alias(); - } - break; - case Device::StateAvailable: - break; - case Device::StateConnected: { - m_bluetoothInter->DisconnectDevice(path); - qCDebug(BLUETOOTH) << "Disconnect device: " << device->alias(); - } - break; - } - } -} - -int AdaptersManager::adaptersCount() -{ - return m_adapters.size(); -} - -void AdaptersManager::onAdapterPropertiesChanged(const QString &json) -{ - const QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8()); - const QJsonObject obj = doc.object(); - const QString id = obj["Path"].toString(); - QDBusObjectPath dPath(id); - - if (!m_adapters.contains(id)) { - return; - } - - Adapter *adapter = const_cast(m_adapters[id]); - if (adapter) { - inflateAdapter(adapter, obj); - } -} - -void AdaptersManager::onDevicePropertiesChanged(const QString &json) -{ - const QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8()); - const QJsonObject obj = doc.object(); - for (const Adapter *constAdapter : m_adapters) { - auto adapter = const_cast(constAdapter); - if (adapter) - adapter->updateDevice(obj); - } -} - -void AdaptersManager::onAddAdapter(const QString &json) -{ - const QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8()); - auto adapter = new Adapter(this); - adapterAdd(adapter, doc.object()); -} - -void AdaptersManager::onRemoveAdapter(const QString &json) -{ - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8()); - QJsonObject obj = doc.object(); - const QString id = obj["Path"].toString(); - - if (!m_adapters.contains(id)) { - return; - } - - const Adapter *result = m_adapters[id]; - Adapter *adapter = const_cast(result); - if (adapter) { - m_adapters.remove(id); - m_adapterIds.removeOne(id); - emit adapterDecreased(adapter); - adapter->deleteLater(); - } -} - -void AdaptersManager::onAddDevice(const QString &json) -{ - const QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8()); - const QJsonObject obj = doc.object(); - const QString adapterId = obj["AdapterPath"].toString(); - const QString deviceId = obj["Path"].toString(); - - if (!m_adapters.contains(adapterId)) { - return; - } - - const Adapter *result = m_adapters[adapterId]; - Adapter *adapter = const_cast(result); - if (adapter) { - const Device *result1 = adapter->deviceById(deviceId); - Device *device = const_cast(result1); - if (!device) { - adapter->addDevice(obj); - } - } -} - -void AdaptersManager::onRemoveDevice(const QString &json) -{ - QJsonDocument doc = QJsonDocument::fromJson(json.toUtf8()); - QJsonObject obj = doc.object(); - const QString adapterId = obj["AdapterPath"].toString(); - const QString deviceId = obj["Path"].toString(); - - if (!m_adapters.contains(adapterId)) { - return; - } - - const Adapter *result = m_adapters[adapterId]; - Adapter *adapter = const_cast(result); - if (adapter) { - adapter->removeDevice(deviceId); - } -} - -void AdaptersManager::adapterAdd(Adapter *adapter, const QJsonObject &adpterObj) -{ - if (!adapter) - return; - - inflateAdapter(adapter, adpterObj); - QDBusObjectPath dPath(adpterObj["Path"].toString()); - QDBusPendingCall call = m_bluetoothInter->GetDevices(dPath); - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); - connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, adapter, call, watcher] { - if (adapter) { - if (!call.isError()) { - QDBusReply reply = call.reply(); - const QString replyStr = reply.value(); - QJsonDocument doc = QJsonDocument::fromJson(replyStr.toUtf8()); - adapter->initDevicesList(doc); - emit this->adapterIncreased(adapter); - } else { - qCWarning(BLUETOOTH) << "Add adapter error: " << call.error().message(); - } - } - delete watcher; - }); - - QString id = adapter->id(); - if (!id.isEmpty() && (!m_adapters.contains(id) || !m_adapters[id])) { - m_adapters[id] = adapter; - m_adapterIds << id; - } -} - -void AdaptersManager::inflateAdapter(Adapter *adapter, const QJsonObject &adapterObj) -{ - if (!adapter) - return; - - const QString path = adapterObj["Path"].toString(); - const QString alias = adapterObj["Alias"].toString(); - const bool powered = adapterObj["Powered"].toBool(); - const bool discovering = adapterObj["Discovering"].toBool(); - - adapter->setId(path); - adapter->setName(alias); - adapter->setPowered(powered); - adapter->setDiscover(discovering); -} - -void AdaptersManager::adapterRefresh(const Adapter *adapter) -{ - QDBusObjectPath dPath(adapter->id()); - m_bluetoothInter->RequestDiscovery(dPath); -} - -QList AdaptersManager::adapters() -{ - QList allAdapter = m_adapters.values(); - std::sort(allAdapter.begin(), allAdapter.end(), [ & ](const Adapter *adapter1, const Adapter *adapter2) { - return m_adapterIds.indexOf(adapter1->id()) < m_adapterIds.indexOf(adapter2->id()); - }); - return allAdapter; -} diff --git a/plugins/dde-dock/bluetooth/componments/adaptersmanager.h b/plugins/dde-dock/bluetooth/componments/adaptersmanager.h deleted file mode 100644 index 6f96abab6..000000000 --- a/plugins/dde-dock/bluetooth/componments/adaptersmanager.h +++ /dev/null @@ -1,50 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef ADAPTERSMANAGER_H -#define ADAPTERSMANAGER_H - -#include "bluetooth1interface.h" -using DBusBluetooth = org::deepin::dde::Bluetooth1; - -class Adapter; -class Device; -class AdaptersManager : public QObject -{ - Q_OBJECT -public: - explicit AdaptersManager(QObject *parent = nullptr); - - void setAdapterPowered(const Adapter *adapter, bool powered); - void setAdapterPowered(const QString &adapterId, bool powered); - void connectDevice(const Device *device, Adapter *adapter); - int adaptersCount(); - void adapterRefresh(const Adapter *adapter); - QList adapters(); - -signals: - void adapterIncreased(Adapter *adapter); - void adapterDecreased(Adapter *adapter); - -private slots: - void onAdapterPropertiesChanged(const QString &json); - void onDevicePropertiesChanged(const QString &json); - - void onAddAdapter(const QString &json); - void onRemoveAdapter(const QString &json); - - void onAddDevice(const QString &json); - void onRemoveDevice(const QString &json); - -private: - void adapterAdd(Adapter *adapter, const QJsonObject &adpterObj); - void inflateAdapter(Adapter *adapter, const QJsonObject &adapterObj); - -private: - DBusBluetooth *m_bluetoothInter; - QMap m_adapters; - QStringList m_adapterIds; // 用于记录蓝牙适配器的排序 -}; - -#endif // ADAPTERSMANAGER_H diff --git a/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp b/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp deleted file mode 100644 index 5ebcbb40f..000000000 --- a/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp +++ /dev/null @@ -1,569 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "bluetoothadapteritem.h" -#include "adapter.h" -#include "bluetoothconstants.h" -#include "refreshbutton.h" -#include "horizontalseparator.h" -#include "statebutton.h" -#include "plugins-logging-category.h" -#include "dconfig_helper.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -BluetoothDeviceItem::BluetoothDeviceItem(QStyle *style, const Device *device, PluginListView *parent) - : m_style(style) - , m_device(device) -{ - Q_UNUSED(parent) - m_standardItem = new PluginStandardItem(); - - m_standardItem->updateIcon(m_device->deviceType().isEmpty() ? QIcon::fromTheme("bluetooth_other") - : QIcon::fromTheme(QString("bluetooth_%1").arg(m_device->deviceType()))); - - updateDeviceState(m_device->state()); - - initConnect(); - - m_standardItem->updateBattery(m_device->battery()); - connect(m_device, &Device::batteryChanged, this, [this](int battery) { - m_standardItem->updateBattery(battery); - }); -} - -BluetoothDeviceItem::~BluetoothDeviceItem() -{ -} - -void BluetoothDeviceItem::initConnect() -{ - connect(m_device, &Device::stateChanged, this, &BluetoothDeviceItem::updateDeviceState); - connect(m_standardItem, &PluginStandardItem::connectBtnClicked, this, &BluetoothDeviceItem::disconnectDevice); -} - -void BluetoothDeviceItem::updateDeviceState(Device::State state) -{ - m_standardItem->updateName(m_device->alias()); - - if (state == Device::StateAvailable) { - m_standardItem->updateState(PluginItemState::Connecting); - } else if (state == Device::StateConnected) { - m_standardItem->updateState(PluginItemState::Connected); - emit requestTopDeviceItem(m_standardItem); - } else { - m_standardItem->updateState(PluginItemState::NoState); - } - - emit deviceStateChanged(m_device); -} - -BluetoothAdapterItem::BluetoothAdapterItem(Adapter *adapter, QWidget *parent) - : QWidget(parent) - , m_adapter(adapter) - , m_adapterLabel(new SettingLabel(adapter->name(), this)) - , m_adapterLayout(new QVBoxLayout) - , m_adapterStateBtn(new DSwitchButton(this)) - , m_myDeviceWidget(new QWidget(this)) - , m_myDeviceLabel(new DLabel(tr("My Devices"), this)) - , m_myDeviceListView(new PluginListView(this)) - , m_myDeviceModel(new QStandardItemModel(m_myDeviceListView)) - , m_otherDeviceControlWidget(new DeviceControlWidget(this)) - , m_otherDeviceListView(new PluginListView(this)) - , m_otherDeviceModel(new QStandardItemModel(m_otherDeviceListView)) - , m_refreshBtn(new CommonIconButton(this)) - , m_bluetoothInter(new DBusBluetooth("org.deepin.dde.Bluetooth1", "/org/deepin/dde/Bluetooth1", QDBusConnection::sessionBus(), this)) - , m_showUnnamedDevices(false) - , m_stateBtnEnabled(true) - , m_adapterSwitchEnabled(true) - , m_scanTimer(new QTimer(this)) -{ - initUi(); - initConnect(); - initData(); -} - -BluetoothAdapterItem::~BluetoothAdapterItem() -{ - qDeleteAll(m_deviceItems); -} - -void BluetoothAdapterItem::onConnectDevice(const QModelIndex &index) -{ - const QStandardItemModel *deviceModel = dynamic_cast(index.model()); - if (!deviceModel) - return; - PluginStandardItem *deviceitem = dynamic_cast(deviceModel->item(index.row())); - - foreach (const auto item, m_deviceItems) { - // 只有非连接状态才发送connectDevice信号(connectDevice信号连接的槽为取反操作,而非仅仅连接) - if (!(item->device()->state() == Device::StateUnavailable)) - continue; - - if (item->standardItem() == deviceitem) { - emit connectDevice(item->device(), m_adapter); - } - } -} - -void BluetoothAdapterItem::onTopDeviceItem(PluginStandardItem *item) -{ - if (!item || item->row() == -1 || item->row() == 0) - return; - - int row = item->row(); - // 先获取,再移除,后插入 - PluginStandardItem *sItem = dynamic_cast(m_myDeviceModel->takeItem(row, 0)); - if (sItem) { - m_myDeviceModel->removeRow(row); - m_myDeviceModel->insertRow(0, sItem); - } -} - -void BluetoothAdapterItem::onAdapterNameChanged(const QString name) -{ - m_adapterLabel->label()->setText(name); -} - -QSize BluetoothAdapterItem::sizeHint() const -{ - const int myViewHeight = m_myDeviceModel->rowCount() * (m_myDeviceListView->getItemHeight() + m_myDeviceListView->getItemSpacing()) - m_myDeviceListView->getItemSpacing() + m_myDeviceLabel->height() + 10 + m_otherDeviceControlWidget->height(); - const int otherViewHeight = 5 + m_otherDeviceModel->rowCount() * (m_otherDeviceListView->getItemHeight() + m_otherDeviceListView->getItemSpacing()) - m_otherDeviceListView->getItemSpacing(); - const int viewHeight = (m_myDeviceWidget->isVisible() ? myViewHeight : 0) + (m_otherDeviceListView->isVisibleTo(this) ? otherViewHeight : 0); - m_otherDeviceListView->setFixedHeight(otherViewHeight); - const auto &margin = m_adapterLayout->contentsMargins(); - const int adatperHeight = qMax(m_adapterLabel->sizeHint().height(), m_adapterStateBtn->sizeHint().height()) + margin.top() + margin.bottom(); - return QSize(ItemWidth, adatperHeight + (m_adapter->powered() ? viewHeight : 5)); -} - -QStringList BluetoothAdapterItem::connectedDevicesName() -{ - QStringList devices; - for (BluetoothDeviceItem *devItem : m_deviceItems) { - if (devItem && devItem->device()->state() == Device::StateConnected) { - devices << devItem->device()->alias(); - } - } - - return devices; -} - -void BluetoothAdapterItem::setStateBtnEnabled(bool enable) -{ - if (m_stateBtnEnabled != enable) { - m_stateBtnEnabled = enable; - } - - if (m_adapterStateBtn) { - m_adapterStateBtn->setEnabled(m_stateBtnEnabled); - } -} - -void BluetoothAdapterItem::initData() -{ - m_showUnnamedDevices = m_bluetoothInter->displaySwitch(); - - if (m_adapter && !m_adapter->powered()) - return; - - foreach (const auto device, m_adapter->devices()) { - if (!m_deviceItems.contains(device)) - onDeviceAdded(device); - } - setUnnamedDevicesVisible(m_showUnnamedDevices); - - if (m_adapterSwitchEnabled) { - emit deviceCountChanged(); - } -} - -void BluetoothAdapterItem::onDeviceAdded(const Device *device) -{ - if (m_adapter && !m_adapter->powered()) { - qCInfo(BLUETOOTH) << "Adapter powered is false."; - return; - } - - if (!m_showUnnamedDevices && device->name().isEmpty()) - return; - - BluetoothDeviceItem *deviceItem = new BluetoothDeviceItem(style(), device, m_otherDeviceListView); - connect(deviceItem, &BluetoothDeviceItem::requestTopDeviceItem, this, &BluetoothAdapterItem::onTopDeviceItem); - connect(deviceItem, &BluetoothDeviceItem::deviceStateChanged, this, [this, deviceItem] (const Device *device) { - Q_EMIT deviceStateChanged(device); - if (!(device->state() == Device::StateUnavailable)) - return; - PluginStandardItem *item = deviceItem->standardItem(); - if (item && deviceItem->device()->paired()) { - QModelIndex myDeviceIndex = m_myDeviceModel->indexFromItem(item); - if(myDeviceIndex.isValid()) { - PluginStandardItem *sItem = dynamic_cast(m_myDeviceModel->takeItem(myDeviceIndex.row(), 0)); - if (sItem) { - QMap::iterator i; - // 计算已连接蓝牙设备数 - int connectCount = 0; - for (i = m_deviceItems.begin(); i != m_deviceItems.end(); ++i) { - BluetoothDeviceItem *deviceItem = i.value(); - - if (deviceItem && deviceItem->device() && deviceItem->device()->paired() - && (Device::StateConnected == deviceItem->device()->state() || deviceItem->device()->connecting())) - connectCount++; - } - - m_myDeviceModel->removeRow(myDeviceIndex.row()); - m_myDeviceModel->insertRow(connectCount, sItem); - } - } - } - }); - connect(deviceItem, &BluetoothDeviceItem::disconnectDevice, this, [this, deviceItem](){ - // 只有已连接状态才发送connectDevice信号(connectDevice信号连接的槽为取反操作,而非仅仅连接) - if (deviceItem->device()->state() == Device::StateConnected) { - emit connectDevice(deviceItem->device(), m_adapter); - } - }); - connect(device, &Device::pairedChanged, deviceItem, [this, deviceItem](const bool paired) { - if (deviceItem && deviceItem->device()) { - PluginStandardItem *item = deviceItem->standardItem(); - if (item) { - if (paired) { - QModelIndex otherDeviceIndex = m_otherDeviceModel->indexFromItem(item); - if(otherDeviceIndex.isValid()) { - PluginStandardItem *sItem = dynamic_cast(m_otherDeviceModel->takeItem(otherDeviceIndex.row(), 0)); - if (sItem) { - m_otherDeviceModel->removeRow(otherDeviceIndex.row()); - m_myDeviceModel->appendRow(sItem); - } - } - } else { - QModelIndex myDeviceIndex = m_myDeviceModel->indexFromItem(item); - if (myDeviceIndex.isValid()) { - PluginStandardItem *sItem = dynamic_cast(m_myDeviceModel->takeItem(myDeviceIndex.row(), 0)); - if (sItem) { - m_myDeviceModel->removeRow(myDeviceIndex.row()); - m_otherDeviceModel->appendRow(sItem); - } - } - } - } - } - m_myDeviceWidget->setVisible(m_myDeviceModel->rowCount() > 0 && m_adapterStateBtn->isChecked()); - - if (m_adapterSwitchEnabled) { - emit deviceCountChanged(); - } - }); - - m_deviceItems.insert(device, deviceItem); - if (device->paired()) { - if (device->state() != Device::StateConnected) { - m_myDeviceModel->appendRow(deviceItem->standardItem()); - } else { - m_myDeviceModel->insertRow(0, deviceItem->standardItem()); - } - - } else { - m_otherDeviceModel->appendRow(deviceItem->standardItem()); - } - - if (m_adapterSwitchEnabled) { - emit deviceCountChanged(); - } - m_myDeviceWidget->setVisible(m_myDeviceModel->rowCount() > 0 && m_adapterStateBtn->isChecked()); -} - -void BluetoothAdapterItem::onDeviceRemoved(const Device *device) -{ - if (m_deviceItems.isEmpty()) - return; - - int row = -1; - if (!m_deviceItems.value(device)) - return; - - row = m_deviceItems.value(device)->standardItem()->row(); - if ((row < 0) || (row > m_deviceItems.size() - 1)) { - delete m_deviceItems.value(device); - m_deviceItems.remove(device); - return; - } - - QStandardItemModel *sourceModel = m_deviceItems.value(device)->standardItem()->model(); - if (sourceModel) { - for (int rowIndex = 0; rowIndex < sourceModel->rowCount(); ++rowIndex) { - QModelIndex index = sourceModel->index(rowIndex, 0); - auto item = dynamic_cast(sourceModel->itemFromIndex(index)); - if (item == m_deviceItems.value(device)->standardItem()) { - sourceModel->removeRow(rowIndex); - break; - } - } - } - - delete m_deviceItems.value(device); - m_deviceItems.remove(device); - - if (m_adapterSwitchEnabled) { - if (m_myDeviceModel->rowCount() < 1) { - m_myDeviceWidget->setVisible(false); - m_otherDeviceControlWidget->setExpandState(true); - } - emit deviceCountChanged(); - } -} - -void BluetoothAdapterItem::onDeviceNameUpdated(const Device *device) -{ - if (m_deviceItems.isEmpty()) - return; - - // 修复蓝牙设备列表中,设备名称更新后未实时刷新的问题 - if (m_deviceItems.contains(device)) { - BluetoothDeviceItem *item = m_deviceItems[device]; - if (item && !item->device()->alias().isEmpty()) { - item->updateDeviceState(item->device()->state()); - } - } -} - -void BluetoothAdapterItem::initUi() -{ - m_refreshBtn->setFixedSize(16, 16); - m_refreshBtn->setClickable(true); - m_refreshBtn->setIcon(QIcon::fromTheme("refresh")); - - setAccessibleName(m_adapter->name()); - setContentsMargins(0, 0, 0, 0); - m_adapterLayout->setContentsMargins(0, 0, 0, 5); - m_adapterLayout->setSpacing(0); - m_adapterLayout->addWidget(m_adapterLabel); - m_adapterLabel->addButton(m_refreshBtn, 6); - m_adapterLabel->addButton(m_adapterStateBtn, 0); - m_adapterStateBtn->setObjectName("AdapterStateBtn"); - DFontSizeManager::instance()->bind(m_adapterLabel->label(), DFontSizeManager::T4); - - QVBoxLayout *mainLayout = new QVBoxLayout(this); - mainLayout->setSpacing(0); - mainLayout->setContentsMargins(0, 0, 0, 0); - - m_myDeviceListView->setAccessibleName("MyDeviceItemList"); - m_myDeviceListView->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); - m_myDeviceListView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); - m_myDeviceListView->setModel(m_myDeviceModel); - m_myDeviceListView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_myDeviceListView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - QVBoxLayout *myDeviceLayout = new QVBoxLayout(m_myDeviceWidget); - myDeviceLayout->setSpacing(0); - myDeviceLayout->setContentsMargins(0, 0, 0, 0); - m_myDeviceLabel->setContentsMargins(10, 0, 0, 6); - DFontSizeManager::instance()->bind(m_myDeviceLabel, DFontSizeManager::T10); - updateMyDeviceLabelTheme(); - myDeviceLayout->addWidget(m_myDeviceLabel); - myDeviceLayout->addWidget(m_myDeviceListView); - - m_otherDeviceListView->setItemSpacing(1); - m_otherDeviceListView->setBeginningItemStyle(QStyleOptionViewItem::Beginning); - m_otherDeviceListView->setMiddleItemStyle(QStyleOptionViewItem::Middle); - m_otherDeviceListView->setEndItemStyle(QStyleOptionViewItem::End); - m_otherDeviceListView->setAccessibleName("OtherDeviceItemList"); - m_otherDeviceListView->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); - m_otherDeviceListView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - m_otherDeviceListView->setModel(m_otherDeviceModel); - m_otherDeviceListView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_otherDeviceListView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - - myDeviceLayout->addSpacing(10); - myDeviceLayout->addWidget(m_otherDeviceControlWidget); - - mainLayout->addLayout(m_adapterLayout); - mainLayout->addWidget(m_myDeviceWidget); - mainLayout->addSpacing(4); - mainLayout->addWidget(m_otherDeviceListView); - mainLayout->addStretch(); - - if (m_adapter->discover()) { - m_refreshBtn->startRotate(); - } - - const bool adapterPowered = m_adapter->powered(); - m_refreshBtn->setVisible(adapterPowered); - m_adapterStateBtn->setChecked(adapterPowered); - m_otherDeviceListView->setVisible(adapterPowered && m_otherDeviceControlWidget->isExpand()); - m_myDeviceWidget->setVisible(m_myDeviceModel->rowCount() > 0 && adapterPowered); -} - -void BluetoothAdapterItem::initConnect() -{ - m_scanTimer->setInterval(DConfigHelper::instance()->getConfig("org.deepin.dde.dock", "org.deepin.dde.dock.plugin.bluetooth", "", "scanInterval", 5).toInt() * 1000); - DConfigHelper::instance()->bind("org.deepin.dde.dock", "org.deepin.dde.dock.plugin.bluetooth", "", this, "scanInterval", [this] (const QString&, const QVariant&, QObject*) { - m_scanTimer->setInterval(DConfigHelper::instance()->getConfig("org.deepin.dde.dock", "org.deepin.dde.dock.plugin.bluetooth", "", "scanInterval", 5).toInt() * 1000); - }); - connect(m_scanTimer, &QTimer::timeout, this, [this] { - if (isVisible()) - emit requestRefreshAdapter(m_adapter); - m_scanTimer->stop(); - }); - connect(m_adapter, &Adapter::deviceAdded, this, &BluetoothAdapterItem::onDeviceAdded); - connect(m_adapter, &Adapter::deviceRemoved, this, &BluetoothAdapterItem::onDeviceRemoved); - connect(m_adapter, &Adapter::deviceNameUpdated, this, &BluetoothAdapterItem::onDeviceNameUpdated); - connect(m_adapter, &Adapter::nameChanged, this, &BluetoothAdapterItem::onAdapterNameChanged); - connect(m_otherDeviceListView, &PluginListView::clicked, this, &BluetoothAdapterItem::onConnectDevice); - connect(m_myDeviceListView, &PluginListView::clicked, this, &BluetoothAdapterItem::onConnectDevice); - connect(m_adapter, &Adapter::discoveringChanged, this, [ = ](bool state) { - if (state) { - m_refreshBtn->startRotate(); - } else { - m_refreshBtn->stopRotate(); - if (isVisible()) - m_scanTimer->start(); - } - }); - - connect(m_refreshBtn, &CommonIconButton::clicked, this, [ = ] { - emit requestRefreshAdapter(m_adapter); - }); - - connect(m_adapter, &Adapter::poweredChanged, this, [ = ](bool state) { - if (state) { - // Initialize device list when bluetooth is powered on - initData(); - } else { - // Clear device list when bluetooth is powered off - clearDeviceList(); - } - m_refreshBtn->setVisible(state); - m_myDeviceWidget->setVisible(m_myDeviceModel->rowCount() > 0 && state); - m_otherDeviceListView->setVisible(state && (m_otherDeviceControlWidget->isExpand() || m_myDeviceModel->rowCount() < 1)); - m_adapterStateBtn->setChecked(state); - m_adapterStateBtn->setEnabled(m_stateBtnEnabled); - emit adapterPowerChanged(); - }); - connect(m_adapterStateBtn, &DSwitchButton::clicked, this, [ = ](bool state) { - m_adapterSwitchEnabled = state; - clearDeviceList(); - m_myDeviceWidget->setVisible(false); - m_otherDeviceListView->setVisible(false); - m_adapterStateBtn->setEnabled(false); - m_refreshBtn->setVisible(state); - emit requestSetAdapterPower(m_adapter, state); - }); - connect(m_bluetoothInter, &DBusBluetooth::DisplaySwitchChanged, this, [ = ](bool value) { - m_showUnnamedDevices = value; - setUnnamedDevicesVisible(value); - }); - connect(m_otherDeviceControlWidget, &DeviceControlWidget::expandStateChanged, this, [this] { - m_otherDeviceListView->setVisible(m_adapter->powered() && m_otherDeviceControlWidget->isExpand()); - if (m_adapterSwitchEnabled) { - emit deviceCountChanged(); - } - }); - - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [this]{ - updateMyDeviceLabelTheme(); - update(); - }); -} - -void BluetoothAdapterItem::setUnnamedDevicesVisible(bool isShow) -{ - QMap::iterator i; - - if (isShow) { - // 计算已连接蓝牙设备数 - int connectCount = 0; - for (i = m_deviceItems.begin(); i != m_deviceItems.end(); ++i) { - BluetoothDeviceItem *deviceItem = i.value(); - - if (deviceItem && deviceItem->device() && deviceItem->device()->paired() - && (Device::StateConnected == deviceItem->device()->state() || deviceItem->device()->connecting())) - connectCount++; - } - - // 显示所有蓝牙设备 - for (i = m_deviceItems.begin(); i != m_deviceItems.end(); ++i) { - BluetoothDeviceItem *deviceItem = i.value(); - - if (deviceItem && deviceItem->device() && deviceItem->device()->name().isEmpty()) { - PluginStandardItem *dListItem = deviceItem->standardItem(); - QStandardItemModel *model = i.value()->standardItem()->model(); - if (!model) - continue; - QModelIndex index = model->indexFromItem(dListItem); - if (!index.isValid()) { - model->insertRow(((connectCount > -1 && connectCount < m_deviceItems.count()) ? connectCount : 0), dListItem); - } - } - } - - return; - } - - for (i = m_deviceItems.begin(); i != m_deviceItems.end(); ++i) { - BluetoothDeviceItem *deviceItem = i.value(); - - // 将名称为空的蓝牙设备过滤,如果蓝牙正在连接或者已连接不过滤 - if (deviceItem && deviceItem->device() && deviceItem->device()->name().isEmpty() - && (Device::StateConnected != deviceItem->device()->state() || !deviceItem->device()->connecting())) { - PluginStandardItem *dListItem = deviceItem->standardItem(); - QStandardItemModel *model = i.value()->standardItem()->model(); - if (!model) - continue; - QModelIndex index = model->indexFromItem(dListItem); - if (index.isValid()) { - model->takeRow(index.row()); - } - } - } -} - -void BluetoothAdapterItem::showEvent(QShowEvent *event) -{ - // 设置默认展开状态:只有在没有已配对设备时才展开其他设备列表 - if (m_adapterSwitchEnabled) { - bool shouldExpand = m_myDeviceModel->rowCount() < 1; - m_otherDeviceControlWidget->setExpandState(shouldExpand); - m_otherDeviceListView->setVisible(shouldExpand); - } - - emit deviceCountChanged(); - if (m_adapter->discover()) { - return; - } else if (m_adapter->powered()) { - // 蓝牙适配器开启了,但是未开启搜索,刷新蓝牙设备列表 - emit requestRefreshAdapter(m_adapter); - } - - QWidget::showEvent(event); -} - -void BluetoothAdapterItem::updateMyDeviceLabelTheme() -{ - DPalette palette = DPaletteHelper::instance()->palette(m_myDeviceLabel); - QColor textColor; - if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::LightType) { - textColor = Qt::black; - } else { - textColor = Qt::white; - } - textColor.setAlphaF(0.60); - palette.setColor(QPalette::WindowText, textColor); - DPaletteHelper::instance()->setPalette(m_myDeviceLabel, palette); -} - -void BluetoothAdapterItem::clearDeviceList() -{ - qDeleteAll(m_deviceItems); - m_deviceItems.clear(); - m_myDeviceModel->clear(); - m_otherDeviceModel->clear(); -} diff --git a/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.h b/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.h deleted file mode 100644 index a8477164b..000000000 --- a/plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.h +++ /dev/null @@ -1,208 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef BLUETOOTHADAPTERITEM_H -#define BLUETOOTHADAPTERITEM_H - -#include "commoniconbutton.h" -#include "device.h" -#include "bluetoothapplet.h" -#include "pluginlistview.h" -#include "bluetooth1interface.h" - -#include -#include - -#include - -using DBusBluetooth = org::deepin::dde::Bluetooth1; - -DWIDGET_USE_NAMESPACE - -DWIDGET_BEGIN_NAMESPACE -class DSwitchButton; -DWIDGET_END_NAMESPACE - -class Adapter; -class SettingLabel; -class QStandardItemModel; -class RefreshButton; -class HorizontalSeparator; -class StateButton; -class ListViewDelegate; - -class BluetoothDeviceItem : public QObject -{ - Q_OBJECT -public: - explicit BluetoothDeviceItem(QStyle *style = nullptr, const Device *device = nullptr, PluginListView *parent = nullptr); - virtual ~BluetoothDeviceItem(); - - PluginStandardItem *standardItem() { return m_standardItem; } - const Device *device() { return m_device; } - -public slots: - // 更新蓝牙设备的连接状态 - void updateDeviceState(Device::State state); - -signals: - void requestTopDeviceItem(PluginStandardItem *item); - void deviceStateChanged(const Device *device); - void disconnectDevice(); - -private: - void initConnect(); - - DStyleHelper m_style; - - const Device *m_device; - PluginStandardItem *m_standardItem; -}; - -class DeviceControlWidget : public QPushButton -{ - Q_OBJECT -public: - DeviceControlWidget(QWidget *parent = nullptr) - : QPushButton(parent) - , m_text(tr("Other Devices")) - , m_icon(QIcon::fromTheme("arrow-up")) - , m_isExpand(false) - { - setFixedHeight(24); - connect(this, &QPushButton::clicked, this, [this] { - setExpandState(!m_isExpand); - }); - } - - void setIcon(const QIcon &icon) { - m_icon = icon; - update(); - } - void setExpandState(bool isExpand) { - if (m_isExpand != isExpand) { - m_isExpand = isExpand; - Q_EMIT expandStateChanged(m_isExpand); - update(); - } - } - - bool isExpand() { return m_isExpand; } - -Q_SIGNALS: - void expandStateChanged(bool state); - - -protected: - void paintEvent(QPaintEvent *paint) override - { - Q_UNUSED(paint) - QPainter painter(this); - painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - // 绘制背景 - painter.setPen(Qt::NoPen); - QColor bgNomal = palette().brightText().color(); - bgNomal.setAlphaF(0.05); - QColor background = underMouse() ? palette().color(QPalette::Highlight) : bgNomal; - painter.setBrush(background); - painter.drawRoundedRect(rect(), 8, 8); - // 绘制文字 - QRect textRect = rect().marginsRemoved(QMargins(10, 0, 0, 0)); - QColor textNomal = palette().brightText().color(); - textNomal.setAlphaF(0.6); - QColor textColor = underMouse() ? palette().color(QPalette::HighlightedText) : textNomal; - painter.setPen(textColor); - auto pFont = painter.font(); - pFont.setWeight(QFont::Normal); - pFont.setPixelSize(DFontSizeManager::instance()->fontPixelSize(DFontSizeManager::T10)); - painter.setFont(pFont); - QTextOption opt; - opt.setAlignment(Qt::AlignLeft | Qt::AlignVCenter); - painter.drawText(textRect, m_text, opt); - // 绘制图标 - painter.setPen(textColor); - QRect iconRect = QRect(rect().x() + rect().width() - 22, rect().y() + 6, 12, 12); - if (!m_isExpand) { - painter.translate(iconRect.x() + iconRect.width() / 2, rect().height() / 2); - painter.rotate(180); - painter.translate(-(iconRect.x() + iconRect.width() / 2), -(rect().height() / 2)); - } - m_icon.paint(&painter, iconRect); - } - -private: - QString m_text; - QIcon m_icon; - bool m_isExpand; -}; - -class BluetoothAdapterItem : public QWidget -{ - Q_OBJECT -public: - explicit BluetoothAdapterItem(Adapter *adapter, QWidget *parent = nullptr); - ~BluetoothAdapterItem(); - Adapter *adapter() { return m_adapter; } - QStringList connectedDevicesName(); - void setStateBtnEnabled(bool); - -public slots: - // 添加蓝牙设备 - void onDeviceAdded(const Device *device); - // 移除蓝牙设备 - void onDeviceRemoved(const Device *device); - // 蓝牙设备名称更新 - void onDeviceNameUpdated(const Device *device); - // 连接蓝牙设备 - void onConnectDevice(const QModelIndex &index); - // 将已连接的蓝牙设备放到列表第一个 - void onTopDeviceItem(PluginStandardItem *item); - // 设置蓝牙适配器名称 - void onAdapterNameChanged(const QString name); - - QSize sizeHint() const override; - -protected: - void showEvent(QShowEvent *event) override; - -signals: - void adapterPowerChanged(); - void requestSetAdapterPower(Adapter *adapter, bool state); - void requestRefreshAdapter(Adapter *adapter); - void connectDevice(const Device *device, Adapter *adapter); - void deviceCountChanged(); - void deviceStateChanged(const Device *device); - -private: - void initData(); - void initUi(); - void initConnect(); - void setUnnamedDevicesVisible(bool isShow); - void updateMyDeviceLabelTheme(); - void clearDeviceList(); - - Adapter *m_adapter; - SettingLabel *m_adapterLabel; - QVBoxLayout *m_adapterLayout; - DSwitchButton *m_adapterStateBtn; - QWidget *m_myDeviceWidget; - DLabel *m_myDeviceLabel; - PluginListView *m_myDeviceListView; - QStandardItemModel *m_myDeviceModel; - - DeviceControlWidget *m_otherDeviceControlWidget; - PluginListView *m_otherDeviceListView; - QStandardItemModel *m_otherDeviceModel; - CommonIconButton *m_refreshBtn; - DBusBluetooth *m_bluetoothInter; - bool m_showUnnamedDevices; - bool m_stateBtnEnabled; - bool m_adapterSwitchEnabled; - - QTimer *m_scanTimer; - - QMap m_deviceItems; -}; - -#endif // BLUETOOTHADAPTERITEM_H diff --git a/plugins/dde-dock/bluetooth/componments/bluetoothapplet.cpp b/plugins/dde-dock/bluetooth/componments/bluetoothapplet.cpp deleted file mode 100644 index 1e71b7c39..000000000 --- a/plugins/dde-dock/bluetooth/componments/bluetoothapplet.cpp +++ /dev/null @@ -1,377 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "bluetoothapplet.h" - -#include "adapter.h" -#include "adaptersmanager.h" -#include "bluetoothadapteritem.h" -#include "bluetoothconstants.h" -#include "device.h" -#include "horizontalseparator.h" -#include "jumpsettingbutton.h" -#include "constants.h" -#include "plugins-logging-category.h" -#include "touchscrollfilter.h" - -#include "xdgactivation.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -SettingLabel::SettingLabel(QString text, QWidget *parent) - : QWidget(parent) - , m_label(new DLabel(text, this)) - , m_layout(new QHBoxLayout(this)) -{ - setAccessibleName("BluetoothSettingLabel"); - setContentsMargins(0, 0, 0, 0); - m_layout->setSpacing(0); - m_layout->setContentsMargins(10, 0, 0, 0); - m_layout->addWidget(m_label, 0, Qt::AlignLeft | Qt::AlignHCenter); - m_layout->addStretch(); - - setAutoFillBackground(true); - QPalette p = this->palette(); - p.setColor(QPalette::Window, Qt::transparent); - this->setPalette(p); - - m_label->setForegroundRole(QPalette::BrightText); - m_label->setElideMode(Qt::ElideRight); -} - -void SettingLabel::addButton(QWidget *button, int space) -{ - m_layout->addSpacing(4); - m_layout->addWidget(button, 0, Qt::AlignRight | Qt::AlignHCenter); - m_layout->addSpacing(space); -} - -void SettingLabel::mousePressEvent(QMouseEvent *ev) -{ - if (ev->button() == Qt::LeftButton) { - Q_EMIT clicked(); - return; - } - - return QWidget::mousePressEvent(ev); -} - -void SettingLabel::paintEvent(QPaintEvent *event) -{ - QPainter painter(this); - painter.setPen(Qt::NoPen); - painter.drawRoundedRect(rect(), 0, 0); - - return QWidget::paintEvent(event); -} - -BluetoothApplet::BluetoothApplet(AdaptersManager *adapterManager, QWidget *parent) - : QWidget(parent) - , m_scrollArea(nullptr) - , m_contentWidget(new QWidget(this)) - , m_disableWidget(new QWidget(this)) - , m_airplaneModeWidget(new QWidget(this)) - , m_airplaneModeLabel(new DTipLabel(QString(), m_airplaneModeWidget)) - , m_adaptersManager(adapterManager) - , m_settingBtn(new JumpSettingButton(QIcon::fromTheme("bluetooth-open"), tr("Bluetooth settings"), this)) - , m_mainLayout(new QVBoxLayout(this)) - , m_contentLayout(new QVBoxLayout(m_contentWidget)) - , m_airPlaneModeInter(new DBusAirplaneMode("org.deepin.dde.AirplaneMode1", "/org/deepin/dde/AirplaneMode1", QDBusConnection::systemBus(), this)) - , m_airplaneModeEnable(false) - , m_minHeight(0) -{ - initUi(); - initConnect(); -} - -bool BluetoothApplet::poweredInitState() -{ - foreach (const auto adapter, m_adapterItems) { - if (adapter->adapter()->powered()) { - return true; - } - } - - return false; -} - -bool BluetoothApplet::hasAdapter() -{ - return m_adaptersManager->adaptersCount(); -} - -void BluetoothApplet::setAdapterRefresh() -{ - for (BluetoothAdapterItem *adapterItem : m_adapterItems) { - if (adapterItem->adapter()->discover()) - m_adaptersManager->adapterRefresh(adapterItem->adapter()); - } - updateSize(); -} - -void BluetoothApplet::setAdapterPowered(bool state) -{ - for (BluetoothAdapterItem *adapterItem : m_adapterItems) { - if (adapterItem) - m_adaptersManager->setAdapterPowered(adapterItem->adapter(), state); - } -} - -QStringList BluetoothApplet::connectedDevicesName() -{ - QStringList deviceList; - for (BluetoothAdapterItem *adapterItem : m_adapterItems) { - if (adapterItem) - deviceList << adapterItem->connectedDevicesName(); - } - - return deviceList; -} - -void BluetoothApplet::onAdapterAdded(Adapter *adapter) -{ - if (m_adapterItems.contains(adapter->id())) { - onAdapterRemoved(m_adapterItems.value(adapter->id())->adapter()); - } - - BluetoothAdapterItem *adapterItem = new BluetoothAdapterItem(adapter, this); - connect(adapterItem, &BluetoothAdapterItem::requestSetAdapterPower, this, &BluetoothApplet::onSetAdapterPower); - connect(adapterItem, &BluetoothAdapterItem::connectDevice, m_adaptersManager, &AdaptersManager::connectDevice); - connect(adapterItem, &BluetoothAdapterItem::deviceCountChanged, this, &BluetoothApplet::updateSize); - connect(adapterItem, &BluetoothAdapterItem::adapterPowerChanged, this, &BluetoothApplet::updateBluetoothPowerState); - connect(adapterItem, &BluetoothAdapterItem::deviceStateChanged, this, &BluetoothApplet::deviceStateChanged); - connect(adapterItem, &BluetoothAdapterItem::requestRefreshAdapter, m_adaptersManager, &AdaptersManager::adapterRefresh); - - m_adapterItems.insert(adapter->id(), adapterItem); - - // 如果开启了飞行模式,置灰蓝牙适配器使能开关 - foreach (const auto item, m_adapterItems) { - item->setStateBtnEnabled(!m_airPlaneModeInter->enabled()); - } - - m_contentLayout->insertWidget(m_contentLayout->count() - 1, adapterItem, 0, Qt::AlignTop); - updateBluetoothPowerState(); - updateSize(); - - if (m_adapterItems.size()) { - emit justHasAdapter(); - } -} - -void BluetoothApplet::onAdapterRemoved(Adapter *adapter) -{ - m_contentLayout->removeWidget(m_adapterItems.value(adapter->id())); - m_adapterItems.value(adapter->id())->deleteLater(); - m_adapterItems.remove(adapter->id()); - if (m_adapterItems.isEmpty()) { - emit noAdapter(); - } - updateBluetoothPowerState(); - updateSize(); -} - -void BluetoothApplet::onSetAdapterPower(Adapter *adapter, bool state) -{ - m_adaptersManager->setAdapterPowered(adapter, state); - updateSize(); -} - -void BluetoothApplet::updateBluetoothPowerState() -{ - const bool isOneDisable = m_adapterItems.size() == 1 && !m_adapterItems.first()->adapter()->powered(); - m_disableWidget->setVisible(m_airplaneModeEnable ? false : isOneDisable); - m_airplaneModeWidget->setVisible(m_airplaneModeEnable); - - foreach (const auto item, m_adapterItems) { - if (item->adapter()->powered()) { - emit powerChanged(true); - updateSize(); - return; - } - } - emit powerChanged(false); - updateSize(); -} - -void BluetoothApplet::initUi() -{ - setAccessibleName("BluetoothApplet"); - setContentsMargins(0, 0, 0, 0); - - m_contentLayout->setSpacing(0); - m_contentLayout->setContentsMargins(10, 0, 10, 0); - m_contentLayout->addStretch(); - - m_scrollArea = new QScrollArea(this); - m_scrollArea->setWidgetResizable(true); - m_scrollArea->setWidget(m_contentWidget); - m_contentWidget->setFixedWidth(Dock::DOCK_POPUP_WIDGET_WIDTH); - - m_scrollArea->setFrameShape(QFrame::NoFrame); - m_scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_scrollArea->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding); - m_scrollArea->setAutoFillBackground(true); - m_scrollArea->viewport()->setAutoFillBackground(true); - QPalette scrollAreaBackground = this->palette(); - scrollAreaBackground.setColor(QPalette::ColorRole::Window, Qt::transparent); - m_scrollArea->setPalette(scrollAreaBackground); - - // QScroller::grabGesture(m_scrollArea->viewport(), QScroller::LeftMouseButtonGesture); - new TouchScrollFilter(m_scrollArea); - - m_mainLayout->setSpacing(0); - m_mainLayout->setContentsMargins(0, 10, 0, 0); - m_mainLayout->addWidget(m_scrollArea); - - // 飞行模式跳转tip - QVBoxLayout *airplaneLayout = new QVBoxLayout(m_airplaneModeWidget); - airplaneLayout->setContentsMargins(20, 0, 10, 0); - airplaneLayout->setSpacing(0); - m_airplaneModeLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop); - m_airplaneModeLabel->setText(tr("Disable [Airplane Mode](#) first if you want to connect to a Bluetooth")); - m_airplaneModeLabel->setTextFormat(Qt::MarkdownText); - m_airplaneModeLabel->setWordWrap(true); - DFontSizeManager::instance()->bind(m_airplaneModeLabel, DFontSizeManager::T8); - airplaneLayout->addWidget(m_airplaneModeLabel, 0, Qt::AlignTop); - airplaneLayout->addStretch(1); - m_airplaneModeWidget->setVisible(false); - m_airplaneModeWidget->setFixedWidth(ItemWidth); - m_mainLayout->addWidget(m_airplaneModeWidget); - - QToolButton *disableIcon = new QToolButton(m_disableWidget); - disableIcon->setAttribute(Qt::WA_TransparentForMouseEvents); - disableIcon->setIcon(QIcon::fromTheme("bluetooth_disable")); - disableIcon->setIconSize(QSize(96, 96)); - disableIcon->setFixedSize(96, 96); - - DLabel *disableText = new DLabel(tr("Turned off"), m_disableWidget); - disableText->setForegroundRole(DPalette::TextTips); - DFontSizeManager::instance()->bind(disableText, DFontSizeManager::T8); - - QVBoxLayout *lay = new QVBoxLayout(m_disableWidget); - lay->setSpacing(0); - lay->setContentsMargins(0, 0, 0, 20); - lay->addStretch(); - lay->addWidget(disableIcon, 0, Qt::AlignCenter); - lay->addSpacing(2); - lay->addWidget(disableText, 0, Qt::AlignCenter); - lay->addStretch(); - m_disableWidget->setFixedWidth(ItemWidth); - - m_mainLayout->addWidget(m_disableWidget); - - QHBoxLayout *btnLayout = new QHBoxLayout(); - btnLayout->setSpacing(0); - btnLayout->setContentsMargins(10, 10, 10, 10); - btnLayout->addWidget(m_settingBtn); - m_settingBtn->setDccPage("bluetooth", QString()); - m_settingBtn->setFixedHeight(DeviceItemHeight); - m_mainLayout->addLayout(btnLayout, Qt::AlignBottom | Qt::AlignVCenter); - - setAirplaneModeEnabled(m_airPlaneModeInter->enabled()); - updateBluetoothPowerState(); - updateSize(); -} - -void BluetoothApplet::initConnect() -{ - connect(m_adaptersManager, &AdaptersManager::adapterIncreased, this, &BluetoothApplet::onAdapterAdded); - connect(m_adaptersManager, &AdaptersManager::adapterDecreased, this, &BluetoothApplet::onAdapterRemoved); - - connect(m_settingBtn, &JumpSettingButton::showPageRequestWasSended, this, &BluetoothApplet::requestHideApplet); - - connect(m_airPlaneModeInter, &DBusAirplaneMode::EnabledChanged, this, &BluetoothApplet::setAirplaneModeEnabled); - connect(m_airPlaneModeInter, &DBusAirplaneMode::EnabledChanged, this, [this](bool enabled) { - foreach (const auto item, m_adapterItems) { - item->setStateBtnEnabled(!enabled); - } - m_disableWidget->setVisible(false); - m_airplaneModeWidget->setVisible(enabled); - updateSize(); - }); - - connect(m_airplaneModeLabel, &DTipLabel::linkActivated, this, [this] { - auto *activation = new tray::XdgActivation(this); - connect(activation, &tray::XdgActivation::tokenReady, this, [activation](const QString &token) { - QStringList args {"--by-user", "org.deepin.dde.control-center"}; - if (!token.isEmpty()) - args << "-e" << "XDG_ACTIVATION_TOKEN=" + token; - args << "--" << "-p" << "network/airplaneMode"; - QProcess::startDetached("dde-am", args); - activation->deleteLater(); - }, Qt::SingleShotConnection); - activation->requestToken(); - Q_EMIT requestHideApplet(); - }); -} - -void BluetoothApplet::setAirplaneModeEnabled(bool enable) -{ - if (m_airplaneModeEnable == enable) - return; - - m_airplaneModeEnable = enable; -} - -void BluetoothApplet::updateSize() -{ - int height = 0; - - // 各蓝牙适配器高度之和 - foreach (const auto item, m_adapterItems) { - height += item->sizeHint().height(); - } - int adapterHeight = height; - - // 加上蓝牙设置选项的高度 - static const int settingHeight = DeviceItemHeight + 10 + 10; - height += settingHeight; - - // 最大的高度为显示8个设备的高度 - static const int maxHeight = (TitleHeight + TitleSpace) + (MaxDeviceCount * DeviceItemHeight) + ((MaxDeviceCount-1) * 10) + settingHeight; - - // 如果比允许的最大高度还大,则以最大高度为准 - height = qMin(maxHeight, height); - - // 如果比快捷面板允许的最小高度还小,则以快捷面板允许的最小高度为准 - const int hMargins = m_mainLayout->contentsMargins().top() + m_mainLayout->contentsMargins().bottom(); - height = qMax(m_minHeight - hMargins, height); - - // 加上飞行模式提示控件高度 - m_airplaneModeWidget->isVisibleTo(this) ? m_airplaneModeWidget->setFixedHeight(height - settingHeight - adapterHeight) : m_airplaneModeWidget->setFixedHeight(0); - - // 加上提示控件高度 - m_disableWidget->isVisibleTo(this) ? m_disableWidget->setFixedHeight(height - settingHeight - adapterHeight) : m_disableWidget->setFixedHeight(0); - - // 设置滚动区高度 - const int scrollAreaHeight = height - settingHeight - m_disableWidget->height() - m_airplaneModeWidget->height(); - m_scrollArea->setFixedHeight(scrollAreaHeight); - // 确保内容控件高度至少等于适配器高度,并且不会超过滚动区域的高度太多 - m_contentWidget->setMinimumHeight(qMax(adapterHeight, scrollAreaHeight)); - - // top and bottom margin - height += hMargins; - - setFixedSize(ItemWidth, height); -} - -void BluetoothApplet::updateMinHeight(int minHeight) -{ - m_minHeight = minHeight; - updateSize(); -} diff --git a/plugins/dde-dock/bluetooth/componments/bluetoothapplet.h b/plugins/dde-dock/bluetooth/componments/bluetoothapplet.h deleted file mode 100644 index c3d154d5b..000000000 --- a/plugins/dde-dock/bluetooth/componments/bluetoothapplet.h +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef BLUETOOTHAPPLET_H -#define BLUETOOTHAPPLET_H - -#include "airplanemode1interface.h" - -#include - -#include -#include -#include - -class QVBoxLayout; -class QHBoxLayout; - -class Device; -class Adapter; -class BluetoothAdapterItem; -class AdaptersManager; -class JumpSettingButton; - -DWIDGET_BEGIN_NAMESPACE -class DLabel; -class DSwitchButton; -class DListView; -class DTipLabel; -DWIDGET_END_NAMESPACE - -DWIDGET_USE_NAMESPACE - -using DBusAirplaneMode = org::deepin::dde::AirplaneMode1; - -class SettingLabel : public QWidget -{ - Q_OBJECT -public: - explicit SettingLabel(QString text, QWidget *parent = nullptr); - void addButton(QWidget *button, int space); - - DLabel *label() { return m_label; } - -signals: - void clicked(); - -protected: - void mousePressEvent(QMouseEvent *ev) override; - void paintEvent(QPaintEvent *event) override; - -private: - DLabel *m_label; - QHBoxLayout *m_layout; -}; - -class BluetoothApplet : public QWidget -{ - Q_OBJECT -public: - explicit BluetoothApplet(AdaptersManager *adapterManager, QWidget *parent = nullptr); - bool poweredInitState(); - // 当前是否有蓝牙适配器 - bool hasAdapter(); - // 刷新蓝牙适配器搜索到的设备列表 - void setAdapterRefresh(); - // 设置当前所有蓝牙适配器的电源状态 - void setAdapterPowered(bool state); - // 已连接蓝牙设备名称列表,用于获取鼠标悬浮在蓝牙插件上时tips显示内容 - QStringList connectedDevicesName(); - - inline bool airplaneModeEnable() const { return m_airplaneModeEnable; } - -signals: - void noAdapter(); - void justHasAdapter(); - void powerChanged(bool state); - void deviceStateChanged(const Device *device); - void requestHideApplet(); - -public slots: - // 蓝牙适配器增加 - void onAdapterAdded(Adapter *adapter); - // 蓝牙适配器移除 - void onAdapterRemoved(Adapter *adapter); - // 设置蓝牙适配器电源是否开启 - void onSetAdapterPower(Adapter *adapter, bool state); - // 更新蓝牙适配器电源状态,用于更新任务栏蓝牙插件图标的显示状态 - void updateBluetoothPowerState(); - void setAirplaneModeEnabled(bool enable); - void updateMinHeight(int minHeight); - -private: - void initUi(); - void initConnect(); - // 更新蓝牙插件主界面大小 - void updateSize(); - -private: - QScrollArea *m_scrollArea; - QWidget *m_contentWidget; - QWidget *m_disableWidget; - QWidget *m_airplaneModeWidget; - DTipLabel *m_airplaneModeLabel; - AdaptersManager *m_adaptersManager; - JumpSettingButton *m_settingBtn; - QVBoxLayout *m_mainLayout; - QVBoxLayout *m_contentLayout; - - QStringList m_connectDeviceName; - QMap m_adapterItems; // 所有蓝牙适配器 - DBusAirplaneMode *m_airPlaneModeInter; - bool m_airplaneModeEnable; - int m_minHeight; -}; - -#endif // BLUETOOTHAPPLET_H diff --git a/plugins/dde-dock/bluetooth/componments/bluetoothconstants.h b/plugins/dde-dock/bluetooth/componments/bluetoothconstants.h deleted file mode 100644 index 1714eb753..000000000 --- a/plugins/dde-dock/bluetooth/componments/bluetoothconstants.h +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef BLUETOOTHCONSTANTS_H -#define BLUETOOTHCONSTANTS_H - -const int DeviceItemHeight = 36; -const int ItemWidth = 330; -const int TitleHeight = 46; -const int TitleSpace = 2; -const int MaxDeviceCount = 8; - -#endif // BLUETOOTHCONSTANTS_H diff --git a/plugins/dde-dock/bluetooth/componments/device.cpp b/plugins/dde-dock/bluetooth/componments/device.cpp deleted file mode 100644 index 1ce813d61..000000000 --- a/plugins/dde-dock/bluetooth/componments/device.cpp +++ /dev/null @@ -1,127 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "device.h" - -#include -#include - -QMap Device::deviceType2Icon = { - {"unknow", "other"}, - {"computer", "pc"}, - {"phone", "phone"}, - {"video-display", "vidicon"}, - {"multimedia-player", "tv"}, - {"scanner", "scaner"}, - {"input-keyboard", "keyboard"}, - {"input-mouse", "mouse"}, - {"input-gaming", "other"}, - {"input-tablet", "touchpad"}, - {"audio-card", "pheadset"}, - {"audio-headset", "pheadset"}, - {"audio-headphones", "pheadset"}, - {"network-wireless", "lan"}, - {"camera-video", "vidicon"}, - {"printer", "print"}, - {"camera-photo", "camera"}, - {"modem", "other"} -}; - -Device::Device(QObject *parent) - : QObject(parent) - , m_paired(false) - , m_trusted(false) - , m_connecting(false) - , m_rssi(0) - , m_state(StateUnavailable) - , m_connectState(false) - , m_battery(0) -{ -} - -Device::~Device() -{ -} - -void Device::setId(const QString &id) -{ - m_id = id; -} - -void Device::setName(const QString &name) -{ - if (name != m_name) { - m_name = name; - Q_EMIT nameChanged(name); - } -} - -void Device::setAlias(const QString &alias) -{ - if (alias != m_alias) { - m_alias = alias; - Q_EMIT aliasChanged(alias); - } -} - -void Device::setPaired(bool paired) -{ - if (paired != m_paired) { - m_paired = paired; - Q_EMIT pairedChanged(paired); - } -} - -void Device::setState(const State &state) -{ - // 后端频繁发送属性改变信号,dbus信号处理顺序可能异常(不一定按顺序执行),会导致蓝牙连接状态显示异常 - // 如果当前蓝牙设备状态为已连接,后端传递的状态为正在连接中,此操作视为一次异常的信号(Device::StateConnected -> Device::StateAvailable),不做处理 - // 正常的蓝牙连接状态为Device::StateAvailable -> Device::StateConnected - if (m_state == Device::StateConnected && state == Device::StateAvailable) { - return; - } - - if (state != m_state) { - m_state = state; - Q_EMIT stateChanged(state); - } -} - -void Device::setConnectState(const bool connectState) -{ - if (connectState != m_connectState) { - m_connectState = connectState; - Q_EMIT connectStateChanged(connectState); - } -} - -void Device::setRssi(int rssi) -{ - if (m_rssi != rssi) { - m_rssi = rssi; - Q_EMIT rssiChanged(rssi); - } -} - -void Device::setBattery(const int battery) -{ - if (m_battery != battery) { - m_battery = battery; - Q_EMIT batteryChanged(m_battery); - } -} - -void Device::setDeviceType(const QString &deviceType) -{ - m_deviceType = deviceType2Icon[deviceType]; -} - -QDebug &operator<<(QDebug &stream, const Device *device) -{ - stream << "Device name: " << device->name() - << ", paired:" << device->paired() - << ", state:" << device->state(); - - return stream; -} diff --git a/plugins/dde-dock/bluetooth/componments/device.h b/plugins/dde-dock/bluetooth/componments/device.h deleted file mode 100644 index 0451e572d..000000000 --- a/plugins/dde-dock/bluetooth/componments/device.h +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef DEVICE_H -#define DEVICE_H - -#include -#include - -class Device : public QObject -{ - Q_OBJECT - -public: - enum State { - StateUnavailable = 0, - StateAvailable = 1, - StateConnected = 2 - }; - Q_ENUM(State) - -private: - static QMap deviceType2Icon; - -public: - explicit Device(QObject *parent = nullptr); - ~Device(); - - inline QString id() const { return m_id; } - void setId(const QString &id); - - inline QString name() const { return m_name; } - void setName(const QString &name); - - inline QString alias() const { return m_alias; } - void setAlias(const QString &alias); - - inline bool paired() const { return m_paired; } - void setPaired(bool paired); - - inline State state() const { return m_state; } - void setState(const State &state); - - inline bool connectState() const { return m_connectState; } - void setConnectState(const bool connectState); - - inline bool trusted() const { return m_trusted; } - - inline bool connecting() const { return m_connecting; } - - inline int rssi() const { return m_rssi; } - void setRssi(int rssi); - - inline void setAdapterId(const QString &id) { m_adapterId = id; } - inline const QString &getAdapterId() const { return m_adapterId; } - - inline int battery() const { return m_battery; } - void setBattery(const int battery); - - inline QString deviceType() const { return m_deviceType; } - void setDeviceType(const QString &deviceType); - -Q_SIGNALS: - void nameChanged(const QString &name) const; - void aliasChanged(const QString &alias) const; - void pairedChanged(const bool paired) const; - void stateChanged(const State state) const; - void connectStateChanged(const bool connectState) const; - void rssiChanged(const int rssi) const; - void batteryChanged(const int battery) const; - -private: - QString m_id; - QString m_name; - QString m_alias; - bool m_paired; - bool m_trusted; - bool m_connecting; - int m_rssi; - State m_state; - bool m_connectState; - int m_battery; - QString m_adapterId; - QString m_deviceType; -}; - -QDebug &operator<<(QDebug &stream, const Device *device); - -#endif // DEVICE_H diff --git a/plugins/dde-dock/bluetooth/componments/refreshbutton.cpp b/plugins/dde-dock/bluetooth/componments/refreshbutton.cpp deleted file mode 100644 index ee2d507d8..000000000 --- a/plugins/dde-dock/bluetooth/componments/refreshbutton.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "refreshbutton.h" -#include "imageutil.h" - -#include -#include -#include -#include -#include -#include - -RefreshButton::RefreshButton(QWidget *parent) - : QWidget(parent) - , m_refreshTimer(new QTimer(this)) - , m_rotateAngle(0) -{ - setAccessibleName("RefreshButton"); - m_refreshTimer->setInterval(500 / 60); - initConnect(); -} - -void RefreshButton::setRotateIcon(QString path) -{ - m_pixmap = ImageUtil::loadSvg(path, ":/", qMin(width(), height()), devicePixelRatio()); -} - -void RefreshButton::startRotate() -{ - m_refreshTimer->start(); - if (m_rotateAngle == 360) { - m_rotateAngle = 0; - } - m_rotateAngle += 360 / 60; - update(); -} - -void RefreshButton::stopRotate() -{ - m_refreshTimer->stop(); - m_rotateAngle = 0; - update(); -} - -void RefreshButton::paintEvent(QPaintEvent *e) -{ - QPainter painter(this); - painter.setPen(Qt::NoPen); - painter.setBrush(Qt::NoBrush); - painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - - painter.translate(this->width() / 2, this->height() / 2); - painter.rotate(m_rotateAngle); - painter.translate(-(this->width() / 2), -(this->height() / 2)); - painter.drawPixmap(this->rect(), m_pixmap); - - QWidget::paintEvent(e); -} - -void RefreshButton::mousePressEvent(QMouseEvent *event) -{ - m_pressPos = event->pos(); - return QWidget::mousePressEvent(event); -} - -void RefreshButton::mouseReleaseEvent(QMouseEvent *event) -{ - if (rect().contains(m_pressPos) && rect().contains(event->pos()) && !m_refreshTimer->isActive()) - Q_EMIT clicked(); - return QWidget::mouseReleaseEvent(event); -} - -void RefreshButton::initConnect() -{ - connect(m_refreshTimer, &QTimer::timeout, this, &RefreshButton::startRotate); -} diff --git a/plugins/dde-dock/bluetooth/componments/refreshbutton.h b/plugins/dde-dock/bluetooth/componments/refreshbutton.h deleted file mode 100644 index a02ee0d6e..000000000 --- a/plugins/dde-dock/bluetooth/componments/refreshbutton.h +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef REFRESHBUTTON_H -#define REFRESHBUTTON_H - -#include - -class QTimer; - -class RefreshButton : public QWidget -{ - Q_OBJECT -public: - explicit RefreshButton(QWidget *parent = nullptr); - void setRotateIcon(QString path); - void startRotate(); - void stopRotate(); - -signals: - void clicked(); - -protected: - void paintEvent(QPaintEvent *e) override; - void mousePressEvent(QMouseEvent *event) override; - void mouseReleaseEvent(QMouseEvent *event) override; - -private: - void initConnect(); - - QTimer *m_refreshTimer; - QPixmap m_pixmap; - QPoint m_pressPos; - int m_rotateAngle; -}; - -#endif // REFRESHBUTTON_H diff --git a/plugins/dde-dock/bluetooth/quickpanelwidget.cpp b/plugins/dde-dock/bluetooth/quickpanelwidget.cpp deleted file mode 100644 index 49303f451..000000000 --- a/plugins/dde-dock/bluetooth/quickpanelwidget.cpp +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (C) 2022 ~ 2026 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "quickpanelwidget.h" - -#include -#include - -#include -#include -#include -#include -#include -#include - -DGUI_USE_NAMESPACE -DWIDGET_USE_NAMESPACE - -const QSize IconSize(22, 22); // 图标大小 - -class QuickButton : public DFloatingButton -{ -public: - QuickButton(QWidget *parent = nullptr) - : DFloatingButton(parent) - { - } - -protected: - void initStyleOption(DStyleOptionButton *option) const override - { - DFloatingButton::initStyleOption(option); - QColor bgColor = option->dpalette.color(backgroundRole()); - QColor textColor = option->dpalette.color(foregroundRole()); - if (backgroundRole() == QPalette::Highlight) { - textColor = Qt::white; - if (!option->state.testFlag(QStyle::State_Raised)) { // press - bgColor.setHslF(bgColor.hslHueF(), bgColor.hslSaturationF(), bgColor.lightnessF() * 0.9); - textColor.setAlphaF(0.8); - } else if (option->state.testFlag(QStyle::State_MouseOver)) { // hover - bgColor.setHslF(bgColor.hslHueF(), bgColor.hslSaturationF(), bgColor.lightnessF() * 1.1); - } - } else { - textColor.setAlphaF(1); - if (!option->state.testFlag(QStyle::State_Raised)) { // press - bgColor.setAlphaF(0.2); - } else if (option->state.testFlag(QStyle::State_MouseOver)) { // hover - bgColor.setAlphaF(0.15); - } else { // normal - bgColor.setAlphaF(0.1); - } - } - option->palette.setBrush(QPalette::Button, bgColor); - option->palette.setBrush(QPalette::ButtonText, textColor); - option->state.setFlag(QStyle::State_MouseOver, false); - option->state.setFlag(QStyle::State_Sunken, false); - option->state.setFlag(QStyle::State_Raised, true); - } -}; - -QuickPanelWidget::QuickPanelWidget(QWidget *parent) - : QWidget(parent) - , m_iconWidget(new QuickButton(this)) - , m_nameLabel(new DLabel(this)) - , m_stateLabel(new DLabel(this)) - , m_expandLabel(new DIconButton(this)) -{ - initUi(); - initConnection(); -} - -QuickPanelWidget::~QuickPanelWidget() { } - -void QuickPanelWidget::setIcon(const QIcon &icon) -{ - m_iconWidget->setIcon(icon); -} - -void QuickPanelWidget::setText(const QString &text) -{ - m_nameLabel->setText(text); -} - -void QuickPanelWidget::setDescription(const QString &description) -{ - m_stateLabel->setText(description); -} - -void QuickPanelWidget::setActive(bool active) -{ - m_iconWidget->setBackgroundRole(active ? QPalette::Highlight : QPalette::BrightText); -} - -void QuickPanelWidget::mousePressEvent(QMouseEvent *event) -{ - switch (event->button()) { - case Qt::LeftButton: - m_clickPoint = event->pos(); - break; - default: - break; - } - QWidget::mousePressEvent(event); -} - -void QuickPanelWidget::mouseReleaseEvent(QMouseEvent *event) -{ - switch (event->button()) { - case Qt::LeftButton: - if (m_clickPoint == event->pos()) - Q_EMIT panelClicked(); - break; - default: - break; - } - m_clickPoint = QPoint(); - return QWidget::mouseReleaseEvent(event); -} - -void QuickPanelWidget::initUi() -{ - QWidget *labelWidget = new QWidget(this); - - DFontSizeManager::instance()->bind(m_nameLabel, DFontSizeManager::T6, QFont::Normal); - DToolTip::setToolTipShowMode(m_nameLabel, DToolTip::ShowWhenElided); - m_nameLabel->setElideMode(Qt::ElideRight); - m_nameLabel->setContentsMargins(0, 2, 0, 0); - m_nameLabel->setForegroundRole(QPalette::BrightText); - - DFontSizeManager::instance()->bind(m_stateLabel, DFontSizeManager::T10); - DToolTip::setToolTipShowMode(m_stateLabel, DToolTip::ShowWhenElided); - m_stateLabel->setElideMode(Qt::ElideRight); - - QVBoxLayout *layout = new QVBoxLayout(labelWidget); - layout->setContentsMargins(0, 8, 0, 8); - layout->setSpacing(0); - layout->addWidget(m_nameLabel); - layout->addWidget(m_stateLabel); - - // 图标 - m_iconWidget->setEnabledCircle(true); - m_iconWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - m_iconWidget->setIconSize(IconSize); - m_iconWidget->setCheckable(false); - m_iconWidget->setFixedSize(QSize(40, 40)); - m_iconWidget->setFocusPolicy(Qt::NoFocus); - - // 进入图标 - m_expandLabel->setIcon(DStyle::standardIcon(style(), DStyle::SP_ArrowEnter)); - m_expandLabel->setObjectName("ExpandLabel"); - m_expandLabel->setFlat(true); - m_expandLabel->setFocusPolicy(Qt::NoFocus); - - m_expandLabel->setAttribute(Qt::WA_TransparentForMouseEvents); - - QHBoxLayout *mainLayout = new QHBoxLayout(this); - mainLayout->setContentsMargins(10, 0, 10, 0); - mainLayout->setSpacing(0); - mainLayout->addWidget(m_iconWidget); - mainLayout->addSpacing(10); - mainLayout->addWidget(labelWidget); - mainLayout->addStretch(1); - mainLayout->addWidget(m_expandLabel); - - setActive(true); - setFixedSize(150, 60); -} - -void QuickPanelWidget::initConnection() -{ - connect(m_iconWidget, &DFloatingButton::clicked, this, &QuickPanelWidget::iconClicked); -} diff --git a/plugins/dde-dock/bluetooth/quickpanelwidget.h b/plugins/dde-dock/bluetooth/quickpanelwidget.h deleted file mode 100644 index 38b4808ef..000000000 --- a/plugins/dde-dock/bluetooth/quickpanelwidget.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef QUICKPANELWIDGET_H -#define QUICKPANELWIDGET_H - -#include -#include - -#include - -class QLabel; -class QuickButton; - -class QuickPanelWidget : public QWidget -{ - Q_OBJECT - -public: - explicit QuickPanelWidget(QWidget *parent = nullptr); - ~QuickPanelWidget() override; - -public Q_SLOTS: - void setIcon(const QIcon &icon); - void setText(const QString &text); - void setDescription(const QString &description); - void setActive(bool active); - -Q_SIGNALS: - void panelClicked(); - void iconClicked(); - -protected: - void mousePressEvent(QMouseEvent *event) override; - void mouseReleaseEvent(QMouseEvent *event) override; - -private: - void initUi(); - void initConnection(); - -private: - QuickButton *m_iconWidget; - Dtk::Widget::DLabel *m_nameLabel; - Dtk::Widget::DLabel *m_stateLabel; - Dtk::Widget::DIconButton *m_expandLabel; - QPoint m_clickPoint; -}; - -#endif // QUICKPANELWIDGET_H diff --git a/plugins/dde-dock/bluetooth/resources/bluetooth.qrc b/plugins/dde-dock/bluetooth/resources/bluetooth.qrc deleted file mode 100644 index 70ce25522..000000000 --- a/plugins/dde-dock/bluetooth/resources/bluetooth.qrc +++ /dev/null @@ -1,105 +0,0 @@ - - - list_select.png - list_select@2x.png - notify_close_press.png - notify_close_press@2x.png - refresh_dark.svg - refresh.svg - select_dark.svg - select.svg - disconnect.svg - disconnect_dark.svg - dark/buletooth_camera_dark.svg - dark/buletooth_clang_dark.svg - dark/buletooth_keyboard_dark.svg - dark/buletooth_lan_dark.svg - dark/buletooth_laptop_dark.svg - dark/buletooth_microphone_dark.svg - dark/buletooth_mouse_dark.svg - dark/buletooth_other_dark.svg - dark/buletooth_pad_dark.svg - dark/buletooth_pc_dark.svg - dark/buletooth_pen_dark.svg - dark/buletooth_pheadset_dark.svg - dark/buletooth_phone_dark.svg - dark/buletooth_print_dark.svg - dark/buletooth_scaner_dark.svg - dark/buletooth_touchpad_dark.svg - dark/buletooth_tv_dark.svg - dark/buletooth_vidicon_dark.svg - light/buletooth_camera_light.svg - light/buletooth_clang_light.svg - light/buletooth_keyboard_light.svg - light/buletooth_lan_light.svg - light/buletooth_laptop_light.svg - light/buletooth_microphone_light.svg - light/buletooth_mouse_light.svg - light/buletooth_other_light.svg - light/buletooth_pad_light.svg - light/buletooth_pc_light.svg - light/buletooth_pen_light.svg - light/buletooth_pheadset_light.svg - light/buletooth_phone_light.svg - light/buletooth_print_light.svg - light/buletooth_scaner_light.svg - light/buletooth_touchpad_light.svg - light/buletooth_tv_light.svg - light/buletooth_vidicon_light.svg - - - texts/bluetooth-active-symbolic_24px.svg - texts/bluetooth-disable-symbolic_24px.svg - texts/bluetooth-disconnect-symbolic_24px.svg - texts/bluetooth-active-symbolic_16px.svg - texts/bluetooth-disable-symbolic_16px.svg - texts/bluetooth-disconnect-symbolic_16px.svg - texts/bluetooth-open_16px.svg - dark/actions/bluetooth_disable_96px.svg - light/actions/bluetooth_disable_96px.svg - texts/bluetooth_camera_16px.svg - texts/bluetooth_clang_16px.svg - texts/bluetooth_keyboard_16px.svg - texts/bluetooth_lan_16px.svg - texts/bluetooth_laptop_16px.svg - texts/bluetooth_microphone_16px.svg - texts/bluetooth_mouse_16px.svg - texts/bluetooth_other_16px.svg - texts/bluetooth_pad_16px.svg - texts/bluetooth_pc_16px.svg - texts/bluetooth_pen_16px.svg - texts/bluetooth_pheadset_16px.svg - texts/bluetooth_phone_16px.svg - texts/bluetooth_print_16px.svg - texts/bluetooth_scaner_16px.svg - texts/bluetooth_touchpad_16px.svg - texts/bluetooth_tv_16px.svg - texts/bluetooth_vidicon_16px.svg - texts/plugin_item_disconnect_16px.svg - texts/plugin_item_select_16px.svg - texts/refresh_16px.svg - texts/arrow-up_12px.svg - dark/icons/battery-000-symbolic_16px.svg - dark/icons/battery-010-symbolic_16px.svg - dark/icons/battery-020-symbolic_16px.svg - dark/icons/battery-030-symbolic_16px.svg - dark/icons/battery-040-symbolic_16px.svg - dark/icons/battery-050-symbolic_16px.svg - dark/icons/battery-060-symbolic_16px.svg - dark/icons/battery-070-symbolic_16px.svg - dark/icons/battery-080-symbolic_16px.svg - dark/icons/battery-090-symbolic_16px.svg - dark/icons/battery-100-symbolic_16px.svg - light/icons/battery-000-symbolic_16px.svg - light/icons/battery-010-symbolic_16px.svg - light/icons/battery-020-symbolic_16px.svg - light/icons/battery-030-symbolic_16px.svg - light/icons/battery-040-symbolic_16px.svg - light/icons/battery-050-symbolic_16px.svg - light/icons/battery-060-symbolic_16px.svg - light/icons/battery-070-symbolic_16px.svg - light/icons/battery-080-symbolic_16px.svg - light/icons/battery-090-symbolic_16px.svg - light/icons/battery-100-symbolic_16px.svg - - diff --git a/plugins/dde-dock/bluetooth/resources/dark/actions/bluetooth_disable_96px.svg b/plugins/dde-dock/bluetooth/resources/dark/actions/bluetooth_disable_96px.svg deleted file mode 100644 index 83d4f67a0..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/actions/bluetooth_disable_96px.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - ICON / TrayICON / wifi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_camera_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_camera_dark.svg deleted file mode 100644 index 24d902840..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_camera_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_camera_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_clang_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_clang_dark.svg deleted file mode 100644 index 967f22fd5..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_clang_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_clang_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_keyboard_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_keyboard_dark.svg deleted file mode 100644 index 08b35662b..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_keyboard_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_keyboard_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_lan_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_lan_dark.svg deleted file mode 100644 index 8e5330f0d..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_lan_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_lan_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_laptop_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_laptop_dark.svg deleted file mode 100644 index 078e6ac3c..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_laptop_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_laptop_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_microphone_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_microphone_dark.svg deleted file mode 100644 index 968445cc8..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_microphone_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_microphone_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_mouse_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_mouse_dark.svg deleted file mode 100644 index 7d054f548..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_mouse_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_mouse_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_other_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_other_dark.svg deleted file mode 100644 index ffb55f5ed..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_other_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_other_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pad_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_pad_dark.svg deleted file mode 100644 index 96e30c7d6..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pad_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_pad_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pc_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_pc_dark.svg deleted file mode 100644 index 6341d8e80..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pc_dark.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_pc_dark - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pen_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_pen_dark.svg deleted file mode 100644 index 1d3d6475a..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pen_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_pen_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pheadset_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_pheadset_dark.svg deleted file mode 100644 index 2b84e210c..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_pheadset_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_pheadset_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_phone_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_phone_dark.svg deleted file mode 100644 index 5bb529628..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_phone_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_phone_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_print_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_print_dark.svg deleted file mode 100644 index 4dc865b5d..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_print_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_print_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_scaner_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_scaner_dark.svg deleted file mode 100644 index 6f11f03f6..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_scaner_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_scaner_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_touchpad_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_touchpad_dark.svg deleted file mode 100644 index 21ccab5e9..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_touchpad_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_touchpad_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_tv_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_tv_dark.svg deleted file mode 100644 index f6ff9ed09..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_tv_dark.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - buletooth_tv_dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/buletooth_vidicon_dark.svg b/plugins/dde-dock/bluetooth/resources/dark/buletooth_vidicon_dark.svg deleted file mode 100644 index 6d1f55b33..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/buletooth_vidicon_dark.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_vidicon_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-000-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-000-symbolic_16px.svg deleted file mode 100644 index b62bd0a53..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-000-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - battery-000-symbolic - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-010-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-010-symbolic_16px.svg deleted file mode 100644 index 2d31d6215..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-010-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-010-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-020-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-020-symbolic_16px.svg deleted file mode 100644 index ab74252b3..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-020-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-020-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-030-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-030-symbolic_16px.svg deleted file mode 100644 index d1516da11..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-030-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-030-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-040-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-040-symbolic_16px.svg deleted file mode 100644 index 1339d6ec9..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-040-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-040-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-050-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-050-symbolic_16px.svg deleted file mode 100644 index b2f9a9c51..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-050-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-050-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-060-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-060-symbolic_16px.svg deleted file mode 100644 index 0ad8b8928..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-060-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-060-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-070-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-070-symbolic_16px.svg deleted file mode 100644 index 01bb8cd40..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-070-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-070-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-080-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-080-symbolic_16px.svg deleted file mode 100644 index e6d35d3a2..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-080-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-080-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-090-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-090-symbolic_16px.svg deleted file mode 100644 index ea3c0028c..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-090-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-090-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-100-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/dark/icons/battery-100-symbolic_16px.svg deleted file mode 100644 index 460139c35..000000000 --- a/plugins/dde-dock/bluetooth/resources/dark/icons/battery-100-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-100-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/dcc-bluetooth.dci b/plugins/dde-dock/bluetooth/resources/dcc-bluetooth.dci deleted file mode 100644 index 2d96225320a18406a6f5eae2e9558c0d5e264f06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2978 zcmeHIc{r5YAAjE&yRq*L64`3(?jYNcCA(BimP8|&W{l+``%KX!id(W&B4o=Td(t!^ zNt9O0h$&geGUD1&u72sc_rKrM?caNz?{m)Qd*1W;Jn#3s=lvXuy*2;{0RV^=68M!C z%J!WN2_%HzeQ@d+pOBOPMvt;Zg6RAk_TL=8EeO?8*Hn-2^9}m@(N7_nt<~!48k@0I z94^5B#P1q98b7pu6#c*XpOXK+7zzD8{%X;)n;-I91An~O_w=XxqAeX48!M|Do7m0L z+}YJx-~NwHtf4{U72MvIhliVuIjzl_#PTngZtx7$`|P!AD(=A3ISjfpRyn3%03Z)6 zx*XO@ACse<9_B1CLji30psYLqkp}e7TOxDrCyAUk4;rUhdX z?i0KrL^*oKj>%L!z5ZLkBbbM?4;j=D&wVuvq9ZS1x{Pb+3c+g}s}i=V0n<}hgw36W zuHsWGF!Hmr$+1R+E1Z(QJ5SCa@G`{5-HA7ECU#o`Z(kYVMg?e3(TNXKK2=IagR-4o z1iUxPK(>Hj+qI$`Q`a=OE$+R%Q-C=pwp>3wg8KnqMg5>&U$`!T+)F)b9sQyHy;|=h z@euH_&qb?sh@M(pzRI+ux_Q^)!!yS@07l7xmWM!(|Ddn;O`BRzuzXyl`^4#9w1`60 zT!C`QxYSCvgRoF;tfUss#LZbT%EDKPN?iWx{Ku}wPcIGt4OA-&?M!eM+qNvuv$)t= z+lVS$6l|2pJ{xEJ)LBFLUA9l*Jct%6CHomir)h+AS~pZ?lqfPHbe(r@Us@bQHFua) zU8%S^%df8?B$Pyk8xJ#-FHw1$!&g)ioQBJx0@Q3yNtH3kDTNSxtQi+?b%yu zSLbN?+Va{|`k#AF+uTA=Kdh^M6Kh!0gao~ds_=BH4bzqJ4BXQx1Fw(I>J4zwDd^xf%IqceYx-mnn)c1 z_-Oy<(~@{BKkdSR?1=^OqoL^b)@$HUeK2LoFb|XOnS+Kj-=1+{ainFc(nE*J?LzXp zj2KouImW0Xq5T_t8V6)bB4w-SSENujMbeP;N}hoO$GJ6I6Pq58lC;58!~Rzmj0mq# zI>|vhm|Ml`L&Gfx8uA#WlM&jtuO&q#sG*L+@>eXA1_g0 zwGeER7LrNKZrqADAk&RwJKLG{de($>($ka-NgyrIms_(@P1 zNAnC_l63&5s7JgM74XPndaTpFFWwO8lh_v{2F^{|g{Ec?BTY#yqqGWJhO39c()oiM zD8>1Bd%K=og zSeE~5BOs{m3UKJ~Hug9**jKP%fmA7?$XhxuM0A51_ee;JSN5|LTf;DWr&hTbp1TcO ziPUE=iNV3gtw|A3jFb~~(wq3QPIbN=40tvGt)Xy$qwtoHoo@z@fFDyFs;=_YMr1&6 zb=#l<_f)BBrLXviOjU6YlBoY0ER!N!O3Ln<~omQ<5W^iUHWUWQHJtdvPMMOVEz&r9s=9NWn#gf*y> zootR5twUsMGv9r5avmB;4~H->T<7d`Wy3^6s}8g?tx0#3h{f+P@d!Z*!Lf$;L03eK zS=JHfuBB-gILj&TAY<`9tVkMp0r>n8JAq8Qj3qoIJNOvbcY}e6gZtktqvp{b9FN7J zbIi_}r8)4ea<-kj0E>EmureCX7_rEe8g5Gk8kn8QH@~!*NTp98f_p@Km&qSr^zZjw zSmL*>zN~wKAbaOU|EIt+UZZF$jlgUJCBx{hE;We)bjBQ3&Z)t`&xdso9!X_p#Q3jz hG)<+#FlzUNlO*m|BX;MR-i;!6#eLB>JlGqr_ZOS^#i0NI diff --git a/plugins/dde-dock/bluetooth/resources/disconnect.svg b/plugins/dde-dock/bluetooth/resources/disconnect.svg deleted file mode 100644 index f18f360a1..000000000 --- a/plugins/dde-dock/bluetooth/resources/disconnect.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plugins/dde-dock/bluetooth/resources/disconnect_dark.svg b/plugins/dde-dock/bluetooth/resources/disconnect_dark.svg deleted file mode 100644 index cf2971327..000000000 --- a/plugins/dde-dock/bluetooth/resources/disconnect_dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plugins/dde-dock/bluetooth/resources/light/actions/bluetooth_disable_96px.svg b/plugins/dde-dock/bluetooth/resources/light/actions/bluetooth_disable_96px.svg deleted file mode 100644 index 488742d3c..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/actions/bluetooth_disable_96px.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - ICON / TrayICON / wifi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_camera_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_camera_light.svg deleted file mode 100644 index 926f08b22..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_camera_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_camera_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_clang_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_clang_light.svg deleted file mode 100644 index 1e3124b2d..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_clang_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_clang_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_keyboard_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_keyboard_light.svg deleted file mode 100644 index bb189deed..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_keyboard_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_keyboard_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_lan_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_lan_light.svg deleted file mode 100644 index d495b9846..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_lan_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_lan_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_laptop_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_laptop_light.svg deleted file mode 100644 index 0e132c2ce..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_laptop_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_laptop_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_microphone_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_microphone_light.svg deleted file mode 100644 index 8dac57029..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_microphone_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_microphone_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_mouse_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_mouse_light.svg deleted file mode 100644 index a9120efe6..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_mouse_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_mouse_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_other_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_other_light.svg deleted file mode 100644 index 60c4d7883..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_other_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_other_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_pad_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_pad_light.svg deleted file mode 100644 index d5cf5589e..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_pad_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_pad_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_pc_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_pc_light.svg deleted file mode 100644 index c164df087..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_pc_light.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_pc_light - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_pen_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_pen_light.svg deleted file mode 100644 index d1d2a5771..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_pen_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_pen_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_pheadset_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_pheadset_light.svg deleted file mode 100644 index 8d08fdd87..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_pheadset_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_pheadset_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_phone_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_phone_light.svg deleted file mode 100644 index 0acfa2880..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_phone_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_phone_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_print_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_print_light.svg deleted file mode 100644 index fad7fd7d9..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_print_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_print_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_scaner_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_scaner_light.svg deleted file mode 100644 index d4c923ca7..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_scaner_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_scaner_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_touchpad_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_touchpad_light.svg deleted file mode 100644 index 3460b59a9..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_touchpad_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_touchpad_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_tv_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_tv_light.svg deleted file mode 100644 index b3dac2016..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_tv_light.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - buletooth_tv_light - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/buletooth_vidicon_light.svg b/plugins/dde-dock/bluetooth/resources/light/buletooth_vidicon_light.svg deleted file mode 100644 index a9d13281f..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/buletooth_vidicon_light.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_vidicon_light - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-000-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-000-symbolic_16px.svg deleted file mode 100644 index 354e73513..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-000-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - battery-000-symbolic-dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-010-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-010-symbolic_16px.svg deleted file mode 100644 index 827b2b4e8..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-010-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-010-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-020-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-020-symbolic_16px.svg deleted file mode 100644 index 086c167d0..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-020-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-020-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-030-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-030-symbolic_16px.svg deleted file mode 100644 index 98b618d83..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-030-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-030-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-040-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-040-symbolic_16px.svg deleted file mode 100644 index 3275cad66..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-040-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-040-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-050-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-050-symbolic_16px.svg deleted file mode 100644 index e50c8cec8..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-050-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-050-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-060-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-060-symbolic_16px.svg deleted file mode 100644 index 4545cc938..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-060-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-060-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-070-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-070-symbolic_16px.svg deleted file mode 100644 index 0ed6616d3..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-070-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-070-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-080-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-080-symbolic_16px.svg deleted file mode 100644 index 1785b640e..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-080-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-080-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-090-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-090-symbolic_16px.svg deleted file mode 100644 index fac3d8458..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-090-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-090-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/light/icons/battery-100-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/light/icons/battery-100-symbolic_16px.svg deleted file mode 100644 index 64beb419e..000000000 --- a/plugins/dde-dock/bluetooth/resources/light/icons/battery-100-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - battery-100-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/list_select.png b/plugins/dde-dock/bluetooth/resources/list_select.png deleted file mode 100644 index 886736105df8591d6a50568e75e8642c7d408e74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 508 zcmVPx$wn;=mR5%fhQ#(ilK@fejcb7mAu`(8lAOu7qApSsNnKbDIJBxsY5G`!%?G({~ zAecU2txYTyL{S706;r9GXeEM0O!n5D)gv28qTB3z-kY7@5`LYbo$^3cQU*{dMd;OT zMGE%-66nfzIH+(=^=Yq!O1J6D-d_N zVG4f3ngb%=5f@lbxF|mOIDXMN08Ukkj4nZ?So`ZNkGm*KVEL?SK~+lpjLI?sU6DE! zGyM+6q5=y#bq*37=9(r32EO|{2)pSJ#-ra89_=J#;|`XNs(Adckw#WRFUg&4zIjvF zx|GOGdPsH)tW0>=zLGe2_HCGvdBJpRsHpoeXnXV55^Wx^mhf=!BuzluUz4fWa*VTs z4hpvt?`G#}G?sWPd5osec;R!yho7y7wAKVf?qWJLZ<@%v&Fk5kQu8vFIczZjc&B-{ yIVz`CgVsyzV@&W5*lS9#VGX`Bz9-fAJAVOTu&U0u{Yv=&0000Px(Qb|NXR9FeMmtANaRTRh1nNOo_LK(~q=Z+aN_P4F*#b3VuBK z;6p0}>WdG}L&UbA2o@2k4?d+D35XE1QfjKyB(<6>shUMk*fBY z>$TIvk6|`WXr5cVHT2S5l*zmSi2I4Cs<^i|iikIX=wmd^!#}m-AI0WG3h3w|ai&1Gro8P#@L7tTkS8wMVG!-lD;t zwJMBWci`o(voM?UsW<}_#(kr0IO%Dd<#S%@QHy{-zfp1FGCY2R@^CQ-OPJhH_G8Sp zuCcXJ4CQEzH3%nKbxu9P*t7%tzs!Q=6h_8d3Du}oexcmXa>7@c0LQj@@S7IF!GSQi zh@nbhD>m6}h1yE(^Mc`Miw&WwWG!WHrLp)qzVh5PaQA zgs#mV{OXLC`hY`3N7#}tenz*ZT7(aG>F~~W9Ui@Nv4{%hzP(+8J9LDM?G@dvSYHAz zlca9a(RhG=<}z8KA-wmv4hhc2!q&A(gY{M3zIP4f;3A*-xJ}r+1yoc(>N>%zXR_|< zR`4p{-=V|0N>9WK_p7kGp6^?3J>xd?{kCM$1+)oUQAimHSVKBP*9cx4$U)X2s5TKk zU=e%QDsZ6DgO5x((0$&&XF~!+n1qcDJ=tB3ZJ&zp37B`+EAZA<4HV38!*qtAqu+wb zzXPtZI*O{cDywR>GkhGTtzIaYuU0%`o0_3Z?!Z0>`-;Pu6 z`H>%d8+7{)ah|2Z-Pp`>ncVRXF#o7oZ5-p;`YI0mzxW74SbmIrIkV;A XJw9fJ6 zxY2hg?-PH;mB!|gJ^7-a&wzkrz(nIo-lLz(3+6KCm=b#-To?fXViP#(N3}>>Qh+~~?+AS4WVYERYU97*N&ezm!yjI*AOcKt qbx-jB^puL&ccDWcPx$NJ&INR45glQn60MKn%4n3Ka;bgam5_U@J_WC}Kd&?ZyZ210Bj|(1C%K8L`nB zu|S!afQ>Ghk&sFeC`8HO=k&-a>Qqb7#m|2B^PQPIYu(tD&!68@OVk#4YZ@9c(O`9P z;cVF9iAxu(u-)tQFwe3}@gj#+&e#OO$@6h|2V99t%JW;Y_PFHf1mMP3%rt~U*P+Q6O zGe8{qfXWl8=+u2EW&1hc7%4n(AZ`!yVNS@y*Ly6;h&cmi?&r`l^DKZ~4mJTBAyQ%| sXT}-3twF35E{?b4c-u`Rh|OH`Kh4#Xcx*b4Z~y=R07*qoM6N<$f?boY0RR91 diff --git a/plugins/dde-dock/bluetooth/resources/notify_close_press@2x.png b/plugins/dde-dock/bluetooth/resources/notify_close_press@2x.png deleted file mode 100644 index 7d67765b4382dcd75440c6994dd941f5716b1337..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 749 zcmVPx%r%6OXR7efImQ9NjK@f(kdh&7cAS`;&lP3k;T@?gHMO^Tt2f+{*e~U+di>x8S z-UUTgQ4rM4D(K16uAl@Iy(E*Fvfc?j+v)8YCvk8fq`Uguf6sTJkWlWRtn}3hYe?1+`bRhR9^#VUKo6WWpFpTfKc0o4%XWr5Gj6TOC9n97N6M|{UVV= zA%SmmqrzCxzWVd>KJ)MV9OlNdhOSB3aD_3^C8fOzLdv3R@|s=7qC_h5rL3<=n%y!H z##H#t-?KE9r}IL=LegxN0sYAAS=6;XT6SbYKEX2j=9{5G*xV!uC5W57p>yi{1uOen zEN_fHg}&;z8*yEQV6HRw#m+v8FHh3sg*%Qms)3#L_NgpOQ5N_D^e3Dgh6B5dAq{Lc z(hR0^LORRHB7{Jre6?sv5dye2lpGq}CD`(Fh#Eu#AG*SN+FEL4zNg-DAil_`K{S)% zdO$c%9K)ym+QV-SL?^2~v<9gsQe7>to;d)tP}Cq;ck~x|Fc&`D;>r5Slg1j{|NmA9 fyHK?2EcO2YZ*iaQG~OMb00000NkvXXu0mjfZ?#?x diff --git a/plugins/dde-dock/bluetooth/resources/refresh.svg b/plugins/dde-dock/bluetooth/resources/refresh.svg deleted file mode 100644 index 5ef071ada..000000000 --- a/plugins/dde-dock/bluetooth/resources/refresh.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plugins/dde-dock/bluetooth/resources/refresh_dark.svg b/plugins/dde-dock/bluetooth/resources/refresh_dark.svg deleted file mode 100644 index dc2950711..000000000 --- a/plugins/dde-dock/bluetooth/resources/refresh_dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plugins/dde-dock/bluetooth/resources/select.svg b/plugins/dde-dock/bluetooth/resources/select.svg deleted file mode 100644 index e1c2b319c..000000000 --- a/plugins/dde-dock/bluetooth/resources/select.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plugins/dde-dock/bluetooth/resources/select_dark.svg b/plugins/dde-dock/bluetooth/resources/select_dark.svg deleted file mode 100644 index 4071c706a..000000000 --- a/plugins/dde-dock/bluetooth/resources/select_dark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/plugins/dde-dock/bluetooth/resources/texts/arrow-up_12px.svg b/plugins/dde-dock/bluetooth/resources/texts/arrow-up_12px.svg deleted file mode 100644 index dd31cc026..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/arrow-up_12px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - arrow_up - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_16px.svg deleted file mode 100644 index a9d54bdcf..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - bluetooth-active-symbolic-dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_24px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_24px.svg deleted file mode 100644 index f0d9a9a35..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-active-symbolic_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - bluetooth-active-symbolic-dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_16px.svg deleted file mode 100644 index 9a0806128..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - bluetooth-disable-symbolic-dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_24px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_24px.svg deleted file mode 100644 index 23df2b42e..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disable-symbolic_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - bluetooth-disable-symbolic-dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_16px.svg deleted file mode 100644 index 3372953d7..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - bluetooth-disconnect-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_24px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_24px.svg deleted file mode 100644 index f7c343fe8..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-disconnect-symbolic_24px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - bluetooth-disconnect-symbolic-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-open_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth-open_16px.svg deleted file mode 100644 index 5e0874c1d..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth-open_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - open - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_camera_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_camera_16px.svg deleted file mode 100644 index dfc5671e5..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_camera_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/camera - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_clang_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_clang_16px.svg deleted file mode 100644 index 19af98e5a..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_clang_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/clang - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_keyboard_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_keyboard_16px.svg deleted file mode 100644 index 4ac95ed96..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_keyboard_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/keyboard - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_lan_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_lan_16px.svg deleted file mode 100644 index dd6521705..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_lan_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/lan - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_laptop_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_laptop_16px.svg deleted file mode 100644 index 74a8d8c42..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_laptop_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/laptop - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_microphone_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_microphone_16px.svg deleted file mode 100644 index 2bc110d8a..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_microphone_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/microphone - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_mouse_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_mouse_16px.svg deleted file mode 100644 index 72ce585e3..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_mouse_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/mouse - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_other_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_other_16px.svg deleted file mode 100644 index 50f4c7f86..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_other_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/other - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pad_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pad_16px.svg deleted file mode 100644 index 1bbeb41fd..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pad_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/pad - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pc_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pc_16px.svg deleted file mode 100644 index dec6b72c2..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pc_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/pc - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pen_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pen_16px.svg deleted file mode 100644 index e4daa1afa..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pen_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/pen - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pheadset_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pheadset_16px.svg deleted file mode 100644 index 44fd6e443..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_pheadset_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/pheadset - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_phone_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_phone_16px.svg deleted file mode 100644 index eb8118697..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_phone_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/phone - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_print_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_print_16px.svg deleted file mode 100644 index b460c643f..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_print_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/print - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_scaner_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_scaner_16px.svg deleted file mode 100644 index 0390b4588..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_scaner_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/scaner - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_touchpad_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_touchpad_16px.svg deleted file mode 100644 index 73df77c99..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_touchpad_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/touchpad - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_tv_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_tv_16px.svg deleted file mode 100644 index c50aa782e..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_tv_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - buletooth_icon/tv - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_video_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_video_16px.svg deleted file mode 100644 index 21dec29aa..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_video_16px.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - buletooth_icon/video - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_vidicon_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/bluetooth_vidicon_16px.svg deleted file mode 100644 index 6d1f55b33..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/bluetooth_vidicon_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - buletooth_vidicon_dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/plugin_item_disconnect_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/plugin_item_disconnect_16px.svg deleted file mode 100644 index a208403d5..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/plugin_item_disconnect_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - ICON / Action / off - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/plugin_item_select_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/plugin_item_select_16px.svg deleted file mode 100644 index eff205d06..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/plugin_item_select_16px.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - action_select - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/bluetooth/resources/texts/refresh_16px.svg b/plugins/dde-dock/bluetooth/resources/texts/refresh_16px.svg deleted file mode 100644 index 1e1ad4483..000000000 --- a/plugins/dde-dock/bluetooth/resources/texts/refresh_16px.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - ICON / Action / Redo - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/CMakeLists.txt b/plugins/dde-dock/brightness/CMakeLists.txt deleted file mode 100644 index bba4393b5..000000000 --- a/plugins/dde-dock/brightness/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -# SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. -# -# SPDX-License-Identifier: CC0-1.0 - -set(PLUGIN_NAME "brightness") - -project(${PLUGIN_NAME}) - -# Sources files -file(GLOB_RECURSE SRCS - "*.h" - "*.cpp" - "../widgets/*.h" - "../widgets/*.cpp" - "../common/*.h" - "../common/*.cpp" - "../dbus/types/*.h" - "../dbus/types/*.cpp" -) - -find_package(PkgConfig REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Widgets Svg DBus Concurrent) -find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED COMPONENTS Widget Core Tools) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/xml/org.deepin.dde.Display1.xml - display1interface -) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/xml/org.deepin.dde.Display1.Monitor.xml - display1monitorinterface -) - -add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN") -add_library(${PLUGIN_NAME} SHARED ${DBUS_INTERFACES} ${SRCS} resources/brightness.qrc) -set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../) -target_include_directories(${PLUGIN_NAME} PUBLIC - ../dbus - ../../../interfaces - ../widgets - ../util - ../common -) -target_link_libraries(${PLUGIN_NAME} PRIVATE - Dtk${DTK_VERSION_MAJOR}::Core - Dtk${DTK_VERSION_MAJOR}::Widget - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::Svg - Qt${QT_VERSION_MAJOR}::DBus - Qt${QT_VERSION_MAJOR}::Concurrent - dockpluginmanager-interface -) - -install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins) -install(FILES "resources/dcc-dde-brightness.dci" DESTINATION share/dde-dock/icons/dcc-setting) diff --git a/plugins/dde-dock/brightness/brightness-constants.h b/plugins/dde-dock/brightness/brightness-constants.h deleted file mode 100644 index 307e7801a..000000000 --- a/plugins/dde-dock/brightness/brightness-constants.h +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#pragma once - -#include "plugins-logging-category.h" - - -namespace Dock -{ -namespace Brightness -{ - enum DisplayMode { - DisplayMode_Custom = 0, - DisplayMode_Mirror, - DisplayMode_Externd, - DisplayMode_Single - }; -} -} - diff --git a/plugins/dde-dock/brightness/brightness.json b/plugins/dde-dock/brightness/brightness.json deleted file mode 100644 index bec81f0da..000000000 --- a/plugins/dde-dock/brightness/brightness.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "api": "2.0.0" -} diff --git a/plugins/dde-dock/brightness/brightnessapplet.cpp b/plugins/dde-dock/brightness/brightnessapplet.cpp deleted file mode 100644 index 149347f7c..000000000 --- a/plugins/dde-dock/brightness/brightnessapplet.cpp +++ /dev/null @@ -1,200 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "brightnessapplet.h" -#include "brightnessmodel.h" -#include "monitor.h" -#include "brightnesscontroller.h" -#include "constants.h" - -#include -#include -#include -#include - -static const int SLIDER_ITEM_HEIGHT = 56; -static const int ITEM_SPACING = 10; -#define MONITOR_NAME_PROPERTY "MonitorName" - -DWIDGET_USE_NAMESPACE - -BrightnessApplet::BrightnessApplet(QWidget* parent) - : QWidget(parent) - , m_titleWidget(new QWidget(this)) - , m_scrollArea(new QScrollArea(this)) - , m_monitorsLayout(nullptr) - , m_jumpSettingButton(new JumpSettingButton(this)) - , m_minHeight(-1) -{ - initUI(); - initConnections(); - - updateMonitors(); -} - -BrightnessApplet::~BrightnessApplet() -{ - -} - -void BrightnessApplet::initUI() -{ - setFixedWidth(Dock::DOCK_POPUP_WIDGET_WIDTH); - - auto title = new QLabel(tr("Brightness"), m_titleWidget); - DFontSizeManager::instance()->bind(title, DFontSizeManager::T9, QFont::Medium); - auto titleLayout = new QHBoxLayout(m_titleWidget); - titleLayout->setSpacing(0); - titleLayout->setContentsMargins(0, 0, 0, 0); - titleLayout->addSpacing(10); - titleLayout->addWidget(title); - titleLayout->addStretch(); - - m_monitorsLayout = new QVBoxLayout; - m_monitorsLayout->setContentsMargins(0, 0, 0, 0); - m_monitorsLayout->setSpacing(ITEM_SPACING); - auto *widget = new QWidget; - widget->setAttribute(Qt::WA_TranslucentBackground); - widget->setLayout(m_monitorsLayout); - m_scrollArea->setWidget(widget); - m_scrollArea->setWidgetResizable(true); - m_scrollArea->setFrameStyle(QFrame::NoFrame); - m_scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_scrollArea->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding); - m_scrollArea->setContentsMargins(0, 0, 0, 0); - - QScroller::grabGesture(m_scrollArea->viewport(), QScroller::LeftMouseButtonGesture); - QScroller *scroller = QScroller::scroller(this->window()); - QScrollerProperties sp; - sp.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); - scroller->setScrollerProperties(sp); - - m_jumpSettingButton->setIcon(QIcon::fromTheme("open-arrow")); - m_jumpSettingButton->setDescription(tr("Display settings")); - m_jumpSettingButton->setDccPage("display", ""); - - auto mainLayout = new QVBoxLayout(this); - mainLayout->setSpacing(0); - mainLayout->setContentsMargins(10, 10, 10, 10); - mainLayout->addWidget(m_titleWidget); - mainLayout->addSpacing(5); - mainLayout->addWidget(m_scrollArea); - mainLayout->addStretch(0); - mainLayout->addSpacing(10); - mainLayout->addWidget(m_jumpSettingButton); -} - -void BrightnessApplet::initConnections() -{ - connect(&BrightnessModel::ref(), &BrightnessModel::enabledMonitorListChanged, this, &BrightnessApplet::updateMonitors); - connect(&BrightnessModel::ref(), &BrightnessModel::displayModeChanged, this, &BrightnessApplet::updateMonitors); - connect(&BrightnessModel::ref(), &BrightnessModel::primaryScreenChanged, this, &BrightnessApplet::updateMonitors); - connect(m_jumpSettingButton, &JumpSettingButton::showPageRequestWasSended, this, &BrightnessApplet::requestHideApplet); -} - -void BrightnessApplet::resizeScrollArea() -{ - int itemSize = 0; - for (int i = 0; i < m_monitorsLayout->count(); i++) { - if (qobject_cast(m_monitorsLayout->itemAt(i)->widget())) - itemSize++; - } - const int scrollAreaHeight = itemSize * SLIDER_ITEM_HEIGHT + (itemSize - 1) * ITEM_SPACING; - m_scrollArea->setFixedHeight(qMax(0, scrollAreaHeight)); - m_scrollArea->updateGeometry(); - resize(width(), qMax(m_minHeight, scrollAreaHeight + 10 * 2 + m_jumpSettingButton->height())); -} - -void BrightnessApplet::addMonitor(Monitor *monitor) -{ - auto container = new SliderContainer(this); - container->setFixedHeight(SLIDER_ITEM_HEIGHT); - container->addBackground(); - auto dSlider = new Dtk::Widget::DSlider(); - dSlider->setMouseWheelEnabled(true); - container->setSlider(dSlider); - container->setRange(BrightnessModel::ref().minBrightness(), BrightnessModel::ref().maxBrightness()); - container->setTip(monitor->name(), SliderContainer::LeftTip); - container->setTip(QString::number(monitor->brightness() * 100) + "%", SliderContainer::RightTip); - container->setIcon(SliderContainer::LeftIcon, QIcon::fromTheme("Brightness-"), 0); - container->setIcon(SliderContainer::RightIcon, QIcon::fromTheme("Brightness+"), 0); - container->setButtonsSize(QSize(16, 16)); - container->updateSliderValue(monitor->brightness() * 100); - container->setProperty(MONITOR_NAME_PROPERTY, monitor->name()); - container->slider()->setEnabled(monitor->canBrightness()); - m_monitorsLayout->addWidget(container); - - connect(&BrightnessModel::ref(), &BrightnessModel::minBrightnessChanged, container, [container] { - container->setRange(BrightnessModel::ref().minBrightness(), BrightnessModel::ref().maxBrightness()); - }); - connect(container, &SliderContainer::sliderValueChanged, this, [container] (int value) { - const auto &monitor = BrightnessModel::ref().monitor(container->property(MONITOR_NAME_PROPERTY).toString()); - if (monitor) { - BrightnessController::ref().setMonitorBrightness(monitor, (double)value / BrightnessModel::ref().maxBrightness()); - } - }); - connect(monitor, &Monitor::brightnessChanged, container, [container] (double value) { - container->blockSignals(true); - if ((value - BrightnessModel::ref().minimumBrightnessScale()) < 0.00001) { - container->updateSliderValue(BrightnessModel::ref().minBrightness()); - } else { - container->updateSliderValue(int(value * BrightnessModel::ref().maxBrightness())); - } - container->setTip(QString::number(value * 100) + "%", SliderContainer::RightTip); - container->blockSignals(false); - }); -} - -void BrightnessApplet::updateMonitors() -{ - const auto &monitors =BrightnessModel::ref().enabledMonitors(); - // 获取现在界面上显示的屏幕 - QMap sliderContainers; - for (int i = 0; i < m_monitorsLayout->count(); i++) { - auto slider = qobject_cast(m_monitorsLayout->itemAt(i)->widget()); - if (slider) - sliderContainers.insert(slider->property(MONITOR_NAME_PROPERTY).toString(), slider); - } - - // 移除所有屏幕,按照排序依次添加 - for (const auto &slider : sliderContainers.values()) { - m_monitorsLayout->removeWidget(slider); - } - - for (const auto &monitor : monitors) { - if (!sliderContainers.contains(monitor->name())) { - addMonitor(monitor); - } else { - m_monitorsLayout->addWidget(sliderContainers.value(monitor->name())); - sliderContainers.remove(monitor->name()); - } - } - - // 剩下的就是不用展示的屏幕 - for (const auto &slider : sliderContainers.values()) { - m_monitorsLayout->removeWidget(slider); - slider->deleteLater(); - } - - resizeScrollArea(); -} - -void BrightnessApplet::setAppletMinHeight(int minHeight) -{ - m_minHeight = minHeight; - resizeScrollArea(); -} - -void BrightnessApplet::resizeEvent(QResizeEvent *event) -{ - resizeScrollArea(); - - QWidget::resizeEvent(event); -} - -void BrightnessApplet::onContainerChanged(int container) -{ - m_titleWidget->setVisible(Dock::APPLET_CONTAINER_QUICK_PANEL != container); -} diff --git a/plugins/dde-dock/brightness/brightnessapplet.h b/plugins/dde-dock/brightness/brightnessapplet.h deleted file mode 100644 index b6d1ac434..000000000 --- a/plugins/dde-dock/brightness/brightnessapplet.h +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef BRIGHTNESSAPPLET_H -#define BRIGHTNESSAPPLET_H - -#include "jumpsettingbutton.h" -#include "monitor.h" -#include "slidercontainer.h" - -#include -#include -#include - -class BrightnessApplet : public QWidget -{ - Q_OBJECT -public: - explicit BrightnessApplet(QWidget* parent = nullptr); - ~BrightnessApplet(); - - void setAppletMinHeight(int minHeight); - void onContainerChanged(int container); - -Q_SIGNALS: - void requestHideApplet(); - -protected: - void resizeEvent(QResizeEvent *event) override; - -private: - void initUI(); - void initConnections(); - void resizeScrollArea(); - void addMonitor(Monitor *monitor); - void updateMonitors(); - -private: - QWidget *m_titleWidget; - QScrollArea *m_scrollArea; - QVBoxLayout *m_monitorsLayout; - JumpSettingButton *m_jumpSettingButton; - int m_minHeight; -}; - -#endif diff --git a/plugins/dde-dock/brightness/brightnesscontroller.cpp b/plugins/dde-dock/brightness/brightnesscontroller.cpp deleted file mode 100644 index d526c3ff3..000000000 --- a/plugins/dde-dock/brightness/brightnesscontroller.cpp +++ /dev/null @@ -1,233 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "brightnesscontroller.h" -#include "brightness-constants.h" -#include "monitor.h" -#include "brightnessmodel.h" - -#include -#include - -#define DCONFIG_MINIMUM_BRIGHTNESS "minBrightnessValue" - -const QString DisplayInterface("org.deepin.dde.Display1"); - -BrightnessController::BrightnessController(QObject *parent) - : QObject(parent) - , m_displayInter(DisplayInterface, "/org/deepin/dde/Display1", QDBusConnection::sessionBus(), this) - , m_displayDBusInter(new QDBusInterface("org.deepin.dde.Display1", - "/org/deepin/dde/Display1", - "org.deepin.dde.Display1", - QDBusConnection::sessionBus())) - , m_dConfig(DConfig::create("org.deepin.dde.control-center", "org.deepin.dde.control-center.display", QString(), this)) - , m_supportBrightness(false) -{ - -} - -BrightnessController::~BrightnessController() -{ - -} - -void BrightnessController::init() -{ - connect(&m_displayInter, &DisplayInter::MonitorsChanged, this, &BrightnessController::onMonitorListChanged); - connect(&m_displayInter, &DisplayInter::BrightnessChanged, this, &BrightnessController::onMonitorsBrightnessChanged); - connect(&m_displayInter, &DisplayInter::BrightnessChanged, &BrightnessModel::ref(), &BrightnessModel::setBrightnessMap); - connect(&m_displayInter, &DisplayInter::DisplayModeChanged, this, [this](uchar value) { - Q_UNUSED(value) - // 显示模式以m_displayInter.GetRealDisplayMode()为准 - BrightnessModel::ref().setDisplayMode(m_displayInter.GetRealDisplayMode()); - }); - connect(&m_displayInter, &DisplayInter::PrimaryChanged, &BrightnessModel::ref(), &BrightnessModel::setPrimary); - - // 获取内建屏幕 - QDBusMessage reply = m_displayInter.call("GetBuiltinMonitor"); - if (reply.type() != QDBusMessage::ErrorMessage) { - auto outArgs = reply.arguments(); - if (outArgs.count() > 0) { - BrightnessModel::ref().setBuildinMonitorName(outArgs.at(0).toString()); - } else { - qCWarning(BRIGHTNESS) << "Call `GetBuiltinMonitor` failed, out arguments is empty"; - } - } else { - qCWarning(BRIGHTNESS) << "Call `GetBuiltinMonitor` error: " << reply.errorMessage(); - } - - BrightnessModel::ref().setMinimumBrightnessScale(m_dConfig->value(DCONFIG_MINIMUM_BRIGHTNESS).toDouble()); - BrightnessModel::ref().setDisplayMode(m_displayInter.GetRealDisplayMode()); - BrightnessModel::ref().setPrimary(m_displayInter.primary()); - BrightnessModel::ref().setBrightnessMap(m_displayInter.brightness()); - onMonitorListChanged(m_displayInter.monitors()); -} - -void BrightnessController::onGSettingsChanged(const QString &key) -{ - const QVariant &value = m_dConfig->value(key); - - if (key == DCONFIG_MINIMUM_BRIGHTNESS || key == "brightnessMinimum") { - BrightnessModel::ref().setMinimumBrightnessScale(value.toDouble()); - } -} - -void BrightnessController::onMonitorListChanged(const QList &mons) -{ - QList ops; - for (const auto *mon : m_monitors.keys()) { - if (mon) { - ops << mon->path(); - } - } - - qCDebug(BRIGHTNESS) << "Monitor list changed, monitor list size: " << mons.size(); - QList pathList; - for (const auto &op : mons) { - const QString path = op.path(); - pathList << path; - if (!ops.contains(path)) - monitorAdded(path); - } - - for (const auto &op : ops) - if (!pathList.contains(op)) - monitorRemoved(op); -} - - -void BrightnessController::monitorAdded(const QString &path) -{ - MonitorInter *inter = new MonitorInter(DisplayInterface, path, QDBusConnection::sessionBus(), this); - Monitor *mon = new Monitor(this); - connect(inter, &MonitorInter::NameChanged, mon, &Monitor::setName); - connect(inter, &MonitorInter::EnabledChanged, mon, &Monitor::setMonitorEnable); - // NOTE: DO NOT using async dbus call. because we need to have a unique name to distinguish each monitor - Q_ASSERT(inter->isValid()); - mon->setName(inter->name()); - QDBusReply reply = m_displayDBusInter->call("CanSetBrightness", inter->name()); - mon->setCanBrightness(reply.value()); - mon->setMonitorEnable(inter->enabled()); - mon->setPath(path); - mon->setPrimary(m_displayInter.primary()); - if (!BrightnessModel::ref().brightnessMap().isEmpty()) { - mon->setBrightness(BrightnessModel::ref().brightnessMap()[mon->name()]); - } - mon->setBuildin(BrightnessModel::ref().buildinMonitor() == mon->name()); - - BrightnessModel::ref().monitorAdded(mon); - m_monitors.insert(mon, inter); - updateSupportBrightnessState(); - - inter->setSync(false); -} - -void BrightnessController::monitorRemoved(const QString &path) -{ - Monitor *monitor = nullptr; - for (auto it(m_monitors.cbegin()); it != m_monitors.cend(); ++it) { - if (it.key() && it.key()->path() == path) { - monitor = it.key(); - break; - } - } - if (!monitor) - return; - - BrightnessModel::ref().monitorRemoved(monitor); - - m_monitors[monitor]->deleteLater(); - m_monitors.remove(monitor); - updateSupportBrightnessState(); - - monitor->deleteLater(); -} - -void BrightnessController::updateSupportBrightnessState() -{ - bool support = false; - for (auto monitor : m_monitors.keys()) { - if (monitor->canBrightness()) { - support = true; - break; - } - } - - if (support != m_supportBrightness) { - m_supportBrightness = support; - Q_EMIT supportBrightnessChanged(support); - } -} - -void BrightnessController::onMonitorsBrightnessChanged(const BrightnessMap &brightness) -{ - if (brightness.isEmpty()) - return; - - for (auto it = m_monitors.begin(); it != m_monitors.end(); ++it) { - if (it.key()) - it.key()->setBrightness(brightness[it.key()->name()]); - } -} - -void BrightnessController::setMonitorBrightness(Monitor *mon, const double brightness) -{ - if (!mon) - return; - - double value = std::max(brightness, BrightnessModel::ref().minimumBrightnessScale()); - qCDebug(BRIGHTNESS) << "Set monitor brightness, receive request name: " << mon->name() << ", value: " << value; - - //前面亮度设置未完成,只记录最新请求 - QMutexLocker loker(&m_brightness.m_brightnessMutex); - m_brightness.m_hasWaitingRequest = true; - m_brightness.m_brightnessValue = value; - m_brightness.m_monitorName = mon->name(); - if (!m_brightness.m_hasPendingRequest) { - QTimer::singleShot(0, this, &BrightnessController::handleSetBrightnessRequest); - } -} - -void BrightnessController::handleSetBrightnessRequest() { - qCInfo(BRIGHTNESS) << "Set monitor brightness enter"; - QMutexLocker loker(&m_brightness.m_brightnessMutex); - if (m_brightness.m_hasPendingRequest) { - return; - } - if (!m_brightness.m_hasWaitingRequest) { - return; - } - - QFutureWatcher *watcher = new QFutureWatcher(this); - connect(watcher, &QFutureWatcher>::finished, [this, watcher] { - QMutexLocker loker(&m_brightness.m_brightnessMutex); - m_brightness.m_hasPendingRequest = false; - qCInfo(BRIGHTNESS) << "Set monitor brightness finish"; - if (m_brightness.m_hasWaitingRequest) { - QTimer::singleShot(0, this, &BrightnessController::handleSetBrightnessRequest); - } - watcher->deleteLater(); - }); - - QFuture future = QtConcurrent::run([this] { - QMutexLocker loker(&m_brightness.m_brightnessMutex); - if (m_brightness.m_hasPendingRequest) { - return; - } - if (!m_brightness.m_hasWaitingRequest) { - return; - } - m_brightness.m_hasPendingRequest = true; - m_brightness.m_hasWaitingRequest = false; - QString name = m_brightness.m_monitorName; - double value = m_brightness.m_brightnessValue; - m_brightness.m_monitorName = ""; - m_brightness.m_brightnessValue = 0; - loker.unlock(); - qCDebug(BRIGHTNESS) << "Set monitor brightness begin, name: " << name << ", value: " << value; - m_displayInter.SetAndSaveBrightness(name, value).waitForFinished(); - }); - - watcher->setFuture(future); -} diff --git a/plugins/dde-dock/brightness/brightnesscontroller.h b/plugins/dde-dock/brightness/brightnesscontroller.h deleted file mode 100644 index 93ab7cda4..000000000 --- a/plugins/dde-dock/brightness/brightnesscontroller.h +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#pragma once - -#include "monitor.h" -#include "brightnessmodel.h" - -#include -#include - -#include -#include - -#include "display1interface.h" -#include "display1monitorinterface.h" - -using DisplayInter = org::deepin::dde::Display1; -DCORE_USE_NAMESPACE - -class BrightnessController : public QObject, public Dtk::Core::DSingleton -{ - friend Dtk::Core::DSingleton; - - Q_OBJECT - -Q_SIGNALS: - void supportBrightnessChanged(const bool support); - -public Q_SLOTS: - void setMonitorBrightness(Monitor *mon, const double brightness); - void init(); - bool supportBrightness() const { return m_supportBrightness; } - -private Q_SLOTS: - void onGSettingsChanged(const QString &key); - void onMonitorListChanged(const QList &mons); - void onMonitorsBrightnessChanged(const BrightnessMap &brightness); - -private: - explicit BrightnessController(QObject *parent = 0); - ~BrightnessController(); - - void monitorAdded(const QString &path); - void monitorRemoved(const QString &path); - void handleSetBrightnessRequest(); - void updateSupportBrightnessState(); - -private: - DisplayInter m_displayInter; - QDBusInterface *m_displayDBusInter; - DConfig *m_dConfig = nullptr; - QMap m_monitors; - bool m_supportBrightness; - - struct { - QMutex m_brightnessMutex; - bool m_hasPendingRequest = false; - bool m_hasWaitingRequest = false; - double m_brightnessValue = 0; - QString m_monitorName; - }m_brightness; -}; diff --git a/plugins/dde-dock/brightness/brightnessitem.cpp b/plugins/dde-dock/brightness/brightnessitem.cpp deleted file mode 100644 index 907333ab0..000000000 --- a/plugins/dde-dock/brightness/brightnessitem.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "brightnessitem.h" -#include "constants.h" -#include "brightnessmodel.h" - - -#include - -#include -#include -#include -#include -#include -#include - -DGUI_USE_NAMESPACE - -#define SETTINGS "settings" - -BrightnessItem::BrightnessItem(QObject* parent) - : QObject(parent) - , m_tipsLabel(nullptr) - , m_applet(new BrightnessApplet) - , m_icon(new CommonIconButton) -{ - init(); -} - -BrightnessItem::~BrightnessItem() -{ - if (m_tipsLabel) { - m_tipsLabel->deleteLater(); - m_tipsLabel = nullptr; - } - - if (m_applet) { - m_applet->deleteLater(); - m_applet = nullptr; - } - - if (m_icon) { - m_icon->deleteLater(); - m_icon = nullptr; - } -} - -void BrightnessItem::init() -{ - m_icon->setFixedSize(Dock::DOCK_PLUGIN_ITEM_FIXED_SIZE); - m_icon->setIcon(QIcon::fromTheme("display-brightness-control")); - connect(m_applet, &BrightnessApplet::requestHideApplet, this, &BrightnessItem::requestHideApplet); -} - -const QString BrightnessItem::contextMenu() const -{ - QList items; - items.reserve(2); - - QMap settings; - settings["itemId"] = SETTINGS; - settings["itemText"] = tr("Display settings"); - settings["isActive"] = true; - items.push_back(settings); - - QMap menu; - menu["items"] = items; - menu["checkableMenu"] = false; - menu["singleCheck"] = false; - - return QJsonDocument::fromVariant(menu).toJson(); -} - -void BrightnessItem::invokeMenuItem(const QString menuId, const bool checked) -{ - Q_UNUSED(menuId); - Q_UNUSED(checked); - - if (menuId == SETTINGS) { - QStringList args {"--by-user", "org.deepin.dde.control-center", "--", "-p", "display"}; - QProcess::startDetached("dde-am", args); - - Q_EMIT requestHideApplet(); - } -} - -QWidget *BrightnessItem::tipsWidget() -{ - updateTips(); - return m_tipsLabel; -} - -void BrightnessItem::updateTips() -{ - if (!m_tipsLabel) { - m_tipsLabel = new QLabel; - m_tipsLabel->setForegroundRole(QPalette::BrightText); - m_tipsLabel->setContentsMargins(0, 0, 0, 0); - connect(&BrightnessModel::ref(), &BrightnessModel::enabledMonitorListChanged, this, &BrightnessItem::updateTips); - connect(&BrightnessModel::ref(), &BrightnessModel::monitorBrightnessChanged, this, &BrightnessItem::updateTips); - } - - QString tips; - auto monitors = BrightnessModel::ref().enabledMonitors(); - for (const auto &monitor : monitors) { - tips += QString("%1: %2%
").arg(monitor->name()).arg(QString::number(monitor->brightness() * 100)); - } - - // remove HTML default margin - tips = "

" + tips + "

"; - m_tipsLabel->setText(tips); - - QFontMetrics fm(m_tipsLabel->font()); - int lineHeight = fm.height(); - int textHeight = lineHeight * (int)monitors.count(); - m_tipsLabel->setFixedHeight(textHeight); -} diff --git a/plugins/dde-dock/brightness/brightnessitem.h b/plugins/dde-dock/brightness/brightnessitem.h deleted file mode 100644 index 0bb877cbc..000000000 --- a/plugins/dde-dock/brightness/brightnessitem.h +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#pragma once - -#include "commoniconbutton.h" -#include "brightnessapplet.h" - -#include - -namespace Dock { -class TipsWidget; -} - -class BrightnessItem : public QObject -{ - Q_OBJECT - -public: - explicit BrightnessItem(QObject *parent = nullptr); - ~BrightnessItem(); - - QWidget *itemWidget() const { return m_icon; }; - QWidget *tipsWidget(); - BrightnessApplet *popupApplet() const { return m_applet; } - const QString contextMenu() const; - void invokeMenuItem(const QString menuId, const bool checked); - void updateTips(); - -signals: - void requestHideApplet(); - -private: - void init(); - -private: - QLabel *m_tipsLabel; - BrightnessApplet *m_applet; - CommonIconButton *m_icon; - QPixmap m_iconPixmap; -}; diff --git a/plugins/dde-dock/brightness/brightnessmodel.cpp b/plugins/dde-dock/brightness/brightnessmodel.cpp deleted file mode 100644 index 88134e611..000000000 --- a/plugins/dde-dock/brightness/brightnessmodel.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "brightnessmodel.h" -#include "brightness-constants.h" - -const double DoubleZero = 0.000001; - -BrightnessModel::BrightnessModel(QObject* parent) - : QObject(parent) - , m_displayMode(Dock::Brightness::DisplayMode_Mirror) - , m_minimumBrightnessScale(0.1) -{ -} - -BrightnessModel::~BrightnessModel() -{ -} - -void BrightnessModel::setDisplayMode(const int mode) -{ - qCInfo(BRIGHTNESS) << "Set display mode: " << mode; - if (m_displayMode != mode && mode >= 0 && mode < 5) { - m_displayMode = mode; - Q_EMIT displayModeChanged(m_displayMode); - } -} - -void BrightnessModel::setMinimumBrightnessScale(const double scale) -{ - qCInfo(BRIGHTNESS) << "Set minimum brightness scale:" << scale; - if (fabs(m_minimumBrightnessScale - scale) > DoubleZero) { - m_minimumBrightnessScale = scale; - Q_EMIT minBrightnessChanged(m_minimumBrightnessScale); - } -} - -void BrightnessModel::setPrimary(const QString& primary) -{ - qCInfo(BRIGHTNESS) << "Set primary: " << primary; - if (m_primaryMonitorName != primary) { - m_primaryMonitorName = primary; - for (auto mon : m_monitors) - mon->setPrimary(m_primaryMonitorName); - - Q_EMIT primaryScreenChanged(m_primaryMonitorName); - } -} - -void BrightnessModel::setBuildinMonitorName(const QString& monitorName) -{ - qCInfo(BRIGHTNESS) << "Set buildin monitor name:" << monitorName; - m_buildinMonitorName = monitorName; - for (const auto& monitor : m_monitors) { - monitor->setBuildin(monitor->name() == m_buildinMonitorName); - } -} - -void BrightnessModel::monitorAdded(Monitor* mon) -{ - qCInfo(BRIGHTNESS) << "Monitor added:" << mon->name(); - m_monitors.append(mon); - connect(mon, &Monitor::enableChanged, this, &BrightnessModel::enabledMonitorListChanged); - connect(mon, &Monitor::brightnessChanged, this, &BrightnessModel::monitorBrightnessChanged); - // 按照名称排序 - std::sort(m_monitors.begin(), m_monitors.end(), [=](const Monitor* m1, const Monitor* m2) { - return m1->name() < m2->name(); - }); - Q_EMIT enabledMonitorListChanged(); -} - -void BrightnessModel::monitorRemoved(Monitor* mon) -{ - qCInfo(BRIGHTNESS) << "Monitor removed:" << mon->name(); - mon->disconnect(this); - m_monitors.removeOne(mon); - Q_EMIT enabledMonitorListChanged(); -} - -Monitor* BrightnessModel::primaryMonitor() const -{ - for (const auto& monitor : m_monitors) { - if (monitor->isPrimary()) - return monitor; - } - - return nullptr; -} - -/** - * @brief - * 复制模式内建屏幕优先,扩展模式主屏优先,不能调节亮度的屏幕放在后面 - * - * @return const QList - */ -QList BrightnessModel::enabledMonitors() const -{ - QList monitors; - QList canNotAdjustBrightness; - for (const auto& monitor : m_monitors) { - if (monitor->isEnabled()) { - if (monitor->canBrightness()) { - if ((Dock::Brightness::DisplayMode_Externd == m_displayMode && monitor->isPrimary()) - || (Dock::Brightness::DisplayMode_Mirror && monitor->isBuildin())) { - monitors.insert(0, monitor); - } else { - monitors.append(monitor); - } - } else { - canNotAdjustBrightness.append(monitor); - } - } - } - monitors.append(canNotAdjustBrightness); - - return monitors; -} - -Monitor* BrightnessModel::monitor(const QString& monitorName) const -{ - for (const auto& monitor : m_monitors) { - if (monitor->name() == monitorName) - return monitor; - } - - return nullptr; -} - -void BrightnessModel::setBrightnessMap(const BrightnessMap& brightnessMap) -{ - qCInfo(BRIGHTNESS) << "Set brightness map:" << brightnessMap; - if (brightnessMap == m_brightnessMap) - return; - - m_brightnessMap = brightnessMap; -} - -uint BrightnessModel::maxBrightness() const -{ - static const double BRIGHTNESS_MAX_SCALE = 100.0; - return BRIGHTNESS_MAX_SCALE; -} - -uint BrightnessModel::minBrightness() const -{ - const int value = maxBrightness() * m_minimumBrightnessScale; - return value == 0 ? 1 : value; -} diff --git a/plugins/dde-dock/brightness/brightnessmodel.h b/plugins/dde-dock/brightness/brightnessmodel.h deleted file mode 100644 index 2c5c500bb..000000000 --- a/plugins/dde-dock/brightness/brightnessmodel.h +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef BRIGHTNESSMODEL_H -#define BRIGHTNESSMODEL_H - -#include "monitor.h" - -#include - -#include - -#include - -class BrightnessModel : public QObject, public Dtk::Core::DSingleton { - Q_OBJECT - - friend class Dtk::Core::DSingleton; - -public: - void setDisplayMode(const int mode); - inline int displayMode() const { return m_displayMode; } - - void setPrimary(const QString& primary); - inline const QString& primary() const { return m_primaryMonitorName; } - - void setBuildinMonitorName(const QString& monitorName); - inline const QString& buildinMonitor() const { return m_buildinMonitorName; } - - void monitorAdded(Monitor* mon); - void monitorRemoved(Monitor* mon); - inline const QList monitorList() const { return m_monitors; } - QList enabledMonitors() const; - Monitor* primaryMonitor() const; - Monitor* monitor(const QString& monitorName) const; - - void setBrightnessMap(const BrightnessMap& brightnessMap); - inline BrightnessMap brightnessMap() const { return m_brightnessMap; } - - uint maxBrightness() const; - void setMinimumBrightnessScale(const double scale); - inline double minimumBrightnessScale() const { return m_minimumBrightnessScale; } - uint minBrightness() const; - -Q_SIGNALS: - void displayModeChanged(const int mode) const; - void primaryScreenChanged(const QString& primary) const; - void monitorListChanged() const; - void enabledMonitorListChanged() const; - void monitorBrightnessChanged() const; - void minBrightnessChanged(const double) const; - -private: - explicit BrightnessModel(QObject* parent = nullptr); - ~BrightnessModel(); - -private: - int m_displayMode; - double m_minimumBrightnessScale; - QString m_primaryMonitorName; - QString m_buildinMonitorName; - QList m_monitors; - BrightnessMap m_brightnessMap; -}; - -#endif diff --git a/plugins/dde-dock/brightness/brightnessplugin.cpp b/plugins/dde-dock/brightness/brightnessplugin.cpp deleted file mode 100644 index b076d428d..000000000 --- a/plugins/dde-dock/brightness/brightnessplugin.cpp +++ /dev/null @@ -1,162 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "brightnessplugin.h" -#include "brightness-constants.h" - -#include "utils.h" - -DCORE_USE_NAMESPACE - -Q_LOGGING_CATEGORY(BRIGHTNESS, "org.deepin.dde.dock.brightness") - -BrightnessPlugin::BrightnessPlugin(QObject *parent) - : QObject(parent) - , m_quickPanelWidget(nullptr) - , m_item(nullptr) -{ - -} - -BrightnessPlugin::~BrightnessPlugin() -{ - if (m_quickPanelWidget) { - delete m_quickPanelWidget; - m_quickPanelWidget = nullptr; - } -} - -const QString BrightnessPlugin::pluginName() const -{ - return "dde-brightness"; -} - -const QString BrightnessPlugin::pluginDisplayName() const -{ - return tr("Brightness"); -} - -void BrightnessPlugin::init(PluginProxyInterface *proxyInter) -{ - m_proxyInter = proxyInter; - if (m_quickPanelWidget) - return; - - BrightnessController::ref().init(); - m_quickPanelWidget = new BrightnessQuickPanel; - m_item = new BrightnessItem; - - connect(&BrightnessController::ref(), &BrightnessController::supportBrightnessChanged, this, [this] (bool support) { - support ? m_proxyInter->itemAdded(this, pluginName()) : m_proxyInter->itemRemoved(this, pluginName()); - notifySupportFlagChanged(support); - }); - - if (!pluginIsDisable() && BrightnessController::ref().supportBrightness()) { - m_proxyInter->itemAdded(this, pluginName()); - } - - connect(m_item, &BrightnessItem::requestHideApplet, this, [this] { - m_proxyInter->requestSetAppletVisible(this, pluginName(), false); - }); - connect(m_quickPanelWidget, &BrightnessQuickPanel::requestShowApplet, this, [this] { - m_proxyInter->requestSetAppletVisible(this, pluginName(), true); - }); -} - -QWidget *BrightnessPlugin::itemWidget(const QString &itemKey) -{ - if (!m_item) - return nullptr; - - if (itemKey == pluginName()) { - return m_item->itemWidget(); - } - - if (itemKey == Dock::QUICK_ITEM_KEY) { - return m_quickPanelWidget; - } - - return nullptr; -} - -QWidget *BrightnessPlugin::itemTipsWidget(const QString &itemKey) -{ - if (!m_item) - return nullptr; - - if (itemKey == pluginName()) { - return m_item->tipsWidget(); - } - - return nullptr; -} - -QWidget *BrightnessPlugin::itemPopupApplet(const QString &itemKey) -{ - if (!m_item) - return nullptr; - - if (itemKey == pluginName()) { - return m_item->popupApplet(); - } - - return nullptr; -} - -const QString BrightnessPlugin::itemContextMenu(const QString &itemKey) -{ - if (!m_item) - return nullptr; - - if (itemKey == pluginName()) { - return m_item->contextMenu(); - } - - return QString(); -} - -void BrightnessPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) -{ - if (m_item && itemKey == pluginName()) { - m_item->invokeMenuItem(menuId, checked); - } -} - -QString BrightnessPlugin::message(const QString &message) -{ - QJsonObject msgObj = Utils::getRootObj(message); - if (msgObj.isEmpty()) { - return "{}"; - } - - QJsonObject retObj; - QString cmdType = msgObj.value(Dock::MSG_TYPE).toString(); - if (cmdType == Dock::MSG_GET_SUPPORT_FLAG) { - retObj[Dock::MSG_SUPPORT_FLAG] = BrightnessController::ref().supportBrightness(); - } else if (cmdType == Dock::MSG_SET_APPLET_MIN_HEIGHT) { - const int minHeight = msgObj.value(Dock::MSG_DATA).toInt(-1); - if (m_item) { - m_item->popupApplet()->setAppletMinHeight(minHeight); - } - } else if (cmdType == Dock::MSG_APPLET_CONTAINER) { - if (m_item) { - m_item->popupApplet()->onContainerChanged(msgObj.value(Dock::MSG_DATA).toInt(Dock::APPLET_CONTAINER_DOCK)); - } - } - - return Utils::toJson(retObj); -} - -void BrightnessPlugin::notifySupportFlagChanged(bool supportFlag) -{ - if (!m_messageCallback) { - return; - } - - QJsonObject msg; - msg[Dock::MSG_TYPE] = Dock::MSG_SUPPORT_FLAG_CHANGED; - msg[Dock::MSG_DATA] = supportFlag; - m_messageCallback(this, Utils::toJson(msg)); -} - diff --git a/plugins/dde-dock/brightness/brightnessplugin.h b/plugins/dde-dock/brightness/brightnessplugin.h deleted file mode 100644 index 1738349e5..000000000 --- a/plugins/dde-dock/brightness/brightnessplugin.h +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#pragma once - -#include "pluginsiteminterface_v2.h" -#include "brightnessquickpanel.h" -#include "brightnessitem.h" - -class BrightnessPlugin : public QObject, public PluginsItemInterfaceV2 -{ - Q_OBJECT - Q_INTERFACES(PluginsItemInterfaceV2) - Q_PLUGIN_METADATA(IID ModuleInterface_iid_V2 FILE "brightness.json") - -public: - explicit BrightnessPlugin(QObject *parent = nullptr); - ~BrightnessPlugin(); - - const QString pluginName() const Q_DECL_OVERRIDE; - const QString pluginDisplayName() const Q_DECL_OVERRIDE; - void init(PluginProxyInterface *proxyInter) Q_DECL_OVERRIDE; - bool pluginIsAllowDisable() override { return true; } - QWidget *itemWidget(const QString &itemKey) Q_DECL_OVERRIDE; - QWidget *itemPopupApplet(const QString &itemKey) Q_DECL_OVERRIDE; - QWidget *itemTipsWidget(const QString &itemKey) Q_DECL_OVERRIDE; - const QString itemContextMenu(const QString &itemKey) Q_DECL_OVERRIDE; - void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) Q_DECL_OVERRIDE; - Dock::PluginFlags flags() const Q_DECL_OVERRIDE { return Dock::Type_Quick | Dock::Quick_Panel_Full | Dock::Attribute_Normal; } - QString message(const QString &message) Q_DECL_OVERRIDE; - virtual void setMessageCallback(MessageCallbackFunc cb) override { m_messageCallback = cb; } - -private: - void notifySupportFlagChanged(bool supportFlag); - -private: - BrightnessQuickPanel *m_quickPanelWidget; - BrightnessItem *m_item; - MessageCallbackFunc m_messageCallback; -}; diff --git a/plugins/dde-dock/brightness/brightnessquickpanel.cpp b/plugins/dde-dock/brightness/brightnessquickpanel.cpp deleted file mode 100644 index 1f854b528..000000000 --- a/plugins/dde-dock/brightness/brightnessquickpanel.cpp +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "brightnessquickpanel.h" -#include "brightness-constants.h" -#include "brightnessmodel.h" -#include "slidercontainer.h" -#include "brightnesscontroller.h" - -#include - -#include -#include -#include - -DGUI_USE_NAMESPACE - -#define ICON_SIZE 18 -#define BACKSIZE 36 - -BrightnessQuickPanel::BrightnessQuickPanel(QWidget* parent) - : QWidget(parent) - , m_sliderContainer(new SliderContainer(this)) - , m_currentMonitor(nullptr) -{ - initUi(); - initConnection(); - - m_sliderContainer->setRange(BrightnessModel::ref().minBrightness(), BrightnessModel::ref().maxBrightness()); - UpdateDisplayStatus(); -} - -BrightnessQuickPanel::~BrightnessQuickPanel() -{ -} - -void BrightnessQuickPanel::initUi() -{ - m_sliderContainer->setPageStep(2); - m_sliderContainer->setIcon(SliderContainer::LeftIcon, QIcon::fromTheme("Brightness-"), 10); - SliderProxyStyle* proxy = new SliderProxyStyle; - m_sliderContainer->setSliderProxyStyle(proxy); - m_sliderContainer->rightIconWidget()->setStyleType(RightIconButton::StyleType::Background); - m_sliderContainer->setSliderContentsMargin(QMargins(8, 0, 10, 0)); - - QHBoxLayout* mainLayout = new QHBoxLayout(this); - mainLayout->setContentsMargins(6, 0, 2, 0); - mainLayout->addWidget(m_sliderContainer); - - refreshWidget(); -} - -void BrightnessQuickPanel::initConnection() -{ - connect(&BrightnessModel::ref(), &BrightnessModel::displayModeChanged, this, &BrightnessQuickPanel::UpdateDisplayStatus); - connect(&BrightnessModel::ref(), &BrightnessModel::minBrightnessChanged, this, [this] { - m_sliderContainer->setRange(BrightnessModel::ref().minBrightness(), BrightnessModel::ref().maxBrightness()); - }); - connect(&BrightnessModel::ref(), &BrightnessModel::primaryScreenChanged, this, &BrightnessQuickPanel::UpdateDisplayStatus); - connect(&BrightnessModel::ref(), &BrightnessModel::enabledMonitorListChanged, this, &BrightnessQuickPanel::UpdateDisplayStatus); - - connect(m_sliderContainer, &SliderContainer::sliderValueChanged, this, [this] (int value) { - if (m_currentMonitor) { - BrightnessController::ref().setMonitorBrightness(m_currentMonitor, (double)value / BrightnessModel::ref().maxBrightness()); - } - }); - connect(m_sliderContainer, &SliderContainer::iconClicked, this, [this] (SliderContainer::IconPosition icon) { - if (icon == SliderContainer::IconPosition::RightIcon) { - Q_EMIT requestShowApplet(); - } - }); - connect(m_sliderContainer, &SliderContainer::panelClicked, this, &BrightnessQuickPanel::requestShowApplet); - refreshWidget(); -} - -void BrightnessQuickPanel::UpdateDisplayStatus() -{ - const auto &monitors = BrightnessModel::ref().enabledMonitors(); - Monitor *mo = monitors.size() > 0 ? monitors.first() : nullptr; - if (mo == m_currentMonitor || !mo) - return; - - if (m_currentMonitor) - m_currentMonitor->disconnect(this); - - m_currentMonitor = mo; - connect(m_currentMonitor, &Monitor::brightnessChanged, this, [this] (const double value) { - m_sliderContainer->blockSignals(true); - if ((value - BrightnessModel::ref().minimumBrightnessScale()) < 0.00001) { - m_sliderContainer->updateSliderValue(BrightnessModel::ref().minBrightness()); - } else { - m_sliderContainer->updateSliderValue(int(value * BrightnessModel::ref().maxBrightness())); - } - m_sliderContainer->blockSignals(false); - }); - refreshWidget(); -} - -/** - * @brief 刷新左右图标、滑动条位置 - * - */ -void BrightnessQuickPanel::refreshWidget() -{ - if (m_currentMonitor) { - const QString &iconName = m_currentMonitor->name().contains("eDP", Qt::CaseInsensitive) ? QStringLiteral("laptop") : QStringLiteral("external-display"); - m_sliderContainer->setIcon(SliderContainer::RightIcon, QIcon::fromTheme(iconName), 10); - m_sliderContainer->updateSliderValue(m_currentMonitor->brightness() * 100); - } -} diff --git a/plugins/dde-dock/brightness/brightnessquickpanel.h b/plugins/dde-dock/brightness/brightnessquickpanel.h deleted file mode 100644 index e9eb15872..000000000 --- a/plugins/dde-dock/brightness/brightnessquickpanel.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#pragma once - -#include "brightnesscontroller.h" -#include "monitor.h" - -#include -#include -#include - -class QDBusMessage; -class SliderContainer; -class QLabel; - -DWIDGET_USE_NAMESPACE - -class BrightnessQuickPanel : public QWidget -{ - Q_OBJECT - -public: - explicit BrightnessQuickPanel(QWidget *parent = nullptr); - ~BrightnessQuickPanel() override; - -Q_SIGNALS: - void requestShowApplet(); - -protected: - void initUi(); - void initConnection(); - -private Q_SLOTS: - void refreshWidget(); - void UpdateDisplayStatus(); - -private: - SliderContainer *m_sliderContainer; - QPointer m_currentMonitor; -}; diff --git a/plugins/dde-dock/brightness/monitor.cpp b/plugins/dde-dock/brightness/monitor.cpp deleted file mode 100644 index c90943479..000000000 --- a/plugins/dde-dock/brightness/monitor.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "monitor.h" -#include "brightnesscontroller.h" - -#include - -const double DoubleZero = 0.000001; - -Monitor::Monitor(QObject *parent) - : QObject(parent) - , m_brightness(1.0) - , m_enable(false) - , m_canBrightness(true) -{ -} - -void Monitor::setPrimary(const QString &primaryName) -{ - m_primary = primaryName; -} - -void Monitor::setBrightness(const double brightness) -{ - if (fabs(m_brightness - brightness) < DoubleZero) - return; - - m_brightness = brightness; - - Q_EMIT brightnessChanged(m_brightness); -} - -void Monitor::setName(const QString &name) -{ - m_name = name; -} - -void Monitor::setCanBrightness(bool canBrightness) -{ - m_canBrightness = canBrightness; -} - -void Monitor::setPath(const QString &path) -{ - m_path = path; -} - -void Monitor::setBuildin(bool buildin) -{ - m_buildin = buildin; -} - -void Monitor::setMonitorEnable(bool enable) -{ - if (m_enable == enable) - return; - - m_enable = enable; - Q_EMIT enableChanged(enable); -} diff --git a/plugins/dde-dock/brightness/monitor.h b/plugins/dde-dock/brightness/monitor.h deleted file mode 100644 index 65e1069de..000000000 --- a/plugins/dde-dock/brightness/monitor.h +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef MONITOR_H -#define MONITOR_H - -#include -#include - -#include "display1monitorinterface.h" - -using MonitorInter = org::deepin::dde::display1::Monitor; - - -class BrightnessController; -class Monitor : public QObject -{ - Q_OBJECT - friend class BrightnessController; - -public: - enum RotateMode { - Normal, - Gravity, - Rotate - }; - -public: - explicit Monitor(QObject *parent = 0); - - inline bool isPrimary() const { return m_primary == m_name; } - inline double brightness() const { return m_brightness; } - inline const QString name() const { return m_name; } - inline bool canBrightness() const { return m_canBrightness; } - inline const QString path() const { return m_path; } - inline bool isEnabled() const { return m_enable; } - inline bool isBuildin() const { return m_buildin; }; - -Q_SIGNALS: - void brightnessChanged(const double brightness) const; - void enableChanged(bool enable) const; - -public: - static bool isSameResolution(const Resolution &r1, const Resolution &r2); - static bool isSameRatefresh(const Resolution &r1, const Resolution &r2); - bool hasResolution(const Resolution &r); - bool hasResolutionAndRate(const Resolution &r); - bool hasRatefresh(const double r); - QScreen *getQScreen(); - void setPrimary(const QString &primaryName); - void setBuildin(bool buildin); - -private Q_SLOTS: - void setBrightness(const double brightness); - void setName(const QString &name); - void setCanBrightness(bool canBrightness); - void setPath(const QString &path); - void setMonitorEnable(bool enable); - -private: - double m_brightness; - QString m_name; - QString m_path; - QString m_primary; - bool m_enable; - bool m_canBrightness; - bool m_buildin; -}; - -#endif // MONITOR_H diff --git a/plugins/dde-dock/brightness/resources/brightness.qrc b/plugins/dde-dock/brightness/resources/brightness.qrc deleted file mode 100644 index 0cbec3865..000000000 --- a/plugins/dde-dock/brightness/resources/brightness.qrc +++ /dev/null @@ -1,12 +0,0 @@ - - - texts/open-arrow_16px.svg - texts/laptop_16px.svg - texts/external-display_16px.svg - texts/laptop_24px.svg - texts/external-display_24px.svg - texts/Brightness-_24px.svg - texts/Brightness+_24px.svg - texts/display-brightness-control_16px.svg - - diff --git a/plugins/dde-dock/brightness/resources/dcc-dde-brightness.dci b/plugins/dde-dock/brightness/resources/dcc-dde-brightness.dci deleted file mode 100644 index a34c95893fc1360abf627a4f9626ee20af9fa737..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1529 zcmZ>9_GDmWWME)2GGU+utYn4gX3EPi%1zACOGzxsCda(BP)$t6bacE^o$aHV||#}Fi(TUNirUyIEMv7Q|f6Is5y)~L47fUp1ypW{HbzWV_|frcmBdKEhV|KAoI>S#B+^xI%0pN*TeJi@9y*G`O?!k2yi!o;PE7qdRe z+TkI))5Cnr68E)txlROT_W~W-kZkCDz9&_NVZxFNVw?;QmM;t`)?9zG)1zZPgF;&8 zK86E^Q@r*b{l#);f&d@Gi=9p0UJ*Vk7tTJRy-7!9qj?7#gZT`BSL#v`d5jGmymCwr zGCW;WrZn?iQo9p>fSG|$STOU2dewINI zWMxPb61=^faWkU>r_v>1cj?2sn&*273C2q}xo9OE*ziD6>8mBXv9n-dQSFzD?(%yL z8#+8zU+C>HnR!8Xi;9wwW7&_q{SPYkTu5{J-tD>1prs>ZhJjASvMF4fJ32mA9+(r5 z)K$ZvFs;MmP6G?Wr;Iz544WccmZZyj^D(49Kf}r(+u2dL)mNOspxEzk!ITaU=KZ^5 z_)DLiaAvqLtK&pKqg*cI0oy1IqdQ50f}I~0H$U~`xPL%Zl0k?2QSs)3Tnrzk?QQ(R z*Ed1ol5-C~{~?Qo)^A0)8S1z+J8qoHu2DXt&#<9?nwAbHgT*w%qo$|5_!ufyUl0q5 z*1MFuHhxPfyQaJEtXH-l-Y-7q6}GB~HspLv=xP+m2q%2 z%iY=X8)jxc`p7?F8P{8pCp8C})Gl2Xl%BeDZPQ$S$=Kbj*8B&0V|D7DMtf|STUT{x yx7UQ%AI|TX_ScE=$B|zw%NQG+{!1QX7MSo}_`@&u9bWQ*{_ShSpBdN0GXMYpr^*We diff --git a/plugins/dde-dock/brightness/resources/texts/Brightness+_24px.svg b/plugins/dde-dock/brightness/resources/texts/Brightness+_24px.svg deleted file mode 100644 index c7e84d0d2..000000000 --- a/plugins/dde-dock/brightness/resources/texts/Brightness+_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - Brightness+-dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/resources/texts/Brightness-_24px.svg b/plugins/dde-dock/brightness/resources/texts/Brightness-_24px.svg deleted file mode 100644 index 791a2ed4d..000000000 --- a/plugins/dde-dock/brightness/resources/texts/Brightness-_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - Brightness--dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/resources/texts/display-brightness-control_16px.svg b/plugins/dde-dock/brightness/resources/texts/display-brightness-control_16px.svg deleted file mode 100644 index 187e7461f..000000000 --- a/plugins/dde-dock/brightness/resources/texts/display-brightness-control_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - display-brightness-control-dark - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/resources/texts/external-display_16px.svg b/plugins/dde-dock/brightness/resources/texts/external-display_16px.svg deleted file mode 100644 index e2369f646..000000000 --- a/plugins/dde-dock/brightness/resources/texts/external-display_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/display/PC - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/resources/texts/external-display_24px.svg b/plugins/dde-dock/brightness/resources/texts/external-display_24px.svg deleted file mode 100644 index d26c5ff49..000000000 --- a/plugins/dde-dock/brightness/resources/texts/external-display_24px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/display/PC-24 - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/resources/texts/laptop_16px.svg b/plugins/dde-dock/brightness/resources/texts/laptop_16px.svg deleted file mode 100644 index 0dc35bd75..000000000 --- a/plugins/dde-dock/brightness/resources/texts/laptop_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/display/laptop - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/resources/texts/laptop_24px.svg b/plugins/dde-dock/brightness/resources/texts/laptop_24px.svg deleted file mode 100644 index 101991742..000000000 --- a/plugins/dde-dock/brightness/resources/texts/laptop_24px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/display/laptop-24 - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/brightness/resources/texts/open-arrow_16px.svg b/plugins/dde-dock/brightness/resources/texts/open-arrow_16px.svg deleted file mode 100644 index 5e0874c1d..000000000 --- a/plugins/dde-dock/brightness/resources/texts/open-arrow_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - open - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/common/chameleonwidget.cpp b/plugins/dde-dock/common/chameleonwidget.cpp deleted file mode 100644 index 2226250cc..000000000 --- a/plugins/dde-dock/common/chameleonwidget.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "chameleonwidget.h" - -#include -#include -#include -#include -#include - -ChameleonWidget::ChameleonWidget(QWidget *parent) - : MouseStateWidget(parent) - , m_beChameleon(true) - , m_dragging(false) - , m_active(false) -{ - -} - -ChameleonWidget::~ChameleonWidget() -{ - -} - -void ChameleonWidget::setDraggingState(bool dragging) -{ - if (m_dragging != dragging) { - m_dragging = dragging; - update(); - } -} - -void ChameleonWidget::setActive(bool active) -{ - if (m_active != active) { - m_active = active; - update(); - } -} - -void ChameleonWidget::paintEvent(QPaintEvent *event) -{ - QWidget::paintEvent(event); - - if (!m_beChameleon || (!m_state && !m_active) || m_dragging) - return; - - QPainter painter(this); - painter.setRenderHint(QPainter::Antialiasing, true); - - const int radius = 6; - QColor backColor = Qt::white; - if (m_state & HOVERD) { - backColor.setAlphaF(m_active ? 0.25 : 0.15); - } else if (m_state & PRESSED) { - backColor.setAlphaF(m_active ? 0.30 : 0.25); - } else { - backColor.setAlphaF(0.15); - } - QRectF rc = this->rect(); - const int borderWidth = 1; - QPen pen; - - // 背景透明 - painter.fillRect(rc, Qt::transparent); - - // 不开缩放用常规方法 - if (qFuzzyCompare(devicePixelRatioF(), 1.0)) { - // 绘制外边框线 - pen.setColor(QColor(0, 0, 0, 0.10 * 255)); - pen.setWidth(borderWidth); - painter.setPen(pen); - painter.drawRoundedRect(rc, radius, radius); - - // 绘制背景色 - const int backRadius = (radius - borderWidth) > 0 ? radius - borderWidth : 0; - rc = rc.adjusted(borderWidth, borderWidth, -borderWidth, -borderWidth); - QPainterPath path; - path.addRoundedRect(rc, backRadius, backRadius); - painter.fillPath(path, backColor); - - // 绘制内边框线 - pen.setColor(QColor(255, 255, 255, 0.10 * 255)); - pen.setWidth(borderWidth); - painter.setPen(pen); - painter.drawRoundedRect(rc, backRadius, backRadius); - } else { - const qreal devicePixelRatio = qFuzzyCompare(devicePixelRatioF(), 0.0) ? 1.0 : devicePixelRatioF(); - const qreal borderWidthOffset = borderWidth / devicePixelRatio; - - // 空1px处理外边框线 - rc = rc.marginsRemoved(QMargins(borderWidth, borderWidth, borderWidth, borderWidth)); - - // 绘制外边框线 - pen.setColor(QColor(0, 0, 0, 0.10 * 255)); - pen.setWidthF(borderWidthOffset); - painter.setBrush(Qt::NoBrush); - painter.setPen(pen); - drawBorder(&painter, rc, radius); - - // 绘制背景色 - const int backRadius = (radius - borderWidth) > 0 ? radius - borderWidth : 0; - rc = rc.adjusted(borderWidthOffset, borderWidthOffset, -borderWidthOffset, -borderWidthOffset); - painter.setPen(Qt::NoPen); - QPainterPath path; - path.addRoundedRect(rc, backRadius, backRadius); - painter.fillPath(path, backColor); - - // 绘制内边框线 - pen.setColor(QColor(255, 255, 255, 0.10 * 255)); - pen.setWidthF(borderWidthOffset); - painter.setBrush(Qt::NoBrush); - painter.setPen(pen); - drawBorder(&painter, rc, backRadius); - } -} - -void ChameleonWidget::drawBorder(QPainter *p, const QRectF &rect, double radius) -{ - p->setRenderHint(QPainter::RenderHint::Antialiasing, false); - - // 绘制直边 - p->drawLine(rect.topLeft() + QPointF(radius, 0), rect.topRight() - QPointF(radius, 0)); - p->drawLine(rect.bottomLeft() + QPointF(radius, 0), rect.bottomRight() - QPointF(radius, 0)); - p->drawLine(rect.topLeft() + QPointF(0, radius), rect.bottomLeft() - QPointF(0, radius)); - p->drawLine(rect.topRight() + QPointF(0, radius), rect.bottomRight() - QPointF(0, radius)); - - QPen pen = p->pen(); - pen.setCapStyle(Qt::FlatCap); // 设置线条端点样式为平直端点 - p->setPen(pen); - p->setRenderHint(QPainter::RenderHint::Antialiasing, true); // 圆角需要开启抗锯齿 - - // 绘制圆角 - 左上角 - QRectF leftTopRect(rect.topLeft().x(), rect.topLeft().y(), radius * 2, radius * 2); - p->drawArc(leftTopRect, 90 * 16, 90 * 16); - // 右上角 - QRectF rightTopRect(rect.topRight().x() - radius * 2, rect.topRight().y(), radius * 2, radius * 2); - p->drawArc(rightTopRect, 0, 90 * 16); - // 左下角 - QRectF leftBottomRect(rect.bottomLeft().x(), rect.bottomLeft().y() - radius * 2, radius * 2, radius * 2); - p->drawArc(leftBottomRect, 180 * 16, 90 * 16); - // 右下角 - QRectF rightBottomRect(rect.bottomRight().x() - radius * 2, rect.bottomRight().y() - radius * 2, radius * 2, radius * 2); - p->drawArc(rightBottomRect, 270 * 16, 90 * 16); -} - diff --git a/plugins/dde-dock/common/chameleonwidget.h b/plugins/dde-dock/common/chameleonwidget.h deleted file mode 100644 index 78ee8a8f4..000000000 --- a/plugins/dde-dock/common/chameleonwidget.h +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef CHAMELEONWIDGET_H -#define CHAMELEONWIDGET_H - -#include "mousestatewidget.h" - -#include - -/** - * @brief hover 和 press 状态的时候叠加一层透明色 - */ -class ChameleonWidget : public MouseStateWidget -{ - Q_OBJECT -public: - ChameleonWidget(QWidget *parent = nullptr); - ~ChameleonWidget(); - - /** - * @brief 设置是否在hover 和 press 状态的时候变色 - */ - void setBeChameleon(bool beChameleon) { m_beChameleon = beChameleon; } - void setDraggingState(bool dragging); - void setActive(bool active); - -protected: - void paintEvent(QPaintEvent *event) override; - -private: - void drawBorder(QPainter *p, const QRectF &rect, double radius); - -private: - bool m_beChameleon; - bool m_dragging; - bool m_active; -}; - -#endif diff --git a/plugins/dde-dock/common/dconfig_helper.cpp b/plugins/dde-dock/common/dconfig_helper.cpp deleted file mode 100644 index eaf5e5a08..000000000 --- a/plugins/dde-dock/common/dconfig_helper.cpp +++ /dev/null @@ -1,231 +0,0 @@ -// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "dconfig_helper.h" - -#include -#include -#include - -DCORE_USE_NAMESPACE - -Q_GLOBAL_STATIC(DConfigHelper, dConfigWatcher) - -DConfigHelper::DConfigHelper(QObject *parent) - : QObject(parent) -{ - moveToThread(qApp->thread()); -} - -DConfigHelper *DConfigHelper::instance() -{ - return dConfigWatcher; -} - -DConfig *DConfigHelper::initializeDConfig(const QString &appId, - const QString &name, - const QString &subpath) -{ - QMutexLocker locker(&m_mutex); - DConfig *dConfig = DConfig::create(appId, name, subpath); - if (!dConfig) { - qWarning() << "Create dconfig failed, app id: " << appId << ", name: " << name - << ", subpath: " << subpath; - return nullptr; - } - - m_dConfigs[packageDConfigPath(appId, name, subpath)] = dConfig; - m_bindInfos[dConfig] = {}; - - dConfig->moveToThread(qApp->thread()); - dConfig->setParent(this); - - // 即时响应数据变化 - connect(dConfig, &DConfig::valueChanged, this, [this, dConfig](const QString &key) { - const QVariant &value = dConfig->value(key); - auto it = m_bindInfos.find(dConfig); - if (it == m_bindInfos.end()) - return; - - auto itBindInfo = it.value().begin(); - for (; itBindInfo != it.value().end(); ++itBindInfo) { - if (itBindInfo.value().contains(key)) { - auto callbackIt = m_objCallbackMap.find(itBindInfo.key()); - if (callbackIt != m_objCallbackMap.end()) - callbackIt.value()(key, value, itBindInfo.key()); - } - } - }); - - return dConfig; -} - -void DConfigHelper::bind(const QString &appId, - const QString &name, - const QString &subpath, - QObject *obj, - const QString &key, - const OnPropertyChangedCallback &callback) -{ - if (!obj) - return; - - DConfig *dConfig = dConfigObject(appId, name, subpath); - if (!dConfig) { - qWarning() << "Bind failed, dconfig is nullptr, app id: " << appId << ", name: " << name << ", subpath: " << subpath; - return; - } - - auto it = m_bindInfos.find(dConfig); - if (it == m_bindInfos.end()) { - qWarning() << "Can not find bind info"; - return; - } - - QMap &bindInfo = it.value(); - auto bindInfoIt = bindInfo.find(obj); - if (bindInfoIt != bindInfo.end()) { - if (!bindInfoIt.value().contains(key)) - bindInfoIt.value().append(key); - } else { - bindInfo[obj] = QStringList(key); - } - - m_objCallbackMap.insert(obj, callback); - connect(obj, &QObject::destroyed, this, [this, obj] { - unBind(obj); - }); -} - -void DConfigHelper::bind(const QString& encodedPath, - QObject* obj, - const QString& key, - const OnPropertyChangedCallback &callback) -{ - const QStringList &tmp = encodedPath.split(","); - if (tmp.size() != 3) { - qWarning() << "Encoded path is invalid, encoded path: " << encodedPath << ", size: " << tmp.size(); - return; - } - - bind(tmp[0], tmp[1], tmp[2], obj, key, callback); -} - -void DConfigHelper::unBind(QObject *obj, const QString &key) -{ - qDebug() << "DConfig unbind, object: " << obj << ", key: " << key; - if (!obj) { - qWarning() << "Unbinding object is null"; - return; - } - - bool objStillUseful = false; - auto it = m_bindInfos.begin(); - for (; it != m_bindInfos.end(); ++it) { - if (key.isEmpty()) { - it->remove(obj); - } else { - // 移除key,移除完如果obj没有绑定了key了,那么把obj也移除掉 - auto it1 = it.value().find(obj); - if (it1 != it.value().end()) { - it1.value().removeAll(key); - if (it1.value().isEmpty()) { - it->remove(obj); - } else { - objStillUseful = true; - } - } - } - } - - if (key.isEmpty() || !objStillUseful) - m_objCallbackMap.remove(obj); -} - -QVariant DConfigHelper::getConfig(const QString &appId, - const QString &name, - const QString &subpath, - const QString &key, - const QVariant &defaultValue) -{ - DConfig *dConfig = dConfigObject(appId, name, subpath); - if (!dConfig) { - qWarning() << "Get config failed, dconfig object is null"; - return defaultValue; - } - - if (!dConfig->keyList().contains(key)) - return defaultValue; - - const QVariant &value = dConfig->value(key); - return value; -} - -QVariant DConfigHelper::getConfig(const QString& encodedPath, - const QString& key, - const QVariant& defaultValue) -{ - const QStringList &tmp = encodedPath.split(","); - if (tmp.size() != 3) { - qWarning() << "Get config failed, encoded path is invalid:" << encodedPath; - return defaultValue; - } - - return getConfig(tmp[0], tmp[1], tmp[2], key, defaultValue); -} - -void DConfigHelper::setConfig(const QString &appId, - const QString &name, - const QString &subpath, - const QString &key, - const QVariant &value) -{ - DConfig *dConfig = dConfigObject(appId, name, subpath); - if (!dConfig) { - qWarning() << "Set config failed, dconfig object is null"; - return; - } - - if (!dConfig->keyList().contains(key)) { - qWarning() << "Set config failed, dconfig does not contain key: " << key; - return; - } - - dConfig->setValue(key, value); -} - -void DConfigHelper::setConfig(const QString& encodedPath, - const QString& key, - const QVariant& value) -{ - const QStringList &tmp = encodedPath.split(","); - if (tmp.size() != 3) { - qWarning() << "Set config failed, encoded path is invalid:" << encodedPath; - return; - } - - return setConfig(tmp[0], tmp[1], tmp[2], key, value); -} - -DConfig *DConfigHelper::dConfigObject(const QString &appId, - const QString &name, - const QString &subpath) -{ - const QString &configPath = packageDConfigPath(appId, name, subpath); - DConfig *dConfig = nullptr; - if (m_dConfigs.contains(configPath)) - dConfig = m_dConfigs.value(configPath); - else - dConfig = initializeDConfig(appId, name, subpath); - - return dConfig; -} - -QString DConfigHelper::packageDConfigPath(const QString &appId, - const QString &name, - const QString &subpath) const -{ - return appId + name + subpath; -} - diff --git a/plugins/dde-dock/common/dconfig_helper.h b/plugins/dde-dock/common/dconfig_helper.h deleted file mode 100644 index bd36e0ac5..000000000 --- a/plugins/dde-dock/common/dconfig_helper.h +++ /dev/null @@ -1,81 +0,0 @@ -// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#pragma once - -#include - -#include -#include -#include - -/** - * @brief 配置变化回调函数 - * - * @param const QString & 配置键值 - * @param const QVariant & 配置值 - * @param QObject * 绑定对象 - */ - -typedef std::function OnPropertyChangedCallback; - -class DConfigHelper : public QObject { - Q_OBJECT -public: - explicit DConfigHelper(QObject* parent = nullptr); - static DConfigHelper* instance(); - - // 注意:多个配置文件区分同名的key - void bind(const QString& appId, - const QString& name, - const QString& subpath, - QObject* obj, - const QString& key, - const OnPropertyChangedCallback &callback); - // encodedPath 是将appId name subPath 组合起来,以逗号分割;如果subPath为空,则以逗号结尾 - // eg: org.deepin.dde.dock,org.deepin.dde.dock.plugin.power, - void bind(const QString& encodedPath, - QObject* obj, - const QString& key, - const OnPropertyChangedCallback &callback); - void unBind(QObject* obj, const QString& key = ""); - - QVariant getConfig(const QString& appId, - const QString& name, - const QString& subpath, - const QString& key, - const QVariant& defaultValue); - QVariant getConfig(const QString& encodedPath, - const QString& key, - const QVariant& defaultValue); - - void setConfig(const QString& appId, - const QString& name, - const QString& subpath, - const QString& key, - const QVariant& value); - void setConfig(const QString& encodedPath, - const QString& key, - const QVariant& value); - -private: - Q_DISABLE_COPY(DConfigHelper) - - Dtk::Core::DConfig* initializeDConfig(const QString& appId, - const QString& name, - const QString& subpath); - Dtk::Core::DConfig* dConfigObject(const QString& appId, - const QString& name, - const QString& subpath); - QString packageDConfigPath(const QString& appId, - const QString& name, - const QString& subpath) const; - QString decodeDConfigPath(const QString& path) const; - -private: - QMutex m_mutex; - QMap m_dConfigs; - QMap> m_bindInfos; - QMap m_objCallbackMap; -}; diff --git a/plugins/dde-dock/common/dockslider.cpp b/plugins/dde-dock/common/dockslider.cpp deleted file mode 100644 index bc2607ea7..000000000 --- a/plugins/dde-dock/common/dockslider.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "dockslider.h" - -#include -#include -#include - -DockSlider::DockSlider(QWidget *parent) - : DSlider(Qt::Horizontal, parent), - m_pressed(false), - m_timer(new QTimer(this)) -{ - setPageStep(50); - m_timer->setInterval(100); - setMouseWheelEnabled(true); - connect(m_timer, &QTimer::timeout, this, &DockSlider::onTimeout); -} - -void DockSlider::setValue(const int value) -{ - if (m_pressed) - return; - - blockSignals(true); - DSlider::setValue(value); - blockSignals(false); -} - -void DockSlider::mousePressEvent(QMouseEvent *e) -{ - if (e->button() == Qt::LeftButton) - { - if (!rect().contains(e->pos())) - return; - m_pressed = true; - DSlider::setValue(maximum() * e->position().x() / rect().width()); - } -} - -void DockSlider::mouseMoveEvent(QMouseEvent *e) -{ - const int value = minimum() + (double((maximum()) - minimum()) * e->position().x() / rect().width()); - const int normalized = std::max(std::min(maximum(), value), 0); - - DSlider::setValue(normalized); - - blockSignals(true); - emit valueChanged(normalized); - blockSignals(false); -} - -void DockSlider::mouseReleaseEvent(QMouseEvent *e) -{ - if (e->button() == Qt::LeftButton) - { - m_pressed = false; - emit requestPlaySoundEffect(); - } -} - -void DockSlider::wheelEvent(QWheelEvent *e) -{ - e->accept(); - - m_timer->start(); - - DSlider::setValue(value() + (e->angleDelta().y() > 0 ? 2 : -2)); -} - -void DockSlider::onTimeout() -{ - m_timer->stop(); - emit requestPlaySoundEffect(); -} diff --git a/plugins/dde-dock/common/dockslider.h b/plugins/dde-dock/common/dockslider.h deleted file mode 100644 index b570bd789..000000000 --- a/plugins/dde-dock/common/dockslider.h +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef VOLUMESLIDER_H -#define VOLUMESLIDER_H - -#include -#include - -class DockSlider : public DTK_WIDGET_NAMESPACE::DSlider -{ - Q_OBJECT - -public: - explicit DockSlider(QWidget *parent = 0); - - void setValue(const int value); - -signals: - void requestPlaySoundEffect() const; - -protected: - void mousePressEvent(QMouseEvent *e) override; - void mouseMoveEvent(QMouseEvent *e) override; - void mouseReleaseEvent(QMouseEvent *e) override; - void wheelEvent(QWheelEvent *e) override; - -private slots: - void onTimeout(); - -private: - bool m_pressed; - QTimer *m_timer; -}; - -#endif // VOLUMESLIDER_H diff --git a/plugins/dde-dock/common/mousestatewidget.cpp b/plugins/dde-dock/common/mousestatewidget.cpp deleted file mode 100644 index 7ee823e16..000000000 --- a/plugins/dde-dock/common/mousestatewidget.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "mousestatewidget.h" - -#include -#include -#include - -bool MouseStateWidget::ignoreEnterEvent = false; - -MouseStateWidget::MouseStateWidget(QWidget *parent) - : QWidget(parent) - , m_state(LEAVE) - , m_ensureLeave(false) - , m_enableIgnoreEnterEvent(false) -{ -} - -void MouseStateWidget::restState() -{ - m_state = LEAVE; - update(); -} - -bool MouseStateWidget::event(QEvent *event) -{ - auto setState = [this] (int state) { - m_state = state; - update(); - }; - - if (event->type() == QEvent::Enter) { - if (!m_enableIgnoreEnterEvent || !ignoreEnterEvent) - setState(HOVERD); - } else if (event->type() == QEvent::Leave) { - if (!m_ensureLeave || !rect().contains(mapFromGlobal(QCursor::pos()))) - setState(LEAVE); - } else if (event->type() == QEvent::MouseButtonPress) { - QMouseEvent *e = dynamic_cast(event); - if (e && e->button() == Qt::LeftButton) - setState(PRESSED); - else if (m_ensureLeave) // xembed 插件弹出右键菜单的时候,收到leave 事件,但是ensure leave会阻止设置 LEAVE 状态 - setState(LEAVE); - } else if (event->type() == QEvent::MouseButtonRelease) { - setState(rect().contains(mapFromGlobal(QCursor::pos())) ? HOVERD : LEAVE); - } - - return QWidget::event(event); -} diff --git a/plugins/dde-dock/common/mousestatewidget.h b/plugins/dde-dock/common/mousestatewidget.h deleted file mode 100644 index 5923df15e..000000000 --- a/plugins/dde-dock/common/mousestatewidget.h +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef MOUSESTATEWIDGET_H -#define MOUSESTATEWIDGET_H - -#include - -class MouseStateWidget : public QWidget -{ - Q_OBJECT - -public: - explicit MouseStateWidget(QWidget *parent = nullptr); - - void enableEnsureLeave(bool enable) { m_ensureLeave = enable; } - void enableIgnoreEnterEvent(bool enable) { m_enableIgnoreEnterEvent = enable; } - - static void setIgnoreEnterEvent(bool ignore) { ignoreEnterEvent = ignore; } - - void restState(); - -protected: - bool event(QEvent *event) override; - -protected: - static const int LEAVE = 0; - static const int HOVERD = 1 << 0; - static const int PRESSED = 1 << 1; - -protected: - int m_state; - bool m_ensureLeave; - bool m_enableIgnoreEnterEvent; - - static bool ignoreEnterEvent; -}; - -#endif \ No newline at end of file diff --git a/plugins/dde-dock/common/settingmanager.cpp b/plugins/dde-dock/common/settingmanager.cpp deleted file mode 100644 index 00369628d..000000000 --- a/plugins/dde-dock/common/settingmanager.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "settingmanager.h" -#include "../util/utils.h" - -#include - -#include -#include - -DCORE_USE_NAMESPACE - -static DConfig *dockConfig = nullptr; -static DConfig *quickPanelConfig = nullptr; - -const static QString DCONFIG_DOCK_PLUGINS = QStringLiteral("dockedQuickPlugins"); -const static QString DCONFIG_SHOW_WINDOW_NAME = QStringLiteral("showWindowName"); -const static QString DCONFIG_ENABLE_SAFE_MODE = QStringLiteral("enableSafeMode"); -const static QString DCONFIG_DELAY_INTERVAL_ON_HIDE = QStringLiteral("delayIntervalOnHide"); -const static QString DCONFIG_TOGGLE_DESKTOP_INTERVAL = QStringLiteral("toggleDesktopInterval"); -const static QString DCONFIG_ALWAYS_HIDE_DOCK = QStringLiteral("alwaysHideDock"); -const static QString DCONFIG_ENABLE_SHOWDESKTOP = QStringLiteral("enableShowDesktop"); - -SettingManager::SettingManager(QObject *parent) - : QObject(parent) - , m_enableSafeMode(true) - , m_delayIntervalOnHide(0) - , m_showWindowName(-1) - , m_toggleDesktopInterval(0) - , m_alwaysHideDock(false) - , m_enableShowDesktop(true) -{ - if (!dockConfig) - dockConfig = DConfig::create("org.deepin.dde.tray-loader", "org.deepin.dde.dock", QString(), this); - - if (!quickPanelConfig) - quickPanelConfig = DConfig::create("org.deepin.dde.tray-loader", "org.deepin.dde.dock.plugin.quick-panel", QString(), this); - - if (dockConfig) { - connect(dockConfig, &DConfig::valueChanged, this, &SettingManager::onDockConfigChanged); - for (const auto &key : dockConfig->keyList()) { - if (DCONFIG_ENABLE_SAFE_MODE == key) - m_enableSafeMode = dockConfig->value(DCONFIG_ENABLE_SAFE_MODE).toBool(); - else if (DCONFIG_DELAY_INTERVAL_ON_HIDE == key) - m_delayIntervalOnHide = dockConfig->value(DCONFIG_DELAY_INTERVAL_ON_HIDE).toInt(); - else if (DCONFIG_SHOW_WINDOW_NAME == key) - m_showWindowName = dockConfig->value(DCONFIG_SHOW_WINDOW_NAME).toInt(); - else if (DCONFIG_TOGGLE_DESKTOP_INTERVAL == key) - m_toggleDesktopInterval = dockConfig->value(DCONFIG_TOGGLE_DESKTOP_INTERVAL).toInt(); - else if (DCONFIG_ALWAYS_HIDE_DOCK == key) - m_alwaysHideDock = dockConfig->value(DCONFIG_ALWAYS_HIDE_DOCK).toBool(); - else if (DCONFIG_ENABLE_SHOWDESKTOP == key) - m_enableShowDesktop = dockConfig->value(DCONFIG_ENABLE_SHOWDESKTOP).toBool(); - } - } - - if (quickPanelConfig) { - connect(quickPanelConfig, &DConfig::valueChanged, this, &SettingManager::onQuickPanelConfigChanged); - - m_dockedQuickPlugins = quickPanelConfig->value(DCONFIG_DOCK_PLUGINS, QStringList()).toStringList(); - } -} - -SettingManager::~SettingManager() -{ -} - -SettingManager *SettingManager::instance() -{ - static SettingManager config; - return &config; -} - -bool SettingManager::enableSafeMode() const -{ - return m_enableSafeMode; -} - -bool SettingManager::enableShowDesktop() const -{ - return m_enableShowDesktop; -} - -int SettingManager::delayIntervalOnHide() const -{ - return m_delayIntervalOnHide; -} - -int SettingManager::showWindowName() const -{ - return m_showWindowName; -} - -int SettingManager::toggleDesktopInterval() const -{ - return m_toggleDesktopInterval; -} - -bool SettingManager::alwaysHideDock() const -{ - return m_alwaysHideDock; -} - -QStringList SettingManager::dockedPlugins() const -{ - return m_dockedQuickPlugins; -} - -void SettingManager::setPluginDocked(const QString &pluginName, bool docked) -{ - if (!quickPanelConfig) - return; - - if (docked && !m_dockedQuickPlugins.contains(pluginName)) - m_dockedQuickPlugins.append(pluginName); - else if (!docked) - m_dockedQuickPlugins.removeAll(pluginName); - - quickPanelConfig->setValue(DCONFIG_DOCK_PLUGINS, m_dockedQuickPlugins); -} - -void SettingManager::onDockConfigChanged(const QString &key) -{ - if (key == DCONFIG_ENABLE_SAFE_MODE) { - m_enableSafeMode = dockConfig->value(DCONFIG_ENABLE_SAFE_MODE).toBool(); - } else if (key == DCONFIG_DELAY_INTERVAL_ON_HIDE) { - m_delayIntervalOnHide = dockConfig->value(DCONFIG_DELAY_INTERVAL_ON_HIDE).toInt(); - } else if (key == DCONFIG_SHOW_WINDOW_NAME) { - m_showWindowName = dockConfig->value(DCONFIG_SHOW_WINDOW_NAME).toInt(); - } else if (key == DCONFIG_TOGGLE_DESKTOP_INTERVAL) { - m_toggleDesktopInterval = dockConfig->value(DCONFIG_TOGGLE_DESKTOP_INTERVAL).toInt(); - emit toggleDesktopIntervalChanged(m_toggleDesktopInterval); - } else if (key == DCONFIG_ALWAYS_HIDE_DOCK) { - m_alwaysHideDock = dockConfig->value(DCONFIG_ALWAYS_HIDE_DOCK).toBool(); - emit alwaysHideDockChanged(m_alwaysHideDock); - } else if (DCONFIG_ENABLE_SHOWDESKTOP == key) - m_enableShowDesktop = dockConfig->value(DCONFIG_ENABLE_SHOWDESKTOP).toBool(); - emit enableShowDesktopChanged(m_enableShowDesktop); -} - -void SettingManager::onQuickPanelConfigChanged(const QString &key) -{ - if (key == DCONFIG_DOCK_PLUGINS) { - m_dockedQuickPlugins = quickPanelConfig->value(DCONFIG_DOCK_PLUGINS).toStringList(); - Q_EMIT dockedPluginsChanged(m_dockedQuickPlugins); - } -} diff --git a/plugins/dde-dock/common/settingmanager.h b/plugins/dde-dock/common/settingmanager.h deleted file mode 100644 index c9067560e..000000000 --- a/plugins/dde-dock/common/settingmanager.h +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SETTINGMANAGER_H -#define SETTINGMANAGER_H - -#include -#include - -class SettingManager : public QObject -{ - Q_OBJECT - -public: - static SettingManager *instance(); - SettingManager(const SettingManager &) = delete; - SettingManager &operator=(const SettingManager &) = delete; - - bool enableSafeMode() const; - int delayIntervalOnHide() const; - int showWindowName() const; - int toggleDesktopInterval() const; - bool alwaysHideDock() const; - bool enableShowDesktop() const; - QStringList dockedPlugins() const; - -// Setter -public: - void setPluginDocked(const QString &pluginName, bool docked); - -signals: - void onlyShowPrimaryChanged(bool); - void alwaysHideDockChanged(bool); - void toggleDesktopIntervalChanged(int); - void dockedPluginsChanged(const QStringList &); - void enableShowDesktopChanged(bool); - -protected: - explicit SettingManager(QObject *parent = nullptr); - ~SettingManager(); - -private slots: - void onDockConfigChanged(const QString &key); - void onQuickPanelConfigChanged(const QString &key); - -private: - bool m_enableSafeMode; - int m_delayIntervalOnHide; - int m_showWindowName; - int m_toggleDesktopInterval; - bool m_alwaysHideDock; - bool m_enableShowDesktop; - QStringList m_dockedQuickPlugins; -}; - -#endif // CONFIGWATCHER_H diff --git a/plugins/dde-dock/common/settingsitem.cpp b/plugins/dde-dock/common/settingsitem.cpp deleted file mode 100644 index 425508342..000000000 --- a/plugins/dde-dock/common/settingsitem.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "settingsitem.h" - -#include -#include -#include -#include - -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE -DGUI_USE_NAMESPACE - -SettingsItem::SettingsItem(QWidget *parent) - : QFrame(parent) - , m_hasBack(false) -{ -} - -void SettingsItem::addBackground() -{ - m_hasBack = true; - - update(); -} - -void SettingsItem::removeBackground() -{ - m_hasBack = false; - - update(); -} - -void SettingsItem::paintEvent(QPaintEvent *event) -{ - if (m_hasBack) { - QPainter p(this); - p.setPen(Qt::NoPen); - QColor bgColor; - if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::LightType) { - bgColor = QColor(0, 0, 0, 255 * 0.05); - } else { - bgColor = QColor(255, 255, 255, 255 * 0.05); - } - p.setBrush(bgColor); - p.drawRoundedRect(rect(), 8, 8); - } - return QFrame::paintEvent(event); -} diff --git a/plugins/dde-dock/common/settingsitem.h b/plugins/dde-dock/common/settingsitem.h deleted file mode 100644 index 2a77b210f..000000000 --- a/plugins/dde-dock/common/settingsitem.h +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SETTINGSITEM_H -#define SETTINGSITEM_H - -#include - -#include - -class SettingsItem : public QFrame -{ - Q_OBJECT - -public: - explicit SettingsItem(QWidget *parent = nullptr); - - void addBackground(); - void removeBackground(); - -protected: - void paintEvent(QPaintEvent *event) override; - -private: - bool m_hasBack; -}; - -#endif // SETTINGSITEM_H diff --git a/plugins/dde-dock/common/slidercontainer.cpp b/plugins/dde-dock/common/slidercontainer.cpp deleted file mode 100644 index f99adeff2..000000000 --- a/plugins/dde-dock/common/slidercontainer.cpp +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright (C) 2022 ~ 2026 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "slidercontainer.h" -#include "commoniconbutton.h" - -#include -#include -#include -#include - -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE - -SliderContainer::SliderContainer(QWidget *parent) - : SettingsItem(parent) - , m_leftIconWidget(new CommonIconButton(this)) - , m_rightIconWidget(new RightIconButton(this)) - , m_slider(new QSlider(Qt::Orientation::Horizontal, this)) - , m_leftTip(new DTipLabel("", this)) - , m_rightTip(new DTipLabel("", this)) - , m_tipWidget(new QWidget(this)) - , m_leftSpacing(new QSpacerItem(10, 0)) - , m_rightSpacing(new QSpacerItem(10, 0)) -{ - m_leftIconWidget->setFixedSize(QSize(24, 24)); - m_rightIconWidget->setFixedSize(QSize(24, 24)); - - QVBoxLayout *mainLayout = new QVBoxLayout(this); - mainLayout->setContentsMargins(0, 0, 0, 0); - mainLayout->setSpacing(0); - - m_sliderLayout = new QHBoxLayout; - m_sliderLayout->setContentsMargins(10, 0, 10, 0); - m_sliderLayout->setSpacing(0); - m_sliderLayout->addWidget(m_leftIconWidget); - m_sliderLayout->addSpacerItem(m_leftSpacing); - m_sliderLayout->addWidget(m_slider); - m_sliderLayout->addSpacerItem(m_rightSpacing); - m_sliderLayout->addWidget(m_rightIconWidget); - - DFontSizeManager::instance()->bind(m_leftTip, DFontSizeManager::T9, QFont::Medium); - DFontSizeManager::instance()->bind(m_rightTip, DFontSizeManager::T9, QFont::Medium); - m_leftTip->setForegroundRole(DPalette::TextTips); - auto titleLayout = new QHBoxLayout(m_tipWidget); - titleLayout->setSpacing(0); - titleLayout->setContentsMargins(10, 0, 10, 2); - titleLayout->addWidget(m_leftTip); - titleLayout->addStretch(); - titleLayout->addWidget(m_rightTip); - - mainLayout->addStretch(); - mainLayout->addWidget(m_tipWidget); - mainLayout->addLayout(m_sliderLayout); - mainLayout->addStretch(); - - m_tipWidget->setVisible(false); - - m_leftIconWidget->installEventFilter(this); - m_slider->setFocusPolicy(Qt::StrongFocus); - m_slider->setObjectName("Slider"); - m_slider->installEventFilter(this); - m_rightIconWidget->installEventFilter(this); - installEventFilter(this); - - connect(m_slider, &QSlider::valueChanged, this, &SliderContainer::sliderValueChanged); - - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [this]{ - QColor tipColor; - if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::LightType) { - tipColor = QColor(0, 0, 0, 255 * 0.60); - } else { - tipColor = QColor(255, 255, 255, 255 * 0.60); - } - DPalette pa = DPaletteHelper::instance()->palette(this); - pa.setBrush(DPalette::TextTips, tipColor); - DPaletteHelper::instance()->setPalette(m_leftTip, pa); - DPaletteHelper::instance()->setPalette(m_rightTip, pa); - update(); - }); -} - -SliderContainer::~SliderContainer() -{ -} - -void SliderContainer::setSlider(QSlider *slider) -{ - m_sliderLayout->replaceWidget(m_slider, slider); - m_slider->deleteLater(); - m_slider = slider; - m_slider->installEventFilter(this); - - connect(m_slider, &QSlider::valueChanged, this, &SliderContainer::sliderValueChanged); -} - -void SliderContainer::setSlider(Dtk::Widget::DSlider *slider) -{ - m_sliderLayout->replaceWidget(m_slider, slider); - m_slider->deleteLater(); - m_slider = slider->slider(); - slider->installEventFilter(this); - - connect(m_slider, &QSlider::valueChanged, this, &SliderContainer::sliderValueChanged); -} - -void SliderContainer::setTip(const QString &text, TitlePosition pos) -{ - if (pos == LeftTip) { - m_leftTip->setText(text); - m_leftTip->setVisible(!text.isEmpty()); - } else { - m_rightTip->setText(text); - m_rightTip->setVisible(!text.isEmpty()); - } - - m_tipWidget->setVisible(!m_leftTip->text().isEmpty() || !m_rightTip->text().isEmpty()); -} - -QSize SliderContainer::getSuitableSize(const QSize &iconSize, const QSize &bgSize) -{ - if (bgSize.isValid() && !bgSize.isNull() && !bgSize.isEmpty()) - return bgSize; - - return iconSize; -} - -void SliderContainer::setIcon(const SliderContainer::IconPosition &iconPosition, const QString &icon, int space) -{ - if (icon.isEmpty()) { - return; - } - - switch (iconPosition) { - case IconPosition::LeftIcon: { - m_leftIconWidget->setIcon(QIcon::fromTheme(icon)); - m_leftSpacing->changeSize(space, 0); - break; - } - case IconPosition::RightIcon: { - m_rightIconWidget->setIcon(QIcon::fromTheme(icon)); - m_rightSpacing->changeSize(space, 0); - break; - } - } - - layout()->invalidate(); -} - -void SliderContainer::setIcon(const SliderContainer::IconPosition &iconPosition, const QIcon &icon, int space) -{ - if (icon.isNull()) { - return; - } - - switch (iconPosition) { - case IconPosition::LeftIcon: { - m_leftIconWidget->setIcon(icon); - m_leftSpacing->changeSize(space, 0); - break; - } - case IconPosition::RightIcon: { - m_rightIconWidget->setIcon(icon); - m_rightSpacing->changeSize(space, 0); - break; - } - } - - layout()->invalidate(); -} - -void SliderContainer::setPageStep(int step) -{ - return m_slider->setPageStep(step); -} - -void SliderContainer::setRange(int min, int max) -{ - return m_slider->setRange(min, max); -} - -void SliderContainer::setButtonEnabled(IconPosition pos, bool enabled) -{ - (pos == IconPosition::LeftIcon ? m_leftIconWidget : m_rightIconWidget)->setEnabled(enabled); -} - -void SliderContainer::setSliderEnabled(bool enable) -{ - m_slider->setEnabled(enable); -} - -void SliderContainer::setButtonsEnabled( bool enabled) -{ - m_leftIconWidget->setAllEnabled(enabled); - - // 右边按键,在默认样式下(与左按键样式一样),使能状态和左按键保持一致; - // 在带背景色的样式下(快捷面板内声音/亮度控件的右边按键样式),一直保持使能状态 - m_rightIconWidget->setAllEnabled(m_rightIconWidget->styleType() == RightIconButton::StyleType::Default ? enabled : true); - -} - -void SliderContainer::setButtonSize(IconPosition pos, QSize size) -{ - (pos == IconPosition::LeftIcon ? m_leftIconWidget : m_rightIconWidget)->setFixedSize(size); -} - -void SliderContainer::setButtonsSize(QSize size) -{ - m_leftIconWidget->setFixedSize(size); - m_rightIconWidget->setFixedSize(size); -} - -void SliderContainer::setSliderContentsMargin(QMargins margins) -{ - m_sliderLayout->setContentsMargins(margins); -} - -bool SliderContainer::eventFilter(QObject *watched, QEvent *event) -{ - if (event->type() == QEvent::MouseButtonRelease) { - auto mouseEvent = dynamic_cast(event); - if (mouseEvent && mouseEvent->button() == Qt::LeftButton) { - if (watched == m_leftIconWidget) { - Q_EMIT iconClicked(IconPosition::LeftIcon); - return true; - } - if (watched == m_rightIconWidget) { - Q_EMIT iconClicked(IconPosition::RightIcon); - return true; - } - if (watched == this) { - Q_EMIT panelClicked(); - } - } - } - - if (event->type() == QEvent::Hide && watched == m_slider) { - m_slider->clearFocus(); - } - - return QWidget::eventFilter(watched, event); -} - -void SliderContainer::updateSliderValue(int value) -{ - m_slider->blockSignals(true); - m_slider->setValue(value); - m_slider->blockSignals(false); -} - -void SliderContainer::setSliderProxyStyle(QProxyStyle *proxyStyle) -{ - proxyStyle->setParent(m_slider); - m_slider->setStyle(proxyStyle); -} - -SliderProxyStyle::SliderProxyStyle(StyleType drawSpecial, QStyle *style) - : QProxyStyle(style) - , m_drawSpecial(drawSpecial) -{ -} - -SliderProxyStyle::~SliderProxyStyle() -{ -} - -void SliderProxyStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget) const -{ - if (control != ComplexControl::CC_Slider) - return; - - // 绘制之前先保存之前的画笔 - painter->save(); - painter->setRenderHint(QPainter::RenderHint::Antialiasing); - // 获取滑动条和滑块的区域 - const QStyleOptionSlider *sliderOption = static_cast(option); - QRect rectGroove = subControlRect(CC_Slider, sliderOption, SC_SliderGroove, widget); - QRect rectHandle = subControlRect(CC_Slider, sliderOption, SC_SliderHandle, widget); - // 设置滑动条高度为 4 - rectGroove.setHeight(4); - if (m_drawSpecial == RoundHandler) - drawRoundSlider(painter, rectGroove, rectHandle, widget); - else - drawNormalSlider(painter, rectGroove, rectHandle, widget); - - painter->restore(); -} - -// 绘制通用的滑动条 -void SliderProxyStyle::drawNormalSlider(QPainter *painter, QRect rectGroove, QRect rectHandle, const QWidget *widget) const -{ - DPalette dpa = DPaletteHelper::instance()->palette(widget); - QColor color = dpa.color(DPalette::Highlight); - QColor rightColor(Qt::gray); - if (!widget->isEnabled()) { - color.setAlphaF(0.8); - rightColor.setAlphaF(0.8); - } - - QPen penLine = QPen(color, 2); - // 绘制上下的竖线,一根竖线的宽度是2,+4个像素刚好保证中间也是间隔2个像素 - for (int i = rectGroove.x(); i < rectGroove.x() + rectGroove.width(); i = i + 4) { - if (i < rectHandle.x()) - painter->setPen(penLine); - else - painter->setPen(QPen(rightColor, 2)); - - painter->drawLine(i, rectGroove.y() + 2, i, rectGroove.y() + rectGroove.height() - 2); - } - // 绘制滚动区域 - painter->setBrush(color); - painter->setPen(Qt::NoPen); - QPainterPath path; - path.addRoundedRect(rectHandle, 6, 6); - painter->drawPath(path); -} - -// 绘制设计师定义的那种圆形滑块,黑色的滑条 -void SliderProxyStyle::drawRoundSlider(QPainter *painter, QRect rectGroove, QRect rectHandle, const QWidget *widget) const -{ - // 深色背景下,滑块和滑动条白色,浅色背景下,滑块和滑动条黑色 - QColor color = widget->isEnabled() ? (DGuiApplicationHelper::DarkType == DGuiApplicationHelper::instance()->themeType() ? Qt::white : Qt::black) : Qt::gray; - - // 此处中绘制圆形滑动条,需要绘制圆角,圆角大小为其高度的一半 - int radius = rectGroove.height() / 2; - - // 此处绘制滑条的全长 - QColor sliderColor = color; - sliderColor.setAlpha(255 * 0.2); // 20% opacity - QBrush allBrush(sliderColor); - QPainterPath allPathGroove; - allPathGroove.addRoundedRect(rectGroove, radius, radius); - painter->fillPath(allPathGroove, allBrush); - - // 已经滑动过的区域 - QBrush brush(color); - QPainterPath pathGroove; - int handleSize = qMin(rectHandle.width(), rectHandle.height()); - rectGroove.setWidth(rectHandle.x() + (rectHandle.width() - handleSize) / 2); - pathGroove.addRoundedRect(rectGroove, radius, radius); - painter->fillPath(pathGroove, brush); - - // 绘制滑块,因为滑块是正圆形,而它本来的区域是一个长方形区域,因此,需要计算当前 - // 区域的正中心区域,将其作为一个正方形区域来绘制圆形滑块 - int x = rectHandle.x() + (rectHandle.width() - handleSize) / 2; - int y = rectGroove.y() + (rectGroove.height() / 2) - handleSize / 2; - rectHandle.setX(x); - rectHandle.setY(y); - rectHandle.setWidth(handleSize); - rectHandle.setHeight(handleSize); - - QPainterPath pathHandle; - pathHandle.addEllipse(rectHandle); - painter->fillPath(pathHandle, brush); -} - -RightIconButton::RightIconButton(QWidget *parent) - : CommonIconButton(parent) - , m_style(StyleType::Default) - , m_press(false) - , m_hover(false) -{ - setAccessibleName("RightIconButton"); - setStyleType(m_style); -} - -void RightIconButton::setStyleType(const StyleType &style) -{ - m_style = style; - if (m_style == StyleType::Background) { - setFixedSize(36, 36); - setIconSize(QSize(24, 24)); - } else { - setIconSize(QSize()); - } - update(); -} - -bool RightIconButton::event(QEvent *e) -{ - if (m_style != StyleType::Background) { - return CommonIconButton::event(e); - } - - switch (e->type()) { - case QEvent::Leave: - case QEvent::Enter: - m_press = false; - m_hover = e->type() == QEvent::Enter; - update(); - break; - case QEvent::MouseButtonPress: - case QEvent::MouseButtonRelease: - m_hover = false; - m_press = e->type() == QEvent::MouseButtonPress; - update(); - break; - default: - break; - } - return QWidget::event(e); -} - -void RightIconButton::paintEvent(QPaintEvent *e) -{ - CommonIconButton::paintEvent(e); - - if (m_style != StyleType::Background) { - return; - } - - QPainter painter(this); - painter.setRenderHints(QPainter::Antialiasing); - - // 背景 - DGuiApplicationHelper::ColorType type = DGuiApplicationHelper::instance()->themeType(); - QColor bgColor = type == DGuiApplicationHelper::LightType ? Qt::black : Qt::white; - if (m_hover) { - bgColor.setAlphaF(type == DGuiApplicationHelper::LightType ? 0.15 : 0.20); - } else if (m_press) { - bgColor.setAlphaF(type == DGuiApplicationHelper::LightType ? 0.20 : 0.25); - } else { - bgColor.setAlphaF(type == DGuiApplicationHelper::LightType ? 0.10 : 0.10); - } - painter.setBrush(bgColor); - painter.setPen(Qt::NoPen); - painter.drawEllipse(rect()); -} diff --git a/plugins/dde-dock/common/slidercontainer.h b/plugins/dde-dock/common/slidercontainer.h deleted file mode 100644 index aaad98d81..000000000 --- a/plugins/dde-dock/common/slidercontainer.h +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SLIDERCONTAINER_H -#define SLIDERCONTAINER_H - -#include "commoniconbutton.h" -#include "settingsitem.h" - -#include -#include - -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE - -class QLabel; -class SliderProxyStyle; -class SliderIconWidget; -class RightIconButton; - -/** - * @brief 滚动条的类的封装,封装这个类的原因,是为了方便设置左右图标,dtk中的对应的DSlider类也有这个功能, - * 但是只能简单的设置左右图标,对于右边图标有阴影的,需要外部提供一个带阴影图标,但是如果由外部来提供, - * 通过QPixmap绘制的带阴影的图标无法消除锯齿(即使通过反走样也不行),因此在此处封装这个类 - */ -class SliderContainer : public SettingsItem -{ - Q_OBJECT - -public: - enum IconPosition { - LeftIcon = 0, - RightIcon - }; - - enum TitlePosition { - LeftTip = 0, - RightTip - }; - -public: - explicit SliderContainer(QWidget *parent = nullptr); - ~SliderContainer() override; - - void setTip(const QString &text, TitlePosition pos); - void setSliderProxyStyle(QProxyStyle *proxyStyle); - void setIcon(const IconPosition &iconPosition, const QString &icon, int space = 0); - void setIcon(const SliderContainer::IconPosition &iconPosition, const QIcon &icon, int space = 0); - void setSlider(QSlider *slider); - void setSlider(Dtk::Widget::DSlider *slider); - QSlider *slider() const { return m_slider; }; - - void setPageStep(int step); - void setRange(int min, int max); - void setSliderEnabled(bool enable); - void setButtonEnabled(IconPosition pos, bool enabled); - void setButtonsEnabled(bool enabled); - void setButtonSize(IconPosition pos, QSize size); - void setButtonsSize(QSize size); - void setSliderContentsMargin(QMargins margins); - - RightIconButton *rightIconWidget() const { return m_rightIconWidget; }; - -Q_SIGNALS: - void iconClicked(IconPosition pos); - void sliderValueChanged(int value); - void panelClicked(); - -public slots: - void updateSliderValue(int value); - -protected: - bool eventFilter(QObject *watched, QEvent *event) override; - QSize getSuitableSize(const QSize &iconSize, const QSize &bgSize); - -private: - CommonIconButton *m_leftIconWidget; - RightIconButton *m_rightIconWidget; - QSlider *m_slider; - Dtk::Widget::DTipLabel *m_leftTip; - Dtk::Widget::DTipLabel *m_rightTip; - QWidget *m_tipWidget; - QSpacerItem *m_leftSpacing; - QSpacerItem *m_rightSpacing; - QHBoxLayout *m_sliderLayout; -}; - -/** - * @brief 用来设置滚动条的样式 - * @param drawSpecial: true - */ -class SliderProxyStyle : public QProxyStyle -{ - Q_OBJECT - -public: - enum StyleType { - RoundHandler = 0, // 绘制那种黑色圆底滑动条 - Normal // 绘制那种通用的滑动条 - }; - -public: - explicit SliderProxyStyle(StyleType drawSpecial = RoundHandler, QStyle *style = nullptr); - ~SliderProxyStyle() override; - -protected: - void drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = nullptr) const override; - -private: - void drawNormalSlider(QPainter *painter, QRect rectGroove, QRect rectHandle, const QWidget *wigdet) const; - void drawRoundSlider(QPainter *painter, QRect rectGroove, QRect rectHandle, const QWidget *wigdet) const; - -private: - StyleType m_drawSpecial; -}; - -class RightIconButton : public CommonIconButton -{ - Q_OBJECT -public: - explicit RightIconButton(QWidget *parent = nullptr); - - enum StyleType { - Default = 0, // CommonIconButton样式 - Background // 有背景色的CommonIconButton样式 - }; - void setStyleType(const StyleType &style); - StyleType styleType() const { return m_style; } - -protected: - bool event(QEvent *e) override; - void paintEvent(QPaintEvent *e) override; - -private: - StyleType m_style; - bool m_press; - bool m_hover; -}; - -#endif // VOLUMESLIDER_H diff --git a/plugins/dde-dock/common/touchscrollfilter.cpp b/plugins/dde-dock/common/touchscrollfilter.cpp deleted file mode 100644 index 25e2a9786..000000000 --- a/plugins/dde-dock/common/touchscrollfilter.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "touchscrollfilter.h" - -#include -#include -#include -#include -#include - -TouchScrollFilter::TouchScrollFilter(QAbstractScrollArea *area) - : QObject(area) - , m_area(area) - , m_isDrag(false) -{ - if (m_area) { - m_area->viewport()->setAttribute(Qt::WA_AcceptTouchEvents, true); - m_area->setAttribute(Qt::WA_AcceptTouchEvents, true); - m_area->viewport()->installEventFilter(this); - } -} - -bool TouchScrollFilter::eventFilter(QObject *watched, QEvent *event) -{ - if (!m_area) - return QObject::eventFilter(watched, event); - - const QEvent::Type type = event->type(); - if (type != QEvent::TouchBegin && type != QEvent::TouchUpdate && - type != QEvent::TouchEnd && type != QEvent::TouchCancel) { - return QObject::eventFilter(watched, event); - } - - QTouchEvent *te = static_cast(event); - if (te->points().isEmpty()) { - event->accept(); - return true; - } - - QEventPoint pt = te->points().first(); - - switch (type) { - case QEvent::TouchBegin: { - m_lastPos = pt.globalPosition(); - m_isDrag = false; - break; - } - case QEvent::TouchUpdate: { - qreal deltaY = pt.globalPosition().y() - m_lastPos.y(); - qreal deltaX = pt.globalPosition().x() - m_lastPos.x(); - - if (!m_isDrag && (qAbs(deltaY) >= QApplication::startDragDistance() || qAbs(deltaX) >= QApplication::startDragDistance())) { - m_isDrag = true; - } - - if (m_isDrag) { - if (qAbs(deltaY) > 0 && m_area->verticalScrollBar()) { - m_area->verticalScrollBar()->setValue(m_area->verticalScrollBar()->value() - deltaY); - } - if (qAbs(deltaX) > 0 && m_area->horizontalScrollBar()) { - m_area->horizontalScrollBar()->setValue(m_area->horizontalScrollBar()->value() - deltaX); - } - m_lastPos = pt.globalPosition(); - } - break; - } - case QEvent::TouchEnd: { - if (!m_isDrag) { - // Determine the correct target widget for the click - QWidget *target = m_area->viewport(); - QPoint widgetPos = pt.position().toPoint(); - - // If it's a QScrollArea, the content widget is usually a child of the viewport - if (QWidget *child = target->childAt(widgetPos)) { - target = child; - widgetPos = target->mapFrom(m_area->viewport(), widgetPos); - } - - QMouseEvent press(QEvent::MouseButtonPress, widgetPos, pt.globalPosition(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); - QCoreApplication::sendEvent(target, &press); - QMouseEvent release(QEvent::MouseButtonRelease, widgetPos, pt.globalPosition(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); - QCoreApplication::sendEvent(target, &release); - } - break; - } - default: - break; - } - - event->accept(); - return true; -} diff --git a/plugins/dde-dock/common/touchscrollfilter.h b/plugins/dde-dock/common/touchscrollfilter.h deleted file mode 100644 index 50ba48c36..000000000 --- a/plugins/dde-dock/common/touchscrollfilter.h +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef TOUCHSCROLLFILTER_H -#define TOUCHSCROLLFILTER_H - -#include -#include -#include - -class TouchScrollFilter : public QObject -{ -public: - explicit TouchScrollFilter(QAbstractScrollArea *area); - ~TouchScrollFilter() override = default; - -protected: - bool eventFilter(QObject *watched, QEvent *event) override; - -private: - QAbstractScrollArea *m_area; - QPointF m_lastPos; - bool m_isDrag; -}; - -#endif // TOUCHSCROLLFILTER_H diff --git a/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.bluetooth.json b/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.bluetooth.json deleted file mode 100644 index 8ecfa56d6..000000000 --- a/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.bluetooth.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "magic":"dsg.config.meta", - "version":"1.0", - "contents":{ - "scanInterval":{ - "value":5, - "serial": 0, - "flags":[], - "name":"scanInterval", - "name[zh_CN]":"扫描间隔(秒)", - "description[zh_CN]":"扫描间隔(秒)", - "description":"auto scan interval", - "permissions":"readwrite", - "visibility":"private" - } - } -} \ No newline at end of file diff --git a/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.sound.json b/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.sound.json deleted file mode 100644 index db9c0f04b..000000000 --- a/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.sound.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "magic":"dsg.config.meta", - "version":"1.0", - "contents":{ - "enableAdjustVolumeNoCard":{ - "value": false, - "serial": 0, - "flags":["global"], - "name":"enableAdjustVolumeNoCard", - "name[zh_CN]":"无输出端口时允许调节音量", - "description[zh_CN]":"无输出端口时允许调节音量", - "description":"Allow volume adjustment when there is no output port", - "permissions":"readwrite", - "visibility":"private" - }, - "soundOutputSlider":{ - "value": 0, - "serial": 0, - "flags":[], - "name":"soundOutputSlider", - "name[zh_CN]":"音量滑动条", - "description[zh_CN]":"音量滑动条,0-Enabled,1-Disabled,2-Hidden", - "description":"volume slider,0-Enabled,1-Disabled,2-Hidden", - "permissions":"readwrite", - "visibility":"private" - } - } -} diff --git a/plugins/dde-dock/dbus/types/audioport.cpp b/plugins/dde-dock/dbus/types/audioport.cpp deleted file mode 100644 index 37728907d..000000000 --- a/plugins/dde-dock/dbus/types/audioport.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include - -#include "audioport.h" - -void registerAudioPortMetaType() -{ - qRegisterMetaType("AudioPort"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/audioport.h b/plugins/dde-dock/dbus/types/audioport.h deleted file mode 100644 index 87167ba97..000000000 --- a/plugins/dde-dock/dbus/types/audioport.h +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef AUDIOPORT_H -#define AUDIOPORT_H - -#include -#include -#include -#include - -class AudioPort -{ -public: - QString name; - QString description; - uchar availability; // 0 for Unknown, 1 for Not Available, 2 for Available. - - friend QDebug operator<<(QDebug argument, const AudioPort &port) { - argument << port.description; - - return argument; - } - - friend QDBusArgument &operator<<(QDBusArgument &argument, const AudioPort &port) { - argument.beginStructure(); - argument << port.name << port.description << port.availability; - argument.endStructure(); - - return argument; - } - - friend const QDBusArgument &operator>>(const QDBusArgument &argument, AudioPort &port) { - argument.beginStructure(); - argument >> port.name >> port.description >> port.availability; - argument.endStructure(); - - return argument; - } - - bool operator==(const AudioPort what) const { - return what.name == name && what.description == description && what.availability == availability; - } - - bool operator!=(const AudioPort what) const { - return what.name != name || what.description != description || what.availability != availability; - } -}; - -Q_DECLARE_METATYPE(AudioPort) - -void registerAudioPortMetaType(); - -#endif // AUDIOPORT_H diff --git a/plugins/dde-dock/dbus/types/audioportlist.cpp b/plugins/dde-dock/dbus/types/audioportlist.cpp deleted file mode 100644 index 968b1bb82..000000000 --- a/plugins/dde-dock/dbus/types/audioportlist.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "audioportlist.h" - -void registerAudioPortListMetaType() -{ - qRegisterMetaType("AudioPortList"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/audioportlist.h b/plugins/dde-dock/dbus/types/audioportlist.h deleted file mode 100644 index 158f62153..000000000 --- a/plugins/dde-dock/dbus/types/audioportlist.h +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef AUDIOPORTLIST_H -#define AUDIOPORTLIST_H - -#include -#include - -#include "audioport.h" - -typedef QList AudioPortList; - -Q_DECLARE_METATYPE(AudioPortList) - -void registerAudioPortListMetaType(); - -#endif // AUDIOPORTLIST_H diff --git a/plugins/dde-dock/dbus/types/brightnessmap.cpp b/plugins/dde-dock/dbus/types/brightnessmap.cpp deleted file mode 100644 index 8944147de..000000000 --- a/plugins/dde-dock/dbus/types/brightnessmap.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "brightnessmap.h" - -void registerBrightnessMapMetaType() -{ - qRegisterMetaType("BrightnessMap"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/brightnessmap.h b/plugins/dde-dock/dbus/types/brightnessmap.h deleted file mode 100644 index 356592081..000000000 --- a/plugins/dde-dock/dbus/types/brightnessmap.h +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef BRIGHTNESSMAP_H -#define BRIGHTNESSMAP_H - -#include -#include - -typedef QMap BrightnessMap; - -void registerBrightnessMapMetaType(); - -#endif // BRIGHTNESSMAP_H diff --git a/plugins/dde-dock/dbus/types/reflectlist.cpp b/plugins/dde-dock/dbus/types/reflectlist.cpp deleted file mode 100644 index c964094f1..000000000 --- a/plugins/dde-dock/dbus/types/reflectlist.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "reflectlist.h" - -void registerReflectListMetaType() -{ - qRegisterMetaType("ReflectList"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/reflectlist.h b/plugins/dde-dock/dbus/types/reflectlist.h deleted file mode 100644 index 476b6fa27..000000000 --- a/plugins/dde-dock/dbus/types/reflectlist.h +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef REFLECTLIST_H -#define REFLECTLIST_H - -#include -#include - -typedef QList ReflectList; - -void registerReflectListMetaType(); - -#endif // REFLECTLIST_H diff --git a/plugins/dde-dock/dbus/types/resolution.cpp b/plugins/dde-dock/dbus/types/resolution.cpp deleted file mode 100644 index 13e224fae..000000000 --- a/plugins/dde-dock/dbus/types/resolution.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "resolution.h" - -#include - -void registerResolutionMetaType() -{ - qRegisterMetaType("Resolution"); - qDBusRegisterMetaType(); -} - -Resolution::Resolution() -{ - -} - -bool Resolution::operator!=(const Resolution &other) const -{ - return m_width != other.m_width || m_height != other.m_height || m_rate != other.m_rate; -} - -bool Resolution::operator==(const Resolution &other) const -{ - return !(other != *this); -} - -QDBusArgument &operator<<(QDBusArgument &arg, const Resolution &value) -{ - arg.beginStructure(); - arg << quint32(value.id()) << quint16(value.width()) << quint16(value.height()) << value.rate(); - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, Resolution &value) -{ - quint32 id; - quint16 w, h; - double rate; - - arg.beginStructure(); - arg >> id >> w >> h >> rate; - arg.endStructure(); - - value.setId(id); - value.setWidth(w); - value.setHeight(h); - value.setRate(rate); - - return arg; -} diff --git a/plugins/dde-dock/dbus/types/resolution.h b/plugins/dde-dock/dbus/types/resolution.h deleted file mode 100644 index 80d30cb8c..000000000 --- a/plugins/dde-dock/dbus/types/resolution.h +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef RESOLUTION_H -#define RESOLUTION_H - -#include - -class Resolution -{ -public: - friend QDBusArgument &operator<<(QDBusArgument &arg, const Resolution &value); - friend const QDBusArgument &operator>>(const QDBusArgument &arg, Resolution &value); - - explicit Resolution(); - - bool operator!=(const Resolution &other) const; - bool operator==(const Resolution &other) const; - - int id() const { return m_id; } - int width() const { return m_width; } - int height() const { return m_height; } - double rate() const { return m_rate; } - -private: - void setId(const int id) { m_id = id; } - void setWidth(const int w) { m_width = w; } - void setHeight(const int h) { m_height = h; } - void setRate(const double rate) { m_rate = rate; } - -private: - int m_id; - int m_width; - int m_height; - double m_rate; -}; - - -Q_DECLARE_METATYPE(Resolution) - -void registerResolutionMetaType(); - -#endif // RESOLUTION_H diff --git a/plugins/dde-dock/dbus/types/resolutionlist.cpp b/plugins/dde-dock/dbus/types/resolutionlist.cpp deleted file mode 100644 index 3c6aa6e6d..000000000 --- a/plugins/dde-dock/dbus/types/resolutionlist.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "resolutionlist.h" - -void registerResolutionListMetaType() -{ - registerResolutionMetaType(); - - qRegisterMetaType("ResolutionList"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/resolutionlist.h b/plugins/dde-dock/dbus/types/resolutionlist.h deleted file mode 100644 index 9e1461a6b..000000000 --- a/plugins/dde-dock/dbus/types/resolutionlist.h +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef RESOLUTIONLIST_H -#define RESOLUTIONLIST_H - -#include "resolution.h" - -#include - -typedef QList ResolutionList; - -void registerResolutionListMetaType(); - -#endif // RESOLUTIONLIST_H diff --git a/plugins/dde-dock/dbus/types/rotationlist.cpp b/plugins/dde-dock/dbus/types/rotationlist.cpp deleted file mode 100644 index a76bc3e60..000000000 --- a/plugins/dde-dock/dbus/types/rotationlist.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "rotationlist.h" - -void registerRotationListMetaType() -{ - qRegisterMetaType("RotationList"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/rotationlist.h b/plugins/dde-dock/dbus/types/rotationlist.h deleted file mode 100644 index 9e12438e9..000000000 --- a/plugins/dde-dock/dbus/types/rotationlist.h +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef ROTATIONLIST_H -#define ROTATIONLIST_H - -#include -#include - -typedef QList RotationList; - -void registerRotationListMetaType(); - -#endif // ROTATIONLIST_H diff --git a/plugins/dde-dock/dbus/types/screenrect.cpp b/plugins/dde-dock/dbus/types/screenrect.cpp deleted file mode 100644 index 279ebd36d..000000000 --- a/plugins/dde-dock/dbus/types/screenrect.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "screenrect.h" - -ScreenRect::ScreenRect() - : x(0), - y(0), - w(0), - h(0) -{ - -} - -QDebug operator<<(QDebug debug, const ScreenRect &rect) -{ - debug << QString("ScreenRect(%1, %2, %3, %4)").arg(rect.x) - .arg(rect.y) - .arg(rect.w) - .arg(rect.h); - - return debug; -} - -ScreenRect::operator QRect() const -{ - return QRect(x, y, w, h); -} - -QDBusArgument &operator<<(QDBusArgument &arg, const ScreenRect &rect) -{ - arg.beginStructure(); - arg << rect.x << rect.y << rect.w << rect.h; - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, ScreenRect &rect) -{ - arg.beginStructure(); - arg >> rect.x >> rect.y >> rect.w >> rect.h; - arg.endStructure(); - - return arg; -} - -void registerScreenRectMetaType() -{ - qRegisterMetaType("ScreenRect"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/screenrect.h b/plugins/dde-dock/dbus/types/screenrect.h deleted file mode 100644 index 916ad17ac..000000000 --- a/plugins/dde-dock/dbus/types/screenrect.h +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef SCREENRECT_H -#define SCREENRECT_H - -#include -#include -#include -#include - -struct ScreenRect -{ -public: - ScreenRect(); - operator QRect() const; - - friend QDebug operator<<(QDebug debug, const ScreenRect &rect); - friend const QDBusArgument &operator>>(const QDBusArgument &arg, ScreenRect &rect); - friend QDBusArgument &operator<<(QDBusArgument &arg, const ScreenRect &rect); - - bool operator !=(const ScreenRect &rect) const { return x != rect.x || y != rect.y || w != rect.w || h != rect.h; } - -private: - qint16 x; - qint16 y; - quint16 w; - quint16 h; -}; - -Q_DECLARE_METATYPE(ScreenRect) - -void registerScreenRectMetaType(); - -#endif // SCREENRECT_H diff --git a/plugins/dde-dock/dbus/types/touchscreeninfolist.cpp b/plugins/dde-dock/dbus/types/touchscreeninfolist.cpp deleted file mode 100644 index f551e9d8d..000000000 --- a/plugins/dde-dock/dbus/types/touchscreeninfolist.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "touchscreeninfolist.h" - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo &info) -{ - arg.beginStructure(); - arg << info.id << info.name << info.deviceNode << info.serialNumber; - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo &info) -{ - arg.beginStructure(); - arg >> info.id >> info.name >> info.deviceNode >> info.serialNumber; - arg.endStructure(); - - return arg; -} - -bool TouchscreenInfo::operator==(const TouchscreenInfo &info) const -{ - return id == info.id && name == info.name && deviceNode == info.deviceNode && serialNumber == info.serialNumber; -} - -bool TouchscreenInfo::operator!=(const TouchscreenInfo &info) const -{ - return !(*this == info); -} - -void registerTouchscreenInfoMetaType() -{ - qRegisterMetaType("TouchscreenInfo"); - qDBusRegisterMetaType(); -} - -void registerTouchscreenInfoListMetaType() -{ - registerTouchscreenInfoMetaType(); - - qRegisterMetaType("TouchscreenInfoList"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/touchscreeninfolist.h b/plugins/dde-dock/dbus/types/touchscreeninfolist.h deleted file mode 100644 index 62419c684..000000000 --- a/plugins/dde-dock/dbus/types/touchscreeninfolist.h +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TOUCHSCREENINFOLIST_H -#define TOUCHSCREENINFOLIST_H - -#include -#include -#include - -struct TouchscreenInfo { - qint32 id; - QString name; - QString deviceNode; - QString serialNumber; - - bool operator ==(const TouchscreenInfo& info) const; - bool operator !=(const TouchscreenInfo& info) const; -}; - -typedef QList TouchscreenInfoList; - -// 自定义 QList 的 != 操作符 -inline bool operator!=(const TouchscreenInfoList& list1, const TouchscreenInfoList& list2) { - if (list1.size() != list2.size()) - return true; - - for (int i = 0; i < list1.size(); ++i) { - if (list1[i] != list2[i]) { - return true; - } - } - return false; -} - -Q_DECLARE_METATYPE(TouchscreenInfo) -Q_DECLARE_METATYPE(TouchscreenInfoList) - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo &info); -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo &info); - -void registerTouchscreenInfoListMetaType(); - -#endif // !TOUCHSCREENINFOLIST_H diff --git a/plugins/dde-dock/dbus/types/touchscreeninfolist_v2.cpp b/plugins/dde-dock/dbus/types/touchscreeninfolist_v2.cpp deleted file mode 100644 index c67556834..000000000 --- a/plugins/dde-dock/dbus/types/touchscreeninfolist_v2.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "touchscreeninfolist_v2.h" - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo_V2 &info) -{ - arg.beginStructure(); - arg << info.id << info.name << info.deviceNode << info.serialNumber << info.UUID; - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo_V2 &info) -{ - arg.beginStructure(); - arg >> info.id >> info.name >> info.deviceNode >> info.serialNumber >> info.UUID; - arg.endStructure(); - - return arg; -} - -bool TouchscreenInfo_V2::operator==(const TouchscreenInfo_V2 &info) const -{ - return id == info.id && name == info.name && deviceNode == info.deviceNode && serialNumber == info.serialNumber && UUID == info.UUID; -} - -bool TouchscreenInfo_V2::operator!=(const TouchscreenInfo_V2 &info) const -{ - return !(*this == info); -} - -void registerTouchscreenInfoV2MetaType() -{ - qRegisterMetaType("TouchscreenInfo_V2"); - qDBusRegisterMetaType(); -} - -void registerTouchscreenInfoList_V2MetaType() -{ - registerTouchscreenInfoV2MetaType(); - - qRegisterMetaType("TouchscreenInfoList_V2"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/touchscreeninfolist_v2.h b/plugins/dde-dock/dbus/types/touchscreeninfolist_v2.h deleted file mode 100644 index ff5b7f671..000000000 --- a/plugins/dde-dock/dbus/types/touchscreeninfolist_v2.h +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TOUCHSCREENINFOLISTV2_H -#define TOUCHSCREENINFOLISTV2_H - -#include -#include -#include - -struct TouchscreenInfo_V2 { - qint32 id; - QString name; - QString deviceNode; - QString serialNumber; - QString UUID; - - bool operator ==(const TouchscreenInfo_V2& info) const; - bool operator !=(const TouchscreenInfo_V2& info) const; -}; - -typedef QList TouchscreenInfoList_V2; - -inline bool operator!=(const TouchscreenInfoList_V2 &list1, const TouchscreenInfoList_V2 &list2) { - if (list1.size() != list2.size()) - return true; - - for (int i = 0; i < list1.size(); ++i) { - if (list1[i] != list2[i]) { - return true; - } - } - return false; -} - -Q_DECLARE_METATYPE(TouchscreenInfo_V2) -Q_DECLARE_METATYPE(TouchscreenInfoList_V2) - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo_V2 &info); -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo_V2 &info); - -void registerTouchscreenInfoList_V2MetaType(); - -#endif // !TOUCHSCREENINFOLISTV2_H diff --git a/plugins/dde-dock/dbus/types/touchscreenmap.cpp b/plugins/dde-dock/dbus/types/touchscreenmap.cpp deleted file mode 100644 index 2bb7e6218..000000000 --- a/plugins/dde-dock/dbus/types/touchscreenmap.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "touchscreenmap.h" - -void registerTouchscreenMapMetaType() -{ - qRegisterMetaType("TouchscreenMap"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-dock/dbus/types/touchscreenmap.h b/plugins/dde-dock/dbus/types/touchscreenmap.h deleted file mode 100644 index e55db6c0a..000000000 --- a/plugins/dde-dock/dbus/types/touchscreenmap.h +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TOUCHSCREENMAP_H -#define TOUCHSCREENMAP_H - -#include -#include - -typedef QMap TouchscreenMap; - -void registerTouchscreenMapMetaType(); - -#endif // TOUCHSCREENMAP_H diff --git a/plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml b/plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml deleted file mode 100644 index 9f9d55c14..000000000 --- a/plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml b/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml deleted file mode 100644 index 72f6f68b0..000000000 --- a/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \n - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml b/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml deleted file mode 100644 index 7fbe4885f..000000000 --- a/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml b/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml deleted file mode 100644 index 00ba18683..000000000 --- a/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml b/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml deleted file mode 100644 index c6e6235b8..000000000 --- a/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/dde-dock/eye-comfort-mode/CMakeLists.txt b/plugins/dde-dock/eye-comfort-mode/CMakeLists.txt deleted file mode 100644 index 1f49c0764..000000000 --- a/plugins/dde-dock/eye-comfort-mode/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -# SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. -# -# SPDX-License-Identifier: CC0-1.0 - -set(PLUGIN_NAME "eye-comfort-mode") - -project(${PLUGIN_NAME}) - -# Sources files -file(GLOB_RECURSE SRCS - "*.h" - "*.cpp" - "../widgets/*.h" - "../widgets/*.cpp" - "../common/*.h" - "../common/*.cpp" -) - -find_package(PkgConfig REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Widgets Svg DBus) -find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED COMPONENTS Widget Tools) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/xml/org.deepin.dde.Appearance1.xml - appearance1interface -) - -add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN") -add_library(${PLUGIN_NAME} SHARED ${DBUS_INTERFACES} ${SRCS} resources/eye-comfort-mode.qrc) -set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../) -target_include_directories(${PLUGIN_NAME} PUBLIC - ../../../interfaces - ../widgets - ../common - ../util -) -target_link_libraries(${PLUGIN_NAME} PRIVATE - Dtk${DTK_VERSION_MAJOR}::Widget - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::Svg - Qt${QT_VERSION_MAJOR}::DBus - dockpluginmanager-interface -) - -install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins) -install(FILES "resources/dcc-eye-comfort-mode.dci" DESTINATION share/dde-dock/icons/dcc-setting) diff --git a/plugins/dde-dock/eye-comfort-mode/eye-comfort-mode.json b/plugins/dde-dock/eye-comfort-mode/eye-comfort-mode.json deleted file mode 100644 index 265248ca5..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eye-comfort-mode.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "api": "2.0.0", - "depends-daemon-dbus-service": "org.deepin.dde.Appearance1" -} diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.cpp b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.cpp deleted file mode 100644 index d22411d5e..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.cpp +++ /dev/null @@ -1,178 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "eyecomfortmodeapplet.h" -#include "constants.h" -#include "eyecomfortmodecontroller.h" - -#include -#include -#include - -#include -#include -#include - -DWIDGET_USE_NAMESPACE - -EyeComfortmodeApplet::EyeComfortmodeApplet(QWidget *parent) - : QWidget(parent) - , m_title(new DLabel(this)) - , m_switchBtn(new DSwitchButton(this)) - , m_settingButton(new JumpSettingButton(this)) - , m_themeView(new PluginListView(this)) - , m_themeItemModel(new QStandardItemModel(m_themeView)) - , m_lightTheme(new PluginStandardItem(QIcon::fromTheme("theme-light"), tr("Light"))) - , m_darkTheme(new PluginStandardItem(QIcon::fromTheme("theme-dark"), tr("Dark"))) - , m_autoTheme(new PluginStandardItem(QIcon::fromTheme("theme-auto"), tr("Auto"))) -{ - initUi(); - initConnect(); -} - -void EyeComfortmodeApplet::initUi() -{ - m_switchBtn->setFocusPolicy(Qt::NoFocus); - m_switchBtn->setObjectName("SwitchBtn"); - setFixedWidth(Dock::DOCK_POPUP_WIDGET_WIDTH); - - DFontSizeManager::instance()->bind(m_title, DFontSizeManager::T5); - m_title->setForegroundRole(QPalette::BrightText); - - QHBoxLayout *appletLayout = new QHBoxLayout; - appletLayout->setSpacing(0); - appletLayout->setContentsMargins(20, 0, 10, 0); - appletLayout->addWidget(m_title); - appletLayout->addStretch(); - appletLayout->addWidget(m_switchBtn); - - QVBoxLayout *themeLayout = new QVBoxLayout; - themeLayout->setContentsMargins(10, 0, 10, 0); - DLabel *titleLabel = new DLabel(tr("Theme"), this); - titleLabel->setContentsMargins(10, 0, 0, 0); - DFontSizeManager::instance()->bind(titleLabel, DFontSizeManager::T5); - themeLayout->addWidget(titleLabel); - - m_themeView->setModel(m_themeItemModel); - - m_themeItemModel->appendRow(m_lightTheme); - m_themeItemModel->appendRow(m_darkTheme); - m_themeItemModel->appendRow(m_autoTheme); - DFontSizeManager::instance()->bind(m_themeView, DFontSizeManager::T6); - - themeLayout->setSpacing(10); - themeLayout->addWidget(m_themeView); - m_themeView->setMinimumHeight(130); - - QHBoxLayout *settingLayout = new QHBoxLayout; - settingLayout->addWidget(m_settingButton); - settingLayout->setContentsMargins(10, 0, 10, 0); - auto mainLayout = new QVBoxLayout; - mainLayout->setSpacing(0); - mainLayout->addLayout(appletLayout, 0); - mainLayout->addSpacing(10); - mainLayout->addLayout(themeLayout, 0); - mainLayout->addStretch(); - mainLayout->addLayout(settingLayout); - mainLayout->setContentsMargins(0, 10, 0, 10); - setLayout(mainLayout); -} - -void EyeComfortmodeApplet::initConnect() -{ - connect(m_switchBtn, &DSwitchButton::checkedChanged, this, &EyeComfortmodeApplet::enableChanged); - connect(m_settingButton, &JumpSettingButton::showPageRequestWasSended, this, &EyeComfortmodeApplet::requestHideApplet); - connect(m_themeView, &PluginListView::clicked, this, &EyeComfortmodeApplet::onThemeListClicked); -} - -void EyeComfortmodeApplet::setEnabled(bool enable) -{ - m_switchBtn->blockSignals(true); - m_switchBtn->setChecked(enable); - m_switchBtn->blockSignals(false); -} - -void EyeComfortmodeApplet::setTitle(const QString &title) -{ - m_title->setText(title); -} - -void EyeComfortmodeApplet::setIcon(const QIcon &icon) -{ - m_settingButton->setIcon(icon); -} - -void EyeComfortmodeApplet::setDescription(const QString &description) -{ - m_settingButton->setDescription(description); -} - -void EyeComfortmodeApplet::setDccPage(const QString &module, const QString &page) -{ - m_settingButton->setDccPage(module, page); -} - -void EyeComfortmodeApplet::setEyeComfortVisible(bool visible) -{ - m_title->setVisible(visible); - m_switchBtn->setVisible(visible); - m_settingButton->setVisible(visible); -} - -void EyeComfortmodeApplet::setHeight(int height) -{ - resize(width(), height); -} - -void EyeComfortmodeApplet::onGlobalThemeChanged(const QString &value) -{ - if (value.endsWith(THEME_LIGHT)) { - m_themeTypeName = THEME_LIGHT; - m_lightTheme->updateState(PluginItemState::ConnectedOnlyPrompt); - m_darkTheme->updateState(PluginItemState::NoState); - m_autoTheme->updateState(PluginItemState::NoState); - } else if (value.endsWith(THEME_DARK)) { - m_themeTypeName = THEME_DARK; - m_lightTheme->updateState(PluginItemState::NoState); - m_darkTheme->updateState(PluginItemState::ConnectedOnlyPrompt); - m_autoTheme->updateState(PluginItemState::NoState); - } else { - m_themeTypeName = THEME_AUTO; - m_lightTheme->updateState(PluginItemState::NoState); - m_darkTheme->updateState(PluginItemState::NoState); - m_autoTheme->updateState(PluginItemState::ConnectedOnlyPrompt); - } -} - -void EyeComfortmodeApplet::onThemeListClicked(const QModelIndex &index) -{ - if (m_lightTheme == m_themeItemModel->itemFromIndex(index) && m_lightTheme->state() == NoState) - switchTheme(THEME_LIGHT); - else if (m_darkTheme == m_themeItemModel->itemFromIndex(index) && m_darkTheme->state() == NoState) - switchTheme(THEME_DARK); - else if (m_autoTheme == m_themeItemModel->itemFromIndex(index) && m_autoTheme->state() == NoState) - switchTheme(THEME_AUTO); -} - -void EyeComfortmodeApplet::switchTheme(const QString &themeTypeName) -{ - if (m_themeTypeName == themeTypeName) - return; - - m_themeTypeName = themeTypeName; - - auto curGlobalTheme = EyeComfortModeController::ref().globalTheme(); - auto theme = curGlobalTheme.left(curGlobalTheme.indexOf(".")); - - QString newGlobalTheme; - if (themeTypeName == THEME_LIGHT) { - newGlobalTheme = theme + ".light"; - } else if(themeTypeName == THEME_DARK){ - newGlobalTheme = theme + ".dark"; - } else { - newGlobalTheme = theme; - } - - Q_EMIT globalThemeChanged(newGlobalTheme); -} diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.h b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.h deleted file mode 100644 index 7df15d7fa..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.h +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef EYECOMFORTMODEAPPLET_H -#define EYECOMFORTMODEAPPLET_H - -#include "jumpsettingbutton.h" -#include "pluginlistview.h" - -#include - -#include -#include - -const QString THEME_LIGHT = "light"; -const QString THEME_DARK = "dark"; -const QString THEME_AUTO = "auto"; - -class EyeComfortmodeApplet : public QWidget -{ - Q_OBJECT - -public: - explicit EyeComfortmodeApplet(QWidget *parent = nullptr); - void setEnabled(bool enable); - void setTitle(const QString &title); - void setIcon(const QIcon &icon); - void setDescription(const QString &description); - void setDccPage(const QString &first, const QString &second); - void setEyeComfortVisible(bool visible); - void setHeight(int height); - -signals: - void enableChanged(bool enable); - void requestHideApplet(); - void globalThemeChanged(const QString &globalTheme); - -public slots: - void onGlobalThemeChanged(const QString &value); - -private slots: - void onThemeListClicked(const QModelIndex &index); - -private: - void initUi(); - void initConnect(); - void switchTheme(const QString &themeTypeName); - -private: - Dtk::Widget::DLabel *m_title; - Dtk::Widget::DSwitchButton *m_switchBtn; - JumpSettingButton *m_settingButton; - PluginListView *m_themeView; - QStandardItemModel *m_themeItemModel; - PluginStandardItem *m_lightTheme; - PluginStandardItem *m_darkTheme; - PluginStandardItem *m_autoTheme; - QString m_themeTypeName; -}; - -#endif // EYECOMFORTMODEAPPLET_H diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.cpp b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.cpp deleted file mode 100644 index faaf5d5c3..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "eyecomfortmodecontroller.h" - -#include -#include - -#define COLOR_TEMPERATURE_ENABLED "ColorTemperatureEnabled" -#define SUPPORT_COLOR_TEMPERATURE "SupportColorTemperature" - -EyeComfortModeController::EyeComfortModeController() - : m_displayInter(new QDBusInterface("org.deepin.dde.Display1", "/org/deepin/dde/Display1", "org.deepin.dde.Display1", QDBusConnection::sessionBus(), this)) - , m_themeInter(new DBusTheme("org.deepin.dde.Appearance1", "/org/deepin/dde/Appearance1", QDBusConnection::sessionBus(), this)) - , m_eyeComfortModeEnabled(false) - , m_supportColorTemperature(false) -{ - if (!m_displayInter) { - return; - } - - QDBusConnection::sessionBus().connect("org.deepin.dde.Display1", "/org/deepin/dde/Display1", "org.freedesktop.DBus.Properties", "PropertiesChanged", this, SLOT(onPropertiesChanged(QString, QVariantMap, QStringList))); - connect(m_themeInter, &DBusTheme::GlobalThemeChanged, this, &EyeComfortModeController::globalThemeChanged); - - m_eyeComfortModeEnabled = m_displayInter->property(COLOR_TEMPERATURE_ENABLED).toBool(); - m_supportColorTemperature = m_displayInter->property(SUPPORT_COLOR_TEMPERATURE).toBool(); -} - -void EyeComfortModeController::onPropertiesChanged(const QString &interfaceName, const QVariantMap &changedProperties, const QStringList &invalidatedProperties) -{ - Q_UNUSED(interfaceName) - Q_UNUSED(invalidatedProperties) - if (changedProperties.contains(COLOR_TEMPERATURE_ENABLED)) { - m_eyeComfortModeEnabled = changedProperties.value(COLOR_TEMPERATURE_ENABLED, false).toBool(); - Q_EMIT eyeComfortModeChanged(m_eyeComfortModeEnabled); - } - - if (changedProperties.contains(SUPPORT_COLOR_TEMPERATURE)) { - m_supportColorTemperature = changedProperties.value(SUPPORT_COLOR_TEMPERATURE, false).toBool(); - Q_EMIT supportColorTemperatureChanged(m_supportColorTemperature); - } -} - -void EyeComfortModeController::setGtkTheme(const QString &value) -{ - if (m_themeInter->gtkTheme() == value) - return; - - m_themeInter->Set("gtk", value); -} - -QString EyeComfortModeController::gtkTheme() const -{ - return m_themeInter->gtkTheme(); -} - -QString EyeComfortModeController::globalTheme() const -{ - return m_themeInter->globalTheme(); -} - -void EyeComfortModeController::enable(bool enable) -{ - Q_UNUSED(enable) - m_displayInter->setProperty(COLOR_TEMPERATURE_ENABLED, !isEyeComfortModeEnabled()); -} - -void EyeComfortModeController::setGlobalTheme(const QString &value) -{ - if (m_themeInter->globalTheme() == value) - return; - - m_themeInter->Set("globaltheme", value); -} diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.h b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.h deleted file mode 100644 index 926714547..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodecontroller.h +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef EYE_COMFORT_MODE_CONTROLLER_H -#define EYE_COMFORT_MODE_CONTROLLER_H - -#include "appearance1interface.h" - -#include - -#include -#include - -using DBusTheme = org::deepin::dde::Appearance1; - -class EyeComfortModeController : public QObject, public Dtk::Core::DSingleton -{ - friend Dtk::Core::DSingleton; - - Q_OBJECT -public: - void enable(bool enable); - bool isEyeComfortModeEnabled() const { return m_eyeComfortModeEnabled; } - void toggle() { enable(!isEyeComfortModeEnabled()); } - - bool supportColorTemperature() const { return m_supportColorTemperature; } - QString gtkTheme() const; - QString globalTheme() const; - -Q_SIGNALS: - void eyeComfortModeChanged(bool enabled); - void supportColorTemperatureChanged(bool support); - void globalThemeChanged(const QString &value); - -public slots: - void setGtkTheme(const QString &value); - // 适配v23接口 - void setGlobalTheme(const QString &value); - -private: - EyeComfortModeController(); - - ~EyeComfortModeController() {} - -private slots: - void onPropertiesChanged(const QString &interfaceName, const QVariantMap &changedProperties, const QStringList &invalidatedProperties); - -private: - QDBusInterface *m_displayInter; - DBusTheme *m_themeInter; - bool m_eyeComfortModeEnabled; - bool m_supportColorTemperature; -}; - -#endif //EYE_COMFORT_MODE_CONTROLLER_H diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.cpp b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.cpp deleted file mode 100644 index 957896a17..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.cpp +++ /dev/null @@ -1,272 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "eyecomfortmodeitem.h" -#include "eyecomfortmodeapplet.h" -#include "constants.h" -#include "eyecomfortmodecontroller.h" -#include "tipswidget.h" -#include "quickpanelwidget.h" - - -#include - -#include -#include -#include -#include -#include -#include - -DGUI_USE_NAMESPACE - -#define SHIFT "shift" -#define SETTINGS "settings" - -EyeComfortModeItem::EyeComfortModeItem(QWidget* parent) - : QWidget(parent) - , m_tipsLabel(new Dock::TipsWidget(this)) - , m_applet(new EyeComfortmodeApplet(this)) - , m_icon(new CommonIconButton(this)) - , m_supportColorTemperature(EyeComfortModeController::ref().supportColorTemperature()) - , m_themeType(getThemeType(EyeComfortModeController::ref().globalTheme())) -{ - init(); -} - -void EyeComfortModeItem::init() -{ - m_tipsLabel->setVisible(false); - - m_applet->setVisible(false); - m_applet->setDccPage("display", "Brightness"); - m_applet->setTitle(tr("Eye Comfort")); - m_applet->setDescription(tr("Display settings")); - m_applet->setIcon(QIcon::fromTheme("open-arrow")); - m_applet->setEyeComfortVisible(m_supportColorTemperature); - m_applet->onGlobalThemeChanged(EyeComfortModeController::ref().globalTheme()); - - m_icon->setFixedSize(Dock::DOCK_PLUGIN_ITEM_FIXED_SIZE); - - m_quickPanel = new QuickPanelWidget(this); - auto updateEyeComfortQuickPanel = [this]{ - m_quickPanel->setText(tr("Eye comfort")); - m_quickPanel->setIcon(QIcon::fromTheme("eyeshield-on")); - m_quickPanel->setButtonMode(QuickButton::ButtonMode::ClickButton); - m_icon->setStateIconMapping({ { CommonIconButton::State::On, QPair("eyeshield-on", ":/eyeshield-on.svg") }, - { CommonIconButton::State::Off, QPair("eyeshield-off", ":/eyeshield-off.svg") } }); - }; - - if (m_supportColorTemperature) { - updateEyeComfortQuickPanel(); - } else { - m_quickPanel->setText(tr("Theme")); - m_quickPanel->setActive(false); - m_quickPanel->setButtonMode(QuickButton::ButtonMode::DisplayButton); - } - connect(m_quickPanel, &QuickPanelWidget::iconClicked, this, [this](){ - m_supportColorTemperature ? EyeComfortModeController::ref().toggle() : requestExpand(); - }); - - m_quickPanel->setActive(EyeComfortModeController::ref().isEyeComfortModeEnabled()); - - auto vLayout = new QVBoxLayout(this); - vLayout->setSpacing(0); - vLayout->setContentsMargins(0, 0, 0, 0); - vLayout->addWidget(m_icon, 0, Qt::AlignCenter); - - m_applet->setEnabled(EyeComfortModeController::ref().isEyeComfortModeEnabled()); - updateDescription(); - refreshIcon(); - updateTips(); - - connect(m_quickPanel, &QuickPanelWidget::panelClicked, this, &EyeComfortModeItem::requestExpand); - connect(m_applet, &EyeComfortmodeApplet::enableChanged, &EyeComfortModeController::ref(), &EyeComfortModeController::enable); - connect(m_applet, &EyeComfortmodeApplet::requestHideApplet, this, &EyeComfortModeItem::requestHideApplet); - connect(m_applet, &EyeComfortmodeApplet::globalThemeChanged, &EyeComfortModeController::ref(), &EyeComfortModeController::setGlobalTheme); - connect(&EyeComfortModeController::ref(), &EyeComfortModeController::globalThemeChanged, this, [this](const QString &value) { - auto themeType = getThemeType(value); - if (m_themeType == themeType) - return; - - m_themeType = themeType; - m_applet->onGlobalThemeChanged(value); - updateDescription(); - refreshIcon(); - updateTips(); - }); - connect(&EyeComfortModeController::ref(), &EyeComfortModeController::supportColorTemperatureChanged, this, [this, updateEyeComfortQuickPanel](bool support) { - if (m_supportColorTemperature == support) - return; - - m_supportColorTemperature = support; - m_applet->setEyeComfortVisible(m_supportColorTemperature); - - if (support) - updateEyeComfortQuickPanel(); - }); - connect(&EyeComfortModeController::ref(), &EyeComfortModeController::eyeComfortModeChanged, m_quickPanel, &QuickPanelWidget::setActive); - connect(&EyeComfortModeController::ref(), &EyeComfortModeController::eyeComfortModeChanged, this, [this](bool enable) { - m_applet->setEnabled(enable); - refreshIcon(); - updateDescription(); - updateTips(); - }); -} - -void EyeComfortModeItem::updateDescription() -{ - if (m_supportColorTemperature) { - EyeComfortModeController::ref().isEyeComfortModeEnabled() - ? m_quickPanel->setDescription(tr("On")) - : m_quickPanel->setDescription(tr("Off")); - } else { - if (m_themeType == Light) { - m_quickPanel->setDescription(tr("Light")); - } else if (m_themeType == Dark) { - m_quickPanel->setDescription(tr("Dark")); - } else { - m_quickPanel->setDescription(tr("Auto")); - } - } -} - - -QWidget* EyeComfortModeItem::tipsWidget() -{ - return m_tipsLabel; -} - -QWidget* EyeComfortModeItem::popupApplet() -{ - return m_applet; -} - -QWidget *EyeComfortModeItem::quickPanel() -{ - return m_quickPanel; -} - -const QString EyeComfortModeItem::contextMenu() const -{ - QList items; - QMap settings; - QMap menu; - if (m_supportColorTemperature) { - items.reserve(2); - - QMap shift; - shift["itemId"] = SHIFT; - if (EyeComfortModeController::ref().isEyeComfortModeEnabled()) - shift["itemText"] = tr("Disable eye comfort"); - else - shift["itemText"] = tr("Enable eye comfort"); - shift["isActive"] = true; - items.push_back(shift); - - settings["itemId"] = SETTINGS; - settings["itemText"] = tr("Display Settings"); - settings["isActive"] = true; - items.push_back(settings); - - menu["items"] = items; - menu["checkableMenu"] = false; - menu["singleCheck"] = false; - } - - return QJsonDocument::fromVariant(menu).toJson(); -} - -void EyeComfortModeItem::invokeMenuItem(const QString menuId, const bool checked) -{ - Q_UNUSED(menuId); - Q_UNUSED(checked); - - if (menuId == SHIFT) { - EyeComfortModeController::ref().toggle(); - } else if (menuId == SETTINGS) { - QStringList args {"--by-user", "org.deepin.dde.control-center", "--", "-p", "display"}; - QProcess::startDetached("dde-am", args); - Q_EMIT requestHideApplet(); - } -} - -void EyeComfortModeItem::refreshIcon() -{ - if (m_supportColorTemperature) { - m_icon->setState(EyeComfortModeController::ref().isEyeComfortModeEnabled() ? CommonIconButton::On : CommonIconButton::Off); - } else { - if (m_themeType == Light) { - m_quickPanel->setIcon(QIcon::fromTheme("theme-light")); - m_icon->setIcon(QIcon::fromTheme("theme-light")); - } else if (m_themeType == Dark) { - m_quickPanel->setIcon(QIcon::fromTheme("theme-dark")); - m_icon->setIcon(QIcon::fromTheme("theme-dark")); - } else { - m_quickPanel->setIcon(QIcon::fromTheme("theme-auto")); - m_icon->setIcon(QIcon::fromTheme("theme-auto")); - } - } -} - -void EyeComfortModeItem::updateTips() -{ - if (m_supportColorTemperature) { - if (EyeComfortModeController::ref().isEyeComfortModeEnabled()) - m_tipsLabel->setText(tr("Eye comfort enabled")); - else - m_tipsLabel->setText(tr("Eye comfort disabled")); - } else { - if (m_themeType == Light) { - m_tipsLabel->setText(tr("Theme: Light")); - } else if (m_themeType == Dark) { - m_tipsLabel->setText(tr("Theme: Dark")); - } else { - m_tipsLabel->setText(tr("Theme: Auto")); - } - } -} - -QString EyeComfortModeItem::displayName() const -{ - return tr("Visual effect"); -} - -bool EyeComfortModeItem::airplaneEnable() -{ - return EyeComfortModeController::ref().isEyeComfortModeEnabled(); -} - -EyeComfortModeItem::ThemeType EyeComfortModeItem::getThemeType(const QString &globalTheme) -{ - if (globalTheme.endsWith(THEME_LIGHT)) - return Light; - if (globalTheme.endsWith(THEME_DARK)) - return Dark; - - return Auto; -} - -void EyeComfortModeItem::setAppletHeight(int height) -{ - if (m_applet) { - m_applet->setHeight(height); - } -} - -void EyeComfortModeItem::resizeEvent(QResizeEvent* e) -{ - QWidget::resizeEvent(e); - - const Dock::Position position = qApp->property(PROP_POSITION).value(); - if (position == Dock::Bottom || position == Dock::Top) { - setMaximumWidth(height()); - setMaximumHeight(QWIDGETSIZE_MAX); - } else { - setMaximumHeight(width()); - setMaximumWidth(QWIDGETSIZE_MAX); - } - - refreshIcon(); -} diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.h b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.h deleted file mode 100644 index 177f14138..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeitem.h +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef EYE_COMFORT_MODE_ITEM_H -#define EYE_COMFORT_MODE_ITEM_H - -#include "commoniconbutton.h" -#include "eyecomfortmodeapplet.h" - -#include - -namespace Dock { -class TipsWidget; -} - -class QuickPanelWidget; - -class EyeComfortModeItem : public QWidget -{ - Q_OBJECT - -public: - - enum ThemeType { - Light, - Dark, - Auto - }; - - explicit EyeComfortModeItem(QWidget *parent = nullptr); - - QWidget *tipsWidget(); - QWidget *popupApplet(); - QWidget *quickPanel(); - const QString contextMenu() const; - void invokeMenuItem(const QString menuId, const bool checked); - void refreshIcon(); - void updateTips(); - QString displayName() const; - bool airplaneEnable(); - ThemeType getThemeType(const QString &globalTheme); - void setAppletHeight(int height); - -signals: - void requestHideApplet(); - void requestExpand(); - -public slots: - void updateDescription(); - -protected: - void resizeEvent(QResizeEvent *e); - -private: - void init(); - -private: - Dock::TipsWidget *m_tipsLabel; - EyeComfortmodeApplet *m_applet; - CommonIconButton *m_icon; - QPixmap m_iconPixmap; - QuickPanelWidget *m_quickPanel; - bool m_supportColorTemperature; - ThemeType m_themeType; -}; - -#endif // EYE_COMFORT_MODE_ITEM_H diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.cpp b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.cpp deleted file mode 100644 index 0eeee7927..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "eyecomfortmodeplugin.h" -#include "eyecomfortmodecontroller.h" -#include "utils.h" -#include "plugins-logging-category.h" - -#define EYE_COMFORT_MODE_KEY "eye-comfort-mode-key" -DCORE_USE_NAMESPACE - -Q_LOGGING_CATEGORY(EYE_COMFORT, "org.deepin.dde.dock.eye-comfort-mode") - -EyeComfortModePlugin::EyeComfortModePlugin(QObject *parent) - : QObject(parent) - , m_eyeComfortModeItem(nullptr) -{ - -} - -EyeComfortModePlugin::~EyeComfortModePlugin() -{ -} - -const QString EyeComfortModePlugin::pluginName() const -{ - return "eye-comfort-mode"; -} - -const QString EyeComfortModePlugin::pluginDisplayName() const -{ - return m_eyeComfortModeItem->displayName(); -} - -void EyeComfortModePlugin::init(PluginProxyInterface *proxyInter) -{ - m_proxyInter = proxyInter; - - m_eyeComfortModeItem.reset(new EyeComfortModeItem); - - connect(&EyeComfortModeController::ref(), &EyeComfortModeController::supportColorTemperatureChanged, this, [this] (bool support) { - support ? m_proxyInter->itemAdded(this, EYE_COMFORT_MODE_KEY) : m_proxyInter->itemRemoved(this, EYE_COMFORT_MODE_KEY); - notifySupportFlagChanged(support); - }); - if (!pluginIsDisable()) { - m_proxyInter->itemAdded(this, EYE_COMFORT_MODE_KEY); - } - connect(m_eyeComfortModeItem.data(), &EyeComfortModeItem::requestHideApplet, this, [this] { - m_proxyInter->requestSetAppletVisible(this, EYE_COMFORT_MODE_KEY, false); - }); - connect(m_eyeComfortModeItem.data(), &EyeComfortModeItem::requestExpand, this, [this] { - m_proxyInter->requestSetAppletVisible(this, EYE_COMFORT_MODE_KEY, true); - }); -} - -QWidget *EyeComfortModePlugin::itemWidget(const QString &itemKey) -{ - if (itemKey == EYE_COMFORT_MODE_KEY) { - return m_eyeComfortModeItem.data(); - } - - if (itemKey == Dock::QUICK_ITEM_KEY) { - return m_eyeComfortModeItem->quickPanel(); - } - - return nullptr; -} - -QWidget *EyeComfortModePlugin::itemTipsWidget(const QString &itemKey) -{ - if (itemKey == EYE_COMFORT_MODE_KEY) { - return m_eyeComfortModeItem->tipsWidget(); - } - - return nullptr; -} - -QWidget *EyeComfortModePlugin::itemPopupApplet(const QString &itemKey) -{ - if (itemKey == EYE_COMFORT_MODE_KEY) { - return m_eyeComfortModeItem->popupApplet(); - } - - return nullptr; -} - -const QString EyeComfortModePlugin::itemContextMenu(const QString &itemKey) -{ - if (itemKey == EYE_COMFORT_MODE_KEY) { - return m_eyeComfortModeItem->contextMenu(); - } - - return QString(); -} - -void EyeComfortModePlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) -{ - if (itemKey == EYE_COMFORT_MODE_KEY) { - m_eyeComfortModeItem->invokeMenuItem(menuId, checked); - } -} - -int EyeComfortModePlugin::itemSortKey(const QString &itemKey) -{ - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - return m_proxyInter->getValue(this, key, -1).toInt(); -} - -void EyeComfortModePlugin::setSortKey(const QString &itemKey, const int order) -{ - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - m_proxyInter->saveValue(this, key, order); -} - -void EyeComfortModePlugin::refreshIcon(const QString &itemKey) -{ - if (itemKey == EYE_COMFORT_MODE_KEY) { - m_eyeComfortModeItem->refreshIcon(); - } -} - -QString EyeComfortModePlugin::message(const QString &message) -{ - QJsonObject msgObj = Utils::getRootObj(message); - if (msgObj.isEmpty()) { - return "{}"; - } - - QJsonObject retObj; - QString cmdType = msgObj.value(Dock::MSG_TYPE).toString(); - if (cmdType == Dock::MSG_SET_APPLET_MIN_HEIGHT) { - const int height = msgObj.value(Dock::MSG_DATA).toInt(-1); - if (m_eyeComfortModeItem && height > 0) - m_eyeComfortModeItem->setAppletHeight(height); - } - - return QString(); -} - -void EyeComfortModePlugin::notifySupportFlagChanged(bool supportFlag) -{ - if (!m_messageCallback) { - return; - } - - QJsonObject msg; - msg[Dock::MSG_TYPE] = Dock::MSG_SUPPORT_FLAG_CHANGED; - msg[Dock::MSG_DATA] = supportFlag; - m_messageCallback(this, Utils::toJson(msg)); -} diff --git a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.h b/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.h deleted file mode 100644 index d78ecc43d..000000000 --- a/plugins/dde-dock/eye-comfort-mode/eyecomfortmodeplugin.h +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef EYE_COMFORT_MODE_PLUGIN_H -#define EYE_COMFORT_MODE_PLUGIN_H - -#include "pluginsiteminterface_v2.h" -#include "quickpanelwidget.h" -#include "eyecomfortmodeitem.h" - -#include "dtkcore_global.h" - -class EyeComfortModePlugin : public QObject, public PluginsItemInterfaceV2 -{ - Q_OBJECT - Q_INTERFACES(PluginsItemInterfaceV2) - Q_PLUGIN_METADATA(IID ModuleInterface_iid_V2 FILE "eye-comfort-mode.json") - -public: - explicit EyeComfortModePlugin(QObject *parent = nullptr); - ~EyeComfortModePlugin(); - - virtual const QString pluginName() const Q_DECL_OVERRIDE; - virtual const QString pluginDisplayName() const Q_DECL_OVERRIDE; - bool pluginIsAllowDisable() override { return true; } - virtual void init(PluginProxyInterface *proxyInter) Q_DECL_OVERRIDE; - virtual QWidget *itemWidget(const QString &itemKey) Q_DECL_OVERRIDE; - virtual QWidget *itemPopupApplet(const QString &itemKey) Q_DECL_OVERRIDE; - virtual QWidget *itemTipsWidget(const QString &itemKey) Q_DECL_OVERRIDE; - virtual const QString itemContextMenu(const QString &itemKey) Q_DECL_OVERRIDE; - virtual void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) Q_DECL_OVERRIDE; - virtual int itemSortKey(const QString &itemKey) Q_DECL_OVERRIDE; - virtual void setSortKey(const QString &itemKey, const int order) Q_DECL_OVERRIDE; - virtual void refreshIcon(const QString &itemKey) Q_DECL_OVERRIDE; - virtual Dock::PluginFlags flags() const override { return Dock::Type_Quick | Dock::Quick_Panel_Multi | Dock::Attribute_Normal; } - virtual void setMessageCallback(MessageCallbackFunc cb) override { m_messageCallback = cb; } - virtual QString message(const QString &message) override; - -private: - void notifySupportFlagChanged(bool supportFlag); - -private: - QScopedPointer m_eyeComfortModeItem; - MessageCallbackFunc m_messageCallback; -}; - -#endif // EYE_COMFORT_MODE_PLUGIN_H diff --git a/plugins/dde-dock/eye-comfort-mode/quickpanelwidget.cpp b/plugins/dde-dock/eye-comfort-mode/quickpanelwidget.cpp deleted file mode 100644 index 6617f8fcb..000000000 --- a/plugins/dde-dock/eye-comfort-mode/quickpanelwidget.cpp +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (C) 2022 ~ 2026 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "quickpanelwidget.h" -#include "eyecomfortmodecontroller.h" - -#include -#include - -#include -#include -#include -#include -#include -#include - -DGUI_USE_NAMESPACE -DWIDGET_USE_NAMESPACE - -const QSize IconSize(22, 22); // 图标大小 - -void QuickButton::initStyleOption(DStyleOptionButton *option) const -{ - DFloatingButton::initStyleOption(option); - QColor bgColor = option->dpalette.color(backgroundRole()); - QColor textColor = option->dpalette.color(foregroundRole()); - - if (backgroundRole() == QPalette::Highlight) { - textColor = Qt::white; - if (!option->state.testFlag(QStyle::State_Raised)) { // press - bgColor.setHslF(bgColor.hslHueF(), bgColor.hslSaturationF(), bgColor.lightnessF() * 0.9); - textColor.setAlphaF(0.8); - } else if (option->state.testFlag(QStyle::State_MouseOver)) { // hover - bgColor.setHslF(bgColor.hslHueF(), bgColor.hslSaturationF(), bgColor.lightnessF() * 1.1); - } - } else { - textColor.setAlphaF(1); - if (!option->state.testFlag(QStyle::State_Raised)) { // press - bgColor.setAlphaF(0.2); - } else if (option->state.testFlag(QStyle::State_MouseOver)) { // hover - bgColor.setAlphaF(0.15); - } else { // normal - bgColor.setAlphaF(0.1); - } - } - - if (m_mode == ButtonMode::DisplayButton) { - bgColor.setAlphaF(0); - } - - option->palette.setBrush(QPalette::Button, bgColor); - option->palette.setBrush(QPalette::ButtonText, textColor); - option->state.setFlag(QStyle::State_MouseOver, false); - option->state.setFlag(QStyle::State_Sunken, false); - option->state.setFlag(QStyle::State_Raised, true); -} - - -QuickPanelWidget::QuickPanelWidget(QWidget *parent) - : QWidget(parent) - , m_iconWidget(new QuickButton(this)) - , m_nameLabel(new DLabel(this)) - , m_stateLabel(new DLabel(this)) - , m_expandLabel(new DIconButton(this)) -{ - initUi(); - initConnection(); -} - -QuickPanelWidget::~QuickPanelWidget() { } - -void QuickPanelWidget::setIcon(const QIcon &icon) -{ - m_iconWidget->setIcon(icon); -} - -void QuickPanelWidget::setText(const QString &text) -{ - m_nameLabel->setText(text); -} - -void QuickPanelWidget::setDescription(const QString &description) -{ - m_stateLabel->setText(description); -} - -void QuickPanelWidget::setActive(bool active) -{ - m_iconWidget->setBackgroundRole(active ? QPalette::Highlight : QPalette::BrightText); -} - -void QuickPanelWidget::setButtonMode(QuickButton::ButtonMode mode) -{ - m_iconWidget->setButtonMode(mode); -} - -void QuickPanelWidget::mousePressEvent(QMouseEvent *event) -{ - switch (event->button()) { - case Qt::LeftButton: - m_clickPoint = event->pos(); - break; - default: - break; - } - QWidget::mousePressEvent(event); -} - -void QuickPanelWidget::mouseReleaseEvent(QMouseEvent *event) -{ - switch (event->button()) { - case Qt::LeftButton: - if (m_clickPoint == event->pos()) - Q_EMIT panelClicked(); - break; - default: - break; - } - m_clickPoint = QPoint(); - QWidget::mouseReleaseEvent(event); -} - -void QuickPanelWidget::initUi() -{ - QWidget *labelWidget = new QWidget(this); - - DFontSizeManager::instance()->bind(m_nameLabel, DFontSizeManager::T6, QFont::Normal); - DToolTip::setToolTipShowMode(m_nameLabel, DToolTip::ShowWhenElided); - m_nameLabel->setElideMode(Qt::ElideRight); - m_nameLabel->setContentsMargins(0, 2, 0, 0); - m_nameLabel->setForegroundRole(QPalette::BrightText); - - DFontSizeManager::instance()->bind(m_stateLabel, DFontSizeManager::T10); - DToolTip::setToolTipShowMode(m_stateLabel, DToolTip::ShowWhenElided); - m_stateLabel->setElideMode(Qt::ElideRight); - - QVBoxLayout *layout = new QVBoxLayout(labelWidget); - layout->setContentsMargins(0, 8, 8, 8); - layout->setSpacing(0); - layout->addWidget(m_nameLabel); - layout->addWidget(m_stateLabel); - - // 图标 - m_iconWidget->setEnabledCircle(true); - m_iconWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - m_iconWidget->setIconSize(IconSize); - m_iconWidget->setCheckable(false); - m_iconWidget->setFixedSize(QSize(40, 40)); - m_iconWidget->setFocusPolicy(Qt::NoFocus); - - // 进入图标 - m_expandLabel->setIcon(DStyle::standardIcon(style(), DStyle::SP_ArrowEnter)); - m_expandLabel->setObjectName("ExpandLabel"); - m_expandLabel->setFlat(true); - m_expandLabel->setFocusPolicy(Qt::NoFocus); - - m_expandLabel->setAttribute(Qt::WA_TransparentForMouseEvents); - - QHBoxLayout *mainLayout = new QHBoxLayout(this); - mainLayout->setContentsMargins(10, 0, 10, 0); - mainLayout->setSpacing(0); - mainLayout->addWidget(m_iconWidget); - mainLayout->addSpacing(10); - mainLayout->addWidget(labelWidget); - mainLayout->addStretch(1); - mainLayout->addWidget(m_expandLabel); - - setFixedSize(150, 60); -} - -void QuickPanelWidget::initConnection() -{ - connect(m_iconWidget, &DFloatingButton::clicked, this, &QuickPanelWidget::iconClicked); -} diff --git a/plugins/dde-dock/eye-comfort-mode/quickpanelwidget.h b/plugins/dde-dock/eye-comfort-mode/quickpanelwidget.h deleted file mode 100644 index 59f9c52bb..000000000 --- a/plugins/dde-dock/eye-comfort-mode/quickpanelwidget.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef QUICKPANELWIDGET_H -#define QUICKPANELWIDGET_H - -#include -#include -#include - -#include - -DWIDGET_USE_NAMESPACE - -class QuickButton : public DFloatingButton -{ -public: - - enum ButtonMode { - ClickButton, - DisplayButton - }; - - QuickButton(QWidget *parent = nullptr) - : DFloatingButton(parent) - , m_mode(ButtonMode::ClickButton) - { - } - - void setButtonMode(ButtonMode mode) { - if (m_mode == mode) - return; - - m_mode = mode; - DStyleOptionButton option; - initStyleOption(&option); - } - -protected: - void initStyleOption(DStyleOptionButton *option) const override; - -private: - ButtonMode m_mode; -}; - -class QLabel; -class QuickPanelWidget : public QWidget -{ - Q_OBJECT - -public: - explicit QuickPanelWidget(QWidget *parent = nullptr); - ~QuickPanelWidget() override; - -public Q_SLOTS: - void setIcon(const QIcon &icon); - void setText(const QString &text); - void setDescription(const QString &description); - void setActive(bool active); - void setButtonMode(QuickButton::ButtonMode mode); - -Q_SIGNALS: - void panelClicked(); - void iconClicked(); - -protected: - void mousePressEvent(QMouseEvent *event) override; - void mouseReleaseEvent(QMouseEvent *event) override; - -private: - void initUi(); - void initConnection(); - -private: - QuickButton *m_iconWidget; - Dtk::Widget::DLabel *m_nameLabel; - Dtk::Widget::DLabel *m_stateLabel; - Dtk::Widget::DIconButton *m_expandLabel; - QPoint m_clickPoint; - bool m_eyeComfortModeEnabled; -}; - -#endif // QUICKPANELWIDGET_H diff --git a/plugins/dde-dock/eye-comfort-mode/resources/dcc-eye-comfort-mode.dci b/plugins/dde-dock/eye-comfort-mode/resources/dcc-eye-comfort-mode.dci deleted file mode 100644 index bb15ec7c8d3a46c3ae9c18ea435316c0e2cace5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2804 zcmeHHc{tQtAOFo@CfneWB?f6Occih-kR^|@HkPzdma!K#gDAOU8>3fBvK3`%G?Xnb z6*EH2HBnNQY*Ql!ku8ask?nO~JooLeBjYy|OJ5Sofc>|Kj*Sc2_Q@ji{Q1Ie4>Ub`c;EE*dax=Qd6kwq-k<-iEf!J`?@ zlh-85cm~MiMqDuuT|xCWNG1t%#)3MZF65i;Y>z}Y84Fa0vJNR^`SmTverj=1kLGij ze}3`1yXQhdyl_OtJKqGusSoe7J3|s*7XO;}qQ{SOBFo_Viioi_&AL%HudnG82UlT$ z;ye6|y_T zik#uoj~>*(dcqv!MX){2_(9f*MoCB9<-Rq{NTeKL;&(FBQNH|BN7>vum|k~$v>N3s zmtG;KELwC8(l>f?`iLR4wP3I_#&0ZSr2YBcLi` z)eOw)^r+Z~eO5#yqQ|tgMs}lINj-*#9`5uB>g^r4o{>1m^T_Ly>O;#j^6`oD-L8x_ zxz0Ol5RT>3i6Z}K8Qu|P;;JDXh`!M~Y91aD?{{1*8p47LNq;VWQd`|{3kl6)t-pCk z>D1dFoIn1yztqFkC}sdfyG4At?hJr+^nUn7|DCWTusPcPwg0!Ozn{+kz;)X`|C9cF zVN2&{tx97{=TECbY~XFHlHI_XRtyPo&E`A;!fMRnduteE-gI5)Eyi=Grtl?!4LRUf z6$$+&!s7oINJI_f#uXzQG?|)kM)2rHK0X+C1{|%M7d8{g!pPIWoaV@$@Jm?D2iXwTkbIq-5ZX(`%(} zr=CSaW7{fK<{!mhTb91!MVPD>%C)F8F~$`g!C*-@(W}rB*zE%XM z+9W*2UH3Oc^F6b3^~29}wJSVK>NT)3trM;F;TkC<*Pv$iY<19s-WnE5J%wrn=+{^? z+yjAr6fAF9o^eW6nt4sor*>4W2vOGo8o2NTGqZP=)*wqSf!^)oCLK%o79$)9Cj?OW z-1drRcb%t9Q&Y+3NV@M{A)u_T!_#XsI@Uc=paUtV z;?hY(L4&nN!>7phld(3qDdk@6BK6AOA#k6HwkeF8B(qT}zpMlW2@ws9h$4xqj>KqB zTp?DrKzMm9e;q^2N#_+zO42pg;131DZEkiH{qfq{ZdY7!=XPhDO%Ya*|K*D#O|i=@ zu3Pru*Q_0SyPlg0gg*{iqM|QpMehpg*kSwaT0KzcqE>}sS5eEuI2PU5(|qlZFFqrW z-*1hEyp|rk%w#Ntsqa7i<#rL<9SVD~Y_n{{NKGk8e`a6OA;B@T>Ktp}$Ecn2O)aya z+6{=*p(LU{wKHfbs$PY;xq?|87|yXX+VBaWRz)b_X;*Vw2KD+hq+U#F{`_F1LS+OiqN_8(FH2`My$m;+J`< W6y`zXO?2hAS~<5(zIR!Z5&aLytd8>l diff --git a/plugins/dde-dock/eye-comfort-mode/resources/eye-comfort-mode.qrc b/plugins/dde-dock/eye-comfort-mode/resources/eye-comfort-mode.qrc deleted file mode 100644 index 78ac39ccb..000000000 --- a/plugins/dde-dock/eye-comfort-mode/resources/eye-comfort-mode.qrc +++ /dev/null @@ -1,9 +0,0 @@ - - - texts/eyeshield-on_24px.svg - texts/open-arrow_16px.svg - texts/theme-dark_16px.svg - texts/theme-light_16px.svg - texts/theme-auto_16px.svg - - diff --git a/plugins/dde-dock/eye-comfort-mode/resources/texts/eyeshield-on_24px.svg b/plugins/dde-dock/eye-comfort-mode/resources/texts/eyeshield-on_24px.svg deleted file mode 100644 index 8b276eea9..000000000 --- a/plugins/dde-dock/eye-comfort-mode/resources/texts/eyeshield-on_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - eyeshield-on - - - - \ No newline at end of file diff --git a/plugins/dde-dock/eye-comfort-mode/resources/texts/open-arrow_16px.svg b/plugins/dde-dock/eye-comfort-mode/resources/texts/open-arrow_16px.svg deleted file mode 100644 index 5e0874c1d..000000000 --- a/plugins/dde-dock/eye-comfort-mode/resources/texts/open-arrow_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - open - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-auto_16px.svg b/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-auto_16px.svg deleted file mode 100644 index c7fb19f15..000000000 --- a/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-auto_16px.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - 图标/自动 - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-dark_16px.svg b/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-dark_16px.svg deleted file mode 100644 index 529461fd1..000000000 --- a/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-dark_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - 图标/深色 - - - - \ No newline at end of file diff --git a/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-light_16px.svg b/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-light_16px.svg deleted file mode 100644 index 86c599e47..000000000 --- a/plugins/dde-dock/eye-comfort-mode/resources/texts/theme-light_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - 图标/浅色 - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/CMakeLists.txt b/plugins/dde-dock/sound/CMakeLists.txt deleted file mode 100644 index f76aafc16..000000000 --- a/plugins/dde-dock/sound/CMakeLists.txt +++ /dev/null @@ -1,67 +0,0 @@ -# SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. -# -# SPDX-License-Identifier: CC0-1.0 - -set(PLUGIN_NAME "sound") - -project(${PLUGIN_NAME}) - -# Sources files -file(GLOB_RECURSE SRCS - "*.h" - "*.cpp" - "../widgets/*.h" - "../widgets/*.cpp" - "../util/imageutil.h" - "../util/imageutil.cpp" - "../util/horizontalseparator.h" - "../util/horizontalseparator.cpp" - "../common/*.h" - "../common/*.cpp" - "../dbus/types/audioport.h" - "../dbus/types/audioport.cpp" - "../dbus/types/audioportlist.h" - "../dbus/types/audioportlist.cpp" -) - -find_package(PkgConfig REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Widgets Svg DBus) -find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED COMPONENTS Widget Tools) - -pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11 xcursor) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/xml/org.deepin.dde.Audio1.xml - audio1interface -) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/xml/org.deepin.dde.Audio1.Sink.xml - audio1sinkinterface -) - -add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN") -add_library(${PLUGIN_NAME} SHARED ${DBUS_INTERFACES} ${SRCS} resources/sound.qrc) -set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../) -target_include_directories(${PLUGIN_NAME} PUBLIC - ../dbus - ../../../interfaces - ../util - ../common - ../widgets -) -target_link_libraries(${PLUGIN_NAME} PRIVATE - Dtk${DTK_VERSION_MAJOR}::Widget - ${XCB_EWMH_LIBRARIES} - Qt${QT_VERSION_MAJOR}::DBus - Qt${QT_VERSION_MAJOR}::Widgets - Qt${QT_VERSION_MAJOR}::Svg - dockpluginmanager-interface - ) - -install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins/system-trays) - -dtk_add_config_meta_files(APPID org.deepin.dde.dock FILES ../configs/org.deepin.dde.dock.plugin.sound.json) # compat -dtk_add_config_meta_files(APPID org.deepin.dde.tray-loader FILES ../configs/org.deepin.dde.dock.plugin.sound.json) diff --git a/plugins/dde-dock/sound/resources/slider_bg.png b/plugins/dde-dock/sound/resources/slider_bg.png deleted file mode 100644 index 7f0c6120559bf855fbfcafe055950d2bff0cab84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmeAS@N?(olHy`uVBq!ia0y~yU}OTanK;;hMN(gLK%t-3|FPtqE@f%1!-mQ MboFyt=akR{05`@T_5c6? diff --git a/plugins/dde-dock/sound/resources/slider_handle.svg b/plugins/dde-dock/sound/resources/slider_handle.svg deleted file mode 100644 index 8bdd442e2..000000000 --- a/plugins/dde-dock/sound/resources/slider_handle.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - slider_handle - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/sound.qrc b/plugins/dde-dock/sound/resources/sound.qrc deleted file mode 100644 index f83888fef..000000000 --- a/plugins/dde-dock/sound/resources/sound.qrc +++ /dev/null @@ -1,31 +0,0 @@ - - - - - slider_bg.png - slider_handle.svg - - - texts/audio-volume-high-symbolic_16px.svg - texts/audio-volume-low-symbolic_16px.svg - texts/audio-volume-medium-symbolic_16px.svg - texts/audio-volume-muted-symbolic_16px.svg - texts/audio-volume-off-symbolic_16px.svg - texts/audio-volume-high-symbolic_24px.svg - texts/audio-volume-low-symbolic_24px.svg - texts/audio-volume-medium-symbolic_24px.svg - texts/audio-volume-muted-symbolic_24px.svg - texts/audio-volume-off-symbolic_24px.svg - texts/sound_bluetooth_16px.svg - texts/sound_hdmi_16px.svg - texts/sound_headphone_16px.svg - texts/sound_other_16px.svg - texts/sound_speaker_16px.svg - texts/sound_bluetooth_24px.svg - texts/sound_hdmi_24px.svg - texts/sound_headphone_24px.svg - texts/sound_other_24px.svg - texts/sound_speaker_24px.svg - texts/open-arrow_16px.svg - - diff --git a/plugins/dde-dock/sound/resources/sound.svg b/plugins/dde-dock/sound/resources/sound.svg deleted file mode 100644 index e5c7359c3..000000000 --- a/plugins/dde-dock/sound/resources/sound.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - audio-volume-high-symbolic - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_16px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_16px.svg deleted file mode 100644 index e5c7359c3..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - audio-volume-high-symbolic - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_24px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_24px.svg deleted file mode 100644 index d4b28863f..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-high-symbolic_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - audio-volume-high-symbolic - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_16px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_16px.svg deleted file mode 100644 index 181752c30..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - audio-volume-low-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_24px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_24px.svg deleted file mode 100644 index 46769cd24..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-low-symbolic_24px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - audio-volume-low-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_16px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_16px.svg deleted file mode 100644 index dcae2ee07..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - audio-volume-medium-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_24px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_24px.svg deleted file mode 100644 index af6fdc9b1..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-medium-symbolic_24px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - audio-volume-medium-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_16px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_16px.svg deleted file mode 100644 index 9ac01d682..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - audio-volume-muted-symbolic - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_24px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_24px.svg deleted file mode 100644 index 703565d1b..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-muted-symbolic_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - audio-volume-muted-symbolic - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_16px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_16px.svg deleted file mode 100644 index bafef04f5..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - audio-volume-off-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_24px.svg b/plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_24px.svg deleted file mode 100644 index 41d96d0bc..000000000 --- a/plugins/dde-dock/sound/resources/texts/audio-volume-off-symbolic_24px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - audio-volume-off-symbolic - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/open-arrow_16px.svg b/plugins/dde-dock/sound/resources/texts/open-arrow_16px.svg deleted file mode 100644 index 5e0874c1d..000000000 --- a/plugins/dde-dock/sound/resources/texts/open-arrow_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - open - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_bluetooth_16px.svg b/plugins/dde-dock/sound/resources/texts/sound_bluetooth_16px.svg deleted file mode 100644 index bbcc73237..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_bluetooth_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/volume/bluetooth - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_bluetooth_24px.svg b/plugins/dde-dock/sound/resources/texts/sound_bluetooth_24px.svg deleted file mode 100644 index 71f77acec..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_bluetooth_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - ICON/volume/bluetooth-24 - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_hdmi_16px.svg b/plugins/dde-dock/sound/resources/texts/sound_hdmi_16px.svg deleted file mode 100644 index e55fca651..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_hdmi_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/volume/hdmi - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_hdmi_24px.svg b/plugins/dde-dock/sound/resources/texts/sound_hdmi_24px.svg deleted file mode 100644 index d6c1195c7..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_hdmi_24px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/volume/hdmi-24 - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_headphone_16px.svg b/plugins/dde-dock/sound/resources/texts/sound_headphone_16px.svg deleted file mode 100644 index 523df6d3c..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_headphone_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/volume/headphone - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_headphone_24px.svg b/plugins/dde-dock/sound/resources/texts/sound_headphone_24px.svg deleted file mode 100644 index cba05f2af..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_headphone_24px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON/volume/headphone-24 - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_other_16px.svg b/plugins/dde-dock/sound/resources/texts/sound_other_16px.svg deleted file mode 100644 index 840d2091f..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_other_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - ICON/volume/else - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_other_24px.svg b/plugins/dde-dock/sound/resources/texts/sound_other_24px.svg deleted file mode 100644 index 6879f9292..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_other_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - ICON/volume/else-24 - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_speaker_16px.svg b/plugins/dde-dock/sound/resources/texts/sound_speaker_16px.svg deleted file mode 100644 index 988e14daa..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_speaker_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - ICON/volume/loudspeaker - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/resources/texts/sound_speaker_24px.svg b/plugins/dde-dock/sound/resources/texts/sound_speaker_24px.svg deleted file mode 100644 index 6a6853799..000000000 --- a/plugins/dde-dock/sound/resources/texts/sound_speaker_24px.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - ICON/volume/loudspeaker-24 - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-dock/sound/sound.json b/plugins/dde-dock/sound/sound.json deleted file mode 100644 index 357902116..000000000 --- a/plugins/dde-dock/sound/sound.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "api": "2.0.0", - "depends-daemon-dbus-service": "org.deepin.dde.Audio1" -} diff --git a/plugins/dde-dock/sound/soundapplet.cpp b/plugins/dde-dock/sound/soundapplet.cpp deleted file mode 100644 index c7041f785..000000000 --- a/plugins/dde-dock/sound/soundapplet.cpp +++ /dev/null @@ -1,359 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "soundapplet.h" -#include "utils.h" -#include "soundmodel.h" -#include "dock-constants.h" -#include "constants.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#define SOUND_OUTPUT_SLIDER "soundOutputSlider" - -DWIDGET_USE_NAMESPACE -DGUI_USE_NAMESPACE -using namespace Dock; - -const static int ITEM_SPACING = 10; - -SoundApplet::SoundApplet(QWidget* parent) - : QWidget(parent) - , m_volumeSlider(new DockSlider(this)) - , m_volumeLabel(new QLabel(this)) - , m_deviceLabel(new QLabel(this)) - , m_outputLabel(new QLabel(this)) - , m_deviceWidget(new QWidget(this)) - , m_sliderContainer(new SliderContainer(this)) - , m_audioInter(SoundController::ref().audioInter()) - , m_defSinkInter(nullptr) - , m_listView(new PluginListView(this)) - , m_settingButton(new JumpSettingButton(this)) - , m_itemModel(new QStandardItemModel(m_listView)) - , m_dConfig(Dtk::Core::DConfig::create("org.deepin.dde.tray-loader", "org.deepin.dde.dock.plugin.sound", QString(), this)) - , m_minHeight(-1) - , m_spacerItem(new QSpacerItem(Dock::DOCK_POPUP_WIDGET_WIDTH, ITEM_SPACING)) -{ - initUi(); - initConnections(); -} - -void SoundApplet::initUi() -{ - setFixedWidth(Dock::DOCK_POPUP_WIDGET_WIDTH); - setMaximumHeight(Dock::DOCK_POPUP_WIDGET_MAX_HEIGHT); - // Title - m_deviceLabel->setText(tr("Volume")); - DFontSizeManager::instance()->bind(m_deviceLabel, DFontSizeManager::T9, QFont::Medium); - m_volumeLabel->setText(QString("%1%").arg(0)); - DFontSizeManager::instance()->bind(m_volumeLabel, DFontSizeManager::T9, QFont::Medium); - QHBoxLayout* deviceLayout = new QHBoxLayout(m_deviceWidget); - deviceLayout->setSpacing(0); - deviceLayout->setContentsMargins(0, 0, 0, 0); - deviceLayout->setContentsMargins(10, 0, 10, 0); - deviceLayout->addWidget(m_deviceLabel, 0, Qt::AlignLeft); - deviceLayout->addWidget(m_volumeLabel, 0, Qt::AlignRight); - - // Volume slider - m_volumeSlider->setFixedHeight(36); - m_volumeSlider->setMinimum(0); - m_volumeSlider->setMaximum(SoundModel::ref().maxVolumeUI()); - m_volumeSlider->setPageStep(2); - m_sliderContainer->setSlider(m_volumeSlider); - m_sliderContainer->addBackground(); - m_sliderContainer->setButtonsSize(QSize(16, 16)); - m_sliderContainer->setFixedHeight(36); - updateVolumeSliderStatus(m_dConfig->value(SOUND_OUTPUT_SLIDER, Enabled).toInt()); - refreshIcon(); - - // Output - m_outputLabel->setText(tr("Output")); - m_outputLabel->setContentsMargins(10, 0, 0, 0); - DFontSizeManager::instance()->bind(m_outputLabel, DFontSizeManager::T9, QFont::Medium); - // Port list - m_listView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - m_listView->setModel(m_itemModel); - m_listView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_listView->installEventFilter(this); - - // sound setting button - m_settingButton->setAutoShowPage(true); - m_settingButton->setDccPage("sound", "output"); - m_settingButton->setIcon(QIcon::fromTheme("open-arrow")); - m_settingButton->setDescription(tr("Sound settings")); - - m_centralLayout = new QVBoxLayout(this); - m_centralLayout->setContentsMargins(10,10, 10, 10); - m_centralLayout->setSpacing(0); - m_centralLayout->addWidget(m_deviceWidget); - m_centralLayout->addSpacing(5); - m_centralLayout->addWidget(m_sliderContainer); - m_centralLayout->addSpacing(ITEM_SPACING); - m_centralLayout->addWidget(m_outputLabel); - m_centralLayout->addSpacing(5); - m_centralLayout->addWidget(m_listView); - m_centralLayout->addSpacerItem(m_spacerItem); - m_centralLayout->addWidget(m_settingButton); - - m_volumeSlider->setAccessibleName("volume_slider"); - m_volumeLabel->setAccessibleName("volume_sound_tips"); - - updatePorts(); -} - -void SoundApplet::initConnections() -{ - if (m_dConfig) { - connect(m_dConfig, &Dtk::Core::DConfig::valueChanged, this, [ = ] (const QString &key) { - if (key == SOUND_OUTPUT_SLIDER) { - updateVolumeSliderStatus(m_dConfig->value(SOUND_OUTPUT_SLIDER).toInt()); - } - }); - } - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &SoundApplet::refreshIcon); - connect(qApp, &DApplication::iconThemeChanged, this, &SoundApplet::refreshIcon); - - connect(m_volumeSlider, &DockSlider::valueChanged, this, &SoundApplet::volumeSliderValueChanged); - connect(m_sliderContainer, &SliderContainer::iconClicked, this, [this](SliderContainer::IconPosition icon) { - if (icon == SliderContainer::LeftIcon && SoundController::ref().existActiveOutputDevice() && m_defSinkInter) { - m_defSinkInter->SetMuteQueued(!m_defSinkInter->mute()); - } - }); - connect(m_listView, &PluginListView::clicked, this, [this](const QModelIndex& idx) { - auto key = m_listView->model()->data(idx, Qt::WhatsThisPropertyRole).value(); - const SoundCardPort* port = SoundModel::ref().port(key); - if (port) { - m_audioInter->SetPort(port->cardId(), port->portName(), int(port->direction())); - // 手动勾选时启用设备 - m_audioInter->SetPortEnabled(port->cardId(), port->portName(), true); - } - }); - connect(&SoundController::ref(), &SoundController::defaultSinkChanged, this, &SoundApplet::updatePorts); - - connect(&SoundModel::ref(), &SoundModel::maxVolumeUIChanged, this, &SoundApplet::maxUiVolumeChanged); - connect(&SoundModel::ref(), &SoundModel::enabledPortAdded, this, &SoundApplet::addPort); - connect(&SoundModel::ref(), &SoundModel::cardsInfoChanged, this, &SoundApplet::updatePorts); - connect(&SoundModel::ref(), &SoundModel::portRemoved, this, &SoundApplet::removePort); - connect(&SoundModel::ref(), &SoundModel::volumeChanged, this, [this] (int volume) { - onVolumeChanged(volume); - }); - connect(&SoundModel::ref(), &SoundModel::muteStateChanged, this, [this] { - onVolumeChanged(SoundController::ref().existActiveOutputDevice() ? SoundModel::ref().volume() : 0); - }); - connect(m_settingButton, &JumpSettingButton::showPageRequestWasSended, this, &SoundApplet::requestHideApplet); - - // 初始化数据 - updatePorts(); - for (const auto port : SoundModel::ref().ports()) { - addPort(port); - } -} - -DockSlider* SoundApplet::mainSlider() -{ - return m_volumeSlider; -} - -void SoundApplet::onDefaultSinkChanged() -{ - m_defSinkInter = SoundController::ref().defaultSinkInter(); - - // 无声卡状态下,会有伪sink设备,显示音量为0 - // 支持云平台无声卡显示 - onVolumeChanged(SoundController::ref().existActiveOutputDevice() ? SoundModel::ref().volume() : 0); -} - -void SoundApplet::onVolumeChanged(int volume) -{ - m_volumeSlider->setValue(std::min(150, volume)); - m_volumeLabel->setText(QString::number(volume) + '%'); - refreshIcon(); -} - -void SoundApplet::volumeSliderValueChanged() -{ - SoundController::ref().SetVolume(m_volumeSlider->value() * 0.01, true); -} - -void SoundApplet::updatePorts() -{ - // 重新获取切换的设备信息 - onDefaultSinkChanged(); - - // 判断是否存在激活的输出设备 - enableDevice(SoundController::ref().existActiveOutputDevice()); - - // 一个设备不展示列表,直接可以调整声音 - const bool visible = m_itemModel->rowCount() > 0; - m_listView->setVisible(visible); - m_outputLabel->setVisible(visible); - - m_spacerItem->changeSize(Dock::DOCK_POPUP_WIDGET_WIDTH, ITEM_SPACING, - QSizePolicy::Minimum, visible ? QSizePolicy::Minimum : QSizePolicy::Expanding); - - resizeApplet(); -} - -void SoundApplet::maxUiVolumeChanged() -{ - m_volumeSlider->setMaximum(SoundModel::ref().maxVolumeUI()); - m_volumeSlider->setValue(std::min(150, SoundModel::ref().volume())); -} - -void SoundApplet::refreshIcon() -{ - const bool mute = SoundController::ref().existActiveOutputDevice() ? SoundModel::ref().isMute() : true; - QString volumeString = mute ? "muted" : "off"; - - m_sliderContainer->setIcon(SliderContainer::LeftIcon, QString("audio-volume-%1-symbolic").arg(volumeString), 0); - m_sliderContainer->setIcon(SliderContainer::RightIcon, "audio-volume-high-symbolic", 0); -} - -PluginStandardItem* SoundApplet::findItem(const QString &uniqueKey) const -{ - for (int i = 0; i < m_itemModel->rowCount(); i++) { - auto item = m_itemModel->item(i); - if (uniqueKey == item->data(Qt::WhatsThisPropertyRole).value()) { - return dynamic_cast(item); - } - } - - return nullptr; -} - -void SoundApplet::selectItem(PluginStandardItem *targetItem) -{ - if (!targetItem) { - return; - } - - for (int i = 0; i < m_itemModel->rowCount(); ++i) { - auto item = dynamic_cast(m_itemModel->item(i, 0)); - if (!item) { - continue; - } - item->updateState(item == targetItem ? PluginItemState::ConnectedOnlyPrompt : PluginItemState::NoState); - } -} - -void SoundApplet::addPort(const SoundCardPort* port) -{ - if (!port->isEnabled()) - return; - - PluginStandardItem* pi = new PluginStandardItem(QIcon::fromTheme(SoundCardPort::icon(port->portType())), - port->description() + "(" + port->cardName() + ")"); - pi->setData(port->uniqueKey(), Qt::WhatsThisPropertyRole); - - connect(port, &SoundCardPort::nameChanged, this, [this, port](const QString& str) { - QString devName = str + "(" + port->cardName() + ")"; - auto item = findItem(port->uniqueKey()); - if (item) - item->updateName(devName); - }); - connect(port, &SoundCardPort::cardNameChanged, this, [this, port](const QString& str) { - QString devName = port->description() + "(" + str + ")"; - auto item = findItem(port->uniqueKey()); - if (item) - item->updateName(devName); - }); - connect(port, &SoundCardPort::activityChanged, this, [this, port](bool isActive) { - auto item = findItem(port->uniqueKey()); - if (item && isActive) - selectItem(item); - }); - connect(port, &SoundCardPort::enabledChanged, this, [port, this] (bool enabled) { - if (!enabled) { - removeDisabledDevice(port->portName(), port->cardId()); - } - }); - m_itemModel->appendRow(pi); - m_itemModel->sort(0); - if (port->isActive()) { - selectItem(pi); - } - - updatePorts(); -} - -void SoundApplet::removePort(const QString& key) -{ - for (int i = 0; i < m_itemModel->rowCount();) { - auto item = m_itemModel->item(i); - if (key == item->data(Qt::WhatsThisPropertyRole).value()) { - m_itemModel->removeRow(i); - break; - } else { - ++i; - } - } - auto port = SoundModel::ref().port(key); - if (port) - port->disconnect(this); - updatePorts(); -} - -void SoundApplet::enableDevice(bool flag) -{ - int status = m_dConfig ? m_dConfig->value(SOUND_OUTPUT_SLIDER).toInt() : Enabled; - m_volumeSlider->setEnabled(Disabled == status ? false : flag); - m_sliderContainer->setButtonsEnabled(flag); -} - -/** - * @brief SoundApplet::removeDisabledDevice 移除禁用设备 - * @param portId - * @param cardId - */ -void SoundApplet::removeDisabledDevice(QString portName, unsigned int cardId) -{ - removePort(SoundCardPort::compositeKey(cardId, portName)); - if (m_defSinkInter && m_defSinkInter->activePort().name == portName && m_defSinkInter->card() == cardId) { - enableDevice(false); - } -} - -void SoundApplet::updateVolumeSliderStatus(int status) -{ - const bool enabled = (Enabled == status); - m_volumeSlider->setEnabled(enabled); - m_sliderContainer->setButtonsEnabled(enabled); - - const bool visible = (Hidden != status); - m_sliderContainer->setVisible(visible); -} - -void SoundApplet::resizeApplet() -{ - const int listViewHeight = m_itemModel->rowCount() * (m_listView->getItemHeight()+m_listView->getItemSpacing()) - m_listView->getItemSpacing(); - int totalHeight = m_deviceWidget->height() + m_sliderContainer->height() + m_settingButton->height() + ITEM_SPACING * 4; - totalHeight += m_outputLabel->height() + (m_outputLabel->isVisible() ? ITEM_SPACING : 0); - totalHeight += listViewHeight + (listViewHeight > 0 ? ITEM_SPACING : 0); - - resize(width(), qMin(Dock::DOCK_POPUP_WIDGET_MAX_HEIGHT, qMax(m_minHeight, totalHeight))); -} - -bool SoundApplet::eventFilter(QObject *watcher, QEvent *event) -{ - if (event->type() == QEvent::Resize) { - resizeApplet(); - } - - return QWidget::eventFilter(watcher, event); -} - -void SoundApplet::setMinHeight(int minHeight) -{ - m_minHeight = minHeight; - resizeApplet(); -} diff --git a/plugins/dde-dock/sound/soundapplet.h b/plugins/dde-dock/sound/soundapplet.h deleted file mode 100644 index e8b02f40e..000000000 --- a/plugins/dde-dock/sound/soundapplet.h +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SOUNDAPPLET_H -#define SOUNDAPPLET_H - -#include "dockslider.h" -#include "jumpsettingbutton.h" -#include "slidercontainer.h" -#include "soundcardport.h" -#include "soundcontroller.h" -#include "pluginlistview.h" - -#include "audio1interface.h" -#include "audio1sinkinterface.h" - -#include - -#include -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE - -using DBusAudio = org::deepin::dde::Audio1; -using DBusSink = org::deepin::dde::audio1::Sink; - -class HorizontalSeparator; - -namespace Dock { -class TipsWidget; -} - -class SoundApplet : public QWidget -{ - Q_OBJECT -public: - enum volumeSliderStatus { - Enabled = 0, - Disabled, - Hidden - }; - - explicit SoundApplet(QWidget* parent = 0); - - DockSlider* mainSlider(); - void setMinHeight(int minHeight); - -private slots: - void onDefaultSinkChanged(); - void onVolumeChanged(int volume); - void volumeSliderValueChanged(); - void maxUiVolumeChanged(); - void updatePorts(); - void removePort(const QString& key); - void addPort(const SoundCardPort* port); - -signals: - void requestHideApplet(); - -private: - void initUi(); - void initConnections(); - void refreshIcon(); - void enableDevice(bool flag); - void removeDisabledDevice(QString portId, unsigned int cardId); - void updateVolumeSliderStatus(int status); - void resizeApplet(); - PluginStandardItem* findItem(const QString &uniqueKey) const; - void selectItem(PluginStandardItem *targetItem); - -protected: - bool eventFilter(QObject *watcher, QEvent *event); - -private: - DockSlider* m_volumeSlider; - QLabel* m_volumeLabel; - QLabel* m_deviceLabel; - QLabel* m_outputLabel; - QWidget* m_deviceWidget; - QVBoxLayout* m_centralLayout; - SliderContainer* m_sliderContainer; - DBusAudio* m_audioInter; - DBusSink* m_defSinkInter; - PluginListView* m_listView; - JumpSettingButton* m_settingButton; - QStandardItemModel* m_itemModel; - Dtk::Core::DConfig *m_dConfig; - int m_minHeight; - QSpacerItem *m_spacerItem; -}; - -#endif // SOUNDAPPLET_H diff --git a/plugins/dde-dock/sound/soundcardport.cpp b/plugins/dde-dock/sound/soundcardport.cpp deleted file mode 100644 index 49257b286..000000000 --- a/plugins/dde-dock/sound/soundcardport.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "soundcardport.h" - -#include - -SoundCardPort::SoundCardPort(QObject* parent) - : QObject(parent) - , m_cardId(0) - , m_active(false) - , m_enabled(true) - , m_bluetooth(false) - , m_direction(Out) - , m_portType(Other) -{ -} - -void SoundCardPort::setPortName(const QString& name) -{ - if (name != m_portName) { - m_portName = name; - Q_EMIT idChanged(name); - } -} - -void SoundCardPort::setDescription(const QString& description) -{ - if (description != m_description) { - m_description = description; - Q_EMIT nameChanged(description); - } -} - -void SoundCardPort::setCardName(const QString& cardName) -{ - if (cardName != m_cardName) { - m_cardName = cardName; - Q_EMIT cardNameChanged(cardName); - } -} - -void SoundCardPort::setActive(bool active) -{ - if (active != m_active) { - m_active = active; - Q_EMIT activityChanged(active); - } -} - -void SoundCardPort::setDirection(const Direction& direction) -{ - if (direction != m_direction) { - m_direction = direction; - Q_EMIT directionChanged(direction); - } -} - -void SoundCardPort::setCardId(const uint& cardId) -{ - if (cardId != m_cardId) { - m_cardId = cardId; - Q_EMIT cardIdChanged(cardId); - } -} - -void SoundCardPort::setEnabled(bool enabled) -{ - if (enabled != m_enabled) { - m_enabled = enabled; - Q_EMIT enabledChanged(m_enabled); - } -} - -void SoundCardPort::setBluetooth(bool bluetooth) -{ - m_bluetooth = bluetooth; -} - -void SoundCardPort::setPortType(int type) -{ - m_portType = (PortType)type; -} diff --git a/plugins/dde-dock/sound/soundcardport.h b/plugins/dde-dock/sound/soundcardport.h deleted file mode 100644 index 07dcf4c26..000000000 --- a/plugins/dde-dock/sound/soundcardport.h +++ /dev/null @@ -1,109 +0,0 @@ - -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SOUNDCARDPORT_H -#define SOUNDCARDPORT_H - -#include - -class SoundCardPort : public QObject { - Q_OBJECT -public: - enum Direction { - Out = 1, - In = 2 - }; - - enum PortType { - Bluetooth, - Headphone, - Usb, - Builtin, - HDMI, - LineIO, - MultiChannel, - Other - }; - - explicit SoundCardPort(QObject* parent = nullptr); - virtual ~SoundCardPort() { } - - inline QString portName() const { return m_portName; } - void setPortName(const QString& name); - - inline QString description() const { return m_description; } - void setDescription(const QString& description); - - inline QString cardName() const { return m_cardName; } - void setCardName(const QString& cardName); - - inline bool isActive() const { return m_active; } - void setActive(bool active); - - inline Direction direction() const { return m_direction; } - void setDirection(const Direction& direction); - - inline uint cardId() const { return m_cardId; } - void setCardId(const uint& cardId); - - void setEnabled(bool enabled); - inline bool isEnabled() const { return m_enabled; } - - void setBluetooth(bool bluetooth); - inline bool isBluetooth() const { return m_bluetooth; } - - void setPortType(int type); - inline PortType portType() const { return m_portType; } - - inline QString uniqueKey() const { return compositeKey(m_cardId, m_portName); } - - bool operator==(const SoundCardPort& port) const { return m_portName == port.portName() && m_cardId == port.cardId(); } - - // 分隔字符没有特殊意义,只是为了防重复 - static QString compositeKey(uint cardId, const QString& portName) { return QString::number(cardId) + "_dock-separate-key_" + portName; } - static QStringList decomposeKey(const QString& key) { return key.split("_dock-separate-key_"); } - - static QString icon(PortType type) - { - switch (type) { - case Builtin: - return "sound_speaker"; - case Headphone: - return "sound_headphone"; - case HDMI: - return "sound_hdmi"; - case Bluetooth: - return "sound_bluetooth"; - case Other: - return "sound_other"; - default: - return "sound_other"; - } - } - -Q_SIGNALS: - void idChanged(QString id) const; - void nameChanged(QString name) const; - void cardNameChanged(QString name) const; - void activityChanged(bool active) const; - void directionChanged(Direction direction) const; - void cardIdChanged(uint cardId) const; - void enabledChanged(bool enabled); - -private: - QString m_portName; - QString m_description; - uint m_cardId; - QString m_cardName; - bool m_active; - bool m_enabled; - bool m_bluetooth; - Direction m_direction; - PortType m_portType; -}; - -Q_DECLARE_METATYPE(const SoundCardPort*) - -#endif \ No newline at end of file diff --git a/plugins/dde-dock/sound/soundcontroller.cpp b/plugins/dde-dock/sound/soundcontroller.cpp deleted file mode 100644 index 5ce696fd4..000000000 --- a/plugins/dde-dock/sound/soundcontroller.cpp +++ /dev/null @@ -1,129 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "soundcontroller.h" -#include "soundmodel.h" - -SoundController::SoundController(QObject *parent) - : QObject(parent) - , m_audioInter(new DBusAudio("org.deepin.dde.Audio1", "/org/deepin/dde/Audio1", QDBusConnection::sessionBus(), this)) - , m_defaultSinkInter(nullptr) - , m_dconfig(DConfig::create("org.deepin.dde.tray-loader", "org.deepin.dde.dock.plugin.sound", QString(), this)) -{ - connect(m_audioInter, &DBusAudio::DefaultSinkChanged, this, &SoundController::onDefaultSinkChanged); - connect(m_audioInter, &DBusAudio::CardsWithoutUnavailableChanged, &SoundModel::ref(), &SoundModel::setCardsInfo); - connect(m_audioInter, &DBusAudio::MaxUIVolumeChanged, &SoundModel::ref(), &SoundModel::setMaxVolumeUI); - connect(m_audioInter, &DBusAudio::IncreaseVolumeChanged, this, [this] { - SoundModel::ref().setMaxVolumeUI(m_audioInter->maxUIVolume()); - if (m_defaultSinkInter) { - SoundModel::ref().setVolume(m_defaultSinkInter->volume()); - } - }); - - SoundModel::ref().setCardsInfo(m_audioInter->cardsWithoutUnavailable()); - SoundModel::ref().setMaxVolumeUI(m_audioInter->maxUIVolume()); - onDefaultSinkChanged(m_audioInter->defaultSink()); -} - -SoundController::~SoundController() -{ - -} - -bool SoundController::mute() -{ - if (!m_defaultSinkInter) - return false; - - return m_defaultSinkInter->mute(); -} - -double SoundController::volume() -{ - if (!m_defaultSinkInter) - return 0.0; - - return m_defaultSinkInter->volume(); -} - -void SoundController::SetVolume(double in0, bool in1) -{ - if (!m_defaultSinkInter) - return; - - m_defaultSinkInter->SetVolume(in0, in1); -} - -void SoundController::SetMuteQueued(bool in0) -{ - if (!m_defaultSinkInter) - return; - - m_defaultSinkInter->SetMuteQueued(in0); -} - -void SoundController::SetMute(bool in0) -{ - if (!m_defaultSinkInter) - return; - - m_defaultSinkInter->SetMute(in0); -} - -void SoundController::onDefaultSinkChanged(const QDBusObjectPath &path) -{ - if (m_defaultSinkInter) - m_defaultSinkInter->disconnect(this); - // 防止手动切换设备,与后端交互时,获取到多个信号,设备切换多次,造成混乱 - - if (m_defaultSinkInter) - m_defaultSinkInter->deleteLater(); - - if (path.path() == "/" || path.path().isEmpty()) { - qWarning() << "default sink path is invalid, skip setting default sink interface."; - return; - } - - m_defaultSinkInter = new DBusSink("org.deepin.dde.Audio1", path.path(), QDBusConnection::sessionBus(), this); - // 某些机型,如flmx,add和active先后时序有问题,active触发时,设备add还没执行,导致找不到需要active的设备项 - // 这里手动刷新一下设备列表,再执行active操作 - SoundModel::ref().setCardsInfo(m_audioInter->cardsWithoutUnavailable()); - SoundModel::ref().setActivePort(m_defaultSinkInter->card(), m_defaultSinkInter->activePort().name); - SoundModel::ref().setMute(m_defaultSinkInter->mute()); - SoundModel::ref().setVolume(existActiveOutputDevice() ? m_defaultSinkInter->volume() : 0); - // 音量和静音状态变化时手动获取下另外一个的状态,有时候收不到 changed 信号 - connect(m_defaultSinkInter, &DBusSink::MuteChanged, &SoundModel::ref(), [this] (bool value) { - Q_UNUSED(value) - SoundModel::ref().setMute(m_defaultSinkInter->mute()); - SoundModel::ref().setVolume(m_defaultSinkInter->volume()); - }); - connect(m_defaultSinkInter, &DBusSink::VolumeChanged, &SoundModel::ref(), [] (double value) { - SoundModel::ref().setVolume(value); - }); - connect(m_defaultSinkInter, &DBusSink::ActivePortChanged, this, [this](AudioPort port) { - SoundModel::ref().setActivePort(m_defaultSinkInter->card(), port.name); - }); - Q_EMIT defaultSinkChanged(m_defaultSinkInter); -} - -/** 判断是否存在未禁用的声音输出设备 - * @brief existActiveOutputDevice - * @return 存在返回true,否则返回false - */ -bool SoundController::existActiveOutputDevice() const -{ - if (SoundModel::ref().existActiveOutputDevice()) { - return true; - } - - if (m_dconfig.data()->isValid()) { - bool enableAdjustVolumeNoCard = m_dconfig.data()->value("enableAdjustVolumeNoCard", false).toBool(); - if (enableAdjustVolumeNoCard) { - return m_defaultSinkInter; - } - } - // 兼容云平台无端口的情况 - const QString &sinkName = m_defaultSinkInter ? m_defaultSinkInter->name() : QString(); - return SoundModel::ref().ports().isEmpty() && !sinkName.isEmpty() && !sinkName.startsWith("auto_null") && !sinkName.contains("bluez"); -} diff --git a/plugins/dde-dock/sound/soundcontroller.h b/plugins/dde-dock/sound/soundcontroller.h deleted file mode 100644 index 5590a1ac6..000000000 --- a/plugins/dde-dock/sound/soundcontroller.h +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SOUNDCONTROLLER_H -#define SOUNDCONTROLLER_H - -#include - -#include -#include - -#include "audio1interface.h" -#include "audio1sinkinterface.h" - -DCORE_USE_NAMESPACE - -using DBusAudio = org::deepin::dde::Audio1; -using DBusSink = org::deepin::dde::audio1::Sink; - -class SoundController final : public QObject, public Dtk::Core::DSingleton -{ - friend class Dtk::Core::DSingleton; - - Q_OBJECT -public: - DBusAudio *audioInter() const { return m_audioInter; } - DBusSink *defaultSinkInter() const { return m_defaultSinkInter; } - - bool mute(); - double volume(); - void SetVolume(double in0, bool in1); - void SetMuteQueued(bool in0); - void SetMute(bool in0); - bool existActiveOutputDevice() const; - -Q_SIGNALS: - void defaultSinkChanged(DBusSink *); - void VolumeChanged(double value) const; - void MuteChanged(bool value) const; - -private: - SoundController(QObject *parent = nullptr); - ~SoundController(); - - void onDefaultSinkChanged(const QDBusObjectPath &path); - -private: - DBusAudio *m_audioInter; - QPointer m_defaultSinkInter; - QSharedPointer m_dconfig; -}; - -#endif diff --git a/plugins/dde-dock/sound/soundmodel.cpp b/plugins/dde-dock/sound/soundmodel.cpp deleted file mode 100644 index f68c428d4..000000000 --- a/plugins/dde-dock/sound/soundmodel.cpp +++ /dev/null @@ -1,147 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "soundmodel.h" - -#include -#include -#include -#include - -SoundModel::SoundModel() - : m_volume(0) - , m_mute(false) - , m_maxVolumeUI(100) -{ - -} - -SoundModel::~SoundModel() -{ - -} - -void SoundModel::setVolume(double volume) -{ - int tmp = qRound(volume * 100.0f); - if (m_volume != tmp) { - m_volume = tmp; - Q_EMIT volumeChanged(m_volume); - } -} - -void SoundModel::setMute(bool mute) -{ - if (m_mute != mute) { - m_mute = mute; - Q_EMIT muteStateChanged(m_mute); - } -} - -void SoundModel::setCardsInfo(const QString &info) -{ - if (m_cardsInfo != info) { - m_cardsInfo = info; - analysisCardsInfo(); - Q_EMIT cardsInfoChanged(); - } -} - -void SoundModel::setActivePort(uint cardId, const QString &portName) -{ - const QString& activePortKey = SoundCardPort::compositeKey(cardId, portName); - SoundCardPort* activePort = nullptr; - for (auto port : m_ports.values()) { - if (port->uniqueKey() == activePortKey) { - port->setActive(true); - activePort = port; - } else { - port->setActive(false); - } - } - Q_EMIT activePortChanged(activePort); -} - -SoundCardPort* SoundModel::activePort() const -{ - for (const auto port : m_ports.values()) { - if (port->isActive()) - return port; - } - return nullptr; -} - -void SoundModel::setMaxVolumeUI(double volume) -{ - int tmp = qRound(volume * 100.0f); - if (tmp != m_maxVolumeUI ) { - m_maxVolumeUI = tmp; - Q_EMIT maxVolumeUIChanged(m_maxVolumeUI); - } -} - -void SoundModel::analysisCardsInfo() -{ - QStringList tmpPorts; - const auto &cardsStr = m_cardsInfo; - QJsonDocument doc = QJsonDocument::fromJson(cardsStr.toUtf8()); - QJsonArray cardArray = doc.array(); - for (QJsonValue cV : cardArray) { - QJsonObject jCard = cV.toObject(); - const uint cardId = static_cast(jCard["Id"].toDouble()); - const QString cardName = jCard["Name"].toString(); - QJsonArray jPorts = jCard["Ports"].toArray(); - for (QJsonValue pV : jPorts) { - QJsonObject jPort = pV.toObject(); - const double portAvailable = jPort["Available"].toDouble(); - const auto direction =SoundCardPort::Direction(jPort["Direction"].toDouble()); - if ((portAvailable == 2 || portAvailable == 0) && direction == SoundCardPort::Out) { // 0 Unknow 1 Not available 2 Available - const QString &portName = jPort["Name"].toString(); - const QString &key = SoundCardPort::compositeKey(cardId, portName); - - SoundCardPort* port = m_ports.value(key, new SoundCardPort(this)); - port->setPortName(portName); - port->setDescription(jPort["Description"].toString()); - port->setDirection(direction); - port->setCardId(cardId); - port->setCardName(cardName); - const bool oldEnabled = port->isEnabled(); - port->setEnabled(jPort["Enabled"].toBool()); - port->setBluetooth(jPort["Bluetooth"].toBool()); - port->setPortType(jPort["PortType"].toInt()); - if (!m_ports.contains(key)) { - m_ports.insert(key, port); - if (port->isEnabled()) { - Q_EMIT enabledPortAdded(port); - } - } else if (!oldEnabled && port->isEnabled()){ - Q_EMIT enabledPortAdded(port); - } - - tmpPorts << key; - } - } - } - - for (SoundCardPort* port : m_ports.values()) { - // 判断端口是否在最新的设备列表中 - const auto &key = port->uniqueKey(); - if (!tmpPorts.contains(key)) { - Q_EMIT portRemoved(key); - m_ports.remove(key); - port->deleteLater(); - } - } -} - -bool SoundModel::existActiveOutputDevice() const -{ - for (const auto port : m_ports.values()) { - if (port->direction() == SoundCardPort::Out && port->isEnabled()) { - return true; - } - } - - return false; -} diff --git a/plugins/dde-dock/sound/soundmodel.h b/plugins/dde-dock/sound/soundmodel.h deleted file mode 100644 index adcbe6aa7..000000000 --- a/plugins/dde-dock/sound/soundmodel.h +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SOUNDMODEL_H -#define SOUNDMODEL_H - -#include "soundcardport.h" - -#include -#include -#include - -#include - -class SoundModel : public QObject, public Dtk::Core::DSingleton -{ - friend class Dtk::Core::DSingleton; - - Q_OBJECT -public: - void setVolume(double volume); - int volume() const { return m_volume; } - - void setMute(bool mute); - bool isMute() const { return m_mute; } - - void setCardsInfo(const QString &info); - - SoundCardPort* port(const QString &key) const { return m_ports.value(key, nullptr); } - QList ports() const { return m_ports.values(); } - - void setActivePort(uint cardId, const QString &portName); - SoundCardPort* activePort() const; - void setMaxVolumeUI(double volume); - int maxVolumeUI() const { return m_maxVolumeUI; } - - bool existActiveOutputDevice() const; - -Q_SIGNALS: - void volumeChanged(int volume); - void muteStateChanged(bool isMute); - void cardsInfoChanged(); - void enabledPortAdded(SoundCardPort*); - void portRemoved(const QString &key); - void maxVolumeUIChanged(int volume); - void activePortChanged(SoundCardPort*); - -private: - SoundModel(); - ~SoundModel(); - - void analysisCardsInfo(); - -private: - int m_volume; - bool m_mute; - int m_maxVolumeUI; // UI 显示的最大音量,在开启增强的情况下是可能会超过 100 - QString m_cardsInfo; - QMap m_ports; -}; - -#endif diff --git a/plugins/dde-dock/sound/soundplugin.cpp b/plugins/dde-dock/sound/soundplugin.cpp deleted file mode 100644 index cbf23feba..000000000 --- a/plugins/dde-dock/sound/soundplugin.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "soundplugin.h" -#include "utils.h" -#include "plugins-logging-category.h" - -#include - -Q_LOGGING_CATEGORY(DOCK_SOUND, "org.deepin.dde.dock.sound") - -SoundPlugin::SoundPlugin(QObject *parent) - : QObject(parent), - m_soundItem(nullptr) - , m_soundWidget(nullptr) -{ - -} - -const QString SoundPlugin::pluginName() const -{ - return "sound"; -} - -const QString SoundPlugin::pluginDisplayName() const -{ - return tr("Sound"); -} - -void SoundPlugin::init(PluginProxyInterface *proxyInter) -{ - m_proxyInter = proxyInter; - - if (m_soundItem) - return; - - m_soundWidget.reset(new SoundQuickPanel); - m_soundWidget->setFixedHeight(60); - m_soundItem.reset(new SoundView); - - m_proxyInter->itemAdded(this, SOUND_KEY); - connect(m_soundWidget.data(), &SoundQuickPanel::rightIconClick, this, [ this, proxyInter ] { - proxyInter->requestSetAppletVisible(this, SOUND_KEY, true); - }); - connect(m_soundItem.data(), &SoundView::requestHideApplet, this, [this] { - m_proxyInter->requestSetAppletVisible(this, SOUND_KEY, false); - }); -} - -QWidget *SoundPlugin::itemWidget(const QString &itemKey) -{ - if (itemKey == Dock::QUICK_ITEM_KEY) { - return m_soundWidget.data(); - } - - if (itemKey == SOUND_KEY) { - return m_soundItem->dockIcon(); - } - - return nullptr; -} - -QWidget *SoundPlugin::itemTipsWidget(const QString &itemKey) -{ - if (itemKey == SOUND_KEY) { - return m_soundItem->tipsWidget(); - } - - return nullptr; -} - -QWidget *SoundPlugin::itemPopupApplet(const QString &itemKey) -{ - if (itemKey == SOUND_KEY) { - return m_soundItem->popupApplet(); - } - - return nullptr; -} - -const QString SoundPlugin::itemContextMenu(const QString &itemKey) -{ - if (itemKey == SOUND_KEY) { - return m_soundItem->contextMenu(); - } - - return QString(); -} - -void SoundPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) -{ - if (itemKey == SOUND_KEY) { - m_soundItem->invokeMenuItem(menuId, checked); - } -} - -int SoundPlugin::itemSortKey(const QString &itemKey) -{ - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - return m_proxyInter->getValue(this, key, -1).toInt(); -} - -void SoundPlugin::setSortKey(const QString &itemKey, const int order) -{ - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - m_proxyInter->saveValue(this, key, order); -} - -void SoundPlugin::refreshIcon(const QString &itemKey) -{ - if (itemKey == SOUND_KEY) { - m_soundItem->refreshIcon(); - } -} - -void SoundPlugin::pluginSettingsChanged() -{ - refreshPluginItemsVisible(); -} - -void SoundPlugin::refreshPluginItemsVisible() -{ - m_proxyInter->itemAdded(this, SOUND_KEY); -} - -QString SoundPlugin::message(const QString &message) -{ - QJsonObject msgObj = Utils::getRootObj(message); - if (msgObj.isEmpty()) { - return "{}"; - } - - QJsonObject retObj; - QString cmdType = msgObj.value(Dock::MSG_TYPE).toString(); - if (cmdType == Dock::MSG_SET_APPLET_MIN_HEIGHT) { - const int minHeight = msgObj.value(Dock::MSG_DATA).toInt(-1); - if (m_soundItem && minHeight > 0) - m_soundItem->setAppletMinHeight(minHeight); - } - - return Utils::toJson(retObj); -} diff --git a/plugins/dde-dock/sound/soundplugin.h b/plugins/dde-dock/sound/soundplugin.h deleted file mode 100644 index 5aa05a76c..000000000 --- a/plugins/dde-dock/sound/soundplugin.h +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SOUNDPLUGIN_H -#define SOUNDPLUGIN_H - -#include "pluginsiteminterface_v2.h" -#include "soundcontroller.h" -#include "soundview.h" -#include "soundquickpanel.h" - -class SoundPlugin : public QObject, public PluginsItemInterfaceV2 { - Q_OBJECT - Q_INTERFACES(PluginsItemInterfaceV2) - Q_PLUGIN_METADATA(IID ModuleInterface_iid_V2 FILE "sound.json") - -public: - explicit SoundPlugin(QObject* parent = 0); - - const QString pluginName() const override; - const QString pluginDisplayName() const override; - void init(PluginProxyInterface* proxyInter) override; - bool pluginIsAllowDisable() override { return true; } - QWidget* itemWidget(const QString& itemKey) override; - QWidget* itemTipsWidget(const QString& itemKey) override; - QWidget* itemPopupApplet(const QString& itemKey) override; - const QString itemContextMenu(const QString& itemKey) override; - void invokedMenuItem(const QString& itemKey, const QString& menuId, const bool checked) override; - int itemSortKey(const QString& itemKey) override; - void setSortKey(const QString& itemKey, const int order) override; - void refreshIcon(const QString& itemKey) override; - void pluginSettingsChanged() override; - Dock::PluginFlags flags() const override { return Dock::Type_Quick | Dock::Quick_Panel_Full; } - virtual QString message(const QString &) override; - -private: - void refreshPluginItemsVisible(); - -private: - QScopedPointer m_soundItem; - QScopedPointer m_soundWidget; -}; - -#endif // SOUNDPLUGIN_H diff --git a/plugins/dde-dock/sound/soundquickpanel.cpp b/plugins/dde-dock/sound/soundquickpanel.cpp deleted file mode 100644 index 42223d536..000000000 --- a/plugins/dde-dock/sound/soundquickpanel.cpp +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "soundquickpanel.h" -#include "slidercontainer.h" -#include "soundmodel.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DGUI_USE_NAMESPACE - -#define ICON_SIZE 18 -#define BACKSIZE 36 - -SoundQuickPanel::SoundQuickPanel(QWidget* parent) - : QWidget(parent) - , m_sliderContainer(new SliderContainer(this)) -{ - initUi(); - initConnection(); -} - -SoundQuickPanel::~SoundQuickPanel() -{ -} - -void SoundQuickPanel::initUi() -{ - m_sliderContainer->updateSliderValue(soundVolume()); - m_sliderContainer->setRange(0, SoundModel::ref().maxVolumeUI()); - m_sliderContainer->setPageStep(2); - SliderProxyStyle* proxy = new SliderProxyStyle; - m_sliderContainer->setSliderProxyStyle(proxy); - m_sliderContainer->rightIconWidget()->setStyleType(RightIconButton::StyleType::Background); - m_sliderContainer->setSliderContentsMargin(QMargins(8, 0, 10, 0)); - - QHBoxLayout* mainLayout = new QHBoxLayout(this); - mainLayout->setContentsMargins(6, 0, 2, 0); - mainLayout->addWidget(m_sliderContainer); - - refreshWidget(); -} - -void SoundQuickPanel::initConnection() -{ - connect(&SoundModel::ref(), &SoundModel::muteStateChanged, this, [this] { - refreshWidget(); - m_sliderContainer->updateSliderValue(soundVolume()); - }); - connect(&SoundModel::ref(), &SoundModel::volumeChanged, this, [this](int value) { - Q_UNUSED(value) - m_sliderContainer->updateSliderValue(soundVolume()); - refreshWidget(); - }); - connect(&SoundModel::ref(), &SoundModel::maxVolumeUIChanged, this, [=](int maxValue) { - m_sliderContainer->setRange(0, maxValue); - m_sliderContainer->updateSliderValue(soundVolume()); - refreshWidget(); - }); - - connect(m_sliderContainer, &SliderContainer::sliderValueChanged, this, [this](int value) { - SoundController::ref().SetVolume(value * 0.01, true); - }); - connect(&SoundModel::ref(), &SoundModel::activePortChanged, this, &SoundQuickPanel::refreshWidget); - connect(&SoundModel::ref(), &SoundModel::cardsInfoChanged, this, &SoundQuickPanel::refreshWidget); - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &SoundQuickPanel::refreshWidget); - connect(m_sliderContainer, &SliderContainer::iconClicked, this, [this](SliderContainer::IconPosition icon) { - switch (icon) { - case SliderContainer::IconPosition::LeftIcon: { - if (SoundController::ref().existActiveOutputDevice()) - SoundController::ref().SetMute(!SoundModel::ref().isMute()); - break; - } - case SliderContainer::IconPosition::RightIcon: { - // 弹出音量选择对话框 - Q_EMIT rightIconClick(); - break; - } - } - }); - connect(m_sliderContainer, &SliderContainer::panelClicked, this, &SoundQuickPanel::rightIconClick); - - refreshWidget(); -} - -QString SoundQuickPanel::leftIcon() -{ - const double volume = SoundModel::ref().volume(); - const double maxVolume = SoundModel::ref().maxVolumeUI(); - const bool mute = !SoundController::ref().existActiveOutputDevice() ? true : SoundModel::ref().isMute(); - - QString iconString; - QString volumeString; - if (mute) - volumeString = "muted"; - else if (int(volume) == 0) - volumeString = "off"; - else if (volume / maxVolume > 0.6) - volumeString = "high"; - else if (volume / maxVolume > 0.3) - volumeString = "medium"; - else - volumeString = "low"; - - return QString("audio-volume-%1-symbolic").arg(volumeString); -} - -QIcon SoundQuickPanel::rightIcon() -{ - auto activePort = SoundModel::ref().activePort(); - if (activePort) { - return QIcon::fromTheme(SoundCardPort::icon(activePort->portType())); - } - - return QIcon::fromTheme("sound_other"); -} - -void SoundQuickPanel::convertThemePixmap(QPixmap& pixmap) -{ - // 图片是黑色的,如果当前主题为白色主题,则无需转换 - if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::ColorType::LightType) - return; - - // 如果是黑色主题,则转换成白色图像 - QPainter painter(&pixmap); - painter.setCompositionMode(QPainter::CompositionMode_SourceIn); - painter.fillRect(pixmap.rect(), Qt::white); - painter.end(); -} - -void SoundQuickPanel::refreshWidget() -{ - const bool existValidPort = SoundController::ref().existActiveOutputDevice(); - m_sliderContainer->updateSliderValue(soundVolume()); - m_sliderContainer->setIcon(SliderContainer::IconPosition::LeftIcon, leftIcon(), 10); - m_sliderContainer->setIcon(SliderContainer::IconPosition::RightIcon, rightIcon(), 12); - m_sliderContainer->setSliderEnabled(existValidPort); - m_sliderContainer->setButtonEnabled(SliderContainer::IconPosition::LeftIcon, existValidPort); -} - -int SoundQuickPanel::soundVolume() const -{ - return SoundController::ref().existActiveOutputDevice() ? SoundModel::ref().volume() : 0; -} diff --git a/plugins/dde-dock/sound/soundquickpanel.h b/plugins/dde-dock/sound/soundquickpanel.h deleted file mode 100644 index c4de9880d..000000000 --- a/plugins/dde-dock/sound/soundquickpanel.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd. -// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SOUNDWIDGET_H -#define SOUNDWIDGET_H - -#include "soundcontroller.h" - -#include -#include - -class QDBusMessage; -class SliderContainer; -class QLabel; - -DWIDGET_USE_NAMESPACE - -class SoundQuickPanel : public QWidget -{ - Q_OBJECT - -public: - explicit SoundQuickPanel(QWidget *parent = nullptr); - ~SoundQuickPanel() override; - -Q_SIGNALS: - void rightIconClick(); - -protected: - void initUi(); - void initConnection(); - -private: - QString leftIcon(); - QIcon rightIcon(); - void convertThemePixmap(QPixmap &pixmap); - int soundVolume() const; - -private Q_SLOTS: - void refreshWidget(); - -private: - SliderContainer *m_sliderContainer; -}; - -#endif // VOLUMEWIDGET_H diff --git a/plugins/dde-dock/sound/soundview.cpp b/plugins/dde-dock/sound/soundview.cpp deleted file mode 100644 index c7a38b0ce..000000000 --- a/plugins/dde-dock/sound/soundview.cpp +++ /dev/null @@ -1,196 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "soundview.h" -#include "constants.h" -#include "tipswidget.h" -#include "imageutil.h" -#include "utils.h" -#include "soundmodel.h" - - -#include -#include - -#include -#include -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE -DGUI_USE_NAMESPACE - -// menu actions -#define MUTE "mute" -#define SETTINGS "settings" - -using namespace Dock; - -SoundView::SoundView(QWidget *parent) - : QWidget(parent) - , m_tipsLabel(new TipsWidget(this)) - , m_applet(new SoundApplet) - , m_iconWidget(new CommonIconButton(this)) -{ - m_tipsLabel->setAccessibleName("soundtips"); - m_tipsLabel->setVisible(false); - m_applet->setVisible(false); - m_iconWidget->setFixedSize(Dock::DOCK_PLUGIN_ITEM_FIXED_SIZE); - m_iconWidget->installEventFilter(this); - - connect(&SoundModel::ref(), &SoundModel::volumeChanged, this, &SoundView::refresh, Qt::QueuedConnection); - connect(&SoundModel::ref(), &SoundModel::muteStateChanged, this, &SoundView::refresh, Qt::QueuedConnection); - connect(&SoundModel::ref(), &SoundModel::cardsInfoChanged, this, &SoundView::refresh); - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [ = ] { - refreshIcon(); - }); - connect(m_applet.data(), &SoundApplet::requestHideApplet, this, &SoundView::requestHideApplet); - - refresh(); -} - -QWidget *SoundView::tipsWidget() -{ - refreshTips(true); - - return m_tipsLabel; -} - -QWidget *SoundView::popupApplet() -{ - return m_applet.get(); -} - -const QString SoundView::contextMenu() -{ - QList items; - items.reserve(2); - - QMap open; - open["itemId"] = MUTE; - if (!SoundController::ref().existActiveOutputDevice()) { - open["itemText"] = tr("Unmute"); - open["isActive"] = false; - } else { - if (SoundModel::ref().isMute()) { - open["itemText"] = tr("Unmute"); - } else { - open["itemText"] = tr("Mute"); - } - open["isActive"] = true; - } - items.push_back(open); - - if (!QFile::exists(ICBC_CONF_FILE)) { - QMap settings; - settings["itemId"] = SETTINGS; - settings["itemText"] = tr("Sound settings"); - settings["isActive"] = true; - items.push_back(settings); - } - - QMap menu; - menu["items"] = items; - menu["checkableMenu"] = false; - menu["singleCheck"] = false; - - return QJsonDocument::fromVariant(menu).toJson(); -} - -void SoundView::invokeMenuItem(const QString menuId, const bool checked) -{ - Q_UNUSED(checked); - - if (menuId == MUTE) { - SoundController::ref().SetMuteQueued(!SoundModel::ref().isMute()); - } else if (menuId == SETTINGS) { - QStringList args {"--by-user", "org.deepin.dde.control-center", "--", "-p", "sound"}; - QProcess::startDetached("dde-am", args); - Q_EMIT requestHideApplet(); - } -} - -void SoundView::resizeEvent(QResizeEvent *e) -{ - QWidget::resizeEvent(e); - - const Dock::Position position = qApp->property(PROP_POSITION).value(); - // 保持横纵比 - if (position == Dock::Bottom || position == Dock::Top) { - setMaximumWidth(height()); - setMaximumHeight(QWIDGETSIZE_MAX); - } else { - setMaximumHeight(width()); - setMaximumWidth(QWIDGETSIZE_MAX); - } - - refreshIcon(); -} - -bool SoundView::eventFilter(QObject *watched, QEvent *event) -{ - if (watched == m_iconWidget && event->type() == QEvent::Wheel) { - auto e = dynamic_cast(event); - if (e) { - qApp->postEvent(m_applet->mainSlider(), e->clone()); - e->accept(); - } - } - return QWidget::eventFilter(watched, event); -} - -void SoundView::refresh() -{ - refreshIcon(); - refreshTips(false); -} - -void SoundView::refreshIcon() -{ - const double volume = SoundModel::ref().volume(); - const double maxVolume = SoundModel::ref().maxVolumeUI(); - const bool mute = !SoundController::ref().existActiveOutputDevice() ? true : SoundModel::ref().isMute(); - - QString iconString; - QString volumeString; - if (mute) - volumeString = "muted"; - else if (int(volume) == 0) - volumeString = "off"; - else if (volume / maxVolume > 0.6) - volumeString = "high"; - else if (volume / maxVolume > 0.3) - volumeString = "medium"; - else - volumeString = "low"; - - iconString = QString("audio-volume-%1-symbolic").arg(volumeString); - m_iconWidget->setIcon(QIcon::fromTheme(iconString)); -} - -void SoundView::refreshTips(const bool force) -{ - if (!force && !m_tipsLabel->isVisible()) - return; - - if (!SoundController::ref().existActiveOutputDevice()) { - m_tipsLabel->setText(QString(tr("No output devices"))); - } else { - if (SoundModel::ref().isMute()) { - m_tipsLabel->setText(QString(tr("Mute"))); - } else { - auto volume = std::min(150, SoundModel::ref().volume()); - m_tipsLabel->setText(QString(tr("Volume %1").arg(QString::number(volume) + '%'))); - } - } -} - -void SoundView::setAppletMinHeight(int minHeight) -{ - if (m_applet) { - m_applet->setMinHeight(minHeight); - } -} diff --git a/plugins/dde-dock/sound/soundview.h b/plugins/dde-dock/sound/soundview.h deleted file mode 100644 index 487c04c96..000000000 --- a/plugins/dde-dock/sound/soundview.h +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef SOUNDITEM_H -#define SOUNDITEM_H - -#include "soundapplet.h" -#include "soundcontroller.h" -#include "commoniconbutton.h" - -#include "audio1sinkinterface.h" - -#include -#include - -#define SOUND_KEY "sound-item-key" - -using DBusSink = org::deepin::dde::audio1::Sink; - -namespace Dock { -class TipsWidget; -} -class SoundView : public QWidget -{ - Q_OBJECT - -public: - explicit SoundView(QWidget *parent = 0); - - QWidget *tipsWidget(); - QWidget *popupApplet(); - QWidget *dockIcon() const { return m_iconWidget; } - - const QString contextMenu(); - void invokeMenuItem(const QString menuId, const bool checked); - void refreshIcon(); - void refreshTips(const bool force = false); - void setAppletMinHeight(int minHeight); - -signals: - void requestContextMenu() const; - void requestHideApplet(); - -protected: - void resizeEvent(QResizeEvent *e) override; - bool eventFilter(QObject *watched, QEvent *event) override; - -private slots: - void refresh(); - -private: - Dock::TipsWidget *m_tipsLabel; - QScopedPointer m_applet; - CommonIconButton *m_iconWidget; -}; - -#endif // SOUNDITEM_H diff --git a/plugins/dde-dock/util/horizontalseparator.cpp b/plugins/dde-dock/util/horizontalseparator.cpp deleted file mode 100644 index 451a1da45..000000000 --- a/plugins/dde-dock/util/horizontalseparator.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "horizontalseparator.h" - -#include - -/** - * @brief HorizontalSeparator::HorizontalSeparator 分割线控件,高度值初始化为2个像素 - * @param parent - */ -HorizontalSeparator::HorizontalSeparator(QWidget *parent) - : QWidget(parent) -{ - setFixedHeight(2); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); -} - -QSize HorizontalSeparator::sizeHint() const -{ - return QSize(QWidget::sizeHint().width(), 2); -} - -void HorizontalSeparator::paintEvent(QPaintEvent *e) -{ - Q_UNUSED(e) - - QPainter painter(this); - QColor c = palette().color(QPalette::BrightText); - c.setAlpha(int(0.1 * 255)); - - painter.fillRect(rect(), c); -} diff --git a/plugins/dde-dock/util/horizontalseparator.h b/plugins/dde-dock/util/horizontalseparator.h deleted file mode 100644 index c0089aedd..000000000 --- a/plugins/dde-dock/util/horizontalseparator.h +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef HORIZONTALSEPARATOR_H -#define HORIZONTALSEPARATOR_H - -#include - -class HorizontalSeparator : public QWidget -{ - Q_OBJECT - -public: - explicit HorizontalSeparator(QWidget *parent = nullptr); - - QSize sizeHint() const override; - -protected: - void paintEvent(QPaintEvent *e) override; -}; - -#endif // HORIZONTALSEPARATOR_H diff --git a/plugins/dde-dock/util/statebutton.cpp b/plugins/dde-dock/util/statebutton.cpp deleted file mode 100644 index 6d7579863..000000000 --- a/plugins/dde-dock/util/statebutton.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "statebutton.h" - -#include -#include -#include - -StateButton::StateButton(QWidget *parent) - : QWidget(parent) - , m_type(Check) - , m_switchFork(true) -{ - setAttribute(Qt::WA_TranslucentBackground, true); -} - -void StateButton::setType(StateButton::Type type) -{ - m_type = type; - update(); -} - -void StateButton::setSwitchFork(bool switchFork) -{ - m_switchFork = switchFork; -} - -void StateButton::paintEvent(QPaintEvent *event) -{ - QWidget::paintEvent(event); - QPainter painter(this); - painter.setRenderHint(QPainter::Antialiasing, true); - - int radius = qMin(width(), height()); - painter.setPen(QPen(Qt::NoPen)); - painter.setBrush(palette().color(QPalette::Highlight)); - painter.drawPie(rect(), 0, 360 * 16); - - QPen pen(Qt::white, radius / 100.0 * 6.20, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin); - switch (m_type) { - case Check: drawCheck(painter, pen, radius); break; - case Fork: drawFork(painter, pen, radius); break; - } -} - -void StateButton::mousePressEvent(QMouseEvent *event) -{ - QWidget::mousePressEvent(event); - if (m_switchFork) - emit click(); -} - -void StateButton::enterEvent(QEnterEvent *event) -{ - QWidget::enterEvent(event); - if (m_switchFork) - setType(Fork); -} - -void StateButton::leaveEvent(QEvent *event) -{ - QWidget::leaveEvent(event); - if (m_switchFork) - setType(Check); -} - -void StateButton::drawCheck(QPainter &painter, QPen &pen, int radius) -{ - painter.setPen(pen); - - QPointF points[3] = { - QPointF(radius / 100.0 * 32, radius / 100.0 * 57), - QPointF(radius / 100.0 * 45, radius / 100.0 * 70), - QPointF(radius / 100.0 * 75, radius / 100.0 * 35) - }; - - painter.drawPolyline(points, 3); -} - -void StateButton::drawFork(QPainter &painter, QPen &pen, int radius) -{ - pen.setCapStyle(Qt::RoundCap); - painter.setPen(pen); - - QPointF pointsl[2] = { - QPointF(radius / 100.0 * 35, radius / 100.0 * 35), - QPointF(radius / 100.0 * 65, radius / 100.0 * 65) - }; - - painter.drawPolyline(pointsl, 2); - - QPointF pointsr[2] = { - QPointF(radius / 100.0 * 65, radius / 100.0 * 35), - QPointF(radius / 100.0 * 35, radius / 100.0 * 65) - }; - - painter.drawPolyline(pointsr, 2); -} diff --git a/plugins/dde-dock/util/statebutton.h b/plugins/dde-dock/util/statebutton.h deleted file mode 100644 index d761a8700..000000000 --- a/plugins/dde-dock/util/statebutton.h +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef STATEBUTTON_H -#define STATEBUTTON_H - -#include - -class StateButton : public QWidget -{ - Q_OBJECT - -public: - enum Type { - Check, - Fork - }; - -public: - explicit StateButton(QWidget *parent = nullptr); - void setType(Type type); - void setSwitchFork(bool switchFork); - -signals: - void click(); - -protected: - void paintEvent(QPaintEvent *event) override; - void mousePressEvent(QMouseEvent *event) override; - void enterEvent(QEnterEvent *event) override; - void leaveEvent(QEvent *event) override; - -private: - void drawCheck(QPainter &painter, QPen &pen, int radius); - void drawFork(QPainter &painter, QPen &pen, int radius); - -private: - Type m_type; - bool m_switchFork; -}; - -#endif // STATEBUTTON_H diff --git a/plugins/dde-network-display-ui/CMakeLists.txt b/plugins/dde-network-display-ui/CMakeLists.txt deleted file mode 100644 index 41fdb6bb9..000000000 --- a/plugins/dde-network-display-ui/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. -# -# SPDX-License-Identifier: CC0-1.0 - -add_subdirectory(plugins) diff --git a/plugins/dde-network-display-ui/plugins/CMakeLists.txt b/plugins/dde-network-display-ui/plugins/CMakeLists.txt deleted file mode 100644 index b0b063ec1..000000000 --- a/plugins/dde-network-display-ui/plugins/CMakeLists.txt +++ /dev/null @@ -1,84 +0,0 @@ -# SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. -# -# SPDX-License-Identifier: CC0-1.0 - -set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Installation prefix") - -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") - -# Find the library -find_package(PkgConfig REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} ${REQUIRED_QT_VERSION} COMPONENTS Core Widgets DBus Svg LinguistTools REQUIRED) -find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED COMPONENTS Widget Core Tools) - -set(COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/common") -file(GLOB COMMON_FILE "${COMMON_DIR}/*.cpp") - -#--------------------------dock-plugin--------------------------- -set(Dock_Plugin_Name dock-wirelesscasting-plugin) - -set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dock-wirelesscasting-plugin/src") -set(TYPES_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dock-wirelesscasting-plugin/dbus/types") - -# default off -option(ENABLE_WIRELESS_CASTING "Enable wireless casting" OFF) -if(ENABLE_WIRELESS_CASTING) - add_compile_definitions(WIRELESS_CASTING_ENABLED) -endif() - -# 使用 file() 命令和 GLOB 参数获取目录下的所有文件 -file(GLOB DOCK_PLUGIN_SOURCE_FILES - "${SOURCE_DIR}/*.cpp" - "${SOURCE_DIR}/*.h" - "${SOURCE_DIR}/widget/*.h" - "${SOURCE_DIR}/widget/*.cpp" - "${SOURCE_DIR}/../dbus/*.cpp" - "${TYPES_SOURCE_DIR}/*.h" - "${TYPES_SOURCE_DIR}/*.cpp" -) - -dtk_add_dbus_interface( - DBUS_INTERFACES - ${CMAKE_CURRENT_SOURCE_DIR}/dock-wirelesscasting-plugin/dbus/xml/org.deepin.dde.Display1.xml - display1interface -) - -# 将获取到的源文件添加到目标可执行文件中 -add_library(${Dock_Plugin_Name} SHARED - ${DBUS_INTERFACES} - ${DOCK_PLUGIN_SOURCE_FILES} - ${COMMON_FILE} - dock-wirelesscasting-plugin/res/resources.qrc - dock-wirelesscasting-plugin/translations/translations.qrc -) - -set_target_properties(${Dock_Plugin_Name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../../dde-dock) - -target_include_directories(${Dock_Plugin_Name} PUBLIC - ./dock-wirelesscasting-plugin/dbus - ${DtkWidget_INCLUDE_DIRS} - ${DtkCore_INCLUDE_DIRS} - ${OBJECT_BINARY_DIR} - ${COMMON_DIR} - "../../../interfaces" - ) -target_link_libraries(dock-wirelesscasting-plugin - Dtk${DTK_VERSION_MAJOR}::Widget - Dtk${DTK_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Widgets - dockpluginmanager-interface -) - -# 设置执行 make install 时哪个目标应该被 install 到哪个位置 -install(TARGETS ${Dock_Plugin_Name} LIBRARY DESTINATION lib/dde-dock/plugins) -# 翻译文件 -file(GLOB TS_FILES_DOCK "dock-wirelesscasting-plugin/translations/*.ts") -qt_add_translation(QM_FILES_DOCK ${TS_FILES_DOCK}) -add_custom_target(dock_translations ALL DEPENDS ${QM_FILES_DOCK}) -install(FILES ${QM_FILES_DOCK} DESTINATION share/dock-wirelesscasting-plugin/translations) -# 安装显示在控制中心-个性化-任务栏-插件区域的图标 -install(FILES "dock-wirelesscasting-plugin/res/dcc-wireless-casting.dci" DESTINATION share/dde-dock/icons/dcc-setting) diff --git a/plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.cpp b/plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.cpp deleted file mode 100644 index bee76335e..000000000 --- a/plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.cpp +++ /dev/null @@ -1,437 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "wirelesscastingmodel.h" - -#include - -#include -#include -#include -#include -#include - -const QString dbusService = "com.deepin.Cooperation.NetworkDisplay"; -const QString dbusPath = "/com/deepin/Cooperation/NetworkDisplay"; -const QString dbusInterface = "com.deepin.Cooperation.NetworkDisplay"; -const QString sinkInterface = "com.deepin.Cooperation.NetworkDisplay.Sink"; - -DCORE_USE_NAMESPACE - -WirelessCastingModel::WirelessCastingModel(QObject *parent) - : QObject(parent) - , m_dbus(new DDBusInterface(dbusService, dbusPath, dbusInterface, QDBusConnection::sessionBus(), this)) - , m_dbusNM(nullptr) - , m_state(NoMonitor) - , m_curConnected(nullptr) - , m_wirelessDevCheck(false) - , m_wirelessEnabled(false) - , m_needRefresh(false) - , m_connecting(false) - , m_hasMultiscreens(false) -{ -#ifdef WIRELESS_CASTING_ENABLED - checkServiceAvailable(); - connect(this, &WirelessCastingModel::serviceAvailableChanged, this, [this](bool available) { - if (!available) - return; - - prepareDbus(); - initData(); - startTimer(std::chrono::seconds (30)); - }); -#endif -} - -WirelessCastingModel::~WirelessCastingModel() -{ - m_dbus->deleteLater(); -} - -void WirelessCastingModel::refresh() -{ - if (!m_needRefresh || !m_serviceAvailable) { - return; - } - QDBusMessage const reply = m_dbus->call("Refresh"); - if (reply.type() == QDBusMessage::ReplyMessage) { - qInfo() << reply.arguments().value(0); - } else { - qWarning() << "Method call failed. Error:" << reply.errorMessage(); - } -} - -void WirelessCastingModel::disconnectMonitor() -{ - if (nullptr != m_curConnected) - m_curConnected->disconnectMonitor(); -} - -const QString WirelessCastingModel::curMonitorName() -{ - if (nullptr != m_curConnected) - return m_curConnected->name(); - else - return QString(); -} - -void WirelessCastingModel::initData() -{ - QVariant var = m_dbus->property("SinkList"); - if (!var.isValid()) - return; - updateSinkList(var); - var = m_dbus->property("MissingCapabilities"); - if (!var.isValid()) - return; - updateWarningInfo(var); - connect(this, &WirelessCastingModel::SinkListChanged, this, [this](const QList &sinkList) { - if (m_needRefresh) - updateSinkList(QVariant::fromValue(sinkList)); - }); - connect(this, &WirelessCastingModel::MissingCapabilitiesChanged, this, [this](const QStringList &missingList) { - updateWarningInfo(missingList); - }); -} - -void WirelessCastingModel::updateSinkList(const QVariant &sinkList) -{ - QList const list = qdbus_cast>(sinkList); - - QStringList tmpList; - - bool hasConnected = false; - - foreach (const QDBusObjectPath &var, list) { - QString const path = var.path(); - tmpList.append(path); - if (!m_monitors.contains(path)) { - Monitor *mon = new Monitor(path); - m_monitors.insert(path, mon); - connect(mon, &Monitor::stateChanged, this, &WirelessCastingModel::handleMonitorStateChanged); - connect(mon, &Monitor::stateChangeFinished, this, &WirelessCastingModel::stateChangeFinished); - Q_EMIT addMonitor(path, mon); - } - } - - auto it = m_monitors.begin(); - while (it != m_monitors.end()) { - if (tmpList.contains(it.key())) { - if (it.value()->state() == Monitor::ND_SINK_STATE_STREAMING) { - m_curConnected = it.value(); - hasConnected = true; - } - ++it; - continue; - } - disconnect(it.value(), &Monitor::stateChanged, this, &WirelessCastingModel::handleMonitorStateChanged); - disconnect(it.value(), &Monitor::stateChangeFinished, this, &WirelessCastingModel::stateChangeFinished); - Q_EMIT removeMonitor(it.key()); - it.value()->deleteLater(); - it = m_monitors.erase(it); - } - - if (!hasConnected) - m_curConnected = nullptr; - checkState(); -} - -void WirelessCastingModel::updateWarningInfo(const QVariant &var) -{ - Q_UNUSED(var) - checkState(); -} - -void WirelessCastingModel::setState(CastingState state) -{ - if (m_state != state) { - m_state = state; - Q_EMIT stateChanged(m_state); - } -} - -void WirelessCastingModel::checkState() -{ - // 判断无线设备是否存在 - if (!m_wirelessDevCheck || !m_serviceAvailable) { - setState(NoWirelessDevice); - return; - } - - // 判断无线设备是否缺失必要能力 - auto var = m_dbus->property("MissingCapabilities"); - if (!var.isValid()) - return; - if (!var.toStringList().isEmpty()) { - if (var.toStringList().contains("NotSupportP2P", Qt::CaseInsensitive)) { - setState(NotSupportP2P); - } else { - // 判断无线设备是否启用 - if (!m_wirelessEnabled) { - setState(DisabledWirelessDevice); - } else { - setState(WarningInfo); - } - } - return; - } else { - if (!m_wirelessEnabled) { - setState(DisabledWirelessDevice); - return; - } - } - - // 正常显示:已连接、设备列表或无设备 - if (nullptr == m_curConnected) { - if (m_monitors.empty()) { - if (NoMonitor != m_state) { - setState(NoMonitor); - } - } else { - if (List != m_state) { - setState(List); - } - } - } else { - setState(Connected); - } -} - -void WirelessCastingModel::prepareDbus() -{ - auto checkWirelessDev = [this]() { - m_wirelessDevCheck = false; - m_wirelessEnabled = false; - // 获取设备列表 - QList const devices = qdbus_cast>(m_dbusNM->property("AllDevices")); - - // 先检查是否有无线设备,有无线设备的情况再检查无线设备是否启用 - // 遍历设备列表并检查是否有无线网卡设备 - foreach (const QDBusObjectPath &devicePath, devices) { - DDBusInterface deviceInterface("org.freedesktop.NetworkManager", devicePath.path(), "org.freedesktop.NetworkManager.Device", QDBusConnection::systemBus()); - - // 获取设备类型 - auto reply = deviceInterface.property("DeviceType"); - if (reply.isValid() && reply.toUInt() == 2) { - m_wirelessDevCheck = true; - break; - } - } - // 检查设备是否启用 - if (m_wirelessDevCheck) { - DDBusInterface deviceInterface("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager", QDBusConnection::systemBus()); - auto reply = deviceInterface.property("WirelessEnabled"); - if (reply.isValid() && reply.toBool()) { - m_wirelessEnabled = true; - } - } - checkState(); - }; - - // 创建 NetworkManager D-Bus 接口 - m_dbusNM = new DDBusInterface("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager", QDBusConnection::systemBus(), this); - - QDBusConnection::sessionBus().connect("org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "NameOwnerChanged", this, SLOT(onDBusNameOwnerChanged(QString, QString, QString))); - - checkWirelessDev(); - // 设置监听事件 - connect(this, &WirelessCastingModel::DeviceEnabled, this, [=](const QString &, bool) { - checkWirelessDev(); - }); - connect(this, &WirelessCastingModel::AllDevicesChanged, this, [=](const QList &devList) { - Q_UNUSED(devList) - checkWirelessDev(); - }); - connect(this, &WirelessCastingModel::WirelessEnabledChanged, this, [=](bool) { - checkWirelessDev(); - }); -} - -void WirelessCastingModel::onDBusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner) -{ - Q_UNUSED(oldOwner) - if ("com.deepin.Cooperation.NetworkDisplay" == name && !newOwner.isEmpty()) { - resetNetworkDisplayData(); - checkState(); - } - // 不做重启后端进程的操作,如果需要处理该异常,在此处对前端进行处理 -} - -void WirelessCastingModel::resetNetworkDisplayData() -{ - if (m_dbus) { - delete m_dbus; - m_dbus = nullptr; - } - auto it = m_monitors.begin(); - while (it != m_monitors.end()) { - disconnect(it.value(), &Monitor::stateChanged, this, &WirelessCastingModel::handleMonitorStateChanged); - disconnect(it.value(), &Monitor::stateChangeFinished, this, &WirelessCastingModel::stateChangeFinished); - Q_EMIT removeMonitor(it.key()); - it.value()->deleteLater(); - it = m_monitors.erase(it); - } - m_dbus = new DDBusInterface(dbusService, dbusPath, dbusInterface, QDBusConnection::sessionBus(), this); - if (!m_serviceAvailable) { - checkServiceAvailable(); - } else { - initData(); - } -} - -void WirelessCastingModel::handleMonitorStateChanged(const Monitor::NdSinkState state) -{ - setConnectState(false); - switch (state) { - case Monitor::ND_SINK_STATE_DISCONNECTED: - case Monitor::ND_SINK_STATE_ERROR: - if (sender() == m_curConnected) - m_curConnected = nullptr; - break; - case Monitor::ND_SINK_STATE_WAIT_P2P: - case Monitor::ND_SINK_STATE_WAIT_SOCKET: - case Monitor::ND_SINK_STATE_WAIT_STREAMING: - setConnectState(true); - break; - case Monitor::ND_SINK_STATE_STREAMING: - if (sender() != m_curConnected) - m_curConnected = qobject_cast(sender()); - break; - default: - break; - } - checkState(); -} - -void WirelessCastingModel::timerEvent(QTimerEvent *event) -{ - Q_UNUSED(event) - refresh(); -} - -void WirelessCastingModel::enableRefresh(bool enable) -{ - if (!m_serviceAvailable) - return; - - m_needRefresh = enable; - refresh(); - if (enable) { - QVariant var = m_dbus->property("SinkList"); - if (!var.isValid()) - return; - updateSinkList(var); - } -} - -void WirelessCastingModel::setConnectState(bool connecting) -{ - if (m_connecting != connecting) { - m_connecting = connecting; - Q_EMIT connectStateChanged(m_connecting); - } -} - -void WirelessCastingModel::checkServiceAvailable() -{ - QDBusMessage message = QDBusMessage::createMethodCall(dbusService, dbusPath, dbusInterface, "Refresh"); - - // 3s timeout - QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message, 3000); - auto *watcher = new QDBusPendingCallWatcher(pendingCall); - connect(watcher, &QDBusPendingCallWatcher::finished, [watcher, this](const QDBusPendingCallWatcher *call) { - bool available = true; - if (call->isError()) { - available = false; - qWarning() << "DBus call timeout or has error. Service may not be available:" << dbusService << " error:" << call->error().message(); - } - - if (m_serviceAvailable != available) { - m_serviceAvailable = available; - Q_EMIT serviceAvailableChanged(m_serviceAvailable); - } - - watcher->deleteLater(); - }); -} - -void WirelessCastingModel::setMultiscreensFlag(bool hasMultiscreens) -{ - if (m_hasMultiscreens != hasMultiscreens) { - m_hasMultiscreens = hasMultiscreens; - Q_EMIT multiscreensFlagChanged(m_hasMultiscreens); - } -} - -Monitor::Monitor(const QString &monitorPath, QObject *parent) - : QObject(parent) - , m_dbus(nullptr) - , m_state(ND_SINK_STATE_DISCONNECTED) - , m_strength(0) -{ - m_dbus = new DDBusInterface(dbusService, monitorPath, sinkInterface, QDBusConnection::sessionBus(), this); - - initData(); -} - -Monitor::~Monitor() -{ - disconnect(); - m_dbus->deleteLater(); -} - -void Monitor::connMonitor() -{ - QDBusMessage reply = m_dbus->call("Connect"); - if (reply.type() == QDBusMessage::ReplyMessage) { - qInfo() << reply.arguments().value(0); - } else { - qWarning() << "Method call failed. Error:" << reply.errorMessage(); - } -} - -void Monitor::disconnectMonitor() -{ - QDBusMessage reply = m_dbus->call("Cancel"); - if (reply.type() == QDBusMessage::ReplyMessage) { - qInfo() << reply.arguments().value(0); - } else { - qWarning() << "Method call failed. Error:" << reply.errorMessage(); - } -} - -void Monitor::initData() -{ - QVariant var = m_dbus->property("Name"); - if (var.isValid()) - m_name = var.toString(); - - var = m_dbus->property("HwAddress"); - if (var.isValid()) - m_hwAddress = var.toString(); - - var = m_dbus->property("Status"); - if (var.isValid()) - m_state = static_cast(var.toUInt()); - - var = m_dbus->property("Strength"); - if (var.isValid()) - m_strength = var.toUInt(); - - connect(this, &Monitor::StatusChanged, this, [this](int status) { - qInfo() << "Monitor" << m_name << "status changed to " << status; - checkState(status); - }); -} - -void Monitor::checkState(const QVariant &var) -{ - if (!var.isValid()) - return; - auto const state = static_cast(var.toUInt()); - if (state != m_state) { - m_state = state; - Q_EMIT stateChanged(m_state); - } -} diff --git a/plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.h b/plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.h deleted file mode 100644 index 507a50ce3..000000000 --- a/plugins/dde-network-display-ui/plugins/common/wirelesscastingmodel.h +++ /dev/null @@ -1,137 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef WIRELESSCASTINGMODEL_H -#define WIRELESSCASTINGMODEL_H - -#include -#include -#include - -class QDBusVariant; -namespace Dtk { -namespace Core { -class DDBusInterface; -} -} - -class Monitor : public QObject -{ - Q_OBJECT -public: - typedef enum { - ND_SINK_STATE_DISCONNECTED = 0x0, - ND_SINK_STATE_ENSURE_FIREWALL = 0x50, - ND_SINK_STATE_WAIT_P2P = 0x100, - ND_SINK_STATE_WAIT_SOCKET = 0x110, - ND_SINK_STATE_WAIT_STREAMING = 0x120, - ND_SINK_STATE_STREAMING = 0x1000, - ND_SINK_STATE_ERROR = 0x10000, - } NdSinkState; - - explicit Monitor(const QString& monitorPath, QObject *parent = nullptr); - ~Monitor() Q_DECL_OVERRIDE; - - void connMonitor(); - void disconnectMonitor(); - QString name() { return m_name; } - QString hwAddress() { return m_name; } - NdSinkState state() { return m_state; } - -signals: - void stateChanged(const NdSinkState state); - void StatusChanged(int status); - void NameChanged(const QString &name); - void stateChangeFinished(int state); - -private: - void initData(); - void checkState(const QVariant &var); - - Dtk::Core::DDBusInterface *m_dbus; - QString m_hwAddress; - QString m_name; - NdSinkState m_state; - quint32 m_strength; -}; - -class WirelessCastingModel : public QObject -{ - Q_OBJECT -public: - enum CastingState{ - List, - Connected, - NoMonitor, - NotSupportP2P, - WarningInfo, - DisabledWirelessDevice, - NoWirelessDevice, - Count - }; - - explicit WirelessCastingModel(QObject *parent = nullptr); - ~WirelessCastingModel() Q_DECL_OVERRIDE; - - QMap monitors() { return m_monitors; } - CastingState state() { return m_state; } - void refresh(); - void disconnectMonitor(); - const QString curMonitorName(); - void enableRefresh(bool enable); - bool connectState() const { return m_connecting; } - bool multiscreensFlag() { return m_hasMultiscreens; } - void setMultiscreensFlag(bool hasMultiscreens); - -public slots: - void handleMonitorStateChanged(const Monitor::NdSinkState state); - void onDBusNameOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner); - -signals: - void addMonitor(const QString &path, Monitor *monitor); - void removeMonitor(const QString &path); - void stateChanged(CastingState state); - void wirelessDevChanged(bool wirelessDevCheck); - - void SinkListChanged(const QList &sinkList); - void MissingCapabilitiesChanged(const QStringList &missingList); - - void AllDevicesChanged(const QList &devList); - void WirelessEnabledChanged(bool enabled); - void DeviceEnabled(const QString &, bool); - - void connectStateChanged(bool connecting); - - void multiscreensFlagChanged(const bool flag); - void stateChangeFinished(int state); - - void serviceAvailableChanged(bool available); - -protected: - void timerEvent(QTimerEvent *event) override; -private: - void initData(); - void updateSinkList(const QVariant &sinkList); - void updateWarningInfo(const QVariant &var); - void checkState(); - void prepareDbus(); - void resetNetworkDisplayData(); - void setConnectState(bool connecting); - void checkServiceAvailable(); - - Dtk::Core::DDBusInterface *m_dbus; - Dtk::Core::DDBusInterface *m_dbusNM; - QMap m_monitors; - CastingState m_state; - Monitor *m_curConnected; - bool m_wirelessDevCheck; - bool m_wirelessEnabled; - void setState(CastingState state); - bool m_needRefresh; - bool m_connecting; - bool m_hasMultiscreens; - bool m_serviceAvailable = false; -}; -Q_DECLARE_METATYPE(WirelessCastingModel::CastingState) -#endif // WIRELESSCASTINGMODEL_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.cpp deleted file mode 100644 index 8944147de..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "brightnessmap.h" - -void registerBrightnessMapMetaType() -{ - qRegisterMetaType("BrightnessMap"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.h deleted file mode 100644 index 356592081..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/brightnessmap.h +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef BRIGHTNESSMAP_H -#define BRIGHTNESSMAP_H - -#include -#include - -typedef QMap BrightnessMap; - -void registerBrightnessMapMetaType(); - -#endif // BRIGHTNESSMAP_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.cpp deleted file mode 100644 index 13e224fae..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "resolution.h" - -#include - -void registerResolutionMetaType() -{ - qRegisterMetaType("Resolution"); - qDBusRegisterMetaType(); -} - -Resolution::Resolution() -{ - -} - -bool Resolution::operator!=(const Resolution &other) const -{ - return m_width != other.m_width || m_height != other.m_height || m_rate != other.m_rate; -} - -bool Resolution::operator==(const Resolution &other) const -{ - return !(other != *this); -} - -QDBusArgument &operator<<(QDBusArgument &arg, const Resolution &value) -{ - arg.beginStructure(); - arg << quint32(value.id()) << quint16(value.width()) << quint16(value.height()) << value.rate(); - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, Resolution &value) -{ - quint32 id; - quint16 w, h; - double rate; - - arg.beginStructure(); - arg >> id >> w >> h >> rate; - arg.endStructure(); - - value.setId(id); - value.setWidth(w); - value.setHeight(h); - value.setRate(rate); - - return arg; -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.h deleted file mode 100644 index 80d30cb8c..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolution.h +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef RESOLUTION_H -#define RESOLUTION_H - -#include - -class Resolution -{ -public: - friend QDBusArgument &operator<<(QDBusArgument &arg, const Resolution &value); - friend const QDBusArgument &operator>>(const QDBusArgument &arg, Resolution &value); - - explicit Resolution(); - - bool operator!=(const Resolution &other) const; - bool operator==(const Resolution &other) const; - - int id() const { return m_id; } - int width() const { return m_width; } - int height() const { return m_height; } - double rate() const { return m_rate; } - -private: - void setId(const int id) { m_id = id; } - void setWidth(const int w) { m_width = w; } - void setHeight(const int h) { m_height = h; } - void setRate(const double rate) { m_rate = rate; } - -private: - int m_id; - int m_width; - int m_height; - double m_rate; -}; - - -Q_DECLARE_METATYPE(Resolution) - -void registerResolutionMetaType(); - -#endif // RESOLUTION_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.cpp deleted file mode 100644 index 3c6aa6e6d..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "resolutionlist.h" - -void registerResolutionListMetaType() -{ - registerResolutionMetaType(); - - qRegisterMetaType("ResolutionList"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.h deleted file mode 100644 index 9e1461a6b..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/resolutionlist.h +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef RESOLUTIONLIST_H -#define RESOLUTIONLIST_H - -#include "resolution.h" - -#include - -typedef QList ResolutionList; - -void registerResolutionListMetaType(); - -#endif // RESOLUTIONLIST_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.cpp deleted file mode 100644 index 279ebd36d..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "screenrect.h" - -ScreenRect::ScreenRect() - : x(0), - y(0), - w(0), - h(0) -{ - -} - -QDebug operator<<(QDebug debug, const ScreenRect &rect) -{ - debug << QString("ScreenRect(%1, %2, %3, %4)").arg(rect.x) - .arg(rect.y) - .arg(rect.w) - .arg(rect.h); - - return debug; -} - -ScreenRect::operator QRect() const -{ - return QRect(x, y, w, h); -} - -QDBusArgument &operator<<(QDBusArgument &arg, const ScreenRect &rect) -{ - arg.beginStructure(); - arg << rect.x << rect.y << rect.w << rect.h; - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, ScreenRect &rect) -{ - arg.beginStructure(); - arg >> rect.x >> rect.y >> rect.w >> rect.h; - arg.endStructure(); - - return arg; -} - -void registerScreenRectMetaType() -{ - qRegisterMetaType("ScreenRect"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.h deleted file mode 100644 index 916ad17ac..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/screenrect.h +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef SCREENRECT_H -#define SCREENRECT_H - -#include -#include -#include -#include - -struct ScreenRect -{ -public: - ScreenRect(); - operator QRect() const; - - friend QDebug operator<<(QDebug debug, const ScreenRect &rect); - friend const QDBusArgument &operator>>(const QDBusArgument &arg, ScreenRect &rect); - friend QDBusArgument &operator<<(QDBusArgument &arg, const ScreenRect &rect); - - bool operator !=(const ScreenRect &rect) const { return x != rect.x || y != rect.y || w != rect.w || h != rect.h; } - -private: - qint16 x; - qint16 y; - quint16 w; - quint16 h; -}; - -Q_DECLARE_METATYPE(ScreenRect) - -void registerScreenRectMetaType(); - -#endif // SCREENRECT_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.cpp deleted file mode 100644 index f551e9d8d..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "touchscreeninfolist.h" - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo &info) -{ - arg.beginStructure(); - arg << info.id << info.name << info.deviceNode << info.serialNumber; - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo &info) -{ - arg.beginStructure(); - arg >> info.id >> info.name >> info.deviceNode >> info.serialNumber; - arg.endStructure(); - - return arg; -} - -bool TouchscreenInfo::operator==(const TouchscreenInfo &info) const -{ - return id == info.id && name == info.name && deviceNode == info.deviceNode && serialNumber == info.serialNumber; -} - -bool TouchscreenInfo::operator!=(const TouchscreenInfo &info) const -{ - return !(*this == info); -} - -void registerTouchscreenInfoMetaType() -{ - qRegisterMetaType("TouchscreenInfo"); - qDBusRegisterMetaType(); -} - -void registerTouchscreenInfoListMetaType() -{ - registerTouchscreenInfoMetaType(); - - qRegisterMetaType("TouchscreenInfoList"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.h deleted file mode 100644 index 62419c684..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist.h +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TOUCHSCREENINFOLIST_H -#define TOUCHSCREENINFOLIST_H - -#include -#include -#include - -struct TouchscreenInfo { - qint32 id; - QString name; - QString deviceNode; - QString serialNumber; - - bool operator ==(const TouchscreenInfo& info) const; - bool operator !=(const TouchscreenInfo& info) const; -}; - -typedef QList TouchscreenInfoList; - -// 自定义 QList 的 != 操作符 -inline bool operator!=(const TouchscreenInfoList& list1, const TouchscreenInfoList& list2) { - if (list1.size() != list2.size()) - return true; - - for (int i = 0; i < list1.size(); ++i) { - if (list1[i] != list2[i]) { - return true; - } - } - return false; -} - -Q_DECLARE_METATYPE(TouchscreenInfo) -Q_DECLARE_METATYPE(TouchscreenInfoList) - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo &info); -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo &info); - -void registerTouchscreenInfoListMetaType(); - -#endif // !TOUCHSCREENINFOLIST_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.cpp deleted file mode 100644 index c67556834..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "touchscreeninfolist_v2.h" - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo_V2 &info) -{ - arg.beginStructure(); - arg << info.id << info.name << info.deviceNode << info.serialNumber << info.UUID; - arg.endStructure(); - - return arg; -} - -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo_V2 &info) -{ - arg.beginStructure(); - arg >> info.id >> info.name >> info.deviceNode >> info.serialNumber >> info.UUID; - arg.endStructure(); - - return arg; -} - -bool TouchscreenInfo_V2::operator==(const TouchscreenInfo_V2 &info) const -{ - return id == info.id && name == info.name && deviceNode == info.deviceNode && serialNumber == info.serialNumber && UUID == info.UUID; -} - -bool TouchscreenInfo_V2::operator!=(const TouchscreenInfo_V2 &info) const -{ - return !(*this == info); -} - -void registerTouchscreenInfoV2MetaType() -{ - qRegisterMetaType("TouchscreenInfo_V2"); - qDBusRegisterMetaType(); -} - -void registerTouchscreenInfoList_V2MetaType() -{ - registerTouchscreenInfoV2MetaType(); - - qRegisterMetaType("TouchscreenInfoList_V2"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.h deleted file mode 100644 index ff5b7f671..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreeninfolist_v2.h +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TOUCHSCREENINFOLISTV2_H -#define TOUCHSCREENINFOLISTV2_H - -#include -#include -#include - -struct TouchscreenInfo_V2 { - qint32 id; - QString name; - QString deviceNode; - QString serialNumber; - QString UUID; - - bool operator ==(const TouchscreenInfo_V2& info) const; - bool operator !=(const TouchscreenInfo_V2& info) const; -}; - -typedef QList TouchscreenInfoList_V2; - -inline bool operator!=(const TouchscreenInfoList_V2 &list1, const TouchscreenInfoList_V2 &list2) { - if (list1.size() != list2.size()) - return true; - - for (int i = 0; i < list1.size(); ++i) { - if (list1[i] != list2[i]) { - return true; - } - } - return false; -} - -Q_DECLARE_METATYPE(TouchscreenInfo_V2) -Q_DECLARE_METATYPE(TouchscreenInfoList_V2) - -QDBusArgument &operator<<(QDBusArgument &arg, const TouchscreenInfo_V2 &info); -const QDBusArgument &operator>>(const QDBusArgument &arg, TouchscreenInfo_V2 &info); - -void registerTouchscreenInfoList_V2MetaType(); - -#endif // !TOUCHSCREENINFOLISTV2_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.cpp deleted file mode 100644 index 2bb7e6218..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "touchscreenmap.h" - -void registerTouchscreenMapMetaType() -{ - qRegisterMetaType("TouchscreenMap"); - qDBusRegisterMetaType(); -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.h deleted file mode 100644 index e55db6c0a..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/types/touchscreenmap.h +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TOUCHSCREENMAP_H -#define TOUCHSCREENMAP_H - -#include -#include - -typedef QMap TouchscreenMap; - -void registerTouchscreenMapMetaType(); - -#endif // TOUCHSCREENMAP_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/xml/org.deepin.dde.Display1.xml b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/xml/org.deepin.dde.Display1.xml deleted file mode 100644 index c6e6235b8..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/dbus/xml/org.deepin.dde.Display1.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/none_128px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/none_128px.svg deleted file mode 100644 index 89ee72655..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/none_128px.svg +++ /dev/null @@ -1,230 +0,0 @@ - - - none-dark - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/success_128px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/success_128px.svg deleted file mode 100644 index 0fa046162..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dark/icons/success_128px.svg +++ /dev/null @@ -1,183 +0,0 @@ - - - success-dark - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dcc-wireless-casting.dci b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/dcc-wireless-casting.dci deleted file mode 100644 index 19b7785abe35f26d5b57f6285a0cc6525f5c4847..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1428 zcmZ>9_GDmWVqjo0G-IFycmvG<0j9kCqTIwBy_CeFY={VHL$+yd$b|3BORZ@KAKeKxU(z4!^EUZ0{t zmx|}bNlm2=LSYAv`uz?!E&0>?;y+8v`I{WS1Y3Etg-%RiowC6Fr_`z4CQXH*d53K* zH|g@JO7QOyXVlQUy>?=F!hi0Adv@f`j!{0n>dtf)CLEJo<7kr1(IYoWmQX24 z>Ojq*G)X>z#xE#I-T|^DT#Vxze7OK)gHS&>FOH%|+2{qAx67Ik$(qRb{>j+p$Pr$OB< z(%jOI)8dM+y~=|1vwddUu6oVJwte2st^4vGm@u}ye_#6ALWkk=e9y0y)lAPE-z_jJ gJ^IDIzxa2< - - none-light - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/light/icons/success_128px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/light/icons/success_128px.svg deleted file mode 100644 index 02d8b3336..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/light/icons/success_128px.svg +++ /dev/null @@ -1,192 +0,0 @@ - - - success-light - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/resources.qrc b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/resources.qrc deleted file mode 100644 index 58ee55154..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/resources.qrc +++ /dev/null @@ -1,21 +0,0 @@ - - - texts/monitor_16px.svg - texts/refresh_16px.svg - texts/select_16px.svg - texts/duplicate_16px.svg - texts/extend_16px.svg - texts/onlyone-f_16px.svg - texts/onlyone-s_16px.svg - texts/open-display-settings_16px.svg - texts/network-display-succeed-symbolic_16px.svg - texts/network-display-failed-symbolic_16px.svg - texts/network-display-succeed-symbolic_24px.svg - texts/network-display-failed-symbolic_24px.svg - texts/network-display-off-symbolic_24px.svg - dark/icons/none_128px.svg - dark/icons/success_128px.svg - light/icons/none_128px.svg - light/icons/success_128px.svg - - diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/duplicate_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/duplicate_16px.svg deleted file mode 100644 index d03088989..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/duplicate_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - ICON/快捷面板/多屏显示/复制 - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/extend_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/extend_16px.svg deleted file mode 100644 index 79c54f89e..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/extend_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - ICON/快捷面板/多屏显示/拓展 - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/monitor_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/monitor_16px.svg deleted file mode 100644 index 3c5d3643b..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/monitor_16px.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - ICON / Device / PC - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_16px.svg deleted file mode 100644 index e62dcf605..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - network-display-failed-dark - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_24px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_24px.svg deleted file mode 100644 index 3b43d29a2..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-failed-symbolic_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - network-display-failed - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_16px.svg deleted file mode 100644 index 1927ee2b0..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_16px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - network-display-off-dark - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_24px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_24px.svg deleted file mode 100644 index 02a46d310..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-off-symbolic_24px.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - network-display-off - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_16px.svg deleted file mode 100644 index aca495d19..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_16px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - network-display-succeed-dark - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_24px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_24px.svg deleted file mode 100644 index d12d0608c..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/network-display-succeed-symbolic_24px.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - network-display-succeed - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-f_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-f_16px.svg deleted file mode 100644 index 31984136c..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-f_16px.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - ICON/快捷面板/多屏显示/仅2.2 - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-s_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-s_16px.svg deleted file mode 100644 index b256daa68..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/onlyone-s_16px.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - ICON/快捷面板/多屏显示/仅1.1 - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/open-display-settings_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/open-display-settings_16px.svg deleted file mode 100644 index afa570a91..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/open-display-settings_16px.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - ICON / Action / Open - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/refresh_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/refresh_16px.svg deleted file mode 100644 index 1e1ad4483..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/refresh_16px.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - ICON / Action / Redo - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/select_16px.svg b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/select_16px.svg deleted file mode 100644 index eff205d06..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/res/texts/select_16px.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - action_select - - - - - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.cpp deleted file mode 100644 index 017d48811..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.cpp +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "displaymodel.h" - -const QString DisplayDBusServer = "org.deepin.dde.Display1"; -const QString DisplayDBusPath = "/org/deepin/dde/Display1"; - -DisplayModel::DisplayModel(QObject *parent) - : QObject(parent) - , m_displayInter(new DisplayInter(DisplayDBusServer, - DisplayDBusPath, - QDBusConnection::sessionBus(), this)) -{ - m_displayInter->setSync(false, false); - connect(m_displayInter, &DisplayInter::DisplayModeChanged, this, &DisplayModel::setDisplayMode); - connect(m_displayInter, &DisplayInter::MonitorsChanged, this, &DisplayModel::setMonitors); - connect(m_displayInter, &DisplayInter::PrimaryChanged, this, &DisplayModel::setPrimaryScreen); - - setPrimaryScreen(m_displayInter->primary()); - setDisplayMode(m_displayInter->displayMode()); - setMonitors(m_displayInter->monitors()); -} - -DisplayModel::~DisplayModel() -{ -} - -void DisplayModel::setPrimaryScreen(const QString &screen) -{ - if (m_primaryScreen != screen) { - m_primaryScreen = screen; - Q_EMIT primaryScreenChanged(m_primaryScreen); - } -} - -void DisplayModel::setDisplayMode(const uchar &mode) -{ - if (m_displayMode != mode) { - m_displayMode = mode; - Q_EMIT displayModeChanged(m_displayMode); - } -} - -void DisplayModel::setMonitors(const QList &monitors) -{ - Q_UNUSED(monitors) - QDBusPendingCall call = m_displayInter->ListOutputNames(); - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); - connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, watcher] { - if (watcher->isError()) { - qWarning() << "Failed to get all output names: " << watcher->error().message(); - } else { - QDBusReply reply = watcher->reply(); - m_displayMode = m_displayInter->displayMode(); - const QStringList &monitorsTemp = reply.value(); - for (auto name : monitorsTemp) { - if (!m_monitors.contains(name)) { - m_monitors << name; - Q_EMIT screenAdded(name); - } - } - for (auto name : m_monitors) { - if (!monitorsTemp.contains(name)) { - m_monitors.removeOne(name); - Q_EMIT screenRemoved(name); - } - } - // 按照名称排序,显示的时候VGA在前,HDMI在后 - std::sort(m_monitors.begin(), m_monitors.end(), std::greater()); - emit monitorsChanged(m_monitors); - } - }); -} - -void DisplayModel::switchMode(uchar displayMode, QString screen) -{ - m_displayInter->SwitchMode(displayMode, screen); - setDisplayMode(displayMode); -} - -void DisplayModel::setCurrentMode(const QString ¤tMode) -{ - if (m_currentMode != currentMode) { - m_currentMode = currentMode; - Q_EMIT currentModeChanged(currentMode); - } -} \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.h deleted file mode 100644 index 1326ae55f..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/displaymodel.h +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef DISPLAYMODEL_H -#define DISPLAYMODEL_H - -#include "display1interface.h" - -#include - -using DisplayInter = org::deepin::dde::Display1; - -class DisplayModel : public QObject -{ - Q_OBJECT - -public: - explicit DisplayModel(QObject *parent = nullptr); - ~DisplayModel() override; - - uchar displayMode() { return m_displayMode; } - void setDisplayMode(const uchar &mode); - const QStringList &screens() { return m_monitors; } - void setMonitors(const QList &monitors); - QString primaryScreen() { return m_primaryScreen; } - void setPrimaryScreen(const QString &screen); - void switchMode(uchar displayMode, QString screen); - const QString ¤tMode() { return m_currentMode; } - void setCurrentMode(const QString ¤tMode); - -Q_SIGNALS: - void displayModeChanged(const uchar &mode); - void monitorsChanged(const QStringList &monitors); - void screenAdded(const QString &screen); - void screenRemoved(const QString &screen); - void primaryScreenChanged(const QString &screen); - void currentModeChanged(const QString &mode); - -protected: - -private: - DisplayInter *m_displayInter; - uchar m_displayMode; - QString m_primaryScreen; - QStringList m_monitors; - QString m_currentMode; -}; -#endif // DISPLAYMODEL_H \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.cpp deleted file mode 100644 index d7072dd0c..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.cpp +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "quickpanelwidget.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -DGUI_USE_NAMESPACE -DWIDGET_USE_NAMESPACE - -const QSize IconSize(24, 24); // 图标大小 - -namespace dde { -namespace wirelesscasting { -class QuickButton : public DFloatingButton -{ -public: - explicit QuickButton(QWidget *parent = nullptr) - : DFloatingButton(parent) - { - } - -protected: - void initStyleOption(DStyleOptionButton *option) const override - { - DFloatingButton::initStyleOption(option); - QColor bgColor = option->dpalette.color(backgroundRole()); - QColor textColor = option->dpalette.color(foregroundRole()); - if (backgroundRole() == QPalette::Highlight) { - textColor = Qt::white; - if (!option->state.testFlag(QStyle::State_Raised)) { // press - bgColor.setHslF(bgColor.hslHueF(), bgColor.hslSaturationF(), bgColor.lightnessF() * 0.9); - textColor.setAlphaF(0.8); - } else if (option->state.testFlag(QStyle::State_MouseOver)) { // hover - bgColor.setHslF(bgColor.hslHueF(), bgColor.hslSaturationF(), bgColor.lightnessF() * 1.1); - } - } else { - bgColor.setAlphaF(0); - textColor.setAlphaF(1); - } - option->palette.setBrush(QPalette::Button, bgColor); - option->palette.setBrush(QPalette::ButtonText, textColor); - option->state.setFlag(QStyle::State_MouseOver, false); - option->state.setFlag(QStyle::State_Sunken, false); - option->state.setFlag(QStyle::State_Raised, true); - } -}; - -QuickPanelWidget::QuickPanelWidget(QWidget *parent) - : QWidget(parent) - , m_iconWidget(new QuickButton(this)) - , m_nameLabel(new DLabel(this)) - , m_stateLabel(new DLabel(this)) - , m_expandLabel(new DIconButton(this)) -{ - initUi(); - initConnection(); -} - -QuickPanelWidget::~QuickPanelWidget() = default; - -void QuickPanelWidget::setIcon(const QIcon &icon) -{ - m_iconWidget->setIcon(icon); -} - -void QuickPanelWidget::setText(const QString &text) -{ - m_nameLabel->setText(text); -} - -void QuickPanelWidget::setDescription(const QString &description) -{ - m_stateLabel->setText(description); -} - -void QuickPanelWidget::setActive(bool active) -{ - m_iconWidget->setBackgroundRole(active ? QPalette::Highlight : QPalette::BrightText); -} - -void QuickPanelWidget::mousePressEvent(QMouseEvent *event) -{ - switch (event->button()) { - case Qt::LeftButton: - m_clickPoint = event->pos(); - break; - default: - break; - } - QWidget::mousePressEvent(event); -} - -void QuickPanelWidget::mouseReleaseEvent(QMouseEvent *event) -{ - switch (event->button()) { - case Qt::LeftButton: - if (m_clickPoint == event->pos()) - Q_EMIT panelClicked(); - break; - default: - break; - } - m_clickPoint = QPoint(); - return QWidget::mouseReleaseEvent(event); -} - -void QuickPanelWidget::initUi() -{ - QWidget *labelWidget = new QWidget(this); - - DFontSizeManager::instance()->bind(m_nameLabel, DFontSizeManager::T6, QFont::Normal); - DToolTip::setToolTipShowMode(m_nameLabel, DToolTip::ShowWhenElided); - m_nameLabel->setElideMode(Qt::ElideRight); - m_nameLabel->setContentsMargins(0, 2, 0, 0); - m_nameLabel->setForegroundRole(QPalette::BrightText); - - DFontSizeManager::instance()->bind(m_stateLabel, DFontSizeManager::T10); - DToolTip::setToolTipShowMode(m_stateLabel, DToolTip::ShowWhenElided); - m_stateLabel->setElideMode(Qt::ElideRight); - - QVBoxLayout *layout = new QVBoxLayout(labelWidget); - layout->setContentsMargins(0, 8, 0, 8); - layout->setSpacing(0); - layout->addWidget(m_nameLabel); - layout->addWidget(m_stateLabel); - - // 图标 - m_iconWidget->setEnabledCircle(true); - m_iconWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - m_iconWidget->setIconSize(IconSize); - m_iconWidget->setCheckable(false); - m_iconWidget->setFixedSize(QSize(40, 40)); - m_iconWidget->setFocusPolicy(Qt::NoFocus); - - // 进入图标 - m_expandLabel->setIcon(DStyle::standardIcon(style(), DStyle::SP_ArrowEnter)); - m_expandLabel->setObjectName("ExpandLabel"); - m_expandLabel->setFlat(true); - m_expandLabel->setFocusPolicy(Qt::NoFocus); - - m_expandLabel->setAttribute(Qt::WA_TransparentForMouseEvents); - - QHBoxLayout *mainLayout = new QHBoxLayout(this); - mainLayout->setContentsMargins(10, 0, 10, 0); - mainLayout->setSpacing(0); - mainLayout->addWidget(m_iconWidget); - mainLayout->addSpacing(10); - mainLayout->addWidget(labelWidget); - mainLayout->addStretch(1); - mainLayout->addWidget(m_expandLabel); - - setFixedSize(150, 60); -} - -void QuickPanelWidget::initConnection() -{ - connect(m_iconWidget, &DFloatingButton::clicked, this, &QuickPanelWidget::iconClicked); -} - -} // namespace wirelesscasting -} // namespace dde diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.h deleted file mode 100644 index f9b40e18d..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.h +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef QUICKPANELWIDGET_H -#define QUICKPANELWIDGET_H - -#include -#include - -#include - -class QLabel; - -namespace dde { -namespace wirelesscasting { -class QuickButton; - -class QuickPanelWidget : public QWidget -{ - Q_OBJECT - -public: - explicit QuickPanelWidget(QWidget *parent = nullptr); - ~QuickPanelWidget() override; - -public Q_SLOTS: - void setIcon(const QIcon &icon); - void setText(const QString &text); - void setDescription(const QString &description); - void setActive(bool active); - -Q_SIGNALS: - void panelClicked(); - void iconClicked(); - -protected: - void mousePressEvent(QMouseEvent *event) override; - void mouseReleaseEvent(QMouseEvent *event) override; - -private: - void initUi(); - void initConnection(); - -private: - QuickButton *m_iconWidget; - Dtk::Widget::DLabel *m_nameLabel; - Dtk::Widget::DLabel *m_stateLabel; - Dtk::Widget::DIconButton *m_expandLabel; - QPoint m_clickPoint; -}; -} // namespace wirelesscasting -} // namespace dde -#endif // QUICKPANELWIDGET_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.cpp deleted file mode 100644 index e330ea88d..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.cpp +++ /dev/null @@ -1,211 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later -#include "commoniconbutton.h" - -#include -#include -#include - -#include - -DGUI_USE_NAMESPACE - -CommonIconButton::CommonIconButton(QWidget *parent) - : QWidget(parent) - , m_refreshTimer(nullptr) - , m_rotateAngle(0) - , m_clickable(false) - , m_rotatable(false) - , m_hover(false) - , m_state(Default) - , m_lightThemeColor(Qt::black) - , m_darkThemeColor(Qt::white) - , m_activeState(false) - , m_hoverEnable(true) -{ - setAccessibleName("IconButton"); - setFixedSize(24, 24); - if (parent) - setForegroundRole(parent->foregroundRole()); - - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &CommonIconButton::refreshIcon); -} - -void CommonIconButton::setStateIconMapping(QMap> mapping) -{ - m_fileMapping = mapping; -} - -void CommonIconButton::setState(State state) -{ - m_state = state; - if (m_fileMapping.contains(state)) { - auto pair = m_fileMapping.value(state); - setIcon(pair.first, pair.second); - } - if (!m_icon.isNull()) { - updatePalette(); - } -} - -void CommonIconButton::setIcon(const QIcon &icon, QColor lightThemeColor, QColor darkThemeColor) -{ - m_icon = icon; - if (lightThemeColor.isValid() && darkThemeColor.isValid()) { - m_lightThemeColor = lightThemeColor; - m_darkThemeColor = darkThemeColor; - } - - updatePalette(); -} - -void CommonIconButton::updatePalette() -{ - if (m_lightThemeColor.isValid() && m_darkThemeColor.isValid()) { - QColor color = DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::LightType ? m_lightThemeColor : m_darkThemeColor; - if (m_activeState) - color = palette().color(QPalette::Highlight); - auto pa = palette(); - pa.setColor(QPalette::WindowText, color); - setPalette(pa); - } - - update(); -} - -void CommonIconButton::setActiveState(bool state) -{ - m_activeState = state; - if (m_lightThemeColor.isValid() && m_darkThemeColor.isValid()) { - updatePalette(); - } else { - setForegroundRole(state ? QPalette::Highlight : QPalette::NoRole); - } -} - -void CommonIconButton::setHoverEnable(bool enable) -{ - m_hoverEnable = enable; -} - -void CommonIconButton::setIcon(const QString &icon, const QString &fallback, const QString &suffix) -{ - if (!m_fileMapping.contains(Default)) { - m_fileMapping.insert(Default, QPair(icon, fallback)); - } - - QString tmp = icon; - QString tmpFallback = fallback; - - static auto addDarkMark = [suffix] (QString &file) { - if (file.contains(suffix)) { - file.replace(suffix, "-dark" + suffix); - } else { - file.append("-dark"); - } - }; - if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::LightType) { - addDarkMark(tmp); - addDarkMark(tmpFallback); - } - m_icon = QIcon::fromTheme(tmp, QIcon::fromTheme(tmpFallback)); - update(); -} - -void CommonIconButton::setHoverIcon(const QIcon &icon) -{ - m_hoverIcon = icon; -} - -void CommonIconButton::setClickable(bool clickable) -{ - m_clickable = clickable; -} - -void CommonIconButton::setRotatable(bool rotatable) -{ - m_rotatable = rotatable; - if (!m_rotatable) { - if (m_refreshTimer) - delete m_refreshTimer; - m_refreshTimer = nullptr; - } -} - -void CommonIconButton::startRotate() -{ - if (!m_refreshTimer) { - m_refreshTimer = new QTimer(this); - m_refreshTimer->setInterval(50); - connect(m_refreshTimer, &QTimer::timeout, this, &CommonIconButton::startRotate); - } - m_refreshTimer->start(); - m_rotateAngle += 54; - update(); - if (m_rotateAngle >= 360) { - stopRotate(); - } -} - -void CommonIconButton::stopRotate() -{ - m_refreshTimer->stop(); - m_rotateAngle = 0; - update(); -} - -bool CommonIconButton::event(QEvent *e) -{ - switch (e->type()) { - case QEvent::Leave: - case QEvent::Enter: - m_hover = e->type() == QEvent::Enter; - update(); - break; - default: - break; - } - return QWidget::event(e); -} - -void CommonIconButton::paintEvent(QPaintEvent *e) -{ - QWidget::paintEvent(e); - QPainter painter(this); - painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); - - if (m_rotateAngle != 0) { - painter.translate(this->width() / 2, this->height() / 2); - painter.rotate(m_rotateAngle); - painter.translate(-(this->width() / 2), -(this->height() / 2)); - } - - if (m_hoverEnable && m_hover && !m_hoverIcon.isNull()) { - m_hoverIcon.paint(&painter, rect()); - } else if (!m_icon.isNull()) { - m_icon.paint(&painter, rect()); - } -} - -void CommonIconButton::mousePressEvent(QMouseEvent *event) -{ - m_pressPos = event->pos(); - return QWidget::mousePressEvent(event); -} - -void CommonIconButton::mouseReleaseEvent(QMouseEvent *event) -{ - if (m_clickable && rect().contains(m_pressPos) && rect().contains(event->pos()) && (!m_refreshTimer || !m_refreshTimer->isActive())) { - if (m_rotatable) - startRotate(); - Q_EMIT clicked(); - return; - } - return QWidget::mouseReleaseEvent(event); -} - -void CommonIconButton::refreshIcon() -{ - setState(m_state); -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.h deleted file mode 100644 index f9f20f28e..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/commoniconbutton.h +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later -#ifndef ICONBUTTON_H -#define ICONBUTTON_H - -#include -#include -#include - -class CommonIconButton : public QWidget -{ -public: - enum State { - Default, - On, - Off - }; - - Q_OBJECT -public: - explicit CommonIconButton(QWidget *parent = nullptr); - - void setStateIconMapping(QMap> mapping); - void setState(State state); - void setActiveState(bool state); - bool activeState() const { return m_activeState; } - void setHoverEnable(bool enable); - -public Q_SLOTS: - void setIcon(const QString &icon, const QString &fallback = "", const QString &suffix = ".svg"); - void setIcon(const QIcon &icon, QColor lightThemeColor = QColor(), QColor darkThemeColor = QColor()); - void setHoverIcon(const QIcon &icon); - - void setClickable(bool clickable); - void setRotatable(bool rotatable); - -signals: - void clicked(); - -protected: - bool event(QEvent *e) override; - void paintEvent(QPaintEvent *e) override; - void mousePressEvent(QMouseEvent *event) override; - void mouseReleaseEvent(QMouseEvent *event) override; - - void startRotate(); - void stopRotate(); - -private: - void refreshIcon(); - void updatePalette(); - -private: - QTimer *m_refreshTimer; - QIcon m_icon; - QIcon m_hoverIcon; - QPoint m_pressPos; - int m_rotateAngle; - bool m_clickable; - bool m_rotatable; - bool m_hover; - QMap> m_fileMapping; - State m_state; - QColor m_lightThemeColor; - QColor m_darkThemeColor; - bool m_activeState; - bool m_hoverEnable; -}; - -#endif // DOCKICONBUTTON_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.cpp deleted file mode 100644 index b54259232..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "jumpsettingbutton.h" -#include "xdgactivation.h" - -#include -#include - -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE -DGUI_USE_NAMESPACE - -JumpSettingButton::JumpSettingButton(QWidget *parent) - : QFrame(parent) - , m_hover(false) - , m_autoShowPage(true) - , m_iconButton(new CommonIconButton(this)) - , m_descriptionLabel(new DLabel(this)) -{ - initUI(); -} - -JumpSettingButton::JumpSettingButton(const QIcon& icon, const QString& description, QWidget* parent) - : QFrame(parent) - , m_hover(false) - , m_autoShowPage(true) - , m_iconButton(new CommonIconButton(this)) - , m_descriptionLabel(new DLabel(this)) -{ - initUI(); - - m_iconButton->setIcon(icon); - m_descriptionLabel->setText(description); -} - -JumpSettingButton::~JumpSettingButton() -{ - -} - -void JumpSettingButton::initUI() -{ - setFixedHeight(36); - setForegroundRole(QPalette::BrightText); - m_iconButton->setFixedSize(16, 16); - m_iconButton->setForegroundRole(QPalette::BrightText); - - m_descriptionLabel->setElideMode(Qt::ElideRight); - m_descriptionLabel->setForegroundRole(foregroundRole()); - DFontSizeManager::instance()->bind(m_descriptionLabel, DFontSizeManager::T6); - - auto* layout = new QHBoxLayout(this); - layout->setContentsMargins(10, 0, 10, 0); - layout->addWidget(m_iconButton); - layout->addWidget(m_descriptionLabel); - layout->addStretch(); -} - -void JumpSettingButton::setIcon(const QIcon &icon) -{ - m_iconButton->setIcon(icon, Qt::black, Qt::white); -} - -void JumpSettingButton::setDescription(const QString& description) -{ - m_descriptionLabel->setText(description); -} - -bool JumpSettingButton::event(QEvent* e) -{ - switch (e->type()) { - case QEvent::Leave: - case QEvent::Enter: - m_hover = e->type() == QEvent::Enter; - update(); - break; - case QEvent::Hide: - m_hover = false; - update(); - break; - default: - break; - } - return QWidget::event(e); -} - -void JumpSettingButton::paintEvent(QPaintEvent* e) -{ - Q_UNUSED(e) - QPainter p(this); - QPalette palette = this->palette(); - QColor bgColor, textColor; - if (m_hover) { - textColor = palette.highlightedText().color(); - bgColor = palette.color(QPalette::Active, QPalette::Highlight); - } else { - textColor = palette.brightText().color(); - bgColor = palette.brightText().color(); - bgColor.setAlphaF(0.05); - } - palette.setBrush(QPalette::BrightText, textColor); - m_iconButton->setPalette(palette); - m_descriptionLabel->setPalette(palette); - - p.setBrush(bgColor); - p.setRenderHint(QPainter::Antialiasing); - p.setPen(Qt::NoPen); - p.drawRoundedRect(rect(), 8, 8); - return QFrame::paintEvent(e); -} - -void JumpSettingButton::mouseReleaseEvent(QMouseEvent* event) -{ - if (underMouse()) { - Q_EMIT clicked(); - if (m_autoShowPage && !m_dccModule.isEmpty()) { - auto *activation = new tray::XdgActivation(this); - connect(activation, &tray::XdgActivation::tokenReady, this, [this, activation](const QString &token) { - QStringList args {"--by-user", "org.deepin.dde.control-center"}; - if (!token.isEmpty()) - args << "-e" << "XDG_ACTIVATION_TOKEN=" + token; - args << "--" << "-p" << m_dccModule; - QProcess::startDetached("dde-am", args); - activation->deleteLater(); - }, Qt::SingleShotConnection); - activation->requestToken(); - Q_EMIT showPageRequestWasSended(); - } - return; - } - return QWidget::mouseReleaseEvent(event); -} - - -void JumpSettingButton::setDccModule(const QString &module) -{ - m_dccModule = module; -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.h deleted file mode 100644 index 1cece6ff6..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/jumpsettingbutton.h +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef JUMPSETTINGBUTTON_H -#define JUMPSETTINGBUTTON_H - -#include "commoniconbutton.h" - -#include -#include - -#include - -class JumpSettingButton : public QFrame -{ - Q_OBJECT -public: - explicit JumpSettingButton(QWidget *parent = nullptr); - JumpSettingButton(const QIcon& icon, const QString& description, QWidget *parent = nullptr); - ~JumpSettingButton(); - - void setDccModule(const QString &module); - void setAutoShowPage(bool autoShowPage) { m_autoShowPage = autoShowPage; } - void setIcon(const QIcon &icon); - void setDescription(const QString& description); - -signals: - void clicked(); - void showPageRequestWasSended(); - -protected: - bool event(QEvent* e) override; - void paintEvent(QPaintEvent* e) override; - void mouseReleaseEvent(QMouseEvent* event) override; - -private: - void initUI(); - -private: - bool m_hover; - bool m_autoShowPage; - QString m_dccModule; - CommonIconButton *m_iconButton; - Dtk::Widget::DLabel *m_descriptionLabel; -}; - -#endif diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.cpp deleted file mode 100644 index aa0c6e3a0..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.cpp +++ /dev/null @@ -1,511 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "monitoritemdelegate.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -const int STANDARD_WIDGET = 36; -const int EXPAND_WIDGET = 84; - -MonitorItemDelegate::MonitorItemDelegate(QAbstractItemView *parent) - : QStyledItemDelegate(parent) - , m_view(parent) - , m_standardHeight(STANDARD_WIDGET) - , m_expandHeight(EXPAND_WIDGET) - , m_bottomSpacing(10) -{ -} - -void MonitorItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - DStyleOptionBackgroundGroup boption; - boption.init(m_view); - boption.QStyleOption::operator=(option); - boption.state.setFlag(QStyle::State_Active); - - ItemSpacing itemSpacing = getItemSpacing(index); - if (itemSpacing.top != 0 || itemSpacing.bottom != 0) { - boption.rect.adjust(0, itemSpacing.top, 0, -itemSpacing.bottom); - } - - QColor bgColor, textColor; - if (m_view->currentIndex() == index) { - if (option.rect.height() > 50) { - textColor = boption.dpalette.brightText().color(); - bgColor = boption.dpalette.brightText().color(); - bgColor.setAlphaF(0.1); - } else { - textColor = boption.dpalette.highlightedText().color(); - bgColor = boption.dpalette.highlight().color(); - } - } else { - textColor = boption.dpalette.brightText().color(); - bgColor = boption.dpalette.brightText().color(); - bgColor.setAlphaF(0.05); - } - - if (textColor.isValid()) { - boption.palette.setBrush(QPalette::BrightText, textColor); - boption.palette.setBrush(QPalette::Text, textColor); - boption.palette.setBrush(QPalette::Highlight, textColor); - QWidget *w = m_view->indexWidget(index); - if (w) { - w->setPalette(boption.palette); - } - } - - if (bgColor.isValid()) { - boption.dpalette.setBrush(DPalette::ItemBackground, bgColor); - boption.directions = Qt::Vertical; - boption.position = DStyleOptionBackgroundGroup::ItemBackgroundPosition(itemSpacing.viewItemPosition); - m_view->style()->drawPrimitive(static_cast(DStyle::PE_ItemBackground), &boption, painter, option.widget); - } -} - -QWidget *MonitorItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - Q_UNUSED(option) - - if (!index.isValid()) { - return nullptr; - } - - QStandardItem* item = qobject_cast(m_view->model())->itemFromIndex(index); - MonitorItemWidget *widget = nullptr; - if (item) { - widget = new MonitorItemWidget(dynamic_cast(item), parent); - } - return widget; -} - -QSize MonitorItemDelegate::sizeHint(const QStyleOptionViewItem &, const QModelIndex &index) const -{ - ItemSpacing itemSpacing = getItemSpacing(index); - return QSize(-1, itemSpacing.top + itemSpacing.height + itemSpacing.bottom); -} - -void MonitorItemDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - if (!editor) - return; - - QStyledItemDelegate::updateEditorGeometry(editor, option, index); - ItemSpacing itemSpacing = getItemSpacing(index); - if (itemSpacing.top != 0 || itemSpacing.bottom != 0) { - QRect geom = editor->geometry(); - geom.adjust(0, itemSpacing.top, 0, -itemSpacing.bottom); - editor->setGeometry(geom); - } -} - -void MonitorItemDelegate::destroyEditor(QWidget *editor, const QModelIndex &) const -{ - delete editor; -} - -ItemSpacing MonitorItemDelegate::getItemSpacing(const QModelIndex &index) const -{ - ItemSpacing spacing; - spacing.top = 0; - QStandardItem *item = qobject_cast(m_view->model())->itemFromIndex(index); - spacing.height = item ? item->sizeHint().height() : STANDARD_WIDGET; - spacing.bottom = index.row() == (m_view->model()->rowCount()-1) ? 0 : m_bottomSpacing; - spacing.viewItemPosition = QStyleOptionViewItem::OnlyOne; // 显示样式 - return spacing; -} - -MultiscreenOptionItemDelegate::MultiscreenOptionItemDelegate(QAbstractItemView *parent) - : MonitorItemDelegate(parent) - , m_view(parent) -{ -} - -QWidget *MultiscreenOptionItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const -{ - Q_UNUSED(option) - - if (!index.isValid()) { - return nullptr; - } - - QStandardItem* item = qobject_cast(m_view->model())->itemFromIndex(index); - MultiscreenOptionItemWidget *widget = nullptr; - if (item) { - widget = new MultiscreenOptionItemWidget(dynamic_cast(item), parent); - } - return widget; -} - -MonitorItem::MonitorItem(Monitor *monitor) - : QStandardItem() - , m_monitor(monitor) - , m_connectingState(false) - , m_icon(QIcon()) - , m_name(QString()) - , m_itemState(MonitorItemState::NoState) -{ - if (!m_monitor) { - qWarning() << "Monitor pointer is nullptr !"; - return; - } - - m_icon = QIcon::fromTheme(QString("monitor")); - m_name = monitor->name(); - onNdSinkStateChanged(m_monitor->state()); - - connect(m_monitor, &Monitor::NameChanged, this, &MonitorItem::nameChanged); - connect(m_monitor, &Monitor::stateChanged, this, &MonitorItem::onNdSinkStateChanged); - connect(this, &MonitorItem::itemStateChanged, m_monitor, &Monitor::stateChangeFinished); -} - -MonitorItem::~MonitorItem() -{ -} - -void MonitorItem::onNdSinkStateChanged(const Monitor::NdSinkState state) -{ - switch (state) { - case Monitor::ND_SINK_STATE_DISCONNECTED: - case Monitor::ND_SINK_STATE_ERROR: - m_connectingState = false; - setSizeHint(QSize(-1, STANDARD_WIDGET)); - updateItemState(MonitorItemState::NoState); - break; - default: - m_connectingState = true; - setSizeHint(QSize(-1, EXPAND_WIDGET)); - updateItemState(MonitorItemState::Connecting); - break; - } -} - -void MonitorItem::updateIcon(const QIcon &icon) -{ - if (m_icon.cacheKey() != icon.cacheKey()) { - m_icon = icon; - Q_EMIT iconChanged(m_icon); - } -} - -void MonitorItem::updateName(const QString &name) -{ - if (m_name != name) { - m_name = name; - Q_EMIT nameChanged(m_name); - } -} - -void MonitorItem::updateItemState(const MonitorItemState state) -{ - if (m_itemState != state) { - m_itemState = state; - Q_EMIT itemStateChanged(m_itemState); - } -} - -void MonitorItem::connMonitor() -{ - if (m_monitor) { - m_monitor->connMonitor(); - } -} -void MonitorItem::disconnectMonitor() -{ - if (m_monitor) { - m_monitor->disconnectMonitor(); - } -} - -MultiscreenOptionItem::MultiscreenOptionItem(DisplayMode displayMode, const QString &name, const QString &screen) - : QStandardItem() - , m_displayMode(displayMode) - , m_icon(QIcon()) - , m_name(name) - , m_screen(screen) -{ - switch (m_displayMode) { - case MergeMode: - m_icon = QIcon::fromTheme(QString("duplicate")); - break; - case ExtendMode: - m_icon = QIcon::fromTheme(QString("extend")); - break; - case SingleMode: - m_icon = QIcon::fromTheme(QString("monitor")); - break; - } - setSizeHint(QSize(-1, STANDARD_WIDGET)); -} - -MultiscreenOptionItem::~MultiscreenOptionItem() -{ -} - -void MultiscreenOptionItem::updateIcon(const QIcon &icon) -{ - if (m_icon.cacheKey() != icon.cacheKey()) { - m_icon = icon; - Q_EMIT iconChanged(m_icon); - } -} - -void MultiscreenOptionItem::updateName(const QString &name) -{ - if (m_name != name) { - m_name = name; - Q_EMIT nameChanged(m_name); - } -} - -MonitorItemWidget::MonitorItemWidget(MonitorItem *item, QWidget *parent) - : QWidget(parent) - , m_item(item) - , m_mainLayout(new QVBoxLayout(this)) - , m_nameBox(nullptr) - , m_icon(nullptr) - , m_nameLabel(nullptr) - , m_stateBox(nullptr) - , m_spinner(nullptr) - , m_tipLabel(nullptr) - , m_disconnectBtn(nullptr) -{ - if (!m_item) { - QLabel *err = new QLabel(this); - err->setText("Unknown Item"); - m_mainLayout->addWidget(err, 1); - return; - } - - initUI(); - setAccessibleName(m_item->name()); - updateItemState(m_item->itemState()); - - if (parent) - setForegroundRole(parent->foregroundRole()); - - connect(m_item, &MonitorItem::iconChanged, this, &MonitorItemWidget::updateIcon); - connect(m_item, &MonitorItem::nameChanged, this, &MonitorItemWidget::updateName); - connect(m_item, &MonitorItem::itemStateChanged, this, &MonitorItemWidget::updateItemState); - connect(m_disconnectBtn, &QPushButton::clicked, m_item, &MonitorItem::disconnectMonitor); -} - -MonitorItemWidget::~MonitorItemWidget() -{ -} - -void MonitorItemWidget::initUI() -{ - m_nameBox = new DFrame(this); - m_nameBox->setFrameShape(QFrame::NoFrame); - m_nameBox->setFixedHeight(STANDARD_WIDGET); - - QHBoxLayout *nameLayout = new QHBoxLayout(); - nameLayout->setContentsMargins(0, 0, 0, 0); - nameLayout->setSpacing(0); - - m_icon = new CommonIconButton(this); - m_icon->setFixedSize(16, 16); - m_icon->setIcon(m_item->icon()); - - m_nameLabel = new DLabel(this); - m_nameLabel->setText(m_item->name()); - m_nameLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); - - nameLayout->addWidget(m_icon, 0); - nameLayout->addSpacing(10); - nameLayout->addWidget(m_nameLabel, 1); - m_nameBox->setLayout(nameLayout); - - m_stateBox = new DFrame(this); - m_stateBox->setFrameShape(QFrame::NoFrame); - m_stateBox->setFixedHeight(EXPAND_WIDGET - STANDARD_WIDGET); - - QHBoxLayout *stateLayout = new QHBoxLayout(); - stateLayout->setContentsMargins(0, 3, 0, 0); - stateLayout->setSpacing(0); - - QHBoxLayout *tipLayout = new QHBoxLayout(); - tipLayout->setContentsMargins(0, 8, 0, 0); - tipLayout->setSpacing(0); - m_spinner = new DSpinner(this); - m_spinner->setFixedSize(16, 16); - m_spinner->stop(); - - m_tipLabel = new TipLabel(this); - m_tipLabel->setText(tr("Connecting")); - - tipLayout->addWidget(m_spinner); - tipLayout->addSpacing(10); - tipLayout->addWidget(m_tipLabel); - - m_disconnectBtn = new CancelButton(this); - m_disconnectBtn->setObjectName("DisconnectBtn"); - m_disconnectBtn->setText(tr("Cancel")); - m_disconnectBtn->setFixedSize(98, 36); - - stateLayout->addLayout(tipLayout); - stateLayout->addWidget(m_disconnectBtn, 0, Qt::AlignRight | Qt::AlignTop); - m_stateBox->setLayout(stateLayout); - - m_mainLayout->setContentsMargins(2, 0, 2, 0); - m_mainLayout->setSpacing(0); - m_mainLayout->addWidget(m_nameBox); - m_mainLayout->addWidget(m_stateBox); -} - -void MonitorItemWidget::updateIcon(const QIcon &icon) -{ - m_icon->setIcon(icon); -} - -void MonitorItemWidget::updateName(const QString &name) -{ - m_nameLabel->setText(name); -} - -void MonitorItemWidget::updateItemState(const MonitorItemState state) -{ - switch (state) { - case MonitorItemState::NoState: - m_stateBox->setVisible(false); - m_spinner->stop(); - break; - case MonitorItemState::Connecting: - m_stateBox->setVisible(true); - m_spinner->start(); - break; - default: - m_stateBox->setVisible(false); - m_spinner->stop(); - break; - } -} - -bool MonitorItemWidget::event(QEvent *e) -{ - switch (e->type()) { - case QEvent::PaletteChange: { - QLayout *layout = this->layout(); - for (int i = 0; i < layout->count(); i++) { - QWidget *widget = layout->itemAt(i)->widget(); - if (widget) { - widget->setPalette(palette()); - } - } - } break; - default: - break; - } - return QWidget::event(e); -} - -MultiscreenOptionItemWidget::MultiscreenOptionItemWidget(MultiscreenOptionItem *item, QWidget *parent) - : QWidget(parent) - , m_item(item) - , m_mainLayout(new QHBoxLayout(this)) - , m_nameBox(nullptr) - , m_icon(nullptr) - , m_nameLabel(nullptr) - , m_selectIcon(nullptr) -{ - if (!m_item) { - QLabel *err = new QLabel(this); - err->setText("Unknown Item"); - m_mainLayout->addWidget(err, 1); - return; - } - - initUI(); - setAccessibleName(m_item->name()); - - if (parent) - setForegroundRole(parent->foregroundRole()); - - connect(m_item, &MultiscreenOptionItem::iconChanged, this, &MultiscreenOptionItemWidget::updateIcon); - connect(m_item, &MultiscreenOptionItem::nameChanged, this, &MultiscreenOptionItemWidget::updateName); - connect(m_item, &MultiscreenOptionItem::selected, m_selectIcon, &MultiscreenOptionItemWidget::setVisible); -} - -MultiscreenOptionItemWidget::~MultiscreenOptionItemWidget() -{ -} - -void MultiscreenOptionItemWidget::initUI() -{ - m_nameBox = new DFrame(this); - m_nameBox->setFrameShape(QFrame::NoFrame); - m_nameBox->setFixedHeight(STANDARD_WIDGET); - - QHBoxLayout *nameLayout = new QHBoxLayout(); - nameLayout->setContentsMargins(0, 0, 0, 0); - nameLayout->setSpacing(0); - - m_icon = new CommonIconButton(this); - m_icon->setFixedSize(16, 16); - m_icon->setIcon(m_item->icon()); - - m_nameLabel = new DLabel(this); - m_nameLabel->setText(m_item->name()); - m_nameLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); - - nameLayout->addWidget(m_icon, 0); - nameLayout->addSpacing(10); - nameLayout->addWidget(m_nameLabel, 1); - m_nameBox->setLayout(nameLayout); - - m_mainLayout->setContentsMargins(2, 0, 2, 0); - m_mainLayout->setSpacing(0); - m_mainLayout->addWidget(m_nameBox); - - m_selectIcon = new CommonIconButton(this); - m_selectIcon->setFixedSize(16, 16); - m_selectIcon->setIcon(QIcon::fromTheme("select")); - m_selectIcon->setVisible(false); - m_mainLayout->addStretch(); - m_mainLayout->addWidget(m_selectIcon); -} - -void MultiscreenOptionItemWidget::updateIcon(const QIcon &icon) -{ - m_icon->setIcon(icon); -} - -void MultiscreenOptionItemWidget::updateName(const QString &name) -{ - m_nameLabel->setText(name); -} - -bool MultiscreenOptionItemWidget::event(QEvent *e) -{ - switch (e->type()) { - case QEvent::PaletteChange: { - QLayout *layout = this->layout(); - for (int i = 0; i < layout->count(); i++) { - QWidget *widget = layout->itemAt(i)->widget(); - if (widget) { - widget->setPalette(palette()); - } - } - } break; - default: - break; - } - return QWidget::event(e); -} - -void MultiscreenOptionItemWidget::updateItemState(const MonitorItemState state) -{ - Q_UNUSED(state) -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.h deleted file mode 100644 index b76f25eec..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.h +++ /dev/null @@ -1,301 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "wirelesscastingmodel.h" -#include "commoniconbutton.h" - -DWIDGET_USE_NAMESPACE - -enum MonitorItemState -{ - NoState, // 正常状态 - Connecting, // 显示spinner旋片等,提示用户正在连接中 -}; - -enum DisplayMode -{ - MergeMode = 1, - ExtendMode, - SingleMode -}; - -struct ItemSpacing -{ - int top; - int height; - int bottom; - QStyleOptionViewItem::ViewItemPosition viewItemPosition; -}; - -class MonitorItem; -class MonitorItemWidget; -class CancelButton; -class TipLabel; -class MonitorItemDelegate : public QStyledItemDelegate -{ - Q_OBJECT - -public: - explicit MonitorItemDelegate(QAbstractItemView* parent = nullptr); - - inline int expandItemHeight() const { return m_expandHeight; } - inline int standardItemHeight() const { return m_standardHeight; } - inline int itemSpacing() const { return m_bottomSpacing; } - - ItemSpacing getItemSpacing(const QModelIndex &index) const; - - // painting - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; - - // editing - QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override; - QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &index) const override; - void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override; - void destroyEditor(QWidget *editor, const QModelIndex &index) const override; - -private: - const QAbstractItemView *m_view; - const int m_standardHeight; - const int m_expandHeight; - const int m_bottomSpacing; -}; - -class MultiscreenOptionItemDelegate : public MonitorItemDelegate -{ - Q_OBJECT - -public: - explicit MultiscreenOptionItemDelegate(QAbstractItemView* parent = nullptr); - // editing - QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override; - -private: - const QAbstractItemView *m_view; -}; - -class MonitorItem : public QObject, public QStandardItem -{ - Q_OBJECT -public: - explicit MonitorItem(Monitor *monitor); - ~MonitorItem() override; - - void connMonitor(); - void disconnectMonitor(); - Monitor *monitor() { return m_monitor; } - bool connectingState() { return m_connectingState; } - - void updateIcon(const QIcon &icon); - QIcon icon() const { return m_icon; } - - void updateName(const QString &name); - QString name() const { return m_name; } - - void updateItemState(const MonitorItemState state); - MonitorItemState itemState() const { return m_itemState; } - -Q_SIGNALS: - void iconChanged(const QIcon &icon); - void nameChanged(const QString &name); - void itemStateChanged(const MonitorItemState state); - -private Q_SLOTS: - void onNdSinkStateChanged(const Monitor::NdSinkState state); - -private: - Monitor *m_monitor; - bool m_connectingState; - - QIcon m_icon; - QString m_name; - MonitorItemState m_itemState; -}; - -class MultiscreenOptionItem : public QObject, public QStandardItem -{ - Q_OBJECT -public: - explicit MultiscreenOptionItem(DisplayMode displayMode, const QString &name, const QString &screen); - ~MultiscreenOptionItem() override; - - void updateIcon(const QIcon &icon); - QIcon icon() const { return m_icon; } - - void updateName(const QString &name); - const QString &name() const { return m_name; } - const QString &screen() { return m_screen; } - DisplayMode displayMode() const { return m_displayMode; } - -Q_SIGNALS: - void iconChanged(const QIcon &icon); - void nameChanged(const QString &name); - void selected(bool selected); - -private: - DisplayMode m_displayMode; - QIcon m_icon; - QString m_name; - QString m_screen; -}; - -class MonitorItemWidget : public QWidget -{ - Q_OBJECT -public: - explicit MonitorItemWidget(MonitorItem *item, QWidget *parent = nullptr); - ~MonitorItemWidget() override; - -public Q_SLOTS: - void updateIcon(const QIcon &icon); - void updateName(const QString &name); - void updateItemState(const MonitorItemState state); - -protected: - bool event(QEvent *e) override; - -private: - void initUI(); - -private: - MonitorItem *m_item; - - QVBoxLayout *m_mainLayout; - DFrame *m_nameBox; - CommonIconButton *m_icon; - DLabel *m_nameLabel; - DFrame *m_stateBox; - DSpinner *m_spinner; - TipLabel *m_tipLabel; - CancelButton *m_disconnectBtn; -}; - -class MultiscreenOptionItemWidget : public QWidget -{ - Q_OBJECT -public: - explicit MultiscreenOptionItemWidget(MultiscreenOptionItem *item, QWidget *parent = nullptr); - ~MultiscreenOptionItemWidget() override; - -public Q_SLOTS: - void updateIcon(const QIcon &icon); - void updateName(const QString &name); - void updateItemState(const MonitorItemState state); - -protected: - bool event(QEvent *e) override; - -private: - void initUI(); - -private: - MultiscreenOptionItem *m_item; - - QHBoxLayout *m_mainLayout; - DFrame *m_nameBox; - CommonIconButton *m_icon; - DLabel *m_nameLabel; - CommonIconButton *m_selectIcon; -}; - -class TipLabel : public QLabel -{ - Q_OBJECT -public: - explicit TipLabel(QWidget *parent = nullptr) - : QLabel(parent) - { - DFontSizeManager::instance()->bind(this, DFontSizeManager::T7); - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [this] { - update(); - }); - } - -protected: - void paintEvent(QPaintEvent *event) override - { - Q_UNUSED(event) - QPainter painter(this); - - QColor textColor = DPaletteHelper::instance()->palette(this).brush(QPalette::BrightText).color(); - textColor.setAlphaF(0.6); - painter.setPen(textColor); - painter.drawText(rect(), Qt::AlignLeft | Qt::AlignVCenter, text()); - } -}; - -class CancelButton : public QPushButton -{ - Q_OBJECT -public: - explicit CancelButton(QWidget *parent = nullptr) - : QPushButton(parent) - , m_enter(false) - { - setFocusPolicy(Qt::NoFocus); - setFlat(true); - - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [this] { - update(); - }); - } - -protected: - void enterEvent(QEnterEvent *event) override - { - QPushButton::enterEvent(event); - m_enter = true; - update(); - } - - void leaveEvent(QEvent *event) override - { - QPushButton::leaveEvent(event); - m_enter = false; - update(); - } - - void paintEvent(QPaintEvent *event) override - { - Q_UNUSED(event) - QPainter painter(this); - painter.setRenderHint(QPainter::Antialiasing, true); - - QColor bgColor, textColor; - if (m_enter) { - bgColor = DPaletteHelper::instance()->palette(this).brush(QPalette::BrightText).color(); - bgColor.setAlphaF(0.2); - } else { - bgColor = DPaletteHelper::instance()->palette(this).brush(QPalette::BrightText).color(); - bgColor.setAlphaF(0.1); - } - textColor = DPaletteHelper::instance()->palette(this).brush(QPalette::BrightText).color(); - - QPainterPath path; - path.addRoundedRect(rect(), 8, 8); - painter.fillPath(path, bgColor); - - painter.setPen(textColor); - painter.drawText(rect(), Qt::AlignCenter, text()); - } - -private: - bool m_enter; -}; diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.cpp deleted file mode 100644 index 02ebfa051..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "monitorlistview.h" - -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE - -MonitorListView::MonitorListView(QWidget *parent) - : QListView(parent) - , m_delegate(new MonitorItemDelegate(this)) -{ - setObjectName("MonitorListView"); - setAccessibleName("MonitorListView"); - setFrameShape(QFrame::NoFrame); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); - setSelectionMode(QAbstractItemView::NoSelection); - viewport()->setAutoFillBackground(false); - setAutoFillBackground(false); - setAutoScroll(true); - setDragEnabled(false); - setViewMode(QListView::ViewMode::ListMode); - - // 支持在触摸屏上滚动 - QScroller::grabGesture(viewport(), QScroller::LeftMouseButtonGesture); - QScrollerProperties sp; - sp.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); - - setItemDelegate(m_delegate); -} - -void MonitorListView::setModel(QAbstractItemModel *model) -{ - QListView::setModel(model); -} - -int MonitorListView::getStandardItemHeight() const -{ - return m_delegate->standardItemHeight(); -} - -int MonitorListView::getExpandItemHeight() const -{ - return m_delegate->expandItemHeight(); -} - -int MonitorListView::getItemSpacing() const -{ - return m_delegate->itemSpacing(); -} - -void MonitorListView::rowsInserted(const QModelIndex &parent, int start, int end) -{ - QAbstractItemModel *m = model(); - QList indexes; - indexes.append(parent); - while (!indexes.isEmpty()) { - QModelIndex i = indexes.takeFirst(); - if (!isPersistentEditorOpen(i)) - openPersistentEditor(i); - for (int j = 0; j < m->rowCount(i); j++) { - indexes.append(m->index(j, 0, i)); - } - } - QListView::rowsInserted(parent, start, end); -} - -bool MonitorListView::viewportEvent(QEvent *event) -{ - switch (event->type()) { - case QEvent::HoverLeave: { - setCurrentIndex(QModelIndex()); - } break; - case QEvent::HoverEnter: - case QEvent::HoverMove: { - QHoverEvent *he = dynamic_cast(event); - QModelIndex newIndex = indexAt(QPoint(he->position().x(), he->position().y())); - setCurrentIndex(newIndex); - break; - } - default: - return QListView::viewportEvent(event); - } - return true; -} diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.h deleted file mode 100644 index a52b11ed9..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitorlistview.h +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#pragma once - -#include - -#include "monitoritemdelegate.h" - -class MonitorListView : public QListView -{ - Q_OBJECT - -public: - explicit MonitorListView(QWidget *parent = 0); - - void setModel(QAbstractItemModel *model) override; - - int getStandardItemHeight() const; - int getExpandItemHeight() const; - int getItemSpacing() const; - -protected: - void rowsInserted(const QModelIndex &parent, int start, int end) override; - bool viewportEvent(QEvent *event) override; - -private: - MonitorItemDelegate *m_delegate; -}; diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp deleted file mode 100644 index df69d6aff..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp +++ /dev/null @@ -1,582 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "wirelesscastingapplet.h" -#include "wirelesscastingmodel.h" -#include "constants.h" - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -DWIDGET_USE_NAMESPACE -DCORE_USE_NAMESPACE - -namespace dde { -namespace wirelesscasting { - -WirelessCastingApplet::WirelessCastingApplet(WirelessCastingModel *model, DisplayModel *displayMode, QWidget *parent) - : QWidget(parent) - , m_model(model) - , m_displayModel(displayMode) - , m_contentWidget(new QWidget(this)) - , m_scrollArea(new QScrollArea(this)) -#ifdef WIRELESS_CASTING_ENABLED - , m_refresh(new CommonIconButton(this)) - , m_wirelesscastingWidget(new QWidget(this)) - , m_wirelesscastingTitle(new QWidget(this)) - , m_monitorsListView(new MonitorListView(this)) - , m_monitorsModel(new QStandardItemModel(m_monitorsListView)) - , m_statePanel(new StatePanel(m_model, this)) -#endif - , m_multiscreenOptionsWidget(new QWidget(this)) - , m_multiscreenOptionsTitle(new QWidget(this)) - , m_multiscreenOptionsListView(new MonitorListView(this)) - , m_multiscreenOptionsModel(new QStandardItemModel(m_multiscreenOptionsListView)) - , m_showOnDock(true) - , m_displaySetting(new JumpSettingButton(this)) - , m_lastConnMonitor(nullptr) - , m_cfgShowCasting(true) - , m_cfgEnabled(true) - , m_minHeight(-1) -{ - initUI(); - initMonitors(); -#ifdef WIRELESS_CASTING_ENABLED - qRegisterMetaType("WirelessCastingModel::CastingState"); - connect(m_model, &WirelessCastingModel::stateChanged, this, &WirelessCastingApplet::onStateChanged); - connect(m_model, &WirelessCastingModel::stateChangeFinished, this, &WirelessCastingApplet::resizeApplet); - connect(m_statePanel, &StatePanel::disconnMonitor, this, [this]() { - m_model->disconnectMonitor(); - resizeApplet(); - }); - connect(m_model, &WirelessCastingModel::stateChanged, this, [this](WirelessCastingModel::CastingState state) { - Q_EMIT castingChanged(state == WirelessCastingModel::Connected); - resizeApplet(); - }); - onStateChanged(m_model->state()); -#endif -} - -void WirelessCastingApplet::initUI() -{ - QVBoxLayout *centralLayout = new QVBoxLayout(this); - centralLayout->setAlignment(Qt::AlignCenter); - centralLayout->setContentsMargins(0, 10, 0, 10); - centralLayout->setSpacing(0); - -#ifdef WIRELESS_CASTING_ENABLED - // 无线投屏 - m_wirelesscastingTitle->setFixedHeight(24); - QLabel *wirelesscastingTitle = new QLabel(tr("Wireless Casting"), this); - DFontSizeManager::instance()->bind(wirelesscastingTitle, DFontSizeManager::T9); - m_refresh->setAccessibleName("refresh"); - m_refresh->setFixedSize(16, 16); - m_refresh->setIcon(QIcon::fromTheme("refresh")); - m_refresh->setFocusPolicy(Qt::NoFocus); - m_refresh->setClickable(true); - m_refresh->setRotatable(true); - m_refresh->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); - QHBoxLayout *wirelesscastingTitleLayout = new QHBoxLayout(m_wirelesscastingTitle); - wirelesscastingTitleLayout->setSpacing(0); - wirelesscastingTitleLayout->setContentsMargins(10, 0, 0, 0); - wirelesscastingTitleLayout->addWidget(wirelesscastingTitle); - wirelesscastingTitleLayout->addWidget(m_refresh); - - m_monitorsListView->setModel(m_monitorsModel); - m_monitorsListView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); - m_monitorsListView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_monitorsListView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - QVBoxLayout *wirelesscastingLayout = new QVBoxLayout(m_wirelesscastingWidget); - wirelesscastingLayout->setSpacing(5); - wirelesscastingLayout->setContentsMargins(0, 0, 0, 0); - wirelesscastingLayout->addWidget(m_wirelesscastingTitle); - wirelesscastingLayout->addWidget(m_statePanel); - wirelesscastingLayout->addWidget(m_monitorsListView); - - QVBoxLayout *contentLayout = new QVBoxLayout(m_contentWidget); - contentLayout->setContentsMargins(10, 0, 10, 0); - contentLayout->setSpacing(10); - contentLayout->addWidget(m_wirelesscastingWidget); - m_wirelesscastingWidget->setVisible(false); -#else - QVBoxLayout *contentLayout = new QVBoxLayout(m_contentWidget); - contentLayout->setContentsMargins(10, 0, 10, 0); - contentLayout->setSpacing(10); - m_multiscreenOptionsTitle->setFixedHeight(24); -#endif - // 多屏选项 - QLabel *multiscreenOptionsTitle = new QLabel(tr("Multiple Display options"), this); - DFontSizeManager::instance()->bind(multiscreenOptionsTitle, DFontSizeManager::T9); - m_multiscreenOptionsWidget->setVisible(false); - m_multiscreenOptionsListView->setItemDelegate(new MultiscreenOptionItemDelegate(m_multiscreenOptionsListView)); - m_multiscreenOptionsListView->setObjectName("MultiscreenOptionsListView"); - m_multiscreenOptionsListView->setModel(m_multiscreenOptionsModel); - m_multiscreenOptionsListView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - m_multiscreenOptionsListView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_multiscreenOptionsListView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - QVBoxLayout *multiscreenOptionsLayout = new QVBoxLayout(m_multiscreenOptionsWidget); - multiscreenOptionsLayout->setSpacing(0); - multiscreenOptionsLayout->setContentsMargins(0, 0, 0, 0); - QHBoxLayout *multiscreenOptionsTitleLayout = new QHBoxLayout(m_multiscreenOptionsTitle); - multiscreenOptionsTitleLayout->setSpacing(0); - multiscreenOptionsTitleLayout->setContentsMargins(10, 0, 0, 0); - multiscreenOptionsTitleLayout->addWidget(multiscreenOptionsTitle); - multiscreenOptionsLayout->addWidget(m_multiscreenOptionsTitle); - multiscreenOptionsLayout->addSpacing(5); - multiscreenOptionsLayout->addWidget(m_multiscreenOptionsListView); - contentLayout->addWidget(m_multiscreenOptionsWidget); - contentLayout->addStretch(); - - m_scrollArea->setWidgetResizable(true); - m_scrollArea->setFrameShape(QFrame::NoFrame); - m_scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); - m_scrollArea->setWidget(m_contentWidget); - m_contentWidget->setAttribute(Qt::WA_TranslucentBackground); - QScroller::grabGesture(m_scrollArea->viewport(), QScroller::LeftMouseButtonGesture); - QScroller *scroller = QScroller::scroller(m_scrollArea); - QScrollerProperties sp; - sp.setScrollMetric(QScrollerProperties::HorizontalOvershootPolicy, QScrollerProperties::OvershootAlwaysOff); - scroller->setScrollerProperties(sp); - - centralLayout->addWidget(m_scrollArea); - - // 跳转按键 - QHBoxLayout *btnLayout = new QHBoxLayout(); - btnLayout->setAlignment(Qt::AlignVCenter); - btnLayout->setContentsMargins(10, 0, 10, 0); - btnLayout->setSpacing(0); - m_displaySetting->setIcon(QIcon::fromTheme("open-display-settings")); - m_displaySetting->setDescription(tr("Display settings")); - m_displaySetting->setDccModule("display"); - btnLayout->addWidget(m_displaySetting); - centralLayout->addLayout(btnLayout); - - setFixedWidth(Dock::DOCK_POPUP_WIDGET_WIDTH); - - connect(m_displaySetting, &JumpSettingButton::showPageRequestWasSended, this, &WirelessCastingApplet::requestHideApplet); -#ifdef WIRELESS_CASTING - connect(m_refresh, &CommonIconButton::clicked, m_model, &WirelessCastingModel::refresh); - connect(m_monitorsListView, &MonitorListView::clicked, this, [this](const QModelIndex &idx) { - auto item = dynamic_cast(m_monitorsModel->itemFromIndex(idx)); - if (item) { - if (nullptr != m_lastConnMonitor) { - if (item->monitor() == m_lastConnMonitor && item->connectingState()) - return; - m_lastConnMonitor->disconnectMonitor(); - } - item->connMonitor(); - m_lastConnMonitor = item->monitor(); - resizeApplet(); - } - }); -#endif - connect(m_multiscreenOptionsListView, &MonitorListView::clicked, this, [this](const QModelIndex &idx) { - auto item = dynamic_cast(m_multiscreenOptionsModel->itemFromIndex(idx)); - if (item) { - m_displayModel->switchMode(item->displayMode(), item->screen()); - } - }); - - hide(); -} - -void WirelessCastingApplet::initMonitors() -{ -#ifdef WIRELESS_CASTING_ENABLED - auto monitors = m_model->monitors(); - // 遍历所有设备 - for (auto it = monitors.begin(); it != monitors.end(); ++it) { - MonitorItem *item = new MonitorItem(it.value()); - m_monitorsModel->appendRow(item); - m_monitors[it.key()] = MonitorMapItem{ item, it.value() }; - m_monitorsListView->update(); - } - connect(m_model, &WirelessCastingModel::addMonitor, this, &WirelessCastingApplet::onAddMonitor); - connect(m_model, &WirelessCastingModel::removeMonitor, this, &WirelessCastingApplet::onRemoveMonitor); -#endif - auto updateScreens = [this] { - m_displayModel->setCurrentMode(QString()); - m_multiscreenOptionsModel->clear(); - auto screens = m_displayModel->screens(); - m_model->setMultiscreensFlag(screens.size() > 1); - m_multiscreenOptionsWidget->setVisible(m_model->multiscreensFlag()); - if (m_model->multiscreensFlag()) { - m_multiscreenOptionsModel->appendRow(new MultiscreenOptionItem(DisplayMode::MergeMode, tr("Duplicate"), "")); - m_multiscreenOptionsModel->appendRow(new MultiscreenOptionItem(DisplayMode::ExtendMode, tr("Extend"), "")); - - for (int i = 0; i < screens.size(); ++i) { - auto name = screens[i]; - MultiscreenOptionItem *item = new MultiscreenOptionItem(DisplayMode::SingleMode, tr("Only on %1").arg(name), name); - QString iconPath = "onlyone-" + QString((i % 2) == 0 ? "f" : "s"); - item->updateIcon(QIcon::fromTheme(iconPath)); - m_multiscreenOptionsModel->appendRow(item); - } - m_multiscreenOptionsListView->update(); - } - }; - - auto updateSelectState = [this] { - for (int row = 0; row < m_multiscreenOptionsModel->rowCount(); ++row) { - QModelIndex index = m_multiscreenOptionsModel->index(row, 0); - auto item = dynamic_cast(m_multiscreenOptionsModel->itemFromIndex(index)); - if (item) { - item->selected(false); - if (item->displayMode() == m_displayModel->displayMode()) { - switch (m_displayModel->displayMode()) { - case DisplayMode::MergeMode: - case DisplayMode::ExtendMode: - item->selected(true); - m_displayModel->setCurrentMode(item->name()); - break; - case DisplayMode::SingleMode: { - if (item->screen() == m_displayModel->primaryScreen()) { - item->selected(true); - m_displayModel->setCurrentMode(item->name()); - } - break; - } - } - } - } - } - }; - connect(m_displayModel, &DisplayModel::monitorsChanged, this, [this, updateScreens, updateSelectState] { - updateScreens(); - updateSelectState(); - resizeApplet(); - }); - connect(m_displayModel, &DisplayModel::displayModeChanged, this, updateSelectState); - connect(m_displayModel, &DisplayModel::primaryScreenChanged, this, updateSelectState); - updateSelectState(); - - resizeApplet(); -} - -void WirelessCastingApplet::onStateChanged(WirelessCastingModel::CastingState state) -{ -#ifdef WIRELESS_CASTING_ENABLED - setEnabled(m_cfgEnabled); - if ((WirelessCastingModel::NoWirelessDevice == state || WirelessCastingModel::NotSupportP2P == state) && !m_model->multiscreensFlag()) { - m_wirelesscastingWidget->setVisible(false); - hide(); - return; - } - - m_monitorsListView->setVisible(WirelessCastingModel::List == state); - m_wirelesscastingWidget->setVisible((WirelessCastingModel::NotSupportP2P != state) && (WirelessCastingModel::NoWirelessDevice != state)); - - switch (state) { - case WirelessCastingModel::NoMonitor: - case WirelessCastingModel::List: - m_refresh->show(); - break; - case WirelessCastingModel::Connected: - m_lastConnMonitor = nullptr; - default: - m_refresh->hide(); - break; - } - - resizeApplet(); -#else - Q_UNUSED(state) -#endif -} - -void WirelessCastingApplet::onAddMonitor(const QString &path, Monitor *monitor) -{ - Q_UNUSED(path) - Q_UNUSED(monitor) -#ifdef WIRELESS_CASTING_ENABLED - MonitorItem *item = new MonitorItem(monitor); - m_monitorsModel->appendRow(item); - m_monitors[path] = MonitorMapItem{ item, monitor }; - resizeApplet(); -#endif -} - -void WirelessCastingApplet::onRemoveMonitor(const QString &path) -{ - Q_UNUSED(path) -#ifdef WIRELESS_CASTING_ENABLED - m_monitorsModel->removeRow(m_monitorsModel->indexFromItem(m_monitors[path].item).row()); - if (m_lastConnMonitor == m_monitors.value(path).monitor) - m_lastConnMonitor = nullptr; - m_monitors.remove(path); - resizeApplet(); -#endif -} - -bool WirelessCastingApplet::casting() const -{ - return m_model->state() == WirelessCastingModel::Connected; -} - -void WirelessCastingApplet::setMinHeight(int minHeight) -{ - m_minHeight = minHeight; - resizeApplet(); -} - -void WirelessCastingApplet::onContainerChanged(int container) -{ - m_showOnDock = Dock::APPLET_CONTAINER_DOCK == container; - layout()->setContentsMargins(0, (m_showOnDock ? 10 : 0), 0, 10); - update(); -} - -void WirelessCastingApplet::resizeApplet() -{ - int height = 0; -#ifdef WIRELESS_CASTING_ENABLED - // 列表高度 - if (m_monitorsListView->isVisibleTo(m_contentWidget)) { - for (int row = 0; row < m_monitorsModel->rowCount(); ++row) { - QModelIndex index = m_monitorsModel->index(row, 0); - auto item = dynamic_cast(m_monitorsModel->itemFromIndex(index)); - if (item) { - height += item->sizeHint().height() + m_monitorsListView->getItemSpacing(); - } - } - height -= m_monitorsListView->getItemSpacing(); - m_monitorsListView->setFixedHeight(height); - } -#endif - if (m_multiscreenOptionsListView->isVisibleTo(m_contentWidget)) { - int multiscreenOptionsHeight = m_multiscreenOptionsModel->rowCount() * (m_multiscreenOptionsListView->getStandardItemHeight() + m_multiscreenOptionsListView->getItemSpacing()) - m_multiscreenOptionsListView->getItemSpacing(); - m_multiscreenOptionsListView->setMinimumHeight(multiscreenOptionsHeight); - height += multiscreenOptionsHeight; - } - - // 标题栏 + 跳转按键 + 4个间距 - const int fixHeight = m_displaySetting->height() + (10 * (m_showOnDock ? 3 : 2)); - height += fixHeight; -#ifdef WIRELESS_CASTING_ENABLED - // 状态面板高度 - const int statePanelHeight = m_statePanel->isVisibleTo(m_contentWidget) ? - ((m_model->multiscreensFlag() && (m_model->state() == WirelessCastingModel::NoMonitor - || m_model->state() == WirelessCastingModel::DisabledWirelessDevice || m_model->state() == WirelessCastingModel::WarningInfo)) - ? m_statePanel->infoHeight() : (m_minHeight - fixHeight - m_wirelesscastingTitle->height() - 5)) : 0; - - m_statePanel->setFixedHeight(statePanelHeight); - height += m_statePanel->isVisibleTo(m_contentWidget) ? statePanelHeight : 0; -#endif - // 如果比允许的最小高度还小,则以最小高度为准 - height = qMax(m_minHeight, height); -#ifdef WIRELESS_CASTING_ENABLED - // 自定义最大高度为显示10个item的高度 - const int maxHeight = fixHeight + (m_wirelesscastingWidget->isVisibleTo(this) ? m_wirelesscastingWidget->height() : 0) - + (10 * (m_monitorsListView->getStandardItemHeight() + m_monitorsListView->getItemSpacing()) - - m_monitorsListView->getItemSpacing()); - - // 如果比自定义最大高度还大,则以自定义最大高度为准 - height = qMin(maxHeight, height); -#endif - // 如果比允许的最大高度还大,则以最大高度为准 - height = qMin(Dock::DOCK_POPUP_WIDGET_MAX_HEIGHT, height); - - // 滚动区高度 - m_scrollArea->setFixedHeight(m_contentWidget->isVisibleTo(this) ? (height - fixHeight) : 0); - resize(width(), height); -} - -StatePanel::StatePanel(WirelessCastingModel *model, QWidget *parent) - : QWidget(parent) - , m_model(model) - , m_infoWidget(new QWidget(this)) - , m_infoLab(new DLabel(this)) - , m_noDeviceBox(new QWidget(this)) - , m_iconNoDevice(new DLabel(this)) - , m_noDevice(new DLabel(this)) - , m_connectedDeviceBox(new QWidget(this)) - , m_iconConnected(new DLabel(this)) - , m_connected(new DLabel(this)) - , m_disconnMonitor(new CancelButton) -{ - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); - setFocusPolicy(Qt::FocusPolicy::StrongFocus); - - QVBoxLayout *layout = new QVBoxLayout(this); - layout->setContentsMargins(0, 0, 0, 0); - layout->setSpacing(0); - - // 提示信息 - QVBoxLayout *infoLayout = new QVBoxLayout(m_infoWidget); - infoLayout->setSpacing(0); - infoLayout->setContentsMargins(10, 0, 20, 0); - m_infoLab->setWordWrap(true); - m_infoLab->setAlignment(Qt::AlignLeft); - infoLayout->addWidget(m_infoLab); - DFontSizeManager::instance()->bind(m_infoLab, DFontSizeManager::T8, QFont::Medium); - layout->addWidget(m_infoWidget); - - // 没有设备提示框 - m_iconNoDevice->setFixedSize(128, 128); - m_noDevice->setText(tr("No available casting wireless monitors found")); - m_noDevice->setWordWrap(true); - m_noDevice->setAlignment(Qt::AlignCenter); - m_noDevice->setForegroundRole(DPalette::TextTips); - DFontSizeManager::instance()->bind(m_noDevice, DFontSizeManager::T8); - QVBoxLayout *noDevice = new QVBoxLayout(m_noDeviceBox); - noDevice->setContentsMargins(0, 0, 0, 30); - noDevice->setSpacing(0); - noDevice->setAlignment(Qt::AlignTop | Qt::AlignHCenter); - noDevice->addWidget(m_iconNoDevice, 0, Qt::AlignTop | Qt::AlignHCenter); - noDevice->addWidget(m_noDevice); - layout->addWidget(m_noDeviceBox, 0, Qt::AlignCenter); - - // 设备已连接提示框 - m_iconConnected->setFixedSize(128, 128); - m_connected->setWordWrap(true); - m_connected->setAlignment(Qt::AlignCenter); - m_disconnMonitor->setText(tr("Disconnect")); - m_disconnMonitor->setObjectName("DisconnMonitor"); - m_disconnMonitor->setFixedSize(130, 36); - QVBoxLayout *connected = new QVBoxLayout(m_connectedDeviceBox); - connected->setContentsMargins(0, 0, 0, 0); - connected->setSpacing(0); - connected->addWidget(m_iconConnected); - connected->addWidget(m_connected); - connected->setSpacing(15); - connected->addWidget(m_disconnMonitor); - layout->addWidget(m_connectedDeviceBox, 0, Qt::AlignCenter); - - setState(m_model->state()); - connect(m_disconnMonitor, &QPushButton::clicked, this, &StatePanel::disconnMonitor); - connect(m_model, &WirelessCastingModel::stateChanged, this, &StatePanel::setState); - connect(m_model, &WirelessCastingModel::multiscreensFlagChanged, this, [this] { - setState(m_model->state()); - }); - - auto updateThemeType = [this] (DGuiApplicationHelper::ColorType type) { - if (type == DGuiApplicationHelper::ColorType::LightType) { - m_iconConnected->setPixmap(DIcon::loadNxPixmap(":/icons/deepin/builtin/light/icons/success_128px.svg")); - m_iconNoDevice->setPixmap(DIcon::loadNxPixmap(":/icons/deepin/builtin/light/icons/none_128px.svg")); - } else { - m_iconConnected->setPixmap(DIcon::loadNxPixmap(":/icons/deepin/builtin/dark/icons/success_128px.svg")); - m_iconNoDevice->setPixmap(DIcon::loadNxPixmap(":/icons/deepin/builtin/dark/icons/none_128px.svg")); - } - }; - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, updateThemeType); - updateThemeType(DGuiApplicationHelper::instance()->themeType()); -} - -StatePanel::~StatePanel() = default; - -void StatePanel::setState(WirelessCastingModel::CastingState state) -{ - setVisible(WirelessCastingModel::NotSupportP2P != state && WirelessCastingModel::NoWirelessDevice != state && WirelessCastingModel::List != state); - switch (state) { - case WirelessCastingModel::Connected: - m_connected->setText(tr("Successfully cast the screen to %1").arg(m_model->curMonitorName())); - m_connectedDeviceBox->setVisible(true); - m_noDeviceBox->setVisible(false); - m_infoWidget->setVisible(false); - break; - case WirelessCastingModel::NoMonitor: - m_connectedDeviceBox->setVisible(false); - m_noDeviceBox->setVisible(!m_model->multiscreensFlag()); - m_infoWidget->setVisible(m_model->multiscreensFlag()); - break; - case WirelessCastingModel::WarningInfo: - case WirelessCastingModel::NotSupportP2P: - case WirelessCastingModel::DisabledWirelessDevice: - m_infoWidget->setVisible(true); - m_noDeviceBox->setVisible(false); - m_connectedDeviceBox->setVisible(false); - break; - default: - break; - } - - if (WirelessCastingModel::WarningInfo == state) - m_infoLab->setText(tr("The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor")); - else if (WirelessCastingModel::DisabledWirelessDevice == state) - m_infoLab->setText(tr("You need to enable wireless network to cast the screen to a wireless monitor")); - else if (WirelessCastingModel::NoMonitor == state) - m_infoLab->setText(tr("No available casting wireless monitors found")); -} - -int StatePanel::infoHeight() -{ - auto getLine = [](QPainter *painter, const QRectF &rect, int lineHeight, QTextLayout *layout, Qt::TextElideMode mode) - { - int lineCount = 0; - qreal height = 0; - QString text = layout->text(); - QTextOption text_option = layout->textOption(); - - if (painter) { - text_option.setTextDirection(painter->layoutDirection()); - } - - layout->beginLayout(); - - QTextLine line = layout->createLine(); - QPointF offset = rect.topLeft(); - - while (line.isValid()) { - ++lineCount; - height += lineHeight; - - if (height + lineHeight > rect.height()) { - QString end_str = text.mid(line.textStart()); - - if (painter) - end_str = painter->fontMetrics().elidedText(end_str, mode, qRound(rect.width() - 1)); - - layout->endLayout(); - layout->setText(end_str); - - text_option.setWrapMode(QTextOption::NoWrap); - layout->beginLayout(); - line = layout->createLine(); - line.setLineWidth(rect.width() - 1); - text = end_str; - } else { - line.setLineWidth(rect.width()); - } - - line.setPosition(offset); - - if (painter) { - line.draw(painter, QPointF(0, 0)); - } - - offset.setY(offset.y() + lineHeight); - - if (height + lineHeight > rect.height()) - break; - - line = layout->createLine(); - } - layout->setTextOption(text_option); - layout->endLayout(); - return lineCount; - }; - - QTextLayout layout(m_infoLab->text(), m_infoLab->font()); - QTextOption option; - option.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); - option.setAlignment(Qt::AlignLeft | Qt::AlignVCenter); - layout.setTextOption(option); - QFontMetrics fm(m_infoLab->font()); - int line = getLine(nullptr, QRectF(QPointF(0, 0), QSizeF(330, INT_MAX)), fm.boundingRect(m_infoLab->text()).height(), &layout, Qt::ElideNone); - return fm.boundingRect(m_infoLab->text()).height() * line; -} - -} // namespace wirelesscasting -} // namespace dde diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.h deleted file mode 100644 index 02cd540f5..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.h +++ /dev/null @@ -1,129 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef WIRELESSCASTINGAPPLET_H -#define WIRELESSCASTINGAPPLET_H - -#include "widget/commoniconbutton.h" -#include "wirelesscastingmodel.h" -#include "widget/monitorlistview.h" -#include "widget/jumpsettingbutton.h" -#include "displaymodel.h" - -#include -#include -#include - -#include - -DWIDGET_BEGIN_NAMESPACE -class DLabel; -DWIDGET_END_NAMESPACE - -using namespace Dtk::Widget; - -namespace dde { -namespace wirelesscasting { - -class StatePanel; -class WirelessCastingApplet : public QWidget -{ - Q_OBJECT -public: - explicit WirelessCastingApplet(WirelessCastingModel *model, DisplayModel *displayMode, QWidget *parent = nullptr); - - void resizeApplet(); - void setMinHeight(int minHeight); - void onContainerChanged(int container); -#ifdef WIRLESS_CASTING_ENABLED - QWidget *refreshButton() { return m_refresh; }; -#endif - -public slots: - void onStateChanged(WirelessCastingModel::CastingState status); - void onAddMonitor(const QString &path, Monitor *monitor); - void onRemoveMonitor(const QString &path); - bool casting() const; - -signals: - void castingChanged(bool casting); - void requestHideApplet(); - -private: - void initUI(); - void initMonitors(); - -private: - WirelessCastingModel *m_model; - DisplayModel *m_displayModel; - - QWidget *m_contentWidget; - QScrollArea *m_scrollArea; -#ifdef WIRELESS_CASTING_ENABLED - CommonIconButton *m_refresh; - QWidget *m_wirelesscastingWidget; - QWidget *m_wirelesscastingTitle; - MonitorListView *m_monitorsListView; - QStandardItemModel *m_monitorsModel; - StatePanel *m_statePanel; -#endif - QWidget *m_multiscreenOptionsWidget; - QWidget *m_multiscreenOptionsTitle; - MonitorListView *m_multiscreenOptionsListView; - QStandardItemModel *m_multiscreenOptionsModel; - bool m_showOnDock; - - JumpSettingButton *m_displaySetting; - - // 包含MonitorItem*, Monitor*的结构体 - typedef struct _MonitorMapItem { - MonitorItem *item; - Monitor *monitor; - } MonitorMapItem; - QMap m_monitors; - Monitor *m_lastConnMonitor; - bool m_cfgShowCasting; - bool m_cfgEnabled; - int m_minHeight; -}; - -class StatePanel : public QWidget -{ - Q_OBJECT -public: - enum ConnectionState{ - Connected = 1, - NoMonitor, - WarningInfo, - DisabledWirelessDevice, - NoWirelessDevice, - Count - }; - - explicit StatePanel(WirelessCastingModel *model, QWidget *parent = nullptr); - ~StatePanel() Q_DECL_OVERRIDE; - int infoHeight(); - -public slots: - void setState(WirelessCastingModel::CastingState status); - -signals: - void disconnMonitor(); - -private: - WirelessCastingModel *m_model; - QWidget *m_infoWidget; - DLabel *m_infoLab; - QWidget *m_noDeviceBox; - DLabel *m_iconNoDevice; - DLabel *m_noDevice; - QWidget *m_connectedDeviceBox; - DLabel *m_iconConnected; - DLabel *m_connected; - CancelButton *m_disconnMonitor; -}; -} // namespace wirelesscasting -} // namespace dde - -#endif // WIRELESSCASTINGAPPLET_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.cpp deleted file mode 100644 index 2e3c5c8c9..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.cpp +++ /dev/null @@ -1,231 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "wirelesscastingitem.h" - -#include "quickpanelwidget.h" -#include "wirelesscastingapplet.h" -#include "wirelesscastingmodel.h" -#include "displaymodel.h" - -#include - - -#include - -#include -#include - -namespace dde { -namespace wirelesscasting { - -#define SETTINGS "settings" - -WirelessCastingItem::WirelessCastingItem(QWidget *parent) - : QWidget(parent) - , m_model(new WirelessCastingModel(this)) - , m_displayMode(new DisplayModel(this)) - , m_quickPanel(new QuickPanelWidget()) - , m_appletWidget(new WirelessCastingApplet(m_model, m_displayMode, this)) - , m_trayIcon(new QIcon()) - , m_tips(nullptr) -{ - init(); - auto syncState = [this] { - bool const canCasting = m_canCasting; -#ifdef WIRELESS_CASTING_ENABLED - WirelessCastingModel::CastingState const state = m_model->state(); - m_canCasting = (WirelessCastingModel::NoWirelessDevice != state && WirelessCastingModel::NotSupportP2P != state) || m_model->multiscreensFlag(); -#else - m_canCasting = m_model->multiscreensFlag(); -#endif - if (canCasting != m_canCasting) - Q_EMIT canCastingChanged(m_canCasting); - - *m_trayIcon = QIcon::fromTheme("network-display-failed-symbolic"); - m_quickPanel->setIcon(QIcon::fromTheme("network-display-failed-symbolic")); - m_quickPanel->setActive(false); - if (m_model->state() == WirelessCastingModel::Connected && m_displayMode->screens().size() > 1) { - m_quickPanel->setDescription(tr("Multiple services started")); - } else if (m_model->state() != WirelessCastingModel::Connected && m_displayMode->screens().size() > 1) { - m_quickPanel->setDescription(m_displayMode->currentMode()); - } else if (WirelessCastingModel::Connected != m_model->state()) { - if (m_model->connectState()) { - m_quickPanel->setDescription(tr("Connecting")); - } else { - m_quickPanel->setDescription(tr("Not connected")); - } - } else { - *m_trayIcon = QIcon::fromTheme("network-display-succeed-symbolic"); - m_quickPanel->setIcon(QIcon::fromTheme("network-display-succeed-symbolic")); - m_quickPanel->setActive(true); - m_quickPanel->setDescription(m_model->curMonitorName()); - } - update(); - }; - connect(m_displayMode, &DisplayModel::displayModeChanged, this, syncState); - connect(m_displayMode, &DisplayModel::primaryScreenChanged, this, syncState); - connect(m_displayMode, &DisplayModel::currentModeChanged, this, syncState); - connect(m_model, &WirelessCastingModel::stateChanged, this, [=](WirelessCastingModel::CastingState state) { - Q_UNUSED(state) - syncState(); - }); - connect(m_model, &WirelessCastingModel::connectStateChanged, this, syncState); - connect(m_model, &WirelessCastingModel::multiscreensFlagChanged, this, syncState); - syncState(); - connect(m_quickPanel, &QuickPanelWidget::panelClicked, this, &WirelessCastingItem::requestExpand); - connect(m_quickPanel, &QuickPanelWidget::iconClicked, this, [this] { - if (m_model->state() == WirelessCastingModel::CastingState::Connected && !m_model->multiscreensFlag()) { - m_model->disconnectMonitor(); - } else { - Q_EMIT requestExpand(); - } - }); - connect(m_appletWidget, &WirelessCastingApplet::requestHideApplet, this, &WirelessCastingItem::requestHideApplet); - m_appletWidget->installEventFilter(this); -} - -QLabel *WirelessCastingItem::tips() -{ - if (!m_tips) { - m_tips = new QLabel; - m_tips->setForegroundRole(QPalette::BrightText); - m_tips->setContentsMargins(0, 0, 0, 0); - //connect(qApp, &QGuiApplication::fontChanged, this, &WirelessCastingItem::tips); - } - - if (m_model->state() == WirelessCastingModel::Connected && m_displayMode->screens().size() > 1) { - m_tips->setText(tr("Multiple services started")); - } else if (m_model->state() != WirelessCastingModel::Connected && m_displayMode->screens().size() > 1) { - m_tips->setText(m_displayMode->currentMode()); - } else if (WirelessCastingModel::Connected != m_model->state()) { - if (m_model->connectState()) { - m_tips->setText(tr("Connecting")); - } else { - m_tips->setText(tr("Not connected")); - } - } else { - m_tips->setText(m_model->curMonitorName()); - } - m_tips->adjustSize(); - return m_tips; -} - -WirelessCastingItem::~WirelessCastingItem() -{ - delete m_quickPanel; - delete m_trayIcon; - if (m_tips) { - m_tips->deleteLater(); - m_tips = nullptr; - } -} - -QWidget *WirelessCastingItem::quickPanelWidget() const -{ - return m_quickPanel; -} - -QWidget *WirelessCastingItem::trayIcon() -{ - return this; -} - -QWidget *WirelessCastingItem::appletWidget() const -{ - return m_appletWidget; -} - -QWidget *WirelessCastingItem::refreshButton() const -{ -#ifdef WIRELESS_CASTING_ENABLED - if (m_appletWidget) - return m_appletWidget->refreshButton(); -#endif - return nullptr; -} - -void WirelessCastingItem::setAppletMinHeight(int minHeight) -{ - m_appletWidget->setMinHeight(minHeight); -} - -void WirelessCastingItem::resizeEvent(QResizeEvent *event) -{ - QWidget::resizeEvent(event); - - const Dock::Position position = qApp->property(PROP_POSITION).value(); - // 保持横纵比 - if (position == Dock::Bottom || position == Dock::Top) { - setMaximumWidth(height()); - setMaximumHeight(QWIDGETSIZE_MAX); - } else { - setMaximumHeight(width()); - setMaximumWidth(QWIDGETSIZE_MAX); - } -} - -void WirelessCastingItem::paintEvent(QPaintEvent *event) -{ - QWidget::paintEvent(event); - - QPainter painter(this); - m_trayIcon->paint(&painter, rect()); -} - -void WirelessCastingItem::init() -{ - m_quickPanel->setActive(true); - m_quickPanel->setText(tr("Multiple Displays")); - m_quickPanel->setDescription(tr("Not connected")); - m_quickPanel->setIcon(QIcon::fromTheme("network-display-failed-symbolic")); - - *m_trayIcon = QIcon::fromTheme("network-display-succeed-symbolic"); - setForegroundRole(QPalette::BrightText); -} - -bool WirelessCastingItem::eventFilter(QObject *watcher, QEvent *event) -{ - if (watcher == m_appletWidget) { - if (event->type() == QEvent::Hide) { - m_model->enableRefresh(false); - } else if (event->type() == QEvent::Show) { - m_model->enableRefresh(true); - m_appletWidget->resizeApplet(); - } - } - return QObject::eventFilter(watcher, event); -} - -const QString WirelessCastingItem::contextMenu() const -{ - QList items; - items.reserve(1); - - QMap settings; - settings["itemId"] = SETTINGS; - settings["itemText"] = tr("Display settings"); - settings["isActive"] = true; - items.push_back(settings); - - QMap menu; - menu["items"] = items; - menu["checkableMenu"] = false; - menu["singleCheck"] = false; - return QJsonDocument::fromVariant(menu).toJson(); -} - -void WirelessCastingItem::invokeMenuItem(const QString menuId, const bool checked) -{ - Q_UNUSED(checked); - if (menuId == SETTINGS) { - QStringList args {"--by-user", "org.deepin.dde.control-center", "--", "-p", "display"}; - QProcess::startDetached("dde-am", args); - - Q_EMIT requestHideApplet(); - } -} - -} // namespace wirelesscasting -} // namespace dde diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.h deleted file mode 100644 index 204fba869..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingitem.h +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef WIRELESSCASTINGITEM_H -#define WIRELESSCASTINGITEM_H - -#include - -#define WIRELESS_CASTING_KEY "wireless-casting-item-key" - -class QPixmap; -class QLabel; -class WirelessCastingModel; -class DisplayModel; -namespace dde { -namespace wirelesscasting { -class QuickPanelWidget; -class WirelessCastingApplet; - -class WirelessCastingItem : public QWidget -{ - Q_OBJECT -public: - WirelessCastingItem(QWidget *parent = nullptr); - ~WirelessCastingItem() override; - - QWidget *quickPanelWidget() const; - QWidget *trayIcon(); - QWidget *appletWidget() const; - QWidget *refreshButton() const; - QLabel *tips(); - bool canCasting() const{ return m_canCasting; } - void setAppletMinHeight(int minHeight); - const QString contextMenu() const; - void invokeMenuItem(const QString menuId, const bool checked); - -protected: - void resizeEvent(QResizeEvent *event) override; - void paintEvent(QPaintEvent *event) override; - bool eventFilter(QObject *watcher, QEvent *event) override; - -public Q_SLOTS: - -signals: - void canCastingChanged(bool canCasting); - void requestExpand(); - void requestHideApplet(); - -private: - void init(); - - WirelessCastingModel *m_model; - DisplayModel *m_displayMode; - QuickPanelWidget *m_quickPanel; - WirelessCastingApplet *m_appletWidget; - QIcon *m_trayIcon; - QLabel *m_tips; - bool m_canCasting = false; -}; - -} // namespace wirelesscasting -} // namespace dde -#endif // WIRELESSCASTINGITEM_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.cpp b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.cpp deleted file mode 100644 index 26e326546..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#include "wirelesscastingplugin.h" - -#include "wirelesscastingapplet.h" -#include "wirelesscastingitem.h" - -#include - -namespace dde { -namespace wirelesscasting { - -WirelessCastingPlugin::WirelessCastingPlugin(QObject *parent) - : QObject(parent) - , m_wirelessCastingItem(nullptr) - , m_messageCallback(nullptr) -{ - QTranslator *translator = new QTranslator(this); - if (translator->load(QString("/usr/share/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_%1.qm").arg(QLocale::system().name()))) { - QCoreApplication::installTranslator(translator); - } -} - -void WirelessCastingPlugin::init(PluginProxyInterface *proxyInter) -{ - m_proxyInter = proxyInter; - - if (m_wirelessCastingItem) - return; - m_wirelessCastingItem = new WirelessCastingItem(); - if (m_wirelessCastingItem->canCasting()) - m_proxyInter->itemAdded(this, WIRELESS_CASTING_KEY); - - connect(m_wirelessCastingItem, &WirelessCastingItem::canCastingChanged, this, [this](bool canCasting) { - if (canCasting) - m_proxyInter->itemAdded(this, WIRELESS_CASTING_KEY); - else - m_proxyInter->itemRemoved(this, WIRELESS_CASTING_KEY); - - notifySupportFlagChanged(canCasting); - }); - connect(m_wirelessCastingItem, &WirelessCastingItem::requestExpand, this, [this] { - m_proxyInter->requestSetAppletVisible(this, WIRELESS_CASTING_KEY, true); - }); - connect(m_wirelessCastingItem, &WirelessCastingItem::requestHideApplet, this, [this] { - m_proxyInter->requestSetAppletVisible(this, WIRELESS_CASTING_KEY, false); - }); -} - -void WirelessCastingPlugin::pluginStateSwitched() { } - -bool WirelessCastingPlugin::pluginIsDisable() -{ - return false; -} - -QWidget *WirelessCastingPlugin::itemWidget(const QString &itemKey) -{ - if ("quick_item_key" == itemKey) - return m_wirelessCastingItem->quickPanelWidget(); - if (WIRELESS_CASTING_KEY == itemKey) - return m_wirelessCastingItem->trayIcon(); - return nullptr; -} - -QWidget *WirelessCastingPlugin::itemTipsWidget(const QString &itemKey) -{ - Q_UNUSED(itemKey) - return m_wirelessCastingItem->tips(); -} - -QWidget *WirelessCastingPlugin::itemPopupApplet(const QString &itemKey) -{ - Q_UNUSED(itemKey) - return m_wirelessCastingItem->appletWidget(); -} - -const QString WirelessCastingPlugin::itemContextMenu(const QString &itemKey) -{ - if (itemKey == WIRELESS_CASTING_KEY) { - return m_wirelessCastingItem->contextMenu(); - } - return QString(); -} - -void WirelessCastingPlugin::invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) -{ - if (itemKey == WIRELESS_CASTING_KEY) { - m_wirelessCastingItem->invokeMenuItem(menuId, checked); - } -} - -int WirelessCastingPlugin::itemSortKey(const QString &itemKey) -{ - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - return m_proxyInter->getValue(this, key, 4).toInt(); -} - -void WirelessCastingPlugin::setSortKey(const QString &itemKey, const int order) -{ - const QString key = QString("pos_%1_%2").arg(itemKey).arg(Dock::Efficient); - - m_proxyInter->saveValue(this, key, order); -} - -void WirelessCastingPlugin::refreshIcon(const QString &itemKey) { Q_UNUSED(itemKey) } - -void WirelessCastingPlugin::pluginSettingsChanged() { } - -static QString toJson(const QJsonObject &jsonObj) -{ - QJsonDocument doc; - doc.setObject(jsonObj); - return doc.toJson(); -} - -QString WirelessCastingPlugin::message(const QString &msg) -{ - QJsonParseError jsonParseError; - const QJsonDocument &resultDoc = QJsonDocument::fromJson(msg.toLocal8Bit(), &jsonParseError); - if (jsonParseError.error != QJsonParseError::NoError || resultDoc.isEmpty()) { - qWarning() << "Result json parse error"; - return "{}"; - } - - QJsonObject retObj; - const auto &msgObj = resultDoc.object(); - const QString &cmdType = msgObj.value(Dock::MSG_TYPE).toString(); - if (cmdType == Dock::MSG_SET_APPLET_MIN_HEIGHT) { - const int minHeight = msgObj.value(Dock::MSG_DATA).toInt(-1); - if (m_wirelessCastingItem && minHeight > 0) - m_wirelessCastingItem->setAppletMinHeight(minHeight); - }else if (cmdType == Dock::MSG_GET_SUPPORT_FLAG) { - if (m_wirelessCastingItem) - retObj[Dock::MSG_SUPPORT_FLAG] = m_wirelessCastingItem->canCasting(); - } else if (cmdType == Dock::MSG_APPLET_CONTAINER) { - if (m_wirelessCastingItem && m_wirelessCastingItem->appletWidget()) { - auto *applet = dynamic_cast(m_wirelessCastingItem->appletWidget()); - if (applet) - applet->onContainerChanged(msgObj.value(Dock::MSG_DATA).toInt(Dock::APPLET_CONTAINER_DOCK)); - } - } - - return toJson(retObj); -} - -const QString WirelessCastingPlugin::pluginDisplayName() const -{ - return tr("Multiple Displays"); -} - -void WirelessCastingPlugin::notifySupportFlagChanged(bool supportFlag) -{ - if (!m_messageCallback) { - return; - } - - QJsonObject msg; - msg[Dock::MSG_TYPE] = Dock::MSG_SUPPORT_FLAG_CHANGED; - msg[Dock::MSG_DATA] = supportFlag; - m_messageCallback(this, toJson(msg)); -} - - -} // namespace wirelesscasting -} // namespace dde diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.h b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.h deleted file mode 100644 index 06316f651..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingplugin.h +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: LGPL-3.0-or-later - -#ifndef WIRELESSCASTINGPLUGIN_H -#define WIRELESSCASTINGPLUGIN_H -#include "wirelesscastingitem.h" -#include "pluginsiteminterface_v2.h" - -#include - -namespace dde { -namespace wirelesscasting { -class WirelessCastingPlugin : public QObject, public PluginsItemInterfaceV2 -{ - Q_OBJECT - Q_INTERFACES(PluginsItemInterfaceV2) - Q_PLUGIN_METADATA(IID ModuleInterface_iid_V2 FILE "../wirelesscasting.json") - -public: - explicit WirelessCastingPlugin(QObject* parent = nullptr); - - const QString pluginName() const override { return "wireless-casting"; } // 在任务栏使用名称排序,不可随意修改 - const QString pluginDisplayName() const override; - void init(PluginProxyInterface* proxyInter) override; - void pluginStateSwitched() override; - bool pluginIsAllowDisable() override { return true; } - bool pluginIsDisable() override; - QWidget* itemWidget(const QString& itemKey) override; - QWidget* itemTipsWidget(const QString& itemKey) override; - QWidget* itemPopupApplet(const QString& itemKey) override; - const QString itemContextMenu(const QString& itemKey) override; - void invokedMenuItem(const QString& itemKey, const QString& menuId, const bool checked) override; - int itemSortKey(const QString& itemKey) override; - void setSortKey(const QString& itemKey, const int order) override; - void refreshIcon(const QString& itemKey) override; - void pluginSettingsChanged() override; - Dock::PluginFlags flags() const override { return Dock::Type_Quick | Dock::Quick_Panel_Multi | Dock::Attribute_Normal; } - virtual void setMessageCallback(MessageCallbackFunc cb) override { m_messageCallback = cb; } - virtual QString message(const QString &msg) override; - -private: - void notifySupportFlagChanged(bool supportFlag); - -private: - WirelessCastingItem *m_wirelessCastingItem; - MessageCallbackFunc m_messageCallback; -}; - -} // namespace wirelesscasting -} // namespace dde -#endif // WIRELESSCASTINGPLUGIN_H diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin.ts deleted file mode 100644 index 7a005b014..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin.ts +++ /dev/null @@ -1,119 +0,0 @@ - - - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ady.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ady.ts deleted file mode 100644 index 8c5450765..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ady.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af.ts deleted file mode 100644 index eeebec553..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af_ZA.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af_ZA.ts deleted file mode 100644 index 20e64429a..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_af_ZA.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ak.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ak.ts deleted file mode 100644 index 3ea1a505e..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ak.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am.ts deleted file mode 100644 index e52d056bc..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am_ET.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am_ET.ts deleted file mode 100644 index 56ba82dcc..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_am_ET.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ar.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ar.ts deleted file mode 100644 index 47af2e938..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ar.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ast.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ast.ts deleted file mode 100644 index eecbf5c95..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ast.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_az.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_az.ts deleted file mode 100644 index b437e7c6a..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_az.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - Ekran ayarları - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - Qoşulur - - - - - - Not connected - Qoşulmayıb - - - - Multiple Displays - - - - - Display settings - Ekran ayarları - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bg.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bg.ts deleted file mode 100644 index 704c0629a..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bg.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bn.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bn.ts deleted file mode 100644 index 56f133356..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bn.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bo.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bo.ts deleted file mode 100644 index b3c86b276..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bo.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - སྦྲེལ་བཞིན་པ། - - - - Cancel - མི་སྦྲེལ། - - - - dde::wirelesscasting::StatePanel - - - Disconnect - སྦྲེལ་མཐུད་ཕྲལ་གཅོད། - - - - - No available casting wireless monitors found - བཪྙན་འཆར་ཐུབ་པའི་སྒྲིག་འགོད་ཪྙེད་མ་སོང་། - - - - Successfully cast the screen to %1 - བཪྙན་ཡོལ་%1བདེ་བླག་ངང་འཕེན་ཐུབ། - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - སྐུད་མེད་དྲ་གཱ་ཡིས་ནུས་པ་འདི་ལ་རྒྱབ་སྐྱོར་མེད་པས། བརྙན་ཡོལ་འདི་སྐུད་མེད་མངོན་སྟོན་ཆས་ཐོག་འཕེན་ཐབས་བྲལ། - - - - You need to enable wireless network to cast the screen to a wireless monitor - སྐུད་མེད་དྲ་གྭ་སྤྱད་ན་གཞི་ནས་སྐུད་མེད་བཪྙན་ཡོལ་ཐོག་ཏུ་བཪྙན་འཆར་ཐུབ། - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - སྐུད་མེད་ཡོལ་འཆར། - - - - Multiple Display options - - - - - Display settings - བཪྙན་ཡོལ་སྒྲིག་འགོད། - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - སྦྲེལ་བཞིན་པ། - - - - - - Not connected - སྦྲེལ་མེད་པ། - - - - Multiple Displays - - - - - Display settings - བཪྙན་ཡོལ་སྒྲིག་འགོད། - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bqi.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bqi.ts deleted file mode 100644 index 8d22e7e90..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_bqi.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_br.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_br.ts deleted file mode 100644 index e3c3ff1ba..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_br.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ca.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ca.ts deleted file mode 100644 index 6a4c5a405..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ca.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Es connecta - - - - Cancel - Cancel·la - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Desconnecta - - - - - No available casting wireless monitors found - No s'han trobat monitors d'emissió sense fil disponibles. - - - - Successfully cast the screen to %1 - S'emet la pantalla correctament a %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - La targeta sense fil no admet aquesta funció i no pot transmetre la pantalla a un monitor sense fil. - - - - You need to enable wireless network to cast the screen to a wireless monitor - Heu d'habilitar la xarxa sense fil per emetre la pantalla a un monitor sense fil. - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Emissió sense fil - - - - Multiple Display options - Pantalles múltiples - - - - Display settings - Configuració de la pantalla - - - - Duplicate - Duplica - - - - Extend - Estén - - - - Only on %1 - Només a %1 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - Diversos serveis iniciats - - - - - Connecting - Es connecta - - - - - - Not connected - No connectat - - - - Multiple Displays - Pantalles múltiples - - - - Display settings - Configuració de la pantalla - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - Pantalles múltiples - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cgg.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cgg.ts deleted file mode 100644 index 970121eaf..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cgg.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cs.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cs.ts deleted file mode 100644 index a85178622..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_cs.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_da.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_da.ts deleted file mode 100644 index 73e02f7f2..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_da.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_de.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_de.ts deleted file mode 100644 index 516a35ad7..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_de.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Wird verbunden - - - - Cancel - Abbrechen - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Trennen - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - Sie müssen das Drahtlosnetzwerk aktivieren, um den Bildschirm an einen drahtlosen Monitor zu übertragen - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - Anzeigeeinstellungen - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - Wird verbunden - - - - - - Not connected - Nicht verbunden - - - - Multiple Displays - - - - - Display settings - Anzeigeeinstellungen - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el.ts deleted file mode 100644 index 247e96a6f..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el_GR.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el_GR.ts deleted file mode 100644 index 8a146bb4c..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_el_GR.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_AU.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_AU.ts deleted file mode 100644 index 76553938a..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_AU.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_GB.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_GB.ts deleted file mode 100644 index 7dabeffa6..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_GB.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_NO.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_NO.ts deleted file mode 100644 index 1fb62e724..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_NO.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_US.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_US.ts deleted file mode 100644 index 28660ef52..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_en_US.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eo.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eo.ts deleted file mode 100644 index 09c430041..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eo.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_es.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_es.ts deleted file mode 100644 index fabd9bcd2..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_es.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Conectando - - - - Cancel - Cancelar - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Desconectar - - - - - No available casting wireless monitors found - No se encontraron monitores para transmisión inalámbrica - - - - Successfully cast the screen to %1 - Pantalla transmitida exitosamente a %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - Debe habilitar la red inalámbrica para transmitir la pantalla a un monitor inalámbrico - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Transmisión a pantalla inalámbrica - - - - Multiple Display options - - - - - Display settings - Ajustes de Pantalla - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - Conectando - - - - - - Not connected - Sin conexión - - - - Multiple Displays - - - - - Display settings - Ajustes de Pantalla - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_et.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_et.ts deleted file mode 100644 index e52071add..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_et.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eu.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eu.ts deleted file mode 100644 index 61c9b1ead..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_eu.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fa.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fa.ts deleted file mode 100644 index 56495bfc8..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fa.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fi.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fi.ts deleted file mode 100644 index 7aed0e17b..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fi.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Yhdistää - - - - Cancel - Peruuta - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Katkaise - - - - - No available casting wireless monitors found - Suoratoistoon sopivia langattomia näyttöjä ei löytynyt - - - - Successfully cast the screen to %1 - Näytön suoratoisto onnistui %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - Langaton verkkokortti ei tue tätä ominaisuutta, eikä se voi lähettää näyttöä langattomasti - - - - You need to enable wireless network to cast the screen to a wireless monitor - Sinun on otettava langaton verkko käyttöön, jotta voit suoratoistaa langattomaan näyttöön - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Langaton suoratoisto - - - - Multiple Display options - Usean näytön asetuksia - - - - Display settings - Näytön asetukset - - - - Duplicate - Kahdenna - - - - Extend - Laajenna - - - - Only on %1 - Vain %1 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - Palvelut aloitettiin - - - - - Connecting - Yhdistää - - - - - - Not connected - Ei yhteyttä - - - - Multiple Displays - Useita näyttöjä - - - - Display settings - Näytön asetukset - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - Useita näyttöjä - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fil.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fil.ts deleted file mode 100644 index 33e0e5e3e..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fil.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fr.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fr.ts deleted file mode 100644 index 0d79e0edb..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_fr.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl.ts deleted file mode 100644 index 8f2e6ef1a..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl_ES.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl_ES.ts deleted file mode 100644 index dc805af22..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_gl_ES.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_he.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_he.ts deleted file mode 100644 index b9f15d7d0..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_he.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hi_IN.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hi_IN.ts deleted file mode 100644 index c2b7ef79e..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hi_IN.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hr.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hr.ts deleted file mode 100644 index 24c9f221b..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hr.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hu.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hu.ts deleted file mode 100644 index 0e32e1100..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hu.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Kapcsolódás - - - - Cancel - Mégsem - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Szétkapcsolás - - - - - No available casting wireless monitors found - Nem található elérhető vezeték nélküli monitor  - - - - Successfully cast the screen to %1 - A képernyő sikeresen vetítve a %1-re - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - A vezeték nélküli kártya nem támogatja ezt a funkciót, és nem tudja átküldeni a képernyőt vezeték nélküli monitorra - - - - You need to enable wireless network to cast the screen to a wireless monitor - Engedélyeznie kell a vezeték nélküli hálózatot a képernyő vezeték nélküli monitorra való vetítéshez - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Vezeték nélküli átküldés - - - - Multiple Display options - Többképernyős mód beállításai - - - - Display settings - Képernyő beállítások - - - - Duplicate - Megkettőzés - - - - Extend - Kiterjesztés - - - - Only on %1 - Megjelenítés csak a %1-n - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - Több szolgáltatás is elindult - - - - - Connecting - Kapcsolódás - - - - - - Not connected - Nincs kapcsolódva - - - - Multiple Displays - Többképernyős mód - - - - Display settings - Képernyő beállítások - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - Többképernyős mód - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hy.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hy.ts deleted file mode 100644 index d023c4c20..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_hy.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id.ts deleted file mode 100644 index 446043141..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id_ID.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id_ID.ts deleted file mode 100644 index eae8763b3..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_id_ID.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_it.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_it.ts deleted file mode 100644 index 561ec1b27..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_it.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Connessione in corso - - - - Cancel - Annulla - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Disconnetti - - - - - No available casting wireless monitors found - Nessun monitor wireless di trasmissione disponibile trovato - - - - Successfully cast the screen to %1 - Trasmissione riuscita sul display %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - È necessario abilitare la rete wireless per trasmettere lo schermo ad un monitor wireless - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Trasmissione wireless - - - - Multiple Display options - - - - - Display settings - Impostazioni schermo - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - Connessione in corso - - - - - - Not connected - Non connesso - - - - Multiple Displays - - - - - Display settings - Impostazioni schermo - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ja.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ja.ts deleted file mode 100644 index 332a951f9..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ja.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ka.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ka.ts deleted file mode 100644 index 035754f2f..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ka.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kab.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kab.ts deleted file mode 100644 index c005fc303..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kab.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kk.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kk.ts deleted file mode 100644 index bc813ca45..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kk.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_km_KH.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_km_KH.ts deleted file mode 100644 index c3bf1a4d2..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_km_KH.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kn_IN.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kn_IN.ts deleted file mode 100644 index df755bab3..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_kn_IN.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ko.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ko.ts deleted file mode 100644 index 2508e83c9..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ko.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku.ts deleted file mode 100644 index a1742c87b..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku_IQ.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku_IQ.ts deleted file mode 100644 index 3edccfe07..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ku_IQ.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky.ts deleted file mode 100644 index ba37b8411..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky@Arab.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky@Arab.ts deleted file mode 100644 index 36bc4b7db..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ky@Arab.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_la.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_la.ts deleted file mode 100644 index defe56e27..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_la.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lo.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lo.ts deleted file mode 100644 index 2bb6e0ee5..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lo.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lt.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lt.ts deleted file mode 100644 index 8d83173d6..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lt.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lv.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lv.ts deleted file mode 100644 index 8f8f23bae..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_lv.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ml.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ml.ts deleted file mode 100644 index e41ee6e24..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ml.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mn.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mn.ts deleted file mode 100644 index 7cd39a1e0..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mn.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mr.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mr.ts deleted file mode 100644 index 0ac862163..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_mr.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ms.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ms.ts deleted file mode 100644 index 7adf56498..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ms.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nb.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nb.ts deleted file mode 100644 index 098752006..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nb.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ne.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ne.ts deleted file mode 100644 index 2f2f8bd7f..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ne.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nl.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nl.ts deleted file mode 100644 index 9df18895c..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_nl.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Bezig met verbinden - - - - Cancel - Annuleren - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Verbinding verbreken - - - - - No available casting wireless monitors found - Er zijn geen draadloze beeldschermen aangetroffen. - - - - Successfully cast the screen to %1 - Het scherm wordt gedeeld met %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - De draadloze kaart heeft geen ondersteuning voor deze functie - schermdeling is daarom niet mogelijk. - - - - You need to enable wireless network to cast the screen to a wireless monitor - Schakel draadloos internet in om de huidige scherminhoud te delen met een draadloos beeldscherm. - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Draadloze schermdeling - - - - Multiple Display options - Meerdere beeldschermen - - - - Display settings - Beeldscherminstellingen - - - - Duplicate - Klonen - - - - Extend - Uitbreiden - - - - Only on %1 - Alleen op %1 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - Meerdere diensten gestart - - - - - Connecting - Bezig met verbinden… - - - - - - Not connected - Niet verbonden - - - - Multiple Displays - Meerdere beeldschermen - - - - Display settings - Beeldscherminstellingen - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - Meerdere beeldschermen - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pa.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pa.ts deleted file mode 100644 index e9059d994..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pa.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pam.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pam.ts deleted file mode 100644 index 40819d59b..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pam.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pl.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pl.ts deleted file mode 100644 index 276b3b0ea..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pl.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Łączenie - - - - Cancel - Anuluj - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Rozłącz - - - - - No available casting wireless monitors found - Nie znaleziono dostępnych monitorów bezprzewodowych - - - - Successfully cast the screen to %1 - Pomyślnie kastuję ekran na %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - Karta bezprzewodowa nie wspiera tej funkcji i nie może kastować do monitora bezprzewodowego - - - - You need to enable wireless network to cast the screen to a wireless monitor - Włącz sieć bezprzewodową, aby kastować ekran do ekranu bezprzewodowego - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Kastowanie bezprzewodowe - - - - Multiple Display options - - - - - Display settings - Ustawienia ekranu - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - Łączenie - - - - - - Not connected - Nie połączono - - - - Multiple Displays - - - - - Display settings - Ustawienia ekranu - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ps.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ps.ts deleted file mode 100644 index ec08407b7..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ps.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt.ts deleted file mode 100644 index 71df8c47d..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt_BR.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt_BR.ts deleted file mode 100644 index 36b8ce808..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_pt_BR.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ro.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ro.ts deleted file mode 100644 index b7ef1652b..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ro.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru.ts deleted file mode 100644 index ee462bbb3..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru_UA.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru_UA.ts deleted file mode 100644 index 9a3bb8350..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ru_UA.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sc.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sc.ts deleted file mode 100644 index 0853b0c0d..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sc.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_si.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_si.ts deleted file mode 100644 index a6c935200..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_si.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sk.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sk.ts deleted file mode 100644 index c2956ae49..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sk.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sl.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sl.ts deleted file mode 100644 index b4fe2499a..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sl.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sq.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sq.ts deleted file mode 100644 index 773273ee0..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sq.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Po bëhet lidhja - - - - Cancel - Anuloje - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Shkëputu - - - - - No available casting wireless monitors found - S’u gjetën ekrane për transmetim pa fill - - - - Successfully cast the screen to %1 - U transmetua me sukses skena te %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - Karta për pa fill s’e mbulon këtë veçori dhe s’mund të transmetojë skenën te një ekran pa fill - - - - You need to enable wireless network to cast the screen to a wireless monitor - Lypset të aktivizoni rrjet pa fill, që të transmetohet skena te një ekran pa fill - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Transmetim Pa Fill - - - - Multiple Display options - Mundësi Ekranesh të Shumtë - - - - Display settings - Rregullime ekrani - - - - Duplicate - Përsëdyte - - - - Extend - Zgjeroje - - - - Only on %1 - Vetëm në %1 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - U nisën shërbime të shumta - - - - - Connecting - Po lidhet - - - - - - Not connected - I palidhur - - - - Multiple Displays - Ekrane të Shumtë - - - - Display settings - Rregullime ekrani - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - Ekrane të Shumtë - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sr.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sr.ts deleted file mode 100644 index 4ef64eeda..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sr.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv.ts deleted file mode 100644 index e7bae89ce..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv_SE.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv_SE.ts deleted file mode 100644 index e10a14be5..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sv_SE.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sw.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sw.ts deleted file mode 100644 index 36eb7bd9f..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_sw.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ta.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ta.ts deleted file mode 100644 index 9ec471fd6..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ta.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_te.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_te.ts deleted file mode 100644 index 341349254..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_te.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_th.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_th.ts deleted file mode 100644 index 389d074ea..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_th.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tr.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tr.ts deleted file mode 100644 index 296b6bff7..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tr.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tzm.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tzm.ts deleted file mode 100644 index 65469fe91..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_tzm.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ug.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ug.ts deleted file mode 100644 index 33d7abaf1..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ug.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - ئۇلىنىۋاتىدۇ - - - - Cancel - ئۇلاشنى بىكار قىلىش - - - - dde::wirelesscasting::StatePanel - - - Disconnect - ئۈزۈش - - - - - No available casting wireless monitors found - ئاتقىلى بولىدىغان ئۈسكۈنە بايقالمىدى - - - - Successfully cast the screen to %1 - %1 ئېكرانغا ئېتىلدى - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - سىمسىز تور كارتىسى بۇ ئىقتىدارنى قوللىمىغاچقا، ئېكراننى سىمسىز كۆرسەتكۈچكە ئاتقىلى بولمايدۇ - - - - You need to enable wireless network to cast the screen to a wireless monitor - سىمسىز تور كارتىسىنى قوزغاتسىڭىز ئاندىن ئېكراننى سىمسىز كۆرسەتكۈچكە ئاتالايسىز - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - ئېكرانغا سىسمىز ئېتىش - - - - Multiple Display options - - - - - Display settings - كۆرستىش تەڭشەكلىرى - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - ئۇلىنىۋاتىدۇ - - - - - - Not connected - ئۇلانمىدى - - - - Multiple Displays - - - - - Display settings - كۆرستىش تەڭشەكلىرى - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uk.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uk.ts deleted file mode 100644 index 0fa96b227..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uk.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - Встановлення з'єднання - - - - Cancel - Скасувати - - - - dde::wirelesscasting::StatePanel - - - Disconnect - Відʼєднатися - - - - - No available casting wireless monitors found - Не знайдено доступних бездротових моніторів для трансляції - - - - Successfully cast the screen to %1 - Успішно транслюємо екран до %1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - У картці бездротового зв'язку не передбачено підтримки цієї можливості. Вона не може транслювати екран на бездротовий монітор - - - - You need to enable wireless network to cast the screen to a wireless monitor - Для трансляції екрана на бездротовий монітор вам слід увімкнути бездротову мережу - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - Бездротова трансляція - - - - Multiple Display options - Параметри для декількох дисплеїв - - - - Display settings - Параметри показу - - - - Duplicate - Дублювати - - - - Extend - Розширити - - - - Only on %1 - Лише на %1 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - Запущено декілька служб - - - - - Connecting - З'єднання - - - - - - Not connected - Не з'єднано - - - - Multiple Displays - Кілька дисплеїв - - - - Display settings - Параметри показу - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - Кілька дисплеїв - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ur.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ur.ts deleted file mode 100644 index 2ce29ce31..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_ur.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uz.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uz.ts deleted file mode 100644 index c7feaf8d3..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_uz.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_vi.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_vi.ts deleted file mode 100644 index 040caf1c2..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_vi.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - - - - - Cancel - - - - - dde::wirelesscasting::StatePanel - - - Disconnect - - - - - - No available casting wireless monitors found - - - - - Successfully cast the screen to %1 - - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - - - - - You need to enable wireless network to cast the screen to a wireless monitor - - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - - - - - Multiple Display options - - - - - Display settings - - - - - Duplicate - - - - - Extend - - - - - Only on %1 - - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - - - - - - Connecting - - - - - - - Not connected - - - - - Multiple Displays - - - - - Display settings - - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_CN.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_CN.ts deleted file mode 100644 index 257660933..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_CN.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - 正在连接 - - - - Cancel - 取消连接 - - - - dde::wirelesscasting::StatePanel - - - Disconnect - 断开连接 - - - - - No available casting wireless monitors found - 没有找到可用的无线显示器 - - - - Successfully cast the screen to %1 - 已成功投屏至%1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - 无线网卡不支持此功能,无法将屏幕投送至无线显示器 - - - - You need to enable wireless network to cast the screen to a wireless monitor - 需要启用无线网卡,才能将屏幕投送至无线显示器 - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - 无线投屏 - - - - Multiple Display options - 多屏显示选项 - - - - Display settings - 显示设置 - - - - Duplicate - 复制 - - - - Extend - 扩展 - - - - Only on %1 - 仅%1屏 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - 多个服务开启 - - - - - Connecting - 正在连接 - - - - - - Not connected - 未连接 - - - - Multiple Displays - 多屏显示 - - - - Display settings - 显示设置 - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - 多屏显示 - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_HK.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_HK.ts deleted file mode 100644 index 9f81cc9b7..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_HK.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - 正在連接 - - - - Cancel - 取消連接 - - - - dde::wirelesscasting::StatePanel - - - Disconnect - 斷開連接 - - - - - No available casting wireless monitors found - 沒有找到可用的無線顯示器 - - - - Successfully cast the screen to %1 - 已成功投屏至%1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - 無線網卡不支持此功能,無法將螢幕投送至無線顯示器 - - - - You need to enable wireless network to cast the screen to a wireless monitor - 需要啟用無線網卡,才能將螢幕投送至無線顯示器 - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - 無線投屏 - - - - Multiple Display options - 多屏顯示選項 - - - - Display settings - 顯示設置 - - - - Duplicate - 複製 - - - - Extend - 擴展 - - - - Only on %1 - 僅%1屏 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - 多個服務開啟 - - - - - Connecting - 連接中 - - - - - - Not connected - 未連接 - - - - Multiple Displays - 多屏顯示 - - - - Display settings - 顯示設置 - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - 多屏顯示 - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_TW.ts b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_TW.ts deleted file mode 100644 index af5090e42..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/dock-wirelesscasting-plugin_zh_TW.ts +++ /dev/null @@ -1,117 +0,0 @@ - - - MonitorItemWidget - - - Connecting - 正在連線 - - - - Cancel - 取消連接 - - - - dde::wirelesscasting::StatePanel - - - Disconnect - 斷開連接 - - - - - No available casting wireless monitors found - 沒有找到可用的無線顯示器 - - - - Successfully cast the screen to %1 - 已成功投屏至%1 - - - - The wireless card doesn't support this feature, and cannot cast the screen to a wireless monitor - 無線網卡不支援此功能,無法將螢幕投送至無線顯示器 - - - - You need to enable wireless network to cast the screen to a wireless monitor - 需要啟用無線網卡,才能將螢幕投送至無線顯示器 - - - - dde::wirelesscasting::WirelessCastingApplet - - - Wireless Casting - 無線投屏 - - - - Multiple Display options - 多屏顯示選項 - - - - Display settings - 顯示設定 - - - - Duplicate - 複製 - - - - Extend - 擴展 - - - - Only on %1 - 僅%1屏 - - - - dde::wirelesscasting::WirelessCastingItem - - - - Multiple services started - 多個服務開啟 - - - - - Connecting - 正在連線 - - - - - - Not connected - 未連線 - - - - Multiple Displays - 多屏顯示 - - - - Display settings - 顯示設定 - - - - dde::wirelesscasting::WirelessCastingPlugin - - - Multiple Displays - 多屏顯示 - - - \ No newline at end of file diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/translations.qrc b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/translations.qrc deleted file mode 100644 index 90f4a8379..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/translations/translations.qrc +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/wirelesscasting.json b/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/wirelesscasting.json deleted file mode 100644 index bec81f0da..000000000 --- a/plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/wirelesscasting.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "api": "2.0.0" -} diff --git a/src/loader/main.cpp b/src/loader/main.cpp index b131c09eb..ceba52d91 100644 --- a/src/loader/main.cpp +++ b/src/loader/main.cpp @@ -152,9 +152,11 @@ int main(int argc, char *argv[], char *envp[]) for (const auto &path : dataDirs) { DPathBuf DPathBuf(path); translateDirs << (DPathBuf / "dde-dock/translations").toString(); + translateDirs << (DPathBuf / "dcc-dock-plugins/translations").toString(); translateDirs << (DPathBuf / "trayplugin-loader/translations").toString(); } DGuiApplicationHelper::loadTranslator("dde-dock", translateDirs, QList() << QLocale::system()); + DGuiApplicationHelper::loadTranslator("dcc-dock-plugins", translateDirs, QList() << QLocale::system()); DGuiApplicationHelper::loadTranslator("trayplugin-loader", translateDirs, QList() << QLocale::system()); QCommandLineParser parser; diff --git a/tests/at/spi/expected_names.yaml b/tests/at/spi/expected_names.yaml index 2979558ce..e809c5e1c 100644 --- a/tests/at/spi/expected_names.yaml +++ b/tests/at/spi/expected_names.yaml @@ -3,18 +3,6 @@ version: '1.0' widgets: -- variable: m_adapterStateBtn - type: DSwitchButton * - object_name: AdapterStateBtn - source_file: plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp - class_name: BluetoothAdapterItem - line: 188 -- variable: m_expandLabel - type: Dtk::Widget::DIconButton * - object_name: ExpandLabel - source_file: plugins/dde-dock/bluetooth/quickpanelwidget.cpp - class_name: QuickPanelWidget - line: 47 - variable: m_switchBtn type: Dtk::Widget::DSwitchButton * object_name: SwitchBtn @@ -27,12 +15,6 @@ widgets: source_file: plugins/dde-dock/common/pluginitemdelegate.cpp class_name: PluginItemWidget line: 128 -- variable: m_slider - type: QSlider * - object_name: Slider - source_file: plugins/dde-dock/common/slidercontainer.cpp - class_name: SliderContainer - line: 85 - variable: m_weekWidget type: CWeekWidget * object_name: WeekWidget @@ -45,18 +27,6 @@ widgets: source_file: plugins/dde-dock/datetime/calendar/sidebarcalendarwidget.cpp class_name: SidebarCalendarWidget line: 113 -- variable: m_switchBtn - type: Dtk::Widget::DSwitchButton * - object_name: SwitchBtn - source_file: plugins/dde-dock/eye-comfort-mode/eyecomfortmodeapplet.cpp - class_name: EyeComfortmodeApplet - line: 52 -- variable: m_expandLabel - type: Dtk::Widget::DIconButton * - object_name: ExpandLabel - source_file: plugins/dde-dock/eye-comfort-mode/quickpanelwidget.cpp - class_name: QuickPanelWidget - line: 80 - variable: m_menu type: QMenu * object_name: Menu @@ -69,30 +39,6 @@ widgets: source_file: plugins/dde-dock/keyboard-layout/dbusadaptors.cpp class_name: DBusAdaptors line: 75 -- variable: m_expandLabel - type: Dtk::Widget::DIconButton * - object_name: ExpandLabel - source_file: plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/quickpanelwidget.cpp - class_name: QLabel - line: 49 -- variable: m_disconnectBtn - type: CancelButton * - object_name: DisconnectBtn - source_file: plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/widget/monitoritemdelegate.cpp - class_name: MonitorItemWidget - line: 187 -- variable: m_multiscreenOptionsListView - type: MonitorListView * - object_name: MultiscreenOptionsListView - source_file: plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp - class_name: '' - line: 73 -- variable: m_disconnMonitor - type: CancelButton * - object_name: DisconnMonitor - source_file: plugins/dde-network-display-ui/plugins/dock-wirelesscasting-plugin/src/wirelesscastingapplet.cpp - class_name: '' - line: 124 - variable: m_menu type: QMenu * object_name: Menu diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp deleted file mode 100644 index 29375c29b..000000000 --- a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_bluetooth.hpp +++ /dev/null @@ -1,180 +0,0 @@ -/** - * This file is generated by dconfig2cpp. - * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.bluetooth.json - * Generation time: 2025-01-14T10:55:03 - * JSON file version: 1.0 - * - * WARNING: DO NOT MODIFY THIS FILE MANUALLY. - * If you need to change the content, please modify the dconfig2cpp tool. - */ - -#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_BLUETOOTH_H -#define ORG_DEEPIN_DDE_DOCK_PLUGIN_BLUETOOTH_H - -#include -#include -#include -#include -#include -#include - -class org_deepin_dde_dock_plugin_bluetooth : public QObject { - Q_OBJECT - - Q_PROPERTY(double scanInterval READ scanInterval WRITE setScanInterval NOTIFY scanIntervalChanged) -public: - explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - explicit org_deepin_dde_dock_plugin_bluetooth(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - ~org_deepin_dde_dock_plugin_bluetooth() { - if (m_config.loadRelaxed()) { - m_config.loadRelaxed()->deleteLater(); - } - } - - double scanInterval() const { - return p_scanInterval; - } - void setScanInterval(const double &value) { - auto oldValue = p_scanInterval; - p_scanInterval = value; - markPropertySet(0); - if (auto config = m_config.loadRelaxed()) { - QMetaObject::invokeMethod(config, [this, value]() { - m_config.loadRelaxed()->setValue(QStringLiteral("scanInterval"), value); - }); - } - if (p_scanInterval != oldValue) { - Q_EMIT scanIntervalChanged(); - } - } -Q_SIGNALS: - void scanIntervalChanged(); -private: - void initialize(DTK_CORE_NAMESPACE::DConfig *config) { - Q_ASSERT(!m_config.loadRelaxed()); - m_config.storeRelaxed(config); - if (testPropertySet(0)) { - config->setValue(QStringLiteral("scanInterval"), QVariant::fromValue(p_scanInterval)); - } else { - updateValue(QStringLiteral("scanInterval"), QVariant::fromValue(p_scanInterval)); - } - - connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { - updateValue(key); - }, Qt::DirectConnection); - } - void updateValue(const QString &key, const QVariant &fallback = QVariant()) { - Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); - const QVariant &value = m_config.loadRelaxed()->value(key, fallback); - if (key == QStringLiteral("scanInterval")) { - auto newValue = qvariant_cast(value); - QMetaObject::invokeMethod(this, [this, newValue]() { - if (p_scanInterval != newValue) { - p_scanInterval = newValue; - Q_EMIT scanIntervalChanged(); - } - }); - return; - } - } - inline void markPropertySet(const int index) { - if (index < 32) { - m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); - return; - } - Q_UNREACHABLE(); - } - inline bool testPropertySet(const int index) const { - if (index < 32) { - return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); - } - Q_UNREACHABLE(); - } - QAtomicPointer m_config = nullptr; - double p_scanInterval { 10 }; - QAtomicInteger m_propertySetStatus0 = 0; -}; - -#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_BLUETOOTH_H diff --git a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp b/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp deleted file mode 100644 index 173d4f863..000000000 --- a/toolGenerate/dconfig2cpp/org_deepin_dde_dock_plugin_sound.hpp +++ /dev/null @@ -1,214 +0,0 @@ -/** - * This file is generated by dconfig2cpp. - * Command line arguments: ./dconfig2cpp -p ./dde-tray-loader/toolGenerate/dconfig2cpp ./dde-tray-loader/plugins/dde-dock/configs/org.deepin.dde.dock.plugin.sound.json - * Generation time: 2025-01-14T10:55:03 - * JSON file version: 1.0 - * - * WARNING: DO NOT MODIFY THIS FILE MANUALLY. - * If you need to change the content, please modify the dconfig2cpp tool. - */ - -#ifndef ORG_DEEPIN_DDE_DOCK_PLUGIN_SOUND_H -#define ORG_DEEPIN_DDE_DOCK_PLUGIN_SOUND_H - -#include -#include -#include -#include -#include -#include - -class org_deepin_dde_dock_plugin_sound : public QObject { - Q_OBJECT - - Q_PROPERTY(bool enableAdjustVolumeNoCard READ enableAdjustVolumeNoCard WRITE setEnableAdjustVolumeNoCard NOTIFY enableAdjustVolumeNoCardChanged) - Q_PROPERTY(double soundOutputSlider READ soundOutputSlider WRITE setSoundOutputSlider NOTIFY soundOutputSliderChanged) -public: - explicit org_deepin_dde_dock_plugin_sound(QThread *thread, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(appId, name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - explicit org_deepin_dde_dock_plugin_sound(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, appId, name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - explicit org_deepin_dde_dock_plugin_sound(QThread *thread, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - explicit org_deepin_dde_dock_plugin_sound(QThread *thread, DTK_CORE_NAMESPACE::DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent = nullptr) - : QObject(parent) { - - if (!thread->isRunning()) { - qWarning() << QStringLiteral("Warning: The provided thread is not running."); - } - Q_ASSERT(QThread::currentThread() != thread); - auto worker = new QObject(); - worker->moveToThread(thread); - QMetaObject::invokeMethod(worker, [=]() { - auto config = DTK_CORE_NAMESPACE::DConfig::create(backend, name, subpath, nullptr); - if (!config) { - qWarning() << QStringLiteral("Failed to create DConfig instance."); - worker->deleteLater(); - return; - } - config->moveToThread(QThread::currentThread()); - initialize(config); - worker->deleteLater(); - }); - } - ~org_deepin_dde_dock_plugin_sound() { - if (m_config.loadRelaxed()) { - m_config.loadRelaxed()->deleteLater(); - } - } - - bool enableAdjustVolumeNoCard() const { - return p_enableAdjustVolumeNoCard; - } - void setEnableAdjustVolumeNoCard(const bool &value) { - auto oldValue = p_enableAdjustVolumeNoCard; - p_enableAdjustVolumeNoCard = value; - markPropertySet(0); - if (auto config = m_config.loadRelaxed()) { - QMetaObject::invokeMethod(config, [this, value]() { - m_config.loadRelaxed()->setValue(QStringLiteral("enableAdjustVolumeNoCard"), value); - }); - } - if (p_enableAdjustVolumeNoCard != oldValue) { - Q_EMIT enableAdjustVolumeNoCardChanged(); - } - } - double soundOutputSlider() const { - return p_soundOutputSlider; - } - void setSoundOutputSlider(const double &value) { - auto oldValue = p_soundOutputSlider; - p_soundOutputSlider = value; - markPropertySet(1); - if (auto config = m_config.loadRelaxed()) { - QMetaObject::invokeMethod(config, [this, value]() { - m_config.loadRelaxed()->setValue(QStringLiteral("soundOutputSlider"), value); - }); - } - if (p_soundOutputSlider != oldValue) { - Q_EMIT soundOutputSliderChanged(); - } - } -Q_SIGNALS: - void enableAdjustVolumeNoCardChanged(); - void soundOutputSliderChanged(); -private: - void initialize(DTK_CORE_NAMESPACE::DConfig *config) { - Q_ASSERT(!m_config.loadRelaxed()); - m_config.storeRelaxed(config); - if (testPropertySet(0)) { - config->setValue(QStringLiteral("enableAdjustVolumeNoCard"), QVariant::fromValue(p_enableAdjustVolumeNoCard)); - } else { - updateValue(QStringLiteral("enableAdjustVolumeNoCard"), QVariant::fromValue(p_enableAdjustVolumeNoCard)); - } - if (testPropertySet(1)) { - config->setValue(QStringLiteral("soundOutputSlider"), QVariant::fromValue(p_soundOutputSlider)); - } else { - updateValue(QStringLiteral("soundOutputSlider"), QVariant::fromValue(p_soundOutputSlider)); - } - - connect(config, &DTK_CORE_NAMESPACE::DConfig::valueChanged, this, [this](const QString &key) { - updateValue(key); - }, Qt::DirectConnection); - } - void updateValue(const QString &key, const QVariant &fallback = QVariant()) { - Q_ASSERT(QThread::currentThread() == m_config.loadRelaxed()->thread()); - const QVariant &value = m_config.loadRelaxed()->value(key, fallback); - if (key == QStringLiteral("enableAdjustVolumeNoCard")) { - auto newValue = qvariant_cast(value); - QMetaObject::invokeMethod(this, [this, newValue]() { - if (p_enableAdjustVolumeNoCard != newValue) { - p_enableAdjustVolumeNoCard = newValue; - Q_EMIT enableAdjustVolumeNoCardChanged(); - } - }); - return; - } - if (key == QStringLiteral("soundOutputSlider")) { - auto newValue = qvariant_cast(value); - QMetaObject::invokeMethod(this, [this, newValue]() { - if (p_soundOutputSlider != newValue) { - p_soundOutputSlider = newValue; - Q_EMIT soundOutputSliderChanged(); - } - }); - return; - } - } - inline void markPropertySet(const int index) { - if (index < 32) { - m_propertySetStatus0.fetchAndOrOrdered(1 << (index - 0)); - return; - } - Q_UNREACHABLE(); - } - inline bool testPropertySet(const int index) const { - if (index < 32) { - return (m_propertySetStatus0.loadRelaxed() & (1 << (index - 0))); - } - Q_UNREACHABLE(); - } - QAtomicPointer m_config = nullptr; - bool p_enableAdjustVolumeNoCard { false }; - double p_soundOutputSlider { 0 }; - QAtomicInteger m_propertySetStatus0 = 0; -}; - -#endif // ORG_DEEPIN_DDE_DOCK_PLUGIN_SOUND_H diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp deleted file mode 100644 index ea4936240..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h" -#include -#include -#include -#include -#include -#include -#include - -/* - * Implementation of adaptor class Appearance1Adaptor - */ - -Appearance1Adaptor::Appearance1Adaptor(QObject *parent) - : QDBusAbstractAdaptor(parent) -{ - // constructor - setAutoRelaySignals(true); -} - -Appearance1Adaptor::~Appearance1Adaptor() -{ - // destructor -} - -QString Appearance1Adaptor::background() const -{ - // get the value of property Background - return qvariant_cast< QString >(parent()->property("Background")); -} - -void Appearance1Adaptor::setBackground(const QString &value) -{ - // set the value of property Background - parent()->setProperty("Background", QVariant::fromValue(value)); -} - -QString Appearance1Adaptor::cursorTheme() const -{ - // get the value of property CursorTheme - return qvariant_cast< QString >(parent()->property("CursorTheme")); -} - -void Appearance1Adaptor::setCursorTheme(const QString &value) -{ - // set the value of property CursorTheme - parent()->setProperty("CursorTheme", QVariant::fromValue(value)); -} - -double Appearance1Adaptor::fontSize() const -{ - // get the value of property FontSize - return qvariant_cast< double >(parent()->property("FontSize")); -} - -void Appearance1Adaptor::setFontSize(double value) -{ - // set the value of property FontSize - parent()->setProperty("FontSize", QVariant::fromValue(value)); -} - -QString Appearance1Adaptor::globalTheme() const -{ - // get the value of property GlobalTheme - return qvariant_cast< QString >(parent()->property("GlobalTheme")); -} - -QString Appearance1Adaptor::gtkTheme() const -{ - // get the value of property GtkTheme - return qvariant_cast< QString >(parent()->property("GtkTheme")); -} - -void Appearance1Adaptor::setGtkTheme(const QString &value) -{ - // set the value of property GtkTheme - parent()->setProperty("GtkTheme", QVariant::fromValue(value)); -} - -QString Appearance1Adaptor::iconTheme() const -{ - // get the value of property IconTheme - return qvariant_cast< QString >(parent()->property("IconTheme")); -} - -void Appearance1Adaptor::setIconTheme(const QString &value) -{ - // set the value of property IconTheme - parent()->setProperty("IconTheme", QVariant::fromValue(value)); -} - -QString Appearance1Adaptor::monospaceFont() const -{ - // get the value of property MonospaceFont - return qvariant_cast< QString >(parent()->property("MonospaceFont")); -} - -void Appearance1Adaptor::setMonospaceFont(const QString &value) -{ - // set the value of property MonospaceFont - parent()->setProperty("MonospaceFont", QVariant::fromValue(value)); -} - -double Appearance1Adaptor::opacity() const -{ - // get the value of property Opacity - return qvariant_cast< double >(parent()->property("Opacity")); -} - -void Appearance1Adaptor::setOpacity(double value) -{ - // set the value of property Opacity - parent()->setProperty("Opacity", QVariant::fromValue(value)); -} - -QString Appearance1Adaptor::qtActiveColor() const -{ - // get the value of property QtActiveColor - return qvariant_cast< QString >(parent()->property("QtActiveColor")); -} - -void Appearance1Adaptor::setQtActiveColor(const QString &value) -{ - // set the value of property QtActiveColor - parent()->setProperty("QtActiveColor", QVariant::fromValue(value)); -} - -QString Appearance1Adaptor::standardFont() const -{ - // get the value of property StandardFont - return qvariant_cast< QString >(parent()->property("StandardFont")); -} - -void Appearance1Adaptor::setStandardFont(const QString &value) -{ - // set the value of property StandardFont - parent()->setProperty("StandardFont", QVariant::fromValue(value)); -} - -QString Appearance1Adaptor::wallpaperSlideShow() const -{ - // get the value of property WallpaperSlideShow - return qvariant_cast< QString >(parent()->property("WallpaperSlideShow")); -} - -void Appearance1Adaptor::setWallpaperSlideShow(const QString &value) -{ - // set the value of property WallpaperSlideShow - parent()->setProperty("WallpaperSlideShow", QVariant::fromValue(value)); -} - -void Appearance1Adaptor::Delete(const QString &in0, const QString &in1) -{ - // handle method call org.deepin.dde.Appearance1.Delete - QMetaObject::invokeMethod(parent(), "Delete", Q_ARG(QString, in0), Q_ARG(QString, in1)); -} - -double Appearance1Adaptor::GetScaleFactor() -{ - // handle method call org.deepin.dde.Appearance1.GetScaleFactor - double out0; - QMetaObject::invokeMethod(parent(), "GetScaleFactor", Q_RETURN_ARG(double, out0)); - return out0; -} - -QMap Appearance1Adaptor::GetScreenScaleFactors() -{ - // handle method call org.deepin.dde.Appearance1.GetScreenScaleFactors - QMap scaleFactors; - QMetaObject::invokeMethod(parent(), "GetScreenScaleFactors", Q_RETURN_ARG(QMap, scaleFactors)); - return scaleFactors; -} - -QString Appearance1Adaptor::List(const QString &in0) -{ - // handle method call org.deepin.dde.Appearance1.List - QString out0; - QMetaObject::invokeMethod(parent(), "List", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0)); - return out0; -} - -void Appearance1Adaptor::Set(const QString &in0, const QString &in1) -{ - // handle method call org.deepin.dde.Appearance1.Set - QMetaObject::invokeMethod(parent(), "Set", Q_ARG(QString, in0), Q_ARG(QString, in1)); -} - -void Appearance1Adaptor::SetScaleFactor(double in0) -{ - // handle method call org.deepin.dde.Appearance1.SetScaleFactor - QMetaObject::invokeMethod(parent(), "SetScaleFactor", Q_ARG(double, in0)); -} - -void Appearance1Adaptor::SetScreenScaleFactors(const QMap &scaleFactors) -{ - // handle method call org.deepin.dde.Appearance1.SetScreenScaleFactors - QMetaObject::invokeMethod(parent(), "SetScreenScaleFactors", Q_ARG(QMap, scaleFactors)); -} - -QString Appearance1Adaptor::Show(const QString &in0, const QStringList &in1) -{ - // handle method call org.deepin.dde.Appearance1.Show - QString out0; - QMetaObject::invokeMethod(parent(), "Show", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0), Q_ARG(QStringList, in1)); - return out0; -} - -QString Appearance1Adaptor::Thumbnail(const QString &in0, const QString &in1) -{ - // handle method call org.deepin.dde.Appearance1.Thumbnail - QString out0; - QMetaObject::invokeMethod(parent(), "Thumbnail", Q_RETURN_ARG(QString, out0), Q_ARG(QString, in0), Q_ARG(QString, in1)); - return out0; -} - diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h deleted file mode 100644 index 40fba7f4c..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Appearance1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#ifndef ORG_DEEPIN_DDE_APPEARANCE1ADAPTOR_H -#define ORG_DEEPIN_DDE_APPEARANCE1ADAPTOR_H - -#include -#include -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Appearance1.h" -QT_BEGIN_NAMESPACE -class QByteArray; -template class QList; -template class QMap; -class QString; -class QStringList; -class QVariant; -QT_END_NAMESPACE - -/* - * Adaptor class for interface org.deepin.dde.Appearance1 - */ -class Appearance1Adaptor: public QDBusAbstractAdaptor -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Appearance1") - Q_CLASSINFO("D-Bus Introspection", "" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" - "") -public: - Appearance1Adaptor(QObject *parent); - virtual ~Appearance1Adaptor(); - -public: // PROPERTIES - Q_PROPERTY(QString Background READ background WRITE setBackground) - QString background() const; - void setBackground(const QString &value); - - Q_PROPERTY(QString CursorTheme READ cursorTheme WRITE setCursorTheme) - QString cursorTheme() const; - void setCursorTheme(const QString &value); - - Q_PROPERTY(double FontSize READ fontSize WRITE setFontSize) - double fontSize() const; - void setFontSize(double value); - - Q_PROPERTY(QString GlobalTheme READ globalTheme) - QString globalTheme() const; - - Q_PROPERTY(QString GtkTheme READ gtkTheme WRITE setGtkTheme) - QString gtkTheme() const; - void setGtkTheme(const QString &value); - - Q_PROPERTY(QString IconTheme READ iconTheme WRITE setIconTheme) - QString iconTheme() const; - void setIconTheme(const QString &value); - - Q_PROPERTY(QString MonospaceFont READ monospaceFont WRITE setMonospaceFont) - QString monospaceFont() const; - void setMonospaceFont(const QString &value); - - Q_PROPERTY(double Opacity READ opacity WRITE setOpacity) - double opacity() const; - void setOpacity(double value); - - Q_PROPERTY(QString QtActiveColor READ qtActiveColor WRITE setQtActiveColor) - QString qtActiveColor() const; - void setQtActiveColor(const QString &value); - - Q_PROPERTY(QString StandardFont READ standardFont WRITE setStandardFont) - QString standardFont() const; - void setStandardFont(const QString &value); - - Q_PROPERTY(QString WallpaperSlideShow READ wallpaperSlideShow WRITE setWallpaperSlideShow) - QString wallpaperSlideShow() const; - void setWallpaperSlideShow(const QString &value); - -public Q_SLOTS: // METHODS - void Delete(const QString &in0, const QString &in1); - double GetScaleFactor(); - QMap GetScreenScaleFactors(); - QString List(const QString &in0); - void Set(const QString &in0, const QString &in1); - void SetScaleFactor(double in0); - void SetScreenScaleFactors(const QMap &scaleFactors); - QString Show(const QString &in0, const QStringList &in1); - QString Thumbnail(const QString &in0, const QString &in1); -Q_SIGNALS: // SIGNALS - void Changed(const QString &in0, const QString &in1); - void Refreshed(const QString &in0); -}; - -#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp deleted file mode 100644 index 7b5c35034..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.Sink.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h" -#include -#include -#include -#include -#include -#include -#include - -/* - * Implementation of adaptor class SinkAdaptor - */ - -SinkAdaptor::SinkAdaptor(QObject *parent) - : QDBusAbstractAdaptor(parent) -{ - // constructor - setAutoRelaySignals(true); -} - -SinkAdaptor::~SinkAdaptor() -{ - // destructor -} - -AudioPort SinkAdaptor::activePort() const -{ - // get the value of property ActivePort - return qvariant_cast< AudioPort >(parent()->property("ActivePort")); -} - -double SinkAdaptor::balance() const -{ - // get the value of property Balance - return qvariant_cast< double >(parent()->property("Balance")); -} - -double SinkAdaptor::baseVolume() const -{ - // get the value of property BaseVolume - return qvariant_cast< double >(parent()->property("BaseVolume")); -} - -uint SinkAdaptor::card() const -{ - // get the value of property Card - return qvariant_cast< uint >(parent()->property("Card")); -} - -QString SinkAdaptor::description() const -{ - // get the value of property Description - return qvariant_cast< QString >(parent()->property("Description")); -} - -double SinkAdaptor::fade() const -{ - // get the value of property Fade - return qvariant_cast< double >(parent()->property("Fade")); -} - -bool SinkAdaptor::mute() const -{ - // get the value of property Mute - return qvariant_cast< bool >(parent()->property("Mute")); -} - -QString SinkAdaptor::name() const -{ - // get the value of property Name - return qvariant_cast< QString >(parent()->property("Name")); -} - -AudioPortList SinkAdaptor::ports() const -{ - // get the value of property Ports - return qvariant_cast< AudioPortList >(parent()->property("Ports")); -} - -bool SinkAdaptor::supportBalance() const -{ - // get the value of property SupportBalance - return qvariant_cast< bool >(parent()->property("SupportBalance")); -} - -bool SinkAdaptor::supportFade() const -{ - // get the value of property SupportFade - return qvariant_cast< bool >(parent()->property("SupportFade")); -} - -double SinkAdaptor::volume() const -{ - // get the value of property Volume - return qvariant_cast< double >(parent()->property("Volume")); -} - -QDBusObjectPath SinkAdaptor::GetMeter() -{ - // handle method call org.deepin.dde.Audio1.Sink.GetMeter - QDBusObjectPath out0; - QMetaObject::invokeMethod(parent(), "GetMeter", Q_RETURN_ARG(QDBusObjectPath, out0)); - return out0; -} - -void SinkAdaptor::SetBalance(double in0, bool in1) -{ - // handle method call org.deepin.dde.Audio1.Sink.SetBalance - QMetaObject::invokeMethod(parent(), "SetBalance", Q_ARG(double, in0), Q_ARG(bool, in1)); -} - -void SinkAdaptor::SetFade(double in0) -{ - // handle method call org.deepin.dde.Audio1.Sink.SetFade - QMetaObject::invokeMethod(parent(), "SetFade", Q_ARG(double, in0)); -} - -void SinkAdaptor::SetMute(bool in0) -{ - // handle method call org.deepin.dde.Audio1.Sink.SetMute - QMetaObject::invokeMethod(parent(), "SetMute", Q_ARG(bool, in0)); -} - -void SinkAdaptor::SetPort(const QString &in0) -{ - // handle method call org.deepin.dde.Audio1.Sink.SetPort - QMetaObject::invokeMethod(parent(), "SetPort", Q_ARG(QString, in0)); -} - -void SinkAdaptor::SetVolume(double in0, bool in1) -{ - // handle method call org.deepin.dde.Audio1.Sink.SetVolume - QMetaObject::invokeMethod(parent(), "SetVolume", Q_ARG(double, in0), Q_ARG(bool, in1)); -} - diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h deleted file mode 100644 index 84ffd473c..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.Sink.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.SinkAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.Sink.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#ifndef ORG_DEEPIN_DDE_AUDIO1_SINKADAPTOR_H -#define ORG_DEEPIN_DDE_AUDIO1_SINKADAPTOR_H - -#include -#include -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.Sink.h" -QT_BEGIN_NAMESPACE -class QByteArray; -template class QList; -template class QMap; -class QString; -class QStringList; -class QVariant; -QT_END_NAMESPACE - -/* - * Adaptor class for interface org.deepin.dde.Audio1.Sink - */ -class SinkAdaptor: public QDBusAbstractAdaptor -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Audio1.Sink") - Q_CLASSINFO("D-Bus Introspection", "" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" - "") -public: - SinkAdaptor(QObject *parent); - virtual ~SinkAdaptor(); - -public: // PROPERTIES - Q_PROPERTY(AudioPort ActivePort READ activePort) - AudioPort activePort() const; - - Q_PROPERTY(double Balance READ balance) - double balance() const; - - Q_PROPERTY(double BaseVolume READ baseVolume) - double baseVolume() const; - - Q_PROPERTY(uint Card READ card) - uint card() const; - - Q_PROPERTY(QString Description READ description) - QString description() const; - - Q_PROPERTY(double Fade READ fade) - double fade() const; - - Q_PROPERTY(bool Mute READ mute) - bool mute() const; - - Q_PROPERTY(QString Name READ name) - QString name() const; - - Q_PROPERTY(AudioPortList Ports READ ports) - AudioPortList ports() const; - - Q_PROPERTY(bool SupportBalance READ supportBalance) - bool supportBalance() const; - - Q_PROPERTY(bool SupportFade READ supportFade) - bool supportFade() const; - - Q_PROPERTY(double Volume READ volume) - double volume() const; - -public Q_SLOTS: // METHODS - QDBusObjectPath GetMeter(); - void SetBalance(double in0, bool in1); - void SetFade(double in0); - void SetMute(bool in0); - void SetPort(const QString &in0); - void SetVolume(double in0, bool in1); -Q_SIGNALS: // SIGNALS -}; - -#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp deleted file mode 100644 index 8cf4be364..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h" -#include -#include -#include -#include -#include -#include -#include - -/* - * Implementation of adaptor class Audio1Adaptor - */ - -Audio1Adaptor::Audio1Adaptor(QObject *parent) - : QDBusAbstractAdaptor(parent) -{ - // constructor - setAutoRelaySignals(true); -} - -Audio1Adaptor::~Audio1Adaptor() -{ - // destructor -} - -QString Audio1Adaptor::bluetoothAudioMode() const -{ - // get the value of property BluetoothAudioMode - return qvariant_cast< QString >(parent()->property("BluetoothAudioMode")); -} - -QStringList Audio1Adaptor::bluetoothAudioModeOpts() const -{ - // get the value of property BluetoothAudioModeOpts - return qvariant_cast< QStringList >(parent()->property("BluetoothAudioModeOpts")); -} - -QString Audio1Adaptor::cards() const -{ - // get the value of property Cards - return qvariant_cast< QString >(parent()->property("Cards")); -} - -QString Audio1Adaptor::cardsWithoutUnavailable() const -{ - // get the value of property CardsWithoutUnavailable - return qvariant_cast< QString >(parent()->property("CardsWithoutUnavailable")); -} - -QDBusObjectPath Audio1Adaptor::defaultSink() const -{ - // get the value of property DefaultSink - return qvariant_cast< QDBusObjectPath >(parent()->property("DefaultSink")); -} - -QDBusObjectPath Audio1Adaptor::defaultSource() const -{ - // get the value of property DefaultSource - return qvariant_cast< QDBusObjectPath >(parent()->property("DefaultSource")); -} - -bool Audio1Adaptor::increaseVolume() const -{ - // get the value of property IncreaseVolume - return qvariant_cast< bool >(parent()->property("IncreaseVolume")); -} - -void Audio1Adaptor::setIncreaseVolume(bool value) -{ - // set the value of property IncreaseVolume - parent()->setProperty("IncreaseVolume", QVariant::fromValue(value)); -} - -double Audio1Adaptor::maxUIVolume() const -{ - // get the value of property MaxUIVolume - return qvariant_cast< double >(parent()->property("MaxUIVolume")); -} - -bool Audio1Adaptor::reduceNoise() const -{ - // get the value of property ReduceNoise - return qvariant_cast< bool >(parent()->property("ReduceNoise")); -} - -void Audio1Adaptor::setReduceNoise(bool value) -{ - // set the value of property ReduceNoise - parent()->setProperty("ReduceNoise", QVariant::fromValue(value)); -} - -QList Audio1Adaptor::sinkInputs() const -{ - // get the value of property SinkInputs - return qvariant_cast< QList >(parent()->property("SinkInputs")); -} - -QList Audio1Adaptor::sinks() const -{ - // get the value of property Sinks - return qvariant_cast< QList >(parent()->property("Sinks")); -} - -QList Audio1Adaptor::sources() const -{ - // get the value of property Sources - return qvariant_cast< QList >(parent()->property("Sources")); -} - -bool Audio1Adaptor::IsPortEnabled(uint in0, const QString &in1) -{ - // handle method call org.deepin.dde.Audio1.IsPortEnabled - bool out0; - QMetaObject::invokeMethod(parent(), "IsPortEnabled", Q_RETURN_ARG(bool, out0), Q_ARG(uint, in0), Q_ARG(QString, in1)); - return out0; -} - -void Audio1Adaptor::Reset() -{ - // handle method call org.deepin.dde.Audio1.Reset - QMetaObject::invokeMethod(parent(), "Reset"); -} - -void Audio1Adaptor::SetBluetoothAudioMode(const QString &in0) -{ - // handle method call org.deepin.dde.Audio1.SetBluetoothAudioMode - QMetaObject::invokeMethod(parent(), "SetBluetoothAudioMode", Q_ARG(QString, in0)); -} - -void Audio1Adaptor::SetDefaultSink(const QString &in0) -{ - // handle method call org.deepin.dde.Audio1.SetDefaultSink - QMetaObject::invokeMethod(parent(), "SetDefaultSink", Q_ARG(QString, in0)); -} - -void Audio1Adaptor::SetDefaultSource(const QString &in0) -{ - // handle method call org.deepin.dde.Audio1.SetDefaultSource - QMetaObject::invokeMethod(parent(), "SetDefaultSource", Q_ARG(QString, in0)); -} - -void Audio1Adaptor::SetPort(uint in0, const QString &in1, int in2) -{ - // handle method call org.deepin.dde.Audio1.SetPort - QMetaObject::invokeMethod(parent(), "SetPort", Q_ARG(uint, in0), Q_ARG(QString, in1), Q_ARG(int, in2)); -} - -void Audio1Adaptor::SetPortEnabled(uint in0, const QString &in1, bool in2) -{ - // handle method call org.deepin.dde.Audio1.SetPortEnabled - QMetaObject::invokeMethod(parent(), "SetPortEnabled", Q_ARG(uint, in0), Q_ARG(QString, in1), Q_ARG(bool, in2)); -} - diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h deleted file mode 100644 index 2ffcbe90b..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Audio1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#ifndef ORG_DEEPIN_DDE_AUDIO1ADAPTOR_H -#define ORG_DEEPIN_DDE_AUDIO1ADAPTOR_H - -#include -#include -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Audio1.h" -QT_BEGIN_NAMESPACE -class QByteArray; -template class QList; -template class QMap; -class QString; -class QStringList; -class QVariant; -QT_END_NAMESPACE - -/* - * Adaptor class for interface org.deepin.dde.Audio1 - */ -class Audio1Adaptor: public QDBusAbstractAdaptor -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Audio1") - Q_CLASSINFO("D-Bus Introspection", "" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" - "") -public: - Audio1Adaptor(QObject *parent); - virtual ~Audio1Adaptor(); - -public: // PROPERTIES - Q_PROPERTY(QString BluetoothAudioMode READ bluetoothAudioMode) - QString bluetoothAudioMode() const; - - Q_PROPERTY(QStringList BluetoothAudioModeOpts READ bluetoothAudioModeOpts) - QStringList bluetoothAudioModeOpts() const; - - Q_PROPERTY(QString Cards READ cards) - QString cards() const; - - Q_PROPERTY(QString CardsWithoutUnavailable READ cardsWithoutUnavailable) - QString cardsWithoutUnavailable() const; - - Q_PROPERTY(QDBusObjectPath DefaultSink READ defaultSink) - QDBusObjectPath defaultSink() const; - - Q_PROPERTY(QDBusObjectPath DefaultSource READ defaultSource) - QDBusObjectPath defaultSource() const; - - Q_PROPERTY(bool IncreaseVolume READ increaseVolume WRITE setIncreaseVolume) - bool increaseVolume() const; - void setIncreaseVolume(bool value); - - Q_PROPERTY(double MaxUIVolume READ maxUIVolume) - double maxUIVolume() const; - - Q_PROPERTY(bool ReduceNoise READ reduceNoise WRITE setReduceNoise) - bool reduceNoise() const; - void setReduceNoise(bool value); - - Q_PROPERTY(QList SinkInputs READ sinkInputs) - QList sinkInputs() const; - - Q_PROPERTY(QList Sinks READ sinks) - QList sinks() const; - - Q_PROPERTY(QList Sources READ sources) - QList sources() const; - -public Q_SLOTS: // METHODS - bool IsPortEnabled(uint in0, const QString &in1); - void Reset(); - void SetBluetoothAudioMode(const QString &in0); - void SetDefaultSink(const QString &in0); - void SetDefaultSource(const QString &in0); - void SetPort(uint in0, const QString &in1, int in2); - void SetPortEnabled(uint in0, const QString &in1, bool in2); -Q_SIGNALS: // SIGNALS - void PortEnabledChanged(uint in0, const QString &in1, bool in2); -}; - -#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp deleted file mode 100644 index 0e643b94c..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.Monitor.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h" -#include -#include -#include -#include -#include -#include -#include - -/* - * Implementation of adaptor class MonitorAdaptor - */ - -MonitorAdaptor::MonitorAdaptor(QObject *parent) - : QDBusAbstractAdaptor(parent) -{ - // constructor - setAutoRelaySignals(true); -} - -MonitorAdaptor::~MonitorAdaptor() -{ - // destructor -} - -QStringList MonitorAdaptor::availableFillModes() const -{ - // get the value of property AvailableFillModes - return qvariant_cast< QStringList >(parent()->property("AvailableFillModes")); -} - -Resolution MonitorAdaptor::bestMode() const -{ - // get the value of property BestMode - return qvariant_cast< Resolution >(parent()->property("BestMode")); -} - -bool MonitorAdaptor::connected() const -{ - // get the value of property Connected - return qvariant_cast< bool >(parent()->property("Connected")); -} - -QString MonitorAdaptor::currentFillMode() const -{ - // get the value of property CurrentFillMode - return qvariant_cast< QString >(parent()->property("CurrentFillMode")); -} - -void MonitorAdaptor::setCurrentFillMode(const QString &value) -{ - // set the value of property CurrentFillMode - parent()->setProperty("CurrentFillMode", QVariant::fromValue(value)); -} - -Resolution MonitorAdaptor::currentMode() const -{ - // get the value of property CurrentMode - return qvariant_cast< Resolution >(parent()->property("CurrentMode")); -} - -uchar MonitorAdaptor::currentRotateMode() const -{ - // get the value of property CurrentRotateMode - return qvariant_cast< uchar >(parent()->property("CurrentRotateMode")); -} - -bool MonitorAdaptor::enabled() const -{ - // get the value of property Enabled - return qvariant_cast< bool >(parent()->property("Enabled")); -} - -ushort MonitorAdaptor::height() const -{ - // get the value of property Height - return qvariant_cast< ushort >(parent()->property("Height")); -} - -QString MonitorAdaptor::manufacturer() const -{ - // get the value of property Manufacturer - return qvariant_cast< QString >(parent()->property("Manufacturer")); -} - -uint MonitorAdaptor::mmHeight() const -{ - // get the value of property MmHeight - return qvariant_cast< uint >(parent()->property("MmHeight")); -} - -uint MonitorAdaptor::mmWidth() const -{ - // get the value of property MmWidth - return qvariant_cast< uint >(parent()->property("MmWidth")); -} - -QString MonitorAdaptor::model() const -{ - // get the value of property Model - return qvariant_cast< QString >(parent()->property("Model")); -} - -ResolutionList MonitorAdaptor::modes() const -{ - // get the value of property Modes - return qvariant_cast< ResolutionList >(parent()->property("Modes")); -} - -QString MonitorAdaptor::name() const -{ - // get the value of property Name - return qvariant_cast< QString >(parent()->property("Name")); -} - -ushort MonitorAdaptor::reflect() const -{ - // get the value of property Reflect - return qvariant_cast< ushort >(parent()->property("Reflect")); -} - -ReflectList MonitorAdaptor::reflects() const -{ - // get the value of property Reflects - return qvariant_cast< ReflectList >(parent()->property("Reflects")); -} - -double MonitorAdaptor::refreshRate() const -{ - // get the value of property RefreshRate - return qvariant_cast< double >(parent()->property("RefreshRate")); -} - -ushort MonitorAdaptor::rotation() const -{ - // get the value of property Rotation - return qvariant_cast< ushort >(parent()->property("Rotation")); -} - -RotationList MonitorAdaptor::rotations() const -{ - // get the value of property Rotations - return qvariant_cast< RotationList >(parent()->property("Rotations")); -} - -ushort MonitorAdaptor::width() const -{ - // get the value of property Width - return qvariant_cast< ushort >(parent()->property("Width")); -} - -short MonitorAdaptor::x() const -{ - // get the value of property X - return qvariant_cast< short >(parent()->property("X")); -} - -short MonitorAdaptor::y() const -{ - // get the value of property Y - return qvariant_cast< short >(parent()->property("Y")); -} - -void MonitorAdaptor::Enable(bool in0) -{ - // handle method call org.deepin.dde.Display1.Monitor.Enable - QMetaObject::invokeMethod(parent(), "Enable", Q_ARG(bool, in0)); -} - -void MonitorAdaptor::SetMode(uint in0) -{ - // handle method call org.deepin.dde.Display1.Monitor.SetMode - QMetaObject::invokeMethod(parent(), "SetMode", Q_ARG(uint, in0)); -} - -void MonitorAdaptor::SetModeBySize(ushort in0, ushort in1) -{ - // handle method call org.deepin.dde.Display1.Monitor.SetModeBySize - QMetaObject::invokeMethod(parent(), "SetModeBySize", Q_ARG(ushort, in0), Q_ARG(ushort, in1)); -} - -void MonitorAdaptor::SetPosition(short in0, short in1) -{ - // handle method call org.deepin.dde.Display1.Monitor.SetPosition - QMetaObject::invokeMethod(parent(), "SetPosition", Q_ARG(short, in0), Q_ARG(short, in1)); -} - -void MonitorAdaptor::SetReflect(ushort in0) -{ - // handle method call org.deepin.dde.Display1.Monitor.SetReflect - QMetaObject::invokeMethod(parent(), "SetReflect", Q_ARG(ushort, in0)); -} - -void MonitorAdaptor::SetRotation(ushort in0) -{ - // handle method call org.deepin.dde.Display1.Monitor.SetRotation - QMetaObject::invokeMethod(parent(), "SetRotation", Q_ARG(ushort, in0)); -} - diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h deleted file mode 100644 index e72a4b329..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor.h +++ /dev/null @@ -1,172 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.Monitor.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.MonitorAdaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.Monitor.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#ifndef ORG_DEEPIN_DDE_DISPLAY1_MONITORADAPTOR_H -#define ORG_DEEPIN_DDE_DISPLAY1_MONITORADAPTOR_H - -#include -#include -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.Monitor.h" -QT_BEGIN_NAMESPACE -class QByteArray; -template class QList; -template class QMap; -class QString; -class QStringList; -class QVariant; -QT_END_NAMESPACE - -/* - * Adaptor class for interface org.deepin.dde.Display1.Monitor - */ -class MonitorAdaptor: public QDBusAbstractAdaptor -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Display1.Monitor") - Q_CLASSINFO("D-Bus Introspection", "" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" - "") -public: - MonitorAdaptor(QObject *parent); - virtual ~MonitorAdaptor(); - -public: // PROPERTIES - Q_PROPERTY(QStringList AvailableFillModes READ availableFillModes) - QStringList availableFillModes() const; - - Q_PROPERTY(Resolution BestMode READ bestMode) - Resolution bestMode() const; - - Q_PROPERTY(bool Connected READ connected) - bool connected() const; - - Q_PROPERTY(QString CurrentFillMode READ currentFillMode WRITE setCurrentFillMode) - QString currentFillMode() const; - void setCurrentFillMode(const QString &value); - - Q_PROPERTY(Resolution CurrentMode READ currentMode) - Resolution currentMode() const; - - Q_PROPERTY(uchar CurrentRotateMode READ currentRotateMode) - uchar currentRotateMode() const; - - Q_PROPERTY(bool Enabled READ enabled) - bool enabled() const; - - Q_PROPERTY(ushort Height READ height) - ushort height() const; - - Q_PROPERTY(QString Manufacturer READ manufacturer) - QString manufacturer() const; - - Q_PROPERTY(uint MmHeight READ mmHeight) - uint mmHeight() const; - - Q_PROPERTY(uint MmWidth READ mmWidth) - uint mmWidth() const; - - Q_PROPERTY(QString Model READ model) - QString model() const; - - Q_PROPERTY(ResolutionList Modes READ modes) - ResolutionList modes() const; - - Q_PROPERTY(QString Name READ name) - QString name() const; - - Q_PROPERTY(ushort Reflect READ reflect) - ushort reflect() const; - - Q_PROPERTY(ReflectList Reflects READ reflects) - ReflectList reflects() const; - - Q_PROPERTY(double RefreshRate READ refreshRate) - double refreshRate() const; - - Q_PROPERTY(ushort Rotation READ rotation) - ushort rotation() const; - - Q_PROPERTY(RotationList Rotations READ rotations) - RotationList rotations() const; - - Q_PROPERTY(ushort Width READ width) - ushort width() const; - - Q_PROPERTY(short X READ x) - short x() const; - - Q_PROPERTY(short Y READ y) - short y() const; - -public Q_SLOTS: // METHODS - void Enable(bool in0); - void SetMode(uint in0); - void SetModeBySize(ushort in0, ushort in1); - void SetPosition(short in0, short in1); - void SetReflect(ushort in0); - void SetRotation(ushort in0); -Q_SIGNALS: // SIGNALS -}; - -#endif diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp deleted file mode 100644 index 8fc0165b3..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h" -#include -#include -#include -#include -#include -#include -#include - -/* - * Implementation of adaptor class Display1Adaptor - */ - -Display1Adaptor::Display1Adaptor(QObject *parent) - : QDBusAbstractAdaptor(parent) -{ - // constructor - setAutoRelaySignals(true); -} - -Display1Adaptor::~Display1Adaptor() -{ - // destructor -} - -BrightnessMap Display1Adaptor::brightness() const -{ - // get the value of property Brightness - return qvariant_cast< BrightnessMap >(parent()->property("Brightness")); -} - -int Display1Adaptor::colorTemperatureManual() const -{ - // get the value of property ColorTemperatureManual - return qvariant_cast< int >(parent()->property("ColorTemperatureManual")); -} - -int Display1Adaptor::colorTemperatureMode() const -{ - // get the value of property ColorTemperatureMode - return qvariant_cast< int >(parent()->property("ColorTemperatureMode")); -} - -QString Display1Adaptor::currentCustomId() const -{ - // get the value of property CurrentCustomId - return qvariant_cast< QString >(parent()->property("CurrentCustomId")); -} - -QStringList Display1Adaptor::customIdList() const -{ - // get the value of property CustomIdList - return qvariant_cast< QStringList >(parent()->property("CustomIdList")); -} - -uchar Display1Adaptor::displayMode() const -{ - // get the value of property DisplayMode - return qvariant_cast< uchar >(parent()->property("DisplayMode")); -} - -bool Display1Adaptor::hasChanged() const -{ - // get the value of property HasChanged - return qvariant_cast< bool >(parent()->property("HasChanged")); -} - -uint Display1Adaptor::maxBacklightBrightness() const -{ - // get the value of property MaxBacklightBrightness - return qvariant_cast< uint >(parent()->property("MaxBacklightBrightness")); -} - -QList Display1Adaptor::monitors() const -{ - // get the value of property Monitors - return qvariant_cast< QList >(parent()->property("Monitors")); -} - -QString Display1Adaptor::primary() const -{ - // get the value of property Primary - return qvariant_cast< QString >(parent()->property("Primary")); -} - -ScreenRect Display1Adaptor::primaryRect() const -{ - // get the value of property PrimaryRect - return qvariant_cast< ScreenRect >(parent()->property("PrimaryRect")); -} - -ushort Display1Adaptor::screenHeight() const -{ - // get the value of property ScreenHeight - return qvariant_cast< ushort >(parent()->property("ScreenHeight")); -} - -ushort Display1Adaptor::screenWidth() const -{ - // get the value of property ScreenWidth - return qvariant_cast< ushort >(parent()->property("ScreenWidth")); -} - -TouchscreenMap Display1Adaptor::touchMap() const -{ - // get the value of property TouchMap - return qvariant_cast< TouchscreenMap >(parent()->property("TouchMap")); -} - -TouchscreenInfoList Display1Adaptor::touchscreens() const -{ - // get the value of property Touchscreens - return qvariant_cast< TouchscreenInfoList >(parent()->property("Touchscreens")); -} - -TouchscreenInfoList_V2 Display1Adaptor::touchscreensV2() const -{ - // get the value of property TouchscreensV2 - return qvariant_cast< TouchscreenInfoList_V2 >(parent()->property("TouchscreensV2")); -} - -void Display1Adaptor::ApplyChanges() -{ - // handle method call org.deepin.dde.Display1.ApplyChanges - QMetaObject::invokeMethod(parent(), "ApplyChanges"); -} - -void Display1Adaptor::AssociateTouch(const QString &in0, const QString &in1) -{ - // handle method call org.deepin.dde.Display1.AssociateTouch - QMetaObject::invokeMethod(parent(), "AssociateTouch", Q_ARG(QString, in0), Q_ARG(QString, in1)); -} - -void Display1Adaptor::AssociateTouchByUUID(const QString &in0, const QString &in1) -{ - // handle method call org.deepin.dde.Display1.AssociateTouchByUUID - QMetaObject::invokeMethod(parent(), "AssociateTouchByUUID", Q_ARG(QString, in0), Q_ARG(QString, in1)); -} - -void Display1Adaptor::ChangeBrightness(bool in0) -{ - // handle method call org.deepin.dde.Display1.ChangeBrightness - QMetaObject::invokeMethod(parent(), "ChangeBrightness", Q_ARG(bool, in0)); -} - -void Display1Adaptor::DeleteCustomMode(const QString &in0) -{ - // handle method call org.deepin.dde.Display1.DeleteCustomMode - QMetaObject::invokeMethod(parent(), "DeleteCustomMode", Q_ARG(QString, in0)); -} - -uchar Display1Adaptor::GetRealDisplayMode() -{ - // handle method call org.deepin.dde.Display1.GetRealDisplayMode - uchar out0; - QMetaObject::invokeMethod(parent(), "GetRealDisplayMode", Q_RETURN_ARG(uchar, out0)); - return out0; -} - -QStringList Display1Adaptor::ListOutputNames() -{ - // handle method call org.deepin.dde.Display1.ListOutputNames - QStringList out0; - QMetaObject::invokeMethod(parent(), "ListOutputNames", Q_RETURN_ARG(QStringList, out0)); - return out0; -} - -ResolutionList Display1Adaptor::ListOutputsCommonModes() -{ - // handle method call org.deepin.dde.Display1.ListOutputsCommonModes - ResolutionList out0; - QMetaObject::invokeMethod(parent(), "ListOutputsCommonModes", Q_RETURN_ARG(ResolutionList, out0)); - return out0; -} - -void Display1Adaptor::ModifyConfigName(const QString &in0, const QString &in1) -{ - // handle method call org.deepin.dde.Display1.ModifyConfigName - QMetaObject::invokeMethod(parent(), "ModifyConfigName", Q_ARG(QString, in0), Q_ARG(QString, in1)); -} - -void Display1Adaptor::RefreshBrightness() -{ - // handle method call org.deepin.dde.Display1.RefreshBrightness - QMetaObject::invokeMethod(parent(), "RefreshBrightness"); -} - -void Display1Adaptor::Reset() -{ - // handle method call org.deepin.dde.Display1.Reset - QMetaObject::invokeMethod(parent(), "Reset"); -} - -void Display1Adaptor::ResetChanges() -{ - // handle method call org.deepin.dde.Display1.ResetChanges - QMetaObject::invokeMethod(parent(), "ResetChanges"); -} - -void Display1Adaptor::Save() -{ - // handle method call org.deepin.dde.Display1.Save - QMetaObject::invokeMethod(parent(), "Save"); -} - -void Display1Adaptor::SetAndSaveBrightness(const QString &in0, double in1) -{ - // handle method call org.deepin.dde.Display1.SetAndSaveBrightness - QMetaObject::invokeMethod(parent(), "SetAndSaveBrightness", Q_ARG(QString, in0), Q_ARG(double, in1)); -} - -void Display1Adaptor::SetBrightness(const QString &in0, double in1) -{ - // handle method call org.deepin.dde.Display1.SetBrightness - QMetaObject::invokeMethod(parent(), "SetBrightness", Q_ARG(QString, in0), Q_ARG(double, in1)); -} - -void Display1Adaptor::SetColorTemperature(int in0) -{ - // handle method call org.deepin.dde.Display1.SetColorTemperature - QMetaObject::invokeMethod(parent(), "SetColorTemperature", Q_ARG(int, in0)); -} - -void Display1Adaptor::SetMethodAdjustCCT(int in0) -{ - // handle method call org.deepin.dde.Display1.SetMethodAdjustCCT - QMetaObject::invokeMethod(parent(), "SetMethodAdjustCCT", Q_ARG(int, in0)); -} - -void Display1Adaptor::SetPrimary(const QString &in0) -{ - // handle method call org.deepin.dde.Display1.SetPrimary - QMetaObject::invokeMethod(parent(), "SetPrimary", Q_ARG(QString, in0)); -} - -void Display1Adaptor::SwitchMode(uchar in0, const QString &in1) -{ - // handle method call org.deepin.dde.Display1.SwitchMode - QMetaObject::invokeMethod(parent(), "SwitchMode", Q_ARG(uchar, in0), Q_ARG(QString, in1)); -} - diff --git a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h b/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h deleted file mode 100644 index be03ce869..000000000 --- a/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp ./dde-tray-loader/plugins/dde-dock/dbus/xml/org.deepin.dde.Display1.xml -a ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1Adaptor -i ./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.h - * - * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#ifndef ORG_DEEPIN_DDE_DISPLAY1ADAPTOR_H -#define ORG_DEEPIN_DDE_DISPLAY1ADAPTOR_H - -#include -#include -#include "./dde-tray-loader/toolGenerate/qdbusxml2cpp/org.deepin.dde.Display1.h" -QT_BEGIN_NAMESPACE -class QByteArray; -template class QList; -template class QMap; -class QString; -class QStringList; -class QVariant; -QT_END_NAMESPACE - -/* - * Adaptor class for interface org.deepin.dde.Display1 - */ -class Display1Adaptor: public QDBusAbstractAdaptor -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.Display1") - Q_CLASSINFO("D-Bus Introspection", "" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" - "") -public: - Display1Adaptor(QObject *parent); - virtual ~Display1Adaptor(); - -public: // PROPERTIES - Q_PROPERTY(BrightnessMap Brightness READ brightness) - BrightnessMap brightness() const; - - Q_PROPERTY(int ColorTemperatureManual READ colorTemperatureManual) - int colorTemperatureManual() const; - - Q_PROPERTY(int ColorTemperatureMode READ colorTemperatureMode) - int colorTemperatureMode() const; - - Q_PROPERTY(QString CurrentCustomId READ currentCustomId) - QString currentCustomId() const; - - Q_PROPERTY(QStringList CustomIdList READ customIdList) - QStringList customIdList() const; - - Q_PROPERTY(uchar DisplayMode READ displayMode) - uchar displayMode() const; - - Q_PROPERTY(bool HasChanged READ hasChanged) - bool hasChanged() const; - - Q_PROPERTY(uint MaxBacklightBrightness READ maxBacklightBrightness) - uint maxBacklightBrightness() const; - - Q_PROPERTY(QList Monitors READ monitors) - QList monitors() const; - - Q_PROPERTY(QString Primary READ primary) - QString primary() const; - - Q_PROPERTY(ScreenRect PrimaryRect READ primaryRect) - ScreenRect primaryRect() const; - - Q_PROPERTY(ushort ScreenHeight READ screenHeight) - ushort screenHeight() const; - - Q_PROPERTY(ushort ScreenWidth READ screenWidth) - ushort screenWidth() const; - - Q_PROPERTY(TouchscreenMap TouchMap READ touchMap) - TouchscreenMap touchMap() const; - - Q_PROPERTY(TouchscreenInfoList Touchscreens READ touchscreens) - TouchscreenInfoList touchscreens() const; - - Q_PROPERTY(TouchscreenInfoList_V2 TouchscreensV2 READ touchscreensV2) - TouchscreenInfoList_V2 touchscreensV2() const; - -public Q_SLOTS: // METHODS - void ApplyChanges(); - void AssociateTouch(const QString &in0, const QString &in1); - void AssociateTouchByUUID(const QString &in0, const QString &in1); - void ChangeBrightness(bool in0); - void DeleteCustomMode(const QString &in0); - uchar GetRealDisplayMode(); - QStringList ListOutputNames(); - ResolutionList ListOutputsCommonModes(); - void ModifyConfigName(const QString &in0, const QString &in1); - void RefreshBrightness(); - void Reset(); - void ResetChanges(); - void Save(); - void SetAndSaveBrightness(const QString &in0, double in1); - void SetBrightness(const QString &in0, double in1); - void SetColorTemperature(int in0); - void SetMethodAdjustCCT(int in0); - void SetPrimary(const QString &in0); - void SwitchMode(uchar in0, const QString &in1); -Q_SIGNALS: // SIGNALS -}; - -#endif