WebBrowser/FeaturePermissions/FeaturePermissionsDialog.py

changeset 5034
203039d7e945
parent 4917
682750cc7bd5
child 5389
9b1c800daff3
equal deleted inserted replaced
5033:d1c2651060ec 5034:203039d7e945
35 """ 35 """
36 super(FeaturePermissionsDialog, self).__init__(parent) 36 super(FeaturePermissionsDialog, self).__init__(parent)
37 self.setupUi(self) 37 self.setupUi(self)
38 38
39 # add the various lists 39 # add the various lists
40 # TODO: Qt 5.7?
41 ## self.notifList = QTreeWidget()
42 ## self.notifList.setAlternatingRowColors(True)
43 ## self.notifList.setSelectionMode(QAbstractItemView.ExtendedSelection)
44 ## self.notifList.setRootIsDecorated(False)
45 ## self.notifList.setItemsExpandable(False)
46 ## self.notifList.setAllColumnsShowFocus(True)
47 ## self.notifList.setObjectName("notifList")
48 ## self.notifList.setSortingEnabled(True)
49 ## self.notifList.headerItem().setText(0, self.tr("Host"))
50 ## self.notifList.headerItem().setText(1, self.tr("Permission"))
51 ## self.tabWidget.addTab(
52 ## self.notifList,
53 ## UI.PixmapCache.getIcon("notification.png"),
54 ## self.tr("Notifications"))
55 40
56 self.geoList = QTreeWidget() 41 self.geoList = QTreeWidget()
57 self.geoList.setAlternatingRowColors(True) 42 self.geoList.setAlternatingRowColors(True)
58 self.geoList.setSelectionMode(QAbstractItemView.ExtendedSelection) 43 self.geoList.setSelectionMode(QAbstractItemView.ExtendedSelection)
59 self.geoList.setRootIsDecorated(False) 44 self.geoList.setRootIsDecorated(False)
127 self.tabWidget.addTab( 112 self.tabWidget.addTab(
128 self.mouseLockList, 113 self.mouseLockList,
129 UI.PixmapCache.getIcon("mouse.png"), 114 UI.PixmapCache.getIcon("mouse.png"),
130 self.tr("Mouse Lock")) 115 self.tr("Mouse Lock"))
131 116
132 # TODO: Qt 5.7?
133 ## self.setTabOrder(self.tabWidget, self.notifList)
134 ## self.setTabOrder(self.notifList, self.geoList)
135 self.setTabOrder(self.tabWidget, self.geoList) 117 self.setTabOrder(self.tabWidget, self.geoList)
136 self.setTabOrder(self.geoList, self.micList) 118 self.setTabOrder(self.geoList, self.micList)
137 self.setTabOrder(self.micList, self.camList) 119 self.setTabOrder(self.micList, self.camList)
138 self.setTabOrder(self.camList, self.micCamList) 120 self.setTabOrder(self.camList, self.micCamList)
139 self.setTabOrder(self.micCamList, self.mouseLockList) 121 self.setTabOrder(self.micCamList, self.mouseLockList)
144 QWebEnginePage.PermissionGrantedByUser: self.tr("Allow"), 126 QWebEnginePage.PermissionGrantedByUser: self.tr("Allow"),
145 QWebEnginePage.PermissionDeniedByUser: self.tr("Deny"), 127 QWebEnginePage.PermissionDeniedByUser: self.tr("Deny"),
146 } 128 }
147 129
148 self.__permissionsLists = { 130 self.__permissionsLists = {
149 # TODO: Qt 5.7?
150 ## QWebEnginePage.Notifications: self.notifList,
151 QWebEnginePage.Geolocation: self.geoList, 131 QWebEnginePage.Geolocation: self.geoList,
152 QWebEnginePage.MediaAudioCapture: self.micList, 132 QWebEnginePage.MediaAudioCapture: self.micList,
153 QWebEnginePage.MediaVideoCapture: self.camList, 133 QWebEnginePage.MediaVideoCapture: self.camList,
154 QWebEnginePage.MediaAudioVideoCapture: self.micCamList, 134 QWebEnginePage.MediaAudioVideoCapture: self.micCamList,
155 QWebEnginePage.MouseLock: self.mouseLockList, 135 QWebEnginePage.MouseLock: self.mouseLockList,

eric ide

mercurial