9 |
9 |
10 from PyQt6.QtCore import pyqtSlot, Qt |
10 from PyQt6.QtCore import pyqtSlot, Qt |
11 from PyQt6.QtWidgets import QDialog, QTreeWidgetItem, QTreeWidget, QAbstractItemView |
11 from PyQt6.QtWidgets import QDialog, QTreeWidgetItem, QTreeWidget, QAbstractItemView |
12 from PyQt6.QtWebEngineCore import QWebEnginePage |
12 from PyQt6.QtWebEngineCore import QWebEnginePage |
13 |
13 |
14 import UI.PixmapCache |
14 from eric7.EricGui import EricPixmapCache |
15 |
15 |
16 from .Ui_FeaturePermissionsDialog import Ui_FeaturePermissionsDialog |
16 from .Ui_FeaturePermissionsDialog import Ui_FeaturePermissionsDialog |
17 |
17 |
18 |
18 |
19 class FeaturePermissionsDialog(QDialog, Ui_FeaturePermissionsDialog): |
19 class FeaturePermissionsDialog(QDialog, Ui_FeaturePermissionsDialog): |
48 self.notifList.setSortingEnabled(True) |
48 self.notifList.setSortingEnabled(True) |
49 self.notifList.headerItem().setText(0, self.tr("Host")) |
49 self.notifList.headerItem().setText(0, self.tr("Host")) |
50 self.notifList.headerItem().setText(1, self.tr("Permission")) |
50 self.notifList.headerItem().setText(1, self.tr("Permission")) |
51 self.tabWidget.addTab( |
51 self.tabWidget.addTab( |
52 self.notifList, |
52 self.notifList, |
53 UI.PixmapCache.getIcon("notification"), |
53 EricPixmapCache.getIcon("notification"), |
54 self.tr("Notifications"), |
54 self.tr("Notifications"), |
55 ) |
55 ) |
56 |
56 |
57 self.geoList = QTreeWidget() |
57 self.geoList = QTreeWidget() |
58 self.geoList.setAlternatingRowColors(True) |
58 self.geoList.setAlternatingRowColors(True) |
63 self.geoList.setObjectName("geoList") |
63 self.geoList.setObjectName("geoList") |
64 self.geoList.setSortingEnabled(True) |
64 self.geoList.setSortingEnabled(True) |
65 self.geoList.headerItem().setText(0, self.tr("Host")) |
65 self.geoList.headerItem().setText(0, self.tr("Host")) |
66 self.geoList.headerItem().setText(1, self.tr("Permission")) |
66 self.geoList.headerItem().setText(1, self.tr("Permission")) |
67 self.tabWidget.addTab( |
67 self.tabWidget.addTab( |
68 self.geoList, UI.PixmapCache.getIcon("geolocation"), self.tr("Geolocation") |
68 self.geoList, EricPixmapCache.getIcon("geolocation"), self.tr("Geolocation") |
69 ) |
69 ) |
70 |
70 |
71 self.micList = QTreeWidget() |
71 self.micList = QTreeWidget() |
72 self.micList.setAlternatingRowColors(True) |
72 self.micList.setAlternatingRowColors(True) |
73 self.micList.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) |
73 self.micList.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) |
77 self.micList.setObjectName("micList") |
77 self.micList.setObjectName("micList") |
78 self.micList.setSortingEnabled(True) |
78 self.micList.setSortingEnabled(True) |
79 self.micList.headerItem().setText(0, self.tr("Host")) |
79 self.micList.headerItem().setText(0, self.tr("Host")) |
80 self.micList.headerItem().setText(1, self.tr("Permission")) |
80 self.micList.headerItem().setText(1, self.tr("Permission")) |
81 self.tabWidget.addTab( |
81 self.tabWidget.addTab( |
82 self.micList, UI.PixmapCache.getIcon("audiocapture"), self.tr("Microphone") |
82 self.micList, EricPixmapCache.getIcon("audiocapture"), self.tr("Microphone") |
83 ) |
83 ) |
84 |
84 |
85 self.camList = QTreeWidget() |
85 self.camList = QTreeWidget() |
86 self.camList.setAlternatingRowColors(True) |
86 self.camList.setAlternatingRowColors(True) |
87 self.camList.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) |
87 self.camList.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection) |
91 self.camList.setObjectName("camList") |
91 self.camList.setObjectName("camList") |
92 self.camList.setSortingEnabled(True) |
92 self.camList.setSortingEnabled(True) |
93 self.camList.headerItem().setText(0, self.tr("Host")) |
93 self.camList.headerItem().setText(0, self.tr("Host")) |
94 self.camList.headerItem().setText(1, self.tr("Permission")) |
94 self.camList.headerItem().setText(1, self.tr("Permission")) |
95 self.tabWidget.addTab( |
95 self.tabWidget.addTab( |
96 self.camList, UI.PixmapCache.getIcon("camera"), self.tr("Camera") |
96 self.camList, EricPixmapCache.getIcon("camera"), self.tr("Camera") |
97 ) |
97 ) |
98 |
98 |
99 self.micCamList = QTreeWidget() |
99 self.micCamList = QTreeWidget() |
100 self.micCamList.setAlternatingRowColors(True) |
100 self.micCamList.setAlternatingRowColors(True) |
101 self.micCamList.setSelectionMode( |
101 self.micCamList.setSelectionMode( |
108 self.micCamList.setSortingEnabled(True) |
108 self.micCamList.setSortingEnabled(True) |
109 self.micCamList.headerItem().setText(0, self.tr("Host")) |
109 self.micCamList.headerItem().setText(0, self.tr("Host")) |
110 self.micCamList.headerItem().setText(1, self.tr("Permission")) |
110 self.micCamList.headerItem().setText(1, self.tr("Permission")) |
111 self.tabWidget.addTab( |
111 self.tabWidget.addTab( |
112 self.micCamList, |
112 self.micCamList, |
113 UI.PixmapCache.getIcon("audio-video"), |
113 EricPixmapCache.getIcon("audio-video"), |
114 self.tr("Microphone && Camera"), |
114 self.tr("Microphone && Camera"), |
115 ) |
115 ) |
116 |
116 |
117 self.mouseLockList = QTreeWidget() |
117 self.mouseLockList = QTreeWidget() |
118 self.mouseLockList.setAlternatingRowColors(True) |
118 self.mouseLockList.setAlternatingRowColors(True) |
125 self.mouseLockList.setObjectName("mouseLockList") |
125 self.mouseLockList.setObjectName("mouseLockList") |
126 self.mouseLockList.setSortingEnabled(True) |
126 self.mouseLockList.setSortingEnabled(True) |
127 self.mouseLockList.headerItem().setText(0, self.tr("Host")) |
127 self.mouseLockList.headerItem().setText(0, self.tr("Host")) |
128 self.mouseLockList.headerItem().setText(1, self.tr("Permission")) |
128 self.mouseLockList.headerItem().setText(1, self.tr("Permission")) |
129 self.tabWidget.addTab( |
129 self.tabWidget.addTab( |
130 self.mouseLockList, UI.PixmapCache.getIcon("mouse"), self.tr("Mouse Lock") |
130 self.mouseLockList, EricPixmapCache.getIcon("mouse"), self.tr("Mouse Lock") |
131 ) |
131 ) |
132 |
132 |
133 self.deskVidList = QTreeWidget() |
133 self.deskVidList = QTreeWidget() |
134 self.deskVidList.setAlternatingRowColors(True) |
134 self.deskVidList.setAlternatingRowColors(True) |
135 self.deskVidList.setSelectionMode( |
135 self.deskVidList.setSelectionMode( |
142 self.deskVidList.setSortingEnabled(True) |
142 self.deskVidList.setSortingEnabled(True) |
143 self.deskVidList.headerItem().setText(0, self.tr("Host")) |
143 self.deskVidList.headerItem().setText(0, self.tr("Host")) |
144 self.deskVidList.headerItem().setText(1, self.tr("Permission")) |
144 self.deskVidList.headerItem().setText(1, self.tr("Permission")) |
145 self.tabWidget.addTab( |
145 self.tabWidget.addTab( |
146 self.deskVidList, |
146 self.deskVidList, |
147 UI.PixmapCache.getIcon("desktopVideoCapture"), |
147 EricPixmapCache.getIcon("desktopVideoCapture"), |
148 self.tr("Desktop Video"), |
148 self.tr("Desktop Video"), |
149 ) |
149 ) |
150 |
150 |
151 self.deskAudVidList = QTreeWidget() |
151 self.deskAudVidList = QTreeWidget() |
152 self.deskAudVidList.setAlternatingRowColors(True) |
152 self.deskAudVidList.setAlternatingRowColors(True) |
160 self.deskAudVidList.setSortingEnabled(True) |
160 self.deskAudVidList.setSortingEnabled(True) |
161 self.deskAudVidList.headerItem().setText(0, self.tr("Host")) |
161 self.deskAudVidList.headerItem().setText(0, self.tr("Host")) |
162 self.deskAudVidList.headerItem().setText(1, self.tr("Permission")) |
162 self.deskAudVidList.headerItem().setText(1, self.tr("Permission")) |
163 self.tabWidget.addTab( |
163 self.tabWidget.addTab( |
164 self.deskAudVidList, |
164 self.deskAudVidList, |
165 UI.PixmapCache.getIcon("desktopAudioVideoCapture"), |
165 EricPixmapCache.getIcon("desktopAudioVideoCapture"), |
166 self.tr("Desktop Audio && Video"), |
166 self.tr("Desktop Audio && Video"), |
167 ) |
167 ) |
168 |
168 |
169 self.setTabOrder(self.tabWidget, self.notifList) |
169 self.setTabOrder(self.tabWidget, self.notifList) |
170 self.setTabOrder(self.notifList, self.geoList) |
170 self.setTabOrder(self.notifList, self.geoList) |