3343:f7a6d271bb40 | 3345:071afe8be2a1 |
---|---|
9 | 9 |
10 import os | 10 import os |
11 import sys | 11 import sys |
12 import logging | 12 import logging |
13 | 13 |
14 from PyQt4.QtCore import QTimer, QFile, QFileInfo, pyqtSignal, \ | 14 from PyQt4.QtCore import pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, \ |
15 PYQT_VERSION_STR, QDate, QIODevice, qVersion, QProcess, QSize, QUrl, \ | 15 PYQT_VERSION_STR, QDate, QIODevice, qVersion, QProcess, QSize, QUrl, \ |
16 QObject, Qt | 16 QObject, Qt |
17 from PyQt4.QtGui import QSizePolicy, QWidget, QKeySequence, QDesktopServices, \ | 17 from PyQt4.QtGui import QSizePolicy, QWidget, QKeySequence, QDesktopServices, \ |
18 QWhatsThis, QToolBar, QDialog, QSplitter, QApplication, QMenu, \ | 18 QWhatsThis, QToolBar, QDialog, QSplitter, QApplication, QMenu, \ |
19 QVBoxLayout, QDockWidget, QAction, QLabel | 19 QVBoxLayout, QDockWidget, QAction, QLabel |
1188 """<b>Quit the IDE</b>""" | 1188 """<b>Quit the IDE</b>""" |
1189 """<p>This quits the IDE. Any unsaved changes may be saved""" | 1189 """<p>This quits the IDE. Any unsaved changes may be saved""" |
1190 """ first. Any Python program being debugged will be stopped""" | 1190 """ first. Any Python program being debugged will be stopped""" |
1191 """ and the preferences will be written to disc.</p>""" | 1191 """ and the preferences will be written to disc.</p>""" |
1192 )) | 1192 )) |
1193 self.exitAct.triggered[()].connect(self.__quit) | 1193 self.exitAct.triggered.connect(self.__quit) |
1194 self.exitAct.setMenuRole(QAction.QuitRole) | 1194 self.exitAct.setMenuRole(QAction.QuitRole) |
1195 self.actions.append(self.exitAct) | 1195 self.actions.append(self.exitAct) |
1196 | 1196 |
1197 self.newWindowAct = E5Action( | 1197 self.newWindowAct = E5Action( |
1198 self.tr('New Window'), | 1198 self.tr('New Window'), |
1204 'Open a new eric5 instance')) | 1204 'Open a new eric5 instance')) |
1205 self.newWindowAct.setWhatsThis(self.tr( | 1205 self.newWindowAct.setWhatsThis(self.tr( |
1206 """<b>New Window</b>""" | 1206 """<b>New Window</b>""" |
1207 """<p>This opens a new instance of the eric5 IDE.</p>""" | 1207 """<p>This opens a new instance of the eric5 IDE.</p>""" |
1208 )) | 1208 )) |
1209 self.newWindowAct.triggered[()].connect(self.__newWindow) | 1209 self.newWindowAct.triggered.connect(self.__newWindow) |
1210 self.actions.append(self.newWindowAct) | 1210 self.actions.append(self.newWindowAct) |
1211 self.newWindowAct.setEnabled( | 1211 self.newWindowAct.setEnabled( |
1212 not Preferences.getUI("SingleApplicationMode")) | 1212 not Preferences.getUI("SingleApplicationMode")) |
1213 | 1213 |
1214 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) | 1214 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) |
1225 """<b>Edit Profile</b>""" | 1225 """<b>Edit Profile</b>""" |
1226 """<p>Activate the "Edit View Profile". Windows being shown,""" | 1226 """<p>Activate the "Edit View Profile". Windows being shown,""" |
1227 """ if this profile is active, may be configured with the""" | 1227 """ if this profile is active, may be configured with the""" |
1228 """ "View Profile Configuration" dialog.</p>""" | 1228 """ "View Profile Configuration" dialog.</p>""" |
1229 )) | 1229 )) |
1230 self.setEditProfileAct.triggered[()].connect(self.__setEditProfile) | 1230 self.setEditProfileAct.triggered.connect(self.__setEditProfile) |
1231 self.actions.append(self.setEditProfileAct) | 1231 self.actions.append(self.setEditProfileAct) |
1232 | 1232 |
1233 self.setDebugProfileAct = E5Action( | 1233 self.setDebugProfileAct = E5Action( |
1234 self.tr('Debug Profile'), | 1234 self.tr('Debug Profile'), |
1235 UI.PixmapCache.getIcon("viewProfileDebug.png"), | 1235 UI.PixmapCache.getIcon("viewProfileDebug.png"), |
1242 """<b>Debug Profile</b>""" | 1242 """<b>Debug Profile</b>""" |
1243 """<p>Activate the "Debug View Profile". Windows being shown,""" | 1243 """<p>Activate the "Debug View Profile". Windows being shown,""" |
1244 """ if this profile is active, may be configured with the""" | 1244 """ if this profile is active, may be configured with the""" |
1245 """ "View Profile Configuration" dialog.</p>""" | 1245 """ "View Profile Configuration" dialog.</p>""" |
1246 )) | 1246 )) |
1247 self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile) | 1247 self.setDebugProfileAct.triggered.connect(self.setDebugProfile) |
1248 self.actions.append(self.setDebugProfileAct) | 1248 self.actions.append(self.setDebugProfileAct) |
1249 | 1249 |
1250 self.pbActivateAct = E5Action( | 1250 self.pbActivateAct = E5Action( |
1251 self.tr('Project-Viewer'), | 1251 self.tr('Project-Viewer'), |
1252 self.tr('&Project-Viewer'), | 1252 self.tr('&Project-Viewer'), |
1258 self.pbActivateAct.setWhatsThis(self.tr( | 1258 self.pbActivateAct.setWhatsThis(self.tr( |
1259 """<b>Activate Project-Viewer</b>""" | 1259 """<b>Activate Project-Viewer</b>""" |
1260 """<p>This switches the input focus to the Project-Viewer""" | 1260 """<p>This switches the input focus to the Project-Viewer""" |
1261 """ window.</p>""" | 1261 """ window.</p>""" |
1262 )) | 1262 )) |
1263 self.pbActivateAct.triggered[()].connect(self.__activateProjectBrowser) | 1263 self.pbActivateAct.triggered.connect(self.__activateProjectBrowser) |
1264 self.actions.append(self.pbActivateAct) | 1264 self.actions.append(self.pbActivateAct) |
1265 self.addAction(self.pbActivateAct) | 1265 self.addAction(self.pbActivateAct) |
1266 | 1266 |
1267 self.mpbActivateAct = E5Action( | 1267 self.mpbActivateAct = E5Action( |
1268 self.tr('Multiproject-Viewer'), | 1268 self.tr('Multiproject-Viewer'), |
1275 self.mpbActivateAct.setWhatsThis(self.tr( | 1275 self.mpbActivateAct.setWhatsThis(self.tr( |
1276 """<b>Activate Multiproject-Viewer</b>""" | 1276 """<b>Activate Multiproject-Viewer</b>""" |
1277 """<p>This switches the input focus to the Multiproject-Viewer""" | 1277 """<p>This switches the input focus to the Multiproject-Viewer""" |
1278 """ window.</p>""" | 1278 """ window.</p>""" |
1279 )) | 1279 )) |
1280 self.mpbActivateAct.triggered[()].connect( | 1280 self.mpbActivateAct.triggered.connect( |
1281 self.__activateMultiProjectBrowser) | 1281 self.__activateMultiProjectBrowser) |
1282 self.actions.append(self.mpbActivateAct) | 1282 self.actions.append(self.mpbActivateAct) |
1283 self.addAction(self.mpbActivateAct) | 1283 self.addAction(self.mpbActivateAct) |
1284 | 1284 |
1285 self.debugViewerActivateAct = E5Action( | 1285 self.debugViewerActivateAct = E5Action( |
1293 self.debugViewerActivateAct.setWhatsThis(self.tr( | 1293 self.debugViewerActivateAct.setWhatsThis(self.tr( |
1294 """<b>Activate Debug-Viewer</b>""" | 1294 """<b>Activate Debug-Viewer</b>""" |
1295 """<p>This switches the input focus to the Debug-Viewer""" | 1295 """<p>This switches the input focus to the Debug-Viewer""" |
1296 """ window.</p>""" | 1296 """ window.</p>""" |
1297 )) | 1297 )) |
1298 self.debugViewerActivateAct.triggered[()].connect( | 1298 self.debugViewerActivateAct.triggered.connect( |
1299 self.__activateDebugViewer) | 1299 self.__activateDebugViewer) |
1300 self.actions.append(self.debugViewerActivateAct) | 1300 self.actions.append(self.debugViewerActivateAct) |
1301 self.addAction(self.debugViewerActivateAct) | 1301 self.addAction(self.debugViewerActivateAct) |
1302 | 1302 |
1303 self.shellActivateAct = E5Action( | 1303 self.shellActivateAct = E5Action( |
1310 "Switch the input focus to the Shell window.")) | 1310 "Switch the input focus to the Shell window.")) |
1311 self.shellActivateAct.setWhatsThis(self.tr( | 1311 self.shellActivateAct.setWhatsThis(self.tr( |
1312 """<b>Activate Shell</b>""" | 1312 """<b>Activate Shell</b>""" |
1313 """<p>This switches the input focus to the Shell window.</p>""" | 1313 """<p>This switches the input focus to the Shell window.</p>""" |
1314 )) | 1314 )) |
1315 self.shellActivateAct.triggered[()].connect(self.__activateShell) | 1315 self.shellActivateAct.triggered.connect(self.__activateShell) |
1316 self.actions.append(self.shellActivateAct) | 1316 self.actions.append(self.shellActivateAct) |
1317 self.addAction(self.shellActivateAct) | 1317 self.addAction(self.shellActivateAct) |
1318 | 1318 |
1319 self.browserActivateAct = E5Action( | 1319 self.browserActivateAct = E5Action( |
1320 self.tr('File-Browser'), | 1320 self.tr('File-Browser'), |
1327 self.browserActivateAct.setWhatsThis(self.tr( | 1327 self.browserActivateAct.setWhatsThis(self.tr( |
1328 """<b>Activate File-Browser</b>""" | 1328 """<b>Activate File-Browser</b>""" |
1329 """<p>This switches the input focus to the File-Browser""" | 1329 """<p>This switches the input focus to the File-Browser""" |
1330 """ window.</p>""" | 1330 """ window.</p>""" |
1331 )) | 1331 )) |
1332 self.browserActivateAct.triggered[()].connect(self.__activateBrowser) | 1332 self.browserActivateAct.triggered.connect(self.__activateBrowser) |
1333 self.actions.append(self.browserActivateAct) | 1333 self.actions.append(self.browserActivateAct) |
1334 self.addAction(self.browserActivateAct) | 1334 self.addAction(self.browserActivateAct) |
1335 | 1335 |
1336 self.logViewerActivateAct = E5Action( | 1336 self.logViewerActivateAct = E5Action( |
1337 self.tr('Log-Viewer'), | 1337 self.tr('Log-Viewer'), |
1344 self.logViewerActivateAct.setWhatsThis(self.tr( | 1344 self.logViewerActivateAct.setWhatsThis(self.tr( |
1345 """<b>Activate Log-Viewer</b>""" | 1345 """<b>Activate Log-Viewer</b>""" |
1346 """<p>This switches the input focus to the Log-Viewer""" | 1346 """<p>This switches the input focus to the Log-Viewer""" |
1347 """ window.</p>""" | 1347 """ window.</p>""" |
1348 )) | 1348 )) |
1349 self.logViewerActivateAct.triggered[()].connect( | 1349 self.logViewerActivateAct.triggered.connect( |
1350 self.__activateLogViewer) | 1350 self.__activateLogViewer) |
1351 self.actions.append(self.logViewerActivateAct) | 1351 self.actions.append(self.logViewerActivateAct) |
1352 self.addAction(self.logViewerActivateAct) | 1352 self.addAction(self.logViewerActivateAct) |
1353 | 1353 |
1354 self.taskViewerActivateAct = E5Action( | 1354 self.taskViewerActivateAct = E5Action( |
1362 self.taskViewerActivateAct.setWhatsThis(self.tr( | 1362 self.taskViewerActivateAct.setWhatsThis(self.tr( |
1363 """<b>Activate Task-Viewer</b>""" | 1363 """<b>Activate Task-Viewer</b>""" |
1364 """<p>This switches the input focus to the Task-Viewer""" | 1364 """<p>This switches the input focus to the Task-Viewer""" |
1365 """ window.</p>""" | 1365 """ window.</p>""" |
1366 )) | 1366 )) |
1367 self.taskViewerActivateAct.triggered[()].connect( | 1367 self.taskViewerActivateAct.triggered.connect( |
1368 self.__activateTaskViewer) | 1368 self.__activateTaskViewer) |
1369 self.actions.append(self.taskViewerActivateAct) | 1369 self.actions.append(self.taskViewerActivateAct) |
1370 self.addAction(self.taskViewerActivateAct) | 1370 self.addAction(self.taskViewerActivateAct) |
1371 | 1371 |
1372 self.templateViewerActivateAct = E5Action( | 1372 self.templateViewerActivateAct = E5Action( |
1380 self.templateViewerActivateAct.setWhatsThis(self.tr( | 1380 self.templateViewerActivateAct.setWhatsThis(self.tr( |
1381 """<b>Activate Template-Viewer</b>""" | 1381 """<b>Activate Template-Viewer</b>""" |
1382 """<p>This switches the input focus to the Template-Viewer""" | 1382 """<p>This switches the input focus to the Template-Viewer""" |
1383 """ window.</p>""" | 1383 """ window.</p>""" |
1384 )) | 1384 )) |
1385 self.templateViewerActivateAct.triggered[()].connect( | 1385 self.templateViewerActivateAct.triggered.connect( |
1386 self.__activateTemplateViewer) | 1386 self.__activateTemplateViewer) |
1387 self.actions.append(self.templateViewerActivateAct) | 1387 self.actions.append(self.templateViewerActivateAct) |
1388 self.addAction(self.templateViewerActivateAct) | 1388 self.addAction(self.templateViewerActivateAct) |
1389 | 1389 |
1390 self.ltAct = E5Action( | 1390 self.ltAct = E5Action( |
1394 self.ltAct.setWhatsThis(self.tr( | 1394 self.ltAct.setWhatsThis(self.tr( |
1395 """<b>Toggle the Left Toolbox window</b>""" | 1395 """<b>Toggle the Left Toolbox window</b>""" |
1396 """<p>If the Left Toolbox window is hidden then display it.""" | 1396 """<p>If the Left Toolbox window is hidden then display it.""" |
1397 """ If it is displayed then close it.</p>""" | 1397 """ If it is displayed then close it.</p>""" |
1398 )) | 1398 )) |
1399 self.ltAct.triggered[()].connect(self.__toggleLeftToolbox) | 1399 self.ltAct.triggered.connect(self.__toggleLeftToolbox) |
1400 self.actions.append(self.ltAct) | 1400 self.actions.append(self.ltAct) |
1401 | 1401 |
1402 self.rtAct = E5Action( | 1402 self.rtAct = E5Action( |
1403 self.tr('Right Toolbox'), | 1403 self.tr('Right Toolbox'), |
1404 self.tr('&Right Toolbox'), | 1404 self.tr('&Right Toolbox'), |
1407 self.rtAct.setWhatsThis(self.tr( | 1407 self.rtAct.setWhatsThis(self.tr( |
1408 """<b>Toggle the Right Toolbox window</b>""" | 1408 """<b>Toggle the Right Toolbox window</b>""" |
1409 """<p>If the Right Toolbox window is hidden then display it.""" | 1409 """<p>If the Right Toolbox window is hidden then display it.""" |
1410 """ If it is displayed then close it.</p>""" | 1410 """ If it is displayed then close it.</p>""" |
1411 )) | 1411 )) |
1412 self.rtAct.triggered[()].connect(self.__toggleRightToolbox) | 1412 self.rtAct.triggered.connect(self.__toggleRightToolbox) |
1413 self.actions.append(self.rtAct) | 1413 self.actions.append(self.rtAct) |
1414 | 1414 |
1415 self.htAct = E5Action( | 1415 self.htAct = E5Action( |
1416 self.tr('Horizontal Toolbox'), | 1416 self.tr('Horizontal Toolbox'), |
1417 self.tr('&Horizontal Toolbox'), 0, 0, self, | 1417 self.tr('&Horizontal Toolbox'), 0, 0, self, |
1421 self.htAct.setWhatsThis(self.tr( | 1421 self.htAct.setWhatsThis(self.tr( |
1422 """<b>Toggle the Horizontal Toolbox window</b>""" | 1422 """<b>Toggle the Horizontal Toolbox window</b>""" |
1423 """<p>If the Horizontal Toolbox window is hidden then display""" | 1423 """<p>If the Horizontal Toolbox window is hidden then display""" |
1424 """ it. If it is displayed then close it.</p>""" | 1424 """ it. If it is displayed then close it.</p>""" |
1425 )) | 1425 )) |
1426 self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox) | 1426 self.htAct.triggered.connect(self.__toggleHorizontalToolbox) |
1427 self.actions.append(self.htAct) | 1427 self.actions.append(self.htAct) |
1428 | 1428 |
1429 self.lsbAct = E5Action( | 1429 self.lsbAct = E5Action( |
1430 self.tr('Left Sidebar'), | 1430 self.tr('Left Sidebar'), |
1431 self.tr('&Left Sidebar'), | 1431 self.tr('&Left Sidebar'), |
1434 self.lsbAct.setWhatsThis(self.tr( | 1434 self.lsbAct.setWhatsThis(self.tr( |
1435 """<b>Toggle the left sidebar window</b>""" | 1435 """<b>Toggle the left sidebar window</b>""" |
1436 """<p>If the left sidebar window is hidden then display it.""" | 1436 """<p>If the left sidebar window is hidden then display it.""" |
1437 """ If it is displayed then close it.</p>""" | 1437 """ If it is displayed then close it.</p>""" |
1438 )) | 1438 )) |
1439 self.lsbAct.triggered[()].connect(self.__toggleLeftSidebar) | 1439 self.lsbAct.triggered.connect(self.__toggleLeftSidebar) |
1440 self.actions.append(self.lsbAct) | 1440 self.actions.append(self.lsbAct) |
1441 | 1441 |
1442 self.rsbAct = E5Action( | 1442 self.rsbAct = E5Action( |
1443 self.tr('Right Sidebar'), | 1443 self.tr('Right Sidebar'), |
1444 self.tr('&Right Sidebar'), | 1444 self.tr('&Right Sidebar'), |
1448 self.rsbAct.setWhatsThis(self.tr( | 1448 self.rsbAct.setWhatsThis(self.tr( |
1449 """<b>Toggle the right sidebar window</b>""" | 1449 """<b>Toggle the right sidebar window</b>""" |
1450 """<p>If the right sidebar window is hidden then display it.""" | 1450 """<p>If the right sidebar window is hidden then display it.""" |
1451 """ If it is displayed then close it.</p>""" | 1451 """ If it is displayed then close it.</p>""" |
1452 )) | 1452 )) |
1453 self.rsbAct.triggered[()].connect(self.__toggleRightSidebar) | 1453 self.rsbAct.triggered.connect(self.__toggleRightSidebar) |
1454 self.actions.append(self.rsbAct) | 1454 self.actions.append(self.rsbAct) |
1455 | 1455 |
1456 self.bsbAct = E5Action( | 1456 self.bsbAct = E5Action( |
1457 self.tr('Bottom Sidebar'), | 1457 self.tr('Bottom Sidebar'), |
1458 self.tr('&Bottom Sidebar'), 0, 0, self, | 1458 self.tr('&Bottom Sidebar'), 0, 0, self, |
1462 self.bsbAct.setWhatsThis(self.tr( | 1462 self.bsbAct.setWhatsThis(self.tr( |
1463 """<b>Toggle the bottom sidebar window</b>""" | 1463 """<b>Toggle the bottom sidebar window</b>""" |
1464 """<p>If the bottom sidebar window is hidden then display it.""" | 1464 """<p>If the bottom sidebar window is hidden then display it.""" |
1465 """ If it is displayed then close it.</p>""" | 1465 """ If it is displayed then close it.</p>""" |
1466 )) | 1466 )) |
1467 self.bsbAct.triggered[()].connect(self.__toggleBottomSidebar) | 1467 self.bsbAct.triggered.connect(self.__toggleBottomSidebar) |
1468 self.actions.append(self.bsbAct) | 1468 self.actions.append(self.bsbAct) |
1469 | 1469 |
1470 self.cooperationViewerActivateAct = E5Action( | 1470 self.cooperationViewerActivateAct = E5Action( |
1471 self.tr('Cooperation-Viewer'), | 1471 self.tr('Cooperation-Viewer'), |
1472 self.tr('Co&operation-Viewer'), | 1472 self.tr('Co&operation-Viewer'), |
1478 self.cooperationViewerActivateAct.setWhatsThis(self.tr( | 1478 self.cooperationViewerActivateAct.setWhatsThis(self.tr( |
1479 """<b>Activate Cooperation-Viewer</b>""" | 1479 """<b>Activate Cooperation-Viewer</b>""" |
1480 """<p>This switches the input focus to the Cooperation-Viewer""" | 1480 """<p>This switches the input focus to the Cooperation-Viewer""" |
1481 """ window.</p>""" | 1481 """ window.</p>""" |
1482 )) | 1482 )) |
1483 self.cooperationViewerActivateAct.triggered[()].connect( | 1483 self.cooperationViewerActivateAct.triggered.connect( |
1484 self.activateCooperationViewer) | 1484 self.activateCooperationViewer) |
1485 self.actions.append(self.cooperationViewerActivateAct) | 1485 self.actions.append(self.cooperationViewerActivateAct) |
1486 self.addAction(self.cooperationViewerActivateAct) | 1486 self.addAction(self.cooperationViewerActivateAct) |
1487 | 1487 |
1488 self.ircActivateAct = E5Action( | 1488 self.ircActivateAct = E5Action( |
1495 "Switch the input focus to the IRC window.")) | 1495 "Switch the input focus to the IRC window.")) |
1496 self.ircActivateAct.setWhatsThis(self.tr( | 1496 self.ircActivateAct.setWhatsThis(self.tr( |
1497 """<b>Activate IRC</b>""" | 1497 """<b>Activate IRC</b>""" |
1498 """<p>This switches the input focus to the IRC window.</p>""" | 1498 """<p>This switches the input focus to the IRC window.</p>""" |
1499 )) | 1499 )) |
1500 self.ircActivateAct.triggered[()].connect( | 1500 self.ircActivateAct.triggered.connect( |
1501 self.__activateIRC) | 1501 self.__activateIRC) |
1502 self.actions.append(self.ircActivateAct) | 1502 self.actions.append(self.ircActivateAct) |
1503 self.addAction(self.ircActivateAct) | 1503 self.addAction(self.ircActivateAct) |
1504 | 1504 |
1505 self.symbolsViewerActivateAct = E5Action( | 1505 self.symbolsViewerActivateAct = E5Action( |
1513 self.symbolsViewerActivateAct.setWhatsThis(self.tr( | 1513 self.symbolsViewerActivateAct.setWhatsThis(self.tr( |
1514 """<b>Activate Symbols-Viewer</b>""" | 1514 """<b>Activate Symbols-Viewer</b>""" |
1515 """<p>This switches the input focus to the Symbols-Viewer""" | 1515 """<p>This switches the input focus to the Symbols-Viewer""" |
1516 """ window.</p>""" | 1516 """ window.</p>""" |
1517 )) | 1517 )) |
1518 self.symbolsViewerActivateAct.triggered[()].connect( | 1518 self.symbolsViewerActivateAct.triggered.connect( |
1519 self.__activateSymbolsViewer) | 1519 self.__activateSymbolsViewer) |
1520 self.actions.append(self.symbolsViewerActivateAct) | 1520 self.actions.append(self.symbolsViewerActivateAct) |
1521 self.addAction(self.symbolsViewerActivateAct) | 1521 self.addAction(self.symbolsViewerActivateAct) |
1522 | 1522 |
1523 self.numbersViewerActivateAct = E5Action( | 1523 self.numbersViewerActivateAct = E5Action( |
1531 self.numbersViewerActivateAct.setWhatsThis(self.tr( | 1531 self.numbersViewerActivateAct.setWhatsThis(self.tr( |
1532 """<b>Activate Numbers-Viewer</b>""" | 1532 """<b>Activate Numbers-Viewer</b>""" |
1533 """<p>This switches the input focus to the Numbers-Viewer""" | 1533 """<p>This switches the input focus to the Numbers-Viewer""" |
1534 """ window.</p>""" | 1534 """ window.</p>""" |
1535 )) | 1535 )) |
1536 self.numbersViewerActivateAct.triggered[()].connect( | 1536 self.numbersViewerActivateAct.triggered.connect( |
1537 self.__activateNumbersViewer) | 1537 self.__activateNumbersViewer) |
1538 self.actions.append(self.numbersViewerActivateAct) | 1538 self.actions.append(self.numbersViewerActivateAct) |
1539 self.addAction(self.numbersViewerActivateAct) | 1539 self.addAction(self.numbersViewerActivateAct) |
1540 | 1540 |
1541 self.whatsThisAct = E5Action( | 1541 self.whatsThisAct = E5Action( |
1551 """ a question mark, and you can click on the interface elements""" | 1551 """ a question mark, and you can click on the interface elements""" |
1552 """ to get a short description of what they do and how to use""" | 1552 """ to get a short description of what they do and how to use""" |
1553 """ them. In dialogs, this feature can be accessed using the""" | 1553 """ them. In dialogs, this feature can be accessed using the""" |
1554 """ context help button in the titlebar.</p>""" | 1554 """ context help button in the titlebar.</p>""" |
1555 )) | 1555 )) |
1556 self.whatsThisAct.triggered[()].connect(self.__whatsThis) | 1556 self.whatsThisAct.triggered.connect(self.__whatsThis) |
1557 self.actions.append(self.whatsThisAct) | 1557 self.actions.append(self.whatsThisAct) |
1558 | 1558 |
1559 self.helpviewerAct = E5Action( | 1559 self.helpviewerAct = E5Action( |
1560 self.tr('Helpviewer'), | 1560 self.tr('Helpviewer'), |
1561 UI.PixmapCache.getIcon("help.png"), | 1561 UI.PixmapCache.getIcon("help.png"), |
1571 """ the capability to navigate to links, set bookmarks, print""" | 1571 """ the capability to navigate to links, set bookmarks, print""" |
1572 """ the displayed help and some more features. You may use it to""" | 1572 """ the displayed help and some more features. You may use it to""" |
1573 """ browse the internet as well</p><p>If called with a word""" | 1573 """ browse the internet as well</p><p>If called with a word""" |
1574 """ selected, this word is search in the Qt help collection.</p>""" | 1574 """ selected, this word is search in the Qt help collection.</p>""" |
1575 )) | 1575 )) |
1576 self.helpviewerAct.triggered[()].connect(self.__helpViewer) | 1576 self.helpviewerAct.triggered.connect(self.__helpViewer) |
1577 self.actions.append(self.helpviewerAct) | 1577 self.actions.append(self.helpviewerAct) |
1578 | 1578 |
1579 self.__initQtDocActions() | 1579 self.__initQtDocActions() |
1580 self.__initPythonDocActions() | 1580 self.__initPythonDocActions() |
1581 self.__initEricDocAction() | 1581 self.__initEricDocAction() |
1589 'Display version information')) | 1589 'Display version information')) |
1590 self.versionAct.setWhatsThis(self.tr( | 1590 self.versionAct.setWhatsThis(self.tr( |
1591 """<b>Show Versions</b>""" | 1591 """<b>Show Versions</b>""" |
1592 """<p>Display version information.</p>""" | 1592 """<p>Display version information.</p>""" |
1593 )) | 1593 )) |
1594 self.versionAct.triggered[()].connect(self.__showVersions) | 1594 self.versionAct.triggered.connect(self.__showVersions) |
1595 self.actions.append(self.versionAct) | 1595 self.actions.append(self.versionAct) |
1596 | 1596 |
1597 self.checkUpdateAct = E5Action( | 1597 self.checkUpdateAct = E5Action( |
1598 self.tr('Check for Updates'), | 1598 self.tr('Check for Updates'), |
1599 self.tr('Check for &Updates...'), 0, 0, self, 'check_updates') | 1599 self.tr('Check for &Updates...'), 0, 0, self, 'check_updates') |
1600 self.checkUpdateAct.setStatusTip(self.tr('Check for Updates')) | 1600 self.checkUpdateAct.setStatusTip(self.tr('Check for Updates')) |
1601 self.checkUpdateAct.setWhatsThis(self.tr( | 1601 self.checkUpdateAct.setWhatsThis(self.tr( |
1602 """<b>Check for Updates...</b>""" | 1602 """<b>Check for Updates...</b>""" |
1603 """<p>Checks the internet for updates of eric5.</p>""" | 1603 """<p>Checks the internet for updates of eric5.</p>""" |
1604 )) | 1604 )) |
1605 self.checkUpdateAct.triggered[()].connect(self.performVersionCheck) | 1605 self.checkUpdateAct.triggered.connect(self.performVersionCheck) |
1606 self.actions.append(self.checkUpdateAct) | 1606 self.actions.append(self.checkUpdateAct) |
1607 | 1607 |
1608 self.showVersionsAct = E5Action( | 1608 self.showVersionsAct = E5Action( |
1609 self.tr('Show downloadable versions'), | 1609 self.tr('Show downloadable versions'), |
1610 self.tr('Show &downloadable versions...'), | 1610 self.tr('Show &downloadable versions...'), |
1614 self.showVersionsAct.setWhatsThis(self.tr( | 1614 self.showVersionsAct.setWhatsThis(self.tr( |
1615 """<b>Show downloadable versions...</b>""" | 1615 """<b>Show downloadable versions...</b>""" |
1616 """<p>Shows the eric5 versions available for download """ | 1616 """<p>Shows the eric5 versions available for download """ |
1617 """from the internet.</p>""" | 1617 """from the internet.</p>""" |
1618 )) | 1618 )) |
1619 self.showVersionsAct.triggered[()].connect( | 1619 self.showVersionsAct.triggered.connect( |
1620 self.showAvailableVersionsInfo) | 1620 self.showAvailableVersionsInfo) |
1621 self.actions.append(self.showVersionsAct) | 1621 self.actions.append(self.showVersionsAct) |
1622 | 1622 |
1623 self.showErrorLogAct = E5Action( | 1623 self.showErrorLogAct = E5Action( |
1624 self.tr('Show Error Log'), | 1624 self.tr('Show Error Log'), |
1627 self.showErrorLogAct.setStatusTip(self.tr('Show Error Log')) | 1627 self.showErrorLogAct.setStatusTip(self.tr('Show Error Log')) |
1628 self.showErrorLogAct.setWhatsThis(self.tr( | 1628 self.showErrorLogAct.setWhatsThis(self.tr( |
1629 """<b>Show Error Log...</b>""" | 1629 """<b>Show Error Log...</b>""" |
1630 """<p>Opens a dialog showing the most recent error log.</p>""" | 1630 """<p>Opens a dialog showing the most recent error log.</p>""" |
1631 )) | 1631 )) |
1632 self.showErrorLogAct.triggered[()].connect(self.__showErrorLog) | 1632 self.showErrorLogAct.triggered.connect(self.__showErrorLog) |
1633 self.actions.append(self.showErrorLogAct) | 1633 self.actions.append(self.showErrorLogAct) |
1634 | 1634 |
1635 self.reportBugAct = E5Action( | 1635 self.reportBugAct = E5Action( |
1636 self.tr('Report Bug'), | 1636 self.tr('Report Bug'), |
1637 self.tr('Report &Bug...'), | 1637 self.tr('Report &Bug...'), |
1639 self.reportBugAct.setStatusTip(self.tr('Report a bug')) | 1639 self.reportBugAct.setStatusTip(self.tr('Report a bug')) |
1640 self.reportBugAct.setWhatsThis(self.tr( | 1640 self.reportBugAct.setWhatsThis(self.tr( |
1641 """<b>Report Bug...</b>""" | 1641 """<b>Report Bug...</b>""" |
1642 """<p>Opens a dialog to report a bug.</p>""" | 1642 """<p>Opens a dialog to report a bug.</p>""" |
1643 )) | 1643 )) |
1644 self.reportBugAct.triggered[()].connect(self.__reportBug) | 1644 self.reportBugAct.triggered.connect(self.__reportBug) |
1645 self.actions.append(self.reportBugAct) | 1645 self.actions.append(self.reportBugAct) |
1646 | 1646 |
1647 self.requestFeatureAct = E5Action( | 1647 self.requestFeatureAct = E5Action( |
1648 self.tr('Request Feature'), | 1648 self.tr('Request Feature'), |
1649 self.tr('Request &Feature...'), | 1649 self.tr('Request &Feature...'), |
1652 'Send a feature request')) | 1652 'Send a feature request')) |
1653 self.requestFeatureAct.setWhatsThis(self.tr( | 1653 self.requestFeatureAct.setWhatsThis(self.tr( |
1654 """<b>Request Feature...</b>""" | 1654 """<b>Request Feature...</b>""" |
1655 """<p>Opens a dialog to send a feature request.</p>""" | 1655 """<p>Opens a dialog to send a feature request.</p>""" |
1656 )) | 1656 )) |
1657 self.requestFeatureAct.triggered[()].connect(self.__requestFeature) | 1657 self.requestFeatureAct.triggered.connect(self.__requestFeature) |
1658 self.actions.append(self.requestFeatureAct) | 1658 self.actions.append(self.requestFeatureAct) |
1659 | 1659 |
1660 self.utActGrp = createActionGroup(self) | 1660 self.utActGrp = createActionGroup(self) |
1661 | 1661 |
1662 self.utDialogAct = E5Action( | 1662 self.utDialogAct = E5Action( |
1668 self.utDialogAct.setWhatsThis(self.tr( | 1668 self.utDialogAct.setWhatsThis(self.tr( |
1669 """<b>Unittest</b>""" | 1669 """<b>Unittest</b>""" |
1670 """<p>Perform unit tests. The dialog gives you the""" | 1670 """<p>Perform unit tests. The dialog gives you the""" |
1671 """ ability to select and run a unittest suite.</p>""" | 1671 """ ability to select and run a unittest suite.</p>""" |
1672 )) | 1672 )) |
1673 self.utDialogAct.triggered[()].connect(self.__unittest) | 1673 self.utDialogAct.triggered.connect(self.__unittest) |
1674 self.actions.append(self.utDialogAct) | 1674 self.actions.append(self.utDialogAct) |
1675 | 1675 |
1676 self.utRestartAct = E5Action( | 1676 self.utRestartAct = E5Action( |
1677 self.tr('Unittest Restart'), | 1677 self.tr('Unittest Restart'), |
1678 UI.PixmapCache.getIcon("unittestRestart.png"), | 1678 UI.PixmapCache.getIcon("unittestRestart.png"), |
1681 self.utRestartAct.setStatusTip(self.tr('Restart last unittest')) | 1681 self.utRestartAct.setStatusTip(self.tr('Restart last unittest')) |
1682 self.utRestartAct.setWhatsThis(self.tr( | 1682 self.utRestartAct.setWhatsThis(self.tr( |
1683 """<b>Restart Unittest</b>""" | 1683 """<b>Restart Unittest</b>""" |
1684 """<p>Restart the unittest performed last.</p>""" | 1684 """<p>Restart the unittest performed last.</p>""" |
1685 )) | 1685 )) |
1686 self.utRestartAct.triggered[()].connect(self.__unittestRestart) | 1686 self.utRestartAct.triggered.connect(self.__unittestRestart) |
1687 self.utRestartAct.setEnabled(False) | 1687 self.utRestartAct.setEnabled(False) |
1688 self.actions.append(self.utRestartAct) | 1688 self.actions.append(self.utRestartAct) |
1689 | 1689 |
1690 self.utRerunFailedAct = E5Action( | 1690 self.utRerunFailedAct = E5Action( |
1691 self.tr('Unittest Rerun Failed'), | 1691 self.tr('Unittest Rerun Failed'), |
1697 self.utRerunFailedAct.setWhatsThis(self.tr( | 1697 self.utRerunFailedAct.setWhatsThis(self.tr( |
1698 """<b>Rerun Failed Tests</b>""" | 1698 """<b>Rerun Failed Tests</b>""" |
1699 """<p>Rerun all tests that failed during the last unittest""" | 1699 """<p>Rerun all tests that failed during the last unittest""" |
1700 """ run.</p>""" | 1700 """ run.</p>""" |
1701 )) | 1701 )) |
1702 self.utRerunFailedAct.triggered[()].connect(self.__unittestRerunFailed) | 1702 self.utRerunFailedAct.triggered.connect(self.__unittestRerunFailed) |
1703 self.utRerunFailedAct.setEnabled(False) | 1703 self.utRerunFailedAct.setEnabled(False) |
1704 self.actions.append(self.utRerunFailedAct) | 1704 self.actions.append(self.utRerunFailedAct) |
1705 | 1705 |
1706 self.utScriptAct = E5Action( | 1706 self.utScriptAct = E5Action( |
1707 self.tr('Unittest Script'), | 1707 self.tr('Unittest Script'), |
1712 'Run unittest with current script')) | 1712 'Run unittest with current script')) |
1713 self.utScriptAct.setWhatsThis(self.tr( | 1713 self.utScriptAct.setWhatsThis(self.tr( |
1714 """<b>Unittest Script</b>""" | 1714 """<b>Unittest Script</b>""" |
1715 """<p>Run unittest with current script.</p>""" | 1715 """<p>Run unittest with current script.</p>""" |
1716 )) | 1716 )) |
1717 self.utScriptAct.triggered[()].connect(self.__unittestScript) | 1717 self.utScriptAct.triggered.connect(self.__unittestScript) |
1718 self.utScriptAct.setEnabled(False) | 1718 self.utScriptAct.setEnabled(False) |
1719 self.actions.append(self.utScriptAct) | 1719 self.actions.append(self.utScriptAct) |
1720 | 1720 |
1721 self.utProjectAct = E5Action( | 1721 self.utProjectAct = E5Action( |
1722 self.tr('Unittest Project'), | 1722 self.tr('Unittest Project'), |
1727 'Run unittest with current project')) | 1727 'Run unittest with current project')) |
1728 self.utProjectAct.setWhatsThis(self.tr( | 1728 self.utProjectAct.setWhatsThis(self.tr( |
1729 """<b>Unittest Project</b>""" | 1729 """<b>Unittest Project</b>""" |
1730 """<p>Run unittest with current project.</p>""" | 1730 """<p>Run unittest with current project.</p>""" |
1731 )) | 1731 )) |
1732 self.utProjectAct.triggered[()].connect(self.__unittestProject) | 1732 self.utProjectAct.triggered.connect(self.__unittestProject) |
1733 self.utProjectAct.setEnabled(False) | 1733 self.utProjectAct.setEnabled(False) |
1734 self.actions.append(self.utProjectAct) | 1734 self.actions.append(self.utProjectAct) |
1735 | 1735 |
1736 # check for Qt4/Qt5 designer and linguist | 1736 # check for Qt4/Qt5 designer and linguist |
1737 if Utilities.isWindowsPlatform(): | 1737 if Utilities.isWindowsPlatform(): |
1753 self.designer4Act.setStatusTip(self.tr('Start Qt-Designer')) | 1753 self.designer4Act.setStatusTip(self.tr('Start Qt-Designer')) |
1754 self.designer4Act.setWhatsThis(self.tr( | 1754 self.designer4Act.setWhatsThis(self.tr( |
1755 """<b>Qt-Designer</b>""" | 1755 """<b>Qt-Designer</b>""" |
1756 """<p>Start Qt-Designer.</p>""" | 1756 """<p>Start Qt-Designer.</p>""" |
1757 )) | 1757 )) |
1758 self.designer4Act.triggered[()].connect(self.__designer4) | 1758 self.designer4Act.triggered.connect(self.__designer4) |
1759 self.actions.append(self.designer4Act) | 1759 self.actions.append(self.designer4Act) |
1760 else: | 1760 else: |
1761 self.designer4Act = None | 1761 self.designer4Act = None |
1762 | 1762 |
1763 if Utilities.isWindowsPlatform(): | 1763 if Utilities.isWindowsPlatform(): |
1779 self.linguist4Act.setStatusTip(self.tr('Start Qt-Linguist')) | 1779 self.linguist4Act.setStatusTip(self.tr('Start Qt-Linguist')) |
1780 self.linguist4Act.setWhatsThis(self.tr( | 1780 self.linguist4Act.setWhatsThis(self.tr( |
1781 """<b>Qt-Linguist</b>""" | 1781 """<b>Qt-Linguist</b>""" |
1782 """<p>Start Qt-Linguist.</p>""" | 1782 """<p>Start Qt-Linguist.</p>""" |
1783 )) | 1783 )) |
1784 self.linguist4Act.triggered[()].connect(self.__linguist4) | 1784 self.linguist4Act.triggered.connect(self.__linguist4) |
1785 self.actions.append(self.linguist4Act) | 1785 self.actions.append(self.linguist4Act) |
1786 else: | 1786 else: |
1787 self.linguist4Act = None | 1787 self.linguist4Act = None |
1788 | 1788 |
1789 self.uipreviewerAct = E5Action( | 1789 self.uipreviewerAct = E5Action( |
1794 self.uipreviewerAct.setStatusTip(self.tr('Start the UI Previewer')) | 1794 self.uipreviewerAct.setStatusTip(self.tr('Start the UI Previewer')) |
1795 self.uipreviewerAct.setWhatsThis(self.tr( | 1795 self.uipreviewerAct.setWhatsThis(self.tr( |
1796 """<b>UI Previewer</b>""" | 1796 """<b>UI Previewer</b>""" |
1797 """<p>Start the UI Previewer.</p>""" | 1797 """<p>Start the UI Previewer.</p>""" |
1798 )) | 1798 )) |
1799 self.uipreviewerAct.triggered[()].connect(self.__UIPreviewer) | 1799 self.uipreviewerAct.triggered.connect(self.__UIPreviewer) |
1800 self.actions.append(self.uipreviewerAct) | 1800 self.actions.append(self.uipreviewerAct) |
1801 | 1801 |
1802 self.trpreviewerAct = E5Action( | 1802 self.trpreviewerAct = E5Action( |
1803 self.tr('Translations Previewer'), | 1803 self.tr('Translations Previewer'), |
1804 UI.PixmapCache.getIcon("trPreviewer.png"), | 1804 UI.PixmapCache.getIcon("trPreviewer.png"), |
1808 'Start the Translations Previewer')) | 1808 'Start the Translations Previewer')) |
1809 self.trpreviewerAct.setWhatsThis(self.tr( | 1809 self.trpreviewerAct.setWhatsThis(self.tr( |
1810 """<b>Translations Previewer</b>""" | 1810 """<b>Translations Previewer</b>""" |
1811 """<p>Start the Translations Previewer.</p>""" | 1811 """<p>Start the Translations Previewer.</p>""" |
1812 )) | 1812 )) |
1813 self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer) | 1813 self.trpreviewerAct.triggered.connect(self.__TRPreviewer) |
1814 self.actions.append(self.trpreviewerAct) | 1814 self.actions.append(self.trpreviewerAct) |
1815 | 1815 |
1816 self.diffAct = E5Action( | 1816 self.diffAct = E5Action( |
1817 self.tr('Compare Files'), | 1817 self.tr('Compare Files'), |
1818 UI.PixmapCache.getIcon("diffFiles.png"), | 1818 UI.PixmapCache.getIcon("diffFiles.png"), |
1821 self.diffAct.setStatusTip(self.tr('Compare two files')) | 1821 self.diffAct.setStatusTip(self.tr('Compare two files')) |
1822 self.diffAct.setWhatsThis(self.tr( | 1822 self.diffAct.setWhatsThis(self.tr( |
1823 """<b>Compare Files</b>""" | 1823 """<b>Compare Files</b>""" |
1824 """<p>Open a dialog to compare two files.</p>""" | 1824 """<p>Open a dialog to compare two files.</p>""" |
1825 )) | 1825 )) |
1826 self.diffAct.triggered[()].connect(self.__compareFiles) | 1826 self.diffAct.triggered.connect(self.__compareFiles) |
1827 self.actions.append(self.diffAct) | 1827 self.actions.append(self.diffAct) |
1828 | 1828 |
1829 self.compareAct = E5Action( | 1829 self.compareAct = E5Action( |
1830 self.tr('Compare Files side by side'), | 1830 self.tr('Compare Files side by side'), |
1831 UI.PixmapCache.getIcon("compareFiles.png"), | 1831 UI.PixmapCache.getIcon("compareFiles.png"), |
1835 self.compareAct.setWhatsThis(self.tr( | 1835 self.compareAct.setWhatsThis(self.tr( |
1836 """<b>Compare Files side by side</b>""" | 1836 """<b>Compare Files side by side</b>""" |
1837 """<p>Open a dialog to compare two files and show the result""" | 1837 """<p>Open a dialog to compare two files and show the result""" |
1838 """ side by side.</p>""" | 1838 """ side by side.</p>""" |
1839 )) | 1839 )) |
1840 self.compareAct.triggered[()].connect(self.__compareFilesSbs) | 1840 self.compareAct.triggered.connect(self.__compareFilesSbs) |
1841 self.actions.append(self.compareAct) | 1841 self.actions.append(self.compareAct) |
1842 | 1842 |
1843 self.sqlBrowserAct = E5Action( | 1843 self.sqlBrowserAct = E5Action( |
1844 self.tr('SQL Browser'), | 1844 self.tr('SQL Browser'), |
1845 UI.PixmapCache.getIcon("sqlBrowser.png"), | 1845 UI.PixmapCache.getIcon("sqlBrowser.png"), |
1848 self.sqlBrowserAct.setStatusTip(self.tr('Browse a SQL database')) | 1848 self.sqlBrowserAct.setStatusTip(self.tr('Browse a SQL database')) |
1849 self.sqlBrowserAct.setWhatsThis(self.tr( | 1849 self.sqlBrowserAct.setWhatsThis(self.tr( |
1850 """<b>SQL Browser</b>""" | 1850 """<b>SQL Browser</b>""" |
1851 """<p>Browse a SQL database.</p>""" | 1851 """<p>Browse a SQL database.</p>""" |
1852 )) | 1852 )) |
1853 self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser) | 1853 self.sqlBrowserAct.triggered.connect(self.__sqlBrowser) |
1854 self.actions.append(self.sqlBrowserAct) | 1854 self.actions.append(self.sqlBrowserAct) |
1855 | 1855 |
1856 self.miniEditorAct = E5Action( | 1856 self.miniEditorAct = E5Action( |
1857 self.tr('Mini Editor'), | 1857 self.tr('Mini Editor'), |
1858 UI.PixmapCache.getIcon("editor.png"), | 1858 UI.PixmapCache.getIcon("editor.png"), |
1861 self.miniEditorAct.setStatusTip(self.tr('Mini Editor')) | 1861 self.miniEditorAct.setStatusTip(self.tr('Mini Editor')) |
1862 self.miniEditorAct.setWhatsThis(self.tr( | 1862 self.miniEditorAct.setWhatsThis(self.tr( |
1863 """<b>Mini Editor</b>""" | 1863 """<b>Mini Editor</b>""" |
1864 """<p>Open a dialog with a simplified editor.</p>""" | 1864 """<p>Open a dialog with a simplified editor.</p>""" |
1865 )) | 1865 )) |
1866 self.miniEditorAct.triggered[()].connect(self.__openMiniEditor) | 1866 self.miniEditorAct.triggered.connect(self.__openMiniEditor) |
1867 self.actions.append(self.miniEditorAct) | 1867 self.actions.append(self.miniEditorAct) |
1868 | 1868 |
1869 self.webBrowserAct = E5Action( | 1869 self.webBrowserAct = E5Action( |
1870 self.tr('eric5 Web Browser'), | 1870 self.tr('eric5 Web Browser'), |
1871 UI.PixmapCache.getIcon("ericWeb.png"), | 1871 UI.PixmapCache.getIcon("ericWeb.png"), |
1875 'Start the eric5 Web Browser')) | 1875 'Start the eric5 Web Browser')) |
1876 self.webBrowserAct.setWhatsThis(self.tr( | 1876 self.webBrowserAct.setWhatsThis(self.tr( |
1877 """<b>eric5 Web Browser</b>""" | 1877 """<b>eric5 Web Browser</b>""" |
1878 """<p>Browse the Internet with the eric5 Web Browser.</p>""" | 1878 """<p>Browse the Internet with the eric5 Web Browser.</p>""" |
1879 )) | 1879 )) |
1880 self.webBrowserAct.triggered[()].connect(self.__startWebBrowser) | 1880 self.webBrowserAct.triggered.connect(self.__startWebBrowser) |
1881 self.actions.append(self.webBrowserAct) | 1881 self.actions.append(self.webBrowserAct) |
1882 | 1882 |
1883 self.iconEditorAct = E5Action( | 1883 self.iconEditorAct = E5Action( |
1884 self.tr('Icon Editor'), | 1884 self.tr('Icon Editor'), |
1885 UI.PixmapCache.getIcon("iconEditor.png"), | 1885 UI.PixmapCache.getIcon("iconEditor.png"), |
1889 'Start the eric5 Icon Editor')) | 1889 'Start the eric5 Icon Editor')) |
1890 self.iconEditorAct.setWhatsThis(self.tr( | 1890 self.iconEditorAct.setWhatsThis(self.tr( |
1891 """<b>Icon Editor</b>""" | 1891 """<b>Icon Editor</b>""" |
1892 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>""" | 1892 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>""" |
1893 )) | 1893 )) |
1894 self.iconEditorAct.triggered[()].connect(self.__editPixmap) | 1894 self.iconEditorAct.triggered.connect(self.__editPixmap) |
1895 self.actions.append(self.iconEditorAct) | 1895 self.actions.append(self.iconEditorAct) |
1896 | 1896 |
1897 self.snapshotAct = E5Action( | 1897 self.snapshotAct = E5Action( |
1898 self.tr('Snapshot'), | 1898 self.tr('Snapshot'), |
1899 UI.PixmapCache.getIcon("ericSnap.png"), | 1899 UI.PixmapCache.getIcon("ericSnap.png"), |
1904 self.snapshotAct.setWhatsThis(self.tr( | 1904 self.snapshotAct.setWhatsThis(self.tr( |
1905 """<b>Snapshot</b>""" | 1905 """<b>Snapshot</b>""" |
1906 """<p>This opens a dialog to take snapshots of a screen""" | 1906 """<p>This opens a dialog to take snapshots of a screen""" |
1907 """ region.</p>""" | 1907 """ region.</p>""" |
1908 )) | 1908 )) |
1909 self.snapshotAct.triggered[()].connect(self.__snapshot) | 1909 self.snapshotAct.triggered.connect(self.__snapshot) |
1910 self.actions.append(self.snapshotAct) | 1910 self.actions.append(self.snapshotAct) |
1911 | 1911 |
1912 self.prefAct = E5Action( | 1912 self.prefAct = E5Action( |
1913 self.tr('Preferences'), | 1913 self.tr('Preferences'), |
1914 UI.PixmapCache.getIcon("configure.png"), | 1914 UI.PixmapCache.getIcon("configure.png"), |
1919 self.prefAct.setWhatsThis(self.tr( | 1919 self.prefAct.setWhatsThis(self.tr( |
1920 """<b>Preferences</b>""" | 1920 """<b>Preferences</b>""" |
1921 """<p>Set the configuration items of the application""" | 1921 """<p>Set the configuration items of the application""" |
1922 """ with your prefered values.</p>""" | 1922 """ with your prefered values.</p>""" |
1923 )) | 1923 )) |
1924 self.prefAct.triggered[()].connect(self.showPreferences) | 1924 self.prefAct.triggered.connect(self.showPreferences) |
1925 self.prefAct.setMenuRole(QAction.PreferencesRole) | 1925 self.prefAct.setMenuRole(QAction.PreferencesRole) |
1926 self.actions.append(self.prefAct) | 1926 self.actions.append(self.prefAct) |
1927 | 1927 |
1928 self.prefExportAct = E5Action( | 1928 self.prefExportAct = E5Action( |
1929 self.tr('Export Preferences'), | 1929 self.tr('Export Preferences'), |
1934 'Export the current configuration')) | 1934 'Export the current configuration')) |
1935 self.prefExportAct.setWhatsThis(self.tr( | 1935 self.prefExportAct.setWhatsThis(self.tr( |
1936 """<b>Export Preferences</b>""" | 1936 """<b>Export Preferences</b>""" |
1937 """<p>Export the current configuration to a file.</p>""" | 1937 """<p>Export the current configuration to a file.</p>""" |
1938 )) | 1938 )) |
1939 self.prefExportAct.triggered[()].connect(self.__exportPreferences) | 1939 self.prefExportAct.triggered.connect(self.__exportPreferences) |
1940 self.actions.append(self.prefExportAct) | 1940 self.actions.append(self.prefExportAct) |
1941 | 1941 |
1942 self.prefImportAct = E5Action( | 1942 self.prefImportAct = E5Action( |
1943 self.tr('Import Preferences'), | 1943 self.tr('Import Preferences'), |
1944 UI.PixmapCache.getIcon("configureImport.png"), | 1944 UI.PixmapCache.getIcon("configureImport.png"), |
1948 'Import a previously exported configuration')) | 1948 'Import a previously exported configuration')) |
1949 self.prefImportAct.setWhatsThis(self.tr( | 1949 self.prefImportAct.setWhatsThis(self.tr( |
1950 """<b>Import Preferences</b>""" | 1950 """<b>Import Preferences</b>""" |
1951 """<p>Import a previously exported configuration.</p>""" | 1951 """<p>Import a previously exported configuration.</p>""" |
1952 )) | 1952 )) |
1953 self.prefImportAct.triggered[()].connect(self.__importPreferences) | 1953 self.prefImportAct.triggered.connect(self.__importPreferences) |
1954 self.actions.append(self.prefImportAct) | 1954 self.actions.append(self.prefImportAct) |
1955 | 1955 |
1956 self.reloadAPIsAct = E5Action( | 1956 self.reloadAPIsAct = E5Action( |
1957 self.tr('Reload APIs'), | 1957 self.tr('Reload APIs'), |
1958 self.tr('Reload &APIs'), | 1958 self.tr('Reload &APIs'), |
1961 'Reload the API information')) | 1961 'Reload the API information')) |
1962 self.reloadAPIsAct.setWhatsThis(self.tr( | 1962 self.reloadAPIsAct.setWhatsThis(self.tr( |
1963 """<b>Reload APIs</b>""" | 1963 """<b>Reload APIs</b>""" |
1964 """<p>Reload the API information.</p>""" | 1964 """<p>Reload the API information.</p>""" |
1965 )) | 1965 )) |
1966 self.reloadAPIsAct.triggered[()].connect(self.__reloadAPIs) | 1966 self.reloadAPIsAct.triggered.connect(self.__reloadAPIs) |
1967 self.actions.append(self.reloadAPIsAct) | 1967 self.actions.append(self.reloadAPIsAct) |
1968 | 1968 |
1969 self.showExternalToolsAct = E5Action( | 1969 self.showExternalToolsAct = E5Action( |
1970 self.tr('Show external tools'), | 1970 self.tr('Show external tools'), |
1971 UI.PixmapCache.getIcon("showPrograms.png"), | 1971 UI.PixmapCache.getIcon("showPrograms.png"), |
1976 self.showExternalToolsAct.setWhatsThis(self.tr( | 1976 self.showExternalToolsAct.setWhatsThis(self.tr( |
1977 """<b>Show external tools</b>""" | 1977 """<b>Show external tools</b>""" |
1978 """<p>Opens a dialog to show the path and versions of all""" | 1978 """<p>Opens a dialog to show the path and versions of all""" |
1979 """ extenal tools used by eric5.</p>""" | 1979 """ extenal tools used by eric5.</p>""" |
1980 )) | 1980 )) |
1981 self.showExternalToolsAct.triggered[()].connect( | 1981 self.showExternalToolsAct.triggered.connect( |
1982 self.__showExternalTools) | 1982 self.__showExternalTools) |
1983 self.actions.append(self.showExternalToolsAct) | 1983 self.actions.append(self.showExternalToolsAct) |
1984 | 1984 |
1985 self.configViewProfilesAct = E5Action( | 1985 self.configViewProfilesAct = E5Action( |
1986 self.tr('View Profiles'), | 1986 self.tr('View Profiles'), |
1993 """<b>View Profiles</b>""" | 1993 """<b>View Profiles</b>""" |
1994 """<p>Configure the view profiles. With this dialog you may""" | 1994 """<p>Configure the view profiles. With this dialog you may""" |
1995 """ set the visibility of the various windows for the""" | 1995 """ set the visibility of the various windows for the""" |
1996 """ predetermined view profiles.</p>""" | 1996 """ predetermined view profiles.</p>""" |
1997 )) | 1997 )) |
1998 self.configViewProfilesAct.triggered[()].connect( | 1998 self.configViewProfilesAct.triggered.connect( |
1999 self.__configViewProfiles) | 1999 self.__configViewProfiles) |
2000 self.actions.append(self.configViewProfilesAct) | 2000 self.actions.append(self.configViewProfilesAct) |
2001 | 2001 |
2002 self.configToolBarsAct = E5Action( | 2002 self.configToolBarsAct = E5Action( |
2003 self.tr('Toolbars'), | 2003 self.tr('Toolbars'), |
2009 """<b>Toolbars</b>""" | 2009 """<b>Toolbars</b>""" |
2010 """<p>Configure the toolbars. With this dialog you may""" | 2010 """<p>Configure the toolbars. With this dialog you may""" |
2011 """ change the actions shown on the various toolbars and""" | 2011 """ change the actions shown on the various toolbars and""" |
2012 """ define your own toolbars.</p>""" | 2012 """ define your own toolbars.</p>""" |
2013 )) | 2013 )) |
2014 self.configToolBarsAct.triggered[()].connect(self.__configToolBars) | 2014 self.configToolBarsAct.triggered.connect(self.__configToolBars) |
2015 self.actions.append(self.configToolBarsAct) | 2015 self.actions.append(self.configToolBarsAct) |
2016 | 2016 |
2017 self.shortcutsAct = E5Action( | 2017 self.shortcutsAct = E5Action( |
2018 self.tr('Keyboard Shortcuts'), | 2018 self.tr('Keyboard Shortcuts'), |
2019 UI.PixmapCache.getIcon("configureShortcuts.png"), | 2019 UI.PixmapCache.getIcon("configureShortcuts.png"), |
2024 self.shortcutsAct.setWhatsThis(self.tr( | 2024 self.shortcutsAct.setWhatsThis(self.tr( |
2025 """<b>Keyboard Shortcuts</b>""" | 2025 """<b>Keyboard Shortcuts</b>""" |
2026 """<p>Set the keyboard shortcuts of the application""" | 2026 """<p>Set the keyboard shortcuts of the application""" |
2027 """ with your prefered values.</p>""" | 2027 """ with your prefered values.</p>""" |
2028 )) | 2028 )) |
2029 self.shortcutsAct.triggered[()].connect(self.__configShortcuts) | 2029 self.shortcutsAct.triggered.connect(self.__configShortcuts) |
2030 self.actions.append(self.shortcutsAct) | 2030 self.actions.append(self.shortcutsAct) |
2031 | 2031 |
2032 self.exportShortcutsAct = E5Action( | 2032 self.exportShortcutsAct = E5Action( |
2033 self.tr('Export Keyboard Shortcuts'), | 2033 self.tr('Export Keyboard Shortcuts'), |
2034 UI.PixmapCache.getIcon("exportShortcuts.png"), | 2034 UI.PixmapCache.getIcon("exportShortcuts.png"), |
2038 'Export the keyboard shortcuts')) | 2038 'Export the keyboard shortcuts')) |
2039 self.exportShortcutsAct.setWhatsThis(self.tr( | 2039 self.exportShortcutsAct.setWhatsThis(self.tr( |
2040 """<b>Export Keyboard Shortcuts</b>""" | 2040 """<b>Export Keyboard Shortcuts</b>""" |
2041 """<p>Export the keyboard shortcuts of the application.</p>""" | 2041 """<p>Export the keyboard shortcuts of the application.</p>""" |
2042 )) | 2042 )) |
2043 self.exportShortcutsAct.triggered[()].connect(self.__exportShortcuts) | 2043 self.exportShortcutsAct.triggered.connect(self.__exportShortcuts) |
2044 self.actions.append(self.exportShortcutsAct) | 2044 self.actions.append(self.exportShortcutsAct) |
2045 | 2045 |
2046 self.importShortcutsAct = E5Action( | 2046 self.importShortcutsAct = E5Action( |
2047 self.tr('Import Keyboard Shortcuts'), | 2047 self.tr('Import Keyboard Shortcuts'), |
2048 UI.PixmapCache.getIcon("importShortcuts.png"), | 2048 UI.PixmapCache.getIcon("importShortcuts.png"), |
2052 'Import the keyboard shortcuts')) | 2052 'Import the keyboard shortcuts')) |
2053 self.importShortcutsAct.setWhatsThis(self.tr( | 2053 self.importShortcutsAct.setWhatsThis(self.tr( |
2054 """<b>Import Keyboard Shortcuts</b>""" | 2054 """<b>Import Keyboard Shortcuts</b>""" |
2055 """<p>Import the keyboard shortcuts of the application.</p>""" | 2055 """<p>Import the keyboard shortcuts of the application.</p>""" |
2056 )) | 2056 )) |
2057 self.importShortcutsAct.triggered[()].connect(self.__importShortcuts) | 2057 self.importShortcutsAct.triggered.connect(self.__importShortcuts) |
2058 self.actions.append(self.importShortcutsAct) | 2058 self.actions.append(self.importShortcutsAct) |
2059 | 2059 |
2060 if SSL_AVAILABLE: | 2060 if SSL_AVAILABLE: |
2061 self.certificatesAct = E5Action( | 2061 self.certificatesAct = E5Action( |
2062 self.tr('Manage SSL Certificates'), | 2062 self.tr('Manage SSL Certificates'), |
2068 self.certificatesAct.setWhatsThis(self.tr( | 2068 self.certificatesAct.setWhatsThis(self.tr( |
2069 """<b>Manage SSL Certificates...</b>""" | 2069 """<b>Manage SSL Certificates...</b>""" |
2070 """<p>Opens a dialog to manage the saved SSL certificates.""" | 2070 """<p>Opens a dialog to manage the saved SSL certificates.""" |
2071 """</p>""" | 2071 """</p>""" |
2072 )) | 2072 )) |
2073 self.certificatesAct.triggered[()].connect( | 2073 self.certificatesAct.triggered.connect( |
2074 self.__showCertificatesDialog) | 2074 self.__showCertificatesDialog) |
2075 self.actions.append(self.certificatesAct) | 2075 self.actions.append(self.certificatesAct) |
2076 | 2076 |
2077 self.editMessageFilterAct = E5Action( | 2077 self.editMessageFilterAct = E5Action( |
2078 self.tr('Edit Message Filters'), | 2078 self.tr('Edit Message Filters'), |
2085 """<b>Edit Message Filters</b>""" | 2085 """<b>Edit Message Filters</b>""" |
2086 """<p>Opens a dialog to edit the message filters used to""" | 2086 """<p>Opens a dialog to edit the message filters used to""" |
2087 """ suppress unwanted messages been shown in an error""" | 2087 """ suppress unwanted messages been shown in an error""" |
2088 """ window.</p>""" | 2088 """ window.</p>""" |
2089 )) | 2089 )) |
2090 self.editMessageFilterAct.triggered[()].connect( | 2090 self.editMessageFilterAct.triggered.connect( |
2091 E5ErrorMessage.editMessageFilters) | 2091 E5ErrorMessage.editMessageFilters) |
2092 self.actions.append(self.editMessageFilterAct) | 2092 self.actions.append(self.editMessageFilterAct) |
2093 | 2093 |
2094 self.viewmanagerActivateAct = E5Action( | 2094 self.viewmanagerActivateAct = E5Action( |
2095 self.tr('Activate current editor'), | 2095 self.tr('Activate current editor'), |
2096 self.tr('Activate current editor'), | 2096 self.tr('Activate current editor'), |
2097 QKeySequence(self.tr("Alt+Shift+E")), | 2097 QKeySequence(self.tr("Alt+Shift+E")), |
2098 0, self, 'viewmanager_activate', 1) | 2098 0, self, 'viewmanager_activate', 1) |
2099 self.viewmanagerActivateAct.triggered[()].connect( | 2099 self.viewmanagerActivateAct.triggered.connect( |
2100 self.__activateViewmanager) | 2100 self.__activateViewmanager) |
2101 self.actions.append(self.viewmanagerActivateAct) | 2101 self.actions.append(self.viewmanagerActivateAct) |
2102 self.addAction(self.viewmanagerActivateAct) | 2102 self.addAction(self.viewmanagerActivateAct) |
2103 | 2103 |
2104 self.nextTabAct = E5Action( | 2104 self.nextTabAct = E5Action( |
2105 self.tr('Show next'), | 2105 self.tr('Show next'), |
2106 self.tr('Show next'), | 2106 self.tr('Show next'), |
2107 QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, | 2107 QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, |
2108 self, 'view_next_tab') | 2108 self, 'view_next_tab') |
2109 self.nextTabAct.triggered[()].connect(self.__showNext) | 2109 self.nextTabAct.triggered.connect(self.__showNext) |
2110 self.actions.append(self.nextTabAct) | 2110 self.actions.append(self.nextTabAct) |
2111 self.addAction(self.nextTabAct) | 2111 self.addAction(self.nextTabAct) |
2112 | 2112 |
2113 self.prevTabAct = E5Action( | 2113 self.prevTabAct = E5Action( |
2114 self.tr('Show previous'), | 2114 self.tr('Show previous'), |
2115 self.tr('Show previous'), | 2115 self.tr('Show previous'), |
2116 QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, | 2116 QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, |
2117 self, 'view_previous_tab') | 2117 self, 'view_previous_tab') |
2118 self.prevTabAct.triggered[()].connect(self.__showPrevious) | 2118 self.prevTabAct.triggered.connect(self.__showPrevious) |
2119 self.actions.append(self.prevTabAct) | 2119 self.actions.append(self.prevTabAct) |
2120 self.addAction(self.prevTabAct) | 2120 self.addAction(self.prevTabAct) |
2121 | 2121 |
2122 self.switchTabAct = E5Action( | 2122 self.switchTabAct = E5Action( |
2123 self.tr('Switch between tabs'), | 2123 self.tr('Switch between tabs'), |
2124 self.tr('Switch between tabs'), | 2124 self.tr('Switch between tabs'), |
2125 QKeySequence(self.tr('Ctrl+1')), 0, | 2125 QKeySequence(self.tr('Ctrl+1')), 0, |
2126 self, 'switch_tabs') | 2126 self, 'switch_tabs') |
2127 self.switchTabAct.triggered[()].connect(self.__switchTab) | 2127 self.switchTabAct.triggered.connect(self.__switchTab) |
2128 self.actions.append(self.switchTabAct) | 2128 self.actions.append(self.switchTabAct) |
2129 self.addAction(self.switchTabAct) | 2129 self.addAction(self.switchTabAct) |
2130 | 2130 |
2131 self.pluginInfoAct = E5Action( | 2131 self.pluginInfoAct = E5Action( |
2132 self.tr('Plugin Infos'), | 2132 self.tr('Plugin Infos'), |
2136 self.pluginInfoAct.setWhatsThis(self.tr( | 2136 self.pluginInfoAct.setWhatsThis(self.tr( |
2137 """<b>Plugin Infos...</b>""" | 2137 """<b>Plugin Infos...</b>""" |
2138 """<p>This opens a dialog, that show some information about""" | 2138 """<p>This opens a dialog, that show some information about""" |
2139 """ loaded plugins.</p>""" | 2139 """ loaded plugins.</p>""" |
2140 )) | 2140 )) |
2141 self.pluginInfoAct.triggered[()].connect(self.__showPluginInfo) | 2141 self.pluginInfoAct.triggered.connect(self.__showPluginInfo) |
2142 self.actions.append(self.pluginInfoAct) | 2142 self.actions.append(self.pluginInfoAct) |
2143 | 2143 |
2144 self.pluginInstallAct = E5Action( | 2144 self.pluginInstallAct = E5Action( |
2145 self.tr('Install Plugins'), | 2145 self.tr('Install Plugins'), |
2146 UI.PixmapCache.getIcon("pluginInstall.png"), | 2146 UI.PixmapCache.getIcon("pluginInstall.png"), |
2149 self.pluginInstallAct.setStatusTip(self.tr('Install Plugins')) | 2149 self.pluginInstallAct.setStatusTip(self.tr('Install Plugins')) |
2150 self.pluginInstallAct.setWhatsThis(self.tr( | 2150 self.pluginInstallAct.setWhatsThis(self.tr( |
2151 """<b>Install Plugins...</b>""" | 2151 """<b>Install Plugins...</b>""" |
2152 """<p>This opens a dialog to install or update plugins.</p>""" | 2152 """<p>This opens a dialog to install or update plugins.</p>""" |
2153 )) | 2153 )) |
2154 self.pluginInstallAct.triggered[()].connect(self.__installPlugins) | 2154 self.pluginInstallAct.triggered.connect(self.__installPlugins) |
2155 self.actions.append(self.pluginInstallAct) | 2155 self.actions.append(self.pluginInstallAct) |
2156 | 2156 |
2157 self.pluginDeinstallAct = E5Action( | 2157 self.pluginDeinstallAct = E5Action( |
2158 self.tr('Uninstall Plugin'), | 2158 self.tr('Uninstall Plugin'), |
2159 UI.PixmapCache.getIcon("pluginUninstall.png"), | 2159 UI.PixmapCache.getIcon("pluginUninstall.png"), |
2162 self.pluginDeinstallAct.setStatusTip(self.tr('Uninstall Plugin')) | 2162 self.pluginDeinstallAct.setStatusTip(self.tr('Uninstall Plugin')) |
2163 self.pluginDeinstallAct.setWhatsThis(self.tr( | 2163 self.pluginDeinstallAct.setWhatsThis(self.tr( |
2164 """<b>Uninstall Plugin...</b>""" | 2164 """<b>Uninstall Plugin...</b>""" |
2165 """<p>This opens a dialog to uninstall a plugin.</p>""" | 2165 """<p>This opens a dialog to uninstall a plugin.</p>""" |
2166 )) | 2166 )) |
2167 self.pluginDeinstallAct.triggered[()].connect(self.__deinstallPlugin) | 2167 self.pluginDeinstallAct.triggered.connect(self.__deinstallPlugin) |
2168 self.actions.append(self.pluginDeinstallAct) | 2168 self.actions.append(self.pluginDeinstallAct) |
2169 | 2169 |
2170 self.pluginRepoAct = E5Action( | 2170 self.pluginRepoAct = E5Action( |
2171 self.tr('Plugin Repository'), | 2171 self.tr('Plugin Repository'), |
2172 UI.PixmapCache.getIcon("pluginRepository.png"), | 2172 UI.PixmapCache.getIcon("pluginRepository.png"), |
2177 self.pluginRepoAct.setWhatsThis(self.tr( | 2177 self.pluginRepoAct.setWhatsThis(self.tr( |
2178 """<b>Plugin Repository...</b>""" | 2178 """<b>Plugin Repository...</b>""" |
2179 """<p>This opens a dialog, that shows a list of plugins """ | 2179 """<p>This opens a dialog, that shows a list of plugins """ |
2180 """available on the Internet.</p>""" | 2180 """available on the Internet.</p>""" |
2181 )) | 2181 )) |
2182 self.pluginRepoAct.triggered[()].connect(self.showPluginsAvailable) | 2182 self.pluginRepoAct.triggered.connect(self.showPluginsAvailable) |
2183 self.actions.append(self.pluginRepoAct) | 2183 self.actions.append(self.pluginRepoAct) |
2184 | 2184 |
2185 # initialize viewmanager actions | 2185 # initialize viewmanager actions |
2186 self.viewmanager.initActions() | 2186 self.viewmanager.initActions() |
2187 | 2187 |
2207 """<b>Qt4 Documentation</b>""" | 2207 """<b>Qt4 Documentation</b>""" |
2208 """<p>Display the Qt4 Documentation. Dependent upon your""" | 2208 """<p>Display the Qt4 Documentation. Dependent upon your""" |
2209 """ settings, this will either show the help in Eric's internal""" | 2209 """ settings, this will either show the help in Eric's internal""" |
2210 """ help viewer, or execute a web browser or Qt Assistant. </p>""" | 2210 """ help viewer, or execute a web browser or Qt Assistant. </p>""" |
2211 )) | 2211 )) |
2212 self.qt4DocAct.triggered[()].connect(self.__showQt4Doc) | 2212 self.qt4DocAct.triggered.connect(self.__showQt4Doc) |
2213 self.actions.append(self.qt4DocAct) | 2213 self.actions.append(self.qt4DocAct) |
2214 | 2214 |
2215 self.qt5DocAct = E5Action( | 2215 self.qt5DocAct = E5Action( |
2216 self.tr('Qt5 Documentation'), | 2216 self.tr('Qt5 Documentation'), |
2217 self.tr('Qt&5 Documentation'), | 2217 self.tr('Qt&5 Documentation'), |
2221 """<b>Qt5 Documentation</b>""" | 2221 """<b>Qt5 Documentation</b>""" |
2222 """<p>Display the Qt5 Documentation. Dependent upon your""" | 2222 """<p>Display the Qt5 Documentation. Dependent upon your""" |
2223 """ settings, this will either show the help in Eric's internal""" | 2223 """ settings, this will either show the help in Eric's internal""" |
2224 """ help viewer, or execute a web browser or Qt Assistant. </p>""" | 2224 """ help viewer, or execute a web browser or Qt Assistant. </p>""" |
2225 )) | 2225 )) |
2226 self.qt5DocAct.triggered[()].connect(self.__showQt5Doc) | 2226 self.qt5DocAct.triggered.connect(self.__showQt5Doc) |
2227 self.actions.append(self.qt5DocAct) | 2227 self.actions.append(self.qt5DocAct) |
2228 | 2228 |
2229 self.pyqt4DocAct = E5Action( | 2229 self.pyqt4DocAct = E5Action( |
2230 self.tr('PyQt4 Documentation'), | 2230 self.tr('PyQt4 Documentation'), |
2231 self.tr('PyQt&4 Documentation'), | 2231 self.tr('PyQt&4 Documentation'), |
2235 """<b>PyQt4 Documentation</b>""" | 2235 """<b>PyQt4 Documentation</b>""" |
2236 """<p>Display the PyQt4 Documentation. Dependent upon your""" | 2236 """<p>Display the PyQt4 Documentation. Dependent upon your""" |
2237 """ settings, this will either show the help in Eric's internal""" | 2237 """ settings, this will either show the help in Eric's internal""" |
2238 """ help viewer, or execute a web browser or Qt Assistant. </p>""" | 2238 """ help viewer, or execute a web browser or Qt Assistant. </p>""" |
2239 )) | 2239 )) |
2240 self.pyqt4DocAct.triggered[()].connect(self.__showPyQt4Doc) | 2240 self.pyqt4DocAct.triggered.connect(self.__showPyQt4Doc) |
2241 self.actions.append(self.pyqt4DocAct) | 2241 self.actions.append(self.pyqt4DocAct) |
2242 | 2242 |
2243 try: | 2243 try: |
2244 import PyQt5 # __IGNORE_WARNING__ | 2244 import PyQt5 # __IGNORE_WARNING__ |
2245 self.pyqt5DocAct = E5Action( | 2245 self.pyqt5DocAct = E5Action( |
2253 """<p>Display the PyQt5 Documentation. Dependent upon your""" | 2253 """<p>Display the PyQt5 Documentation. Dependent upon your""" |
2254 """ settings, this will either show the help in Eric's""" | 2254 """ settings, this will either show the help in Eric's""" |
2255 """ internal help viewer, or execute a web browser or""" | 2255 """ internal help viewer, or execute a web browser or""" |
2256 """ Qt Assistant. </p>""" | 2256 """ Qt Assistant. </p>""" |
2257 )) | 2257 )) |
2258 self.pyqt5DocAct.triggered[()].connect(self.__showPyQt5Doc) | 2258 self.pyqt5DocAct.triggered.connect(self.__showPyQt5Doc) |
2259 self.actions.append(self.pyqt5DocAct) | 2259 self.actions.append(self.pyqt5DocAct) |
2260 except ImportError: | 2260 except ImportError: |
2261 self.pyqt5DocAct = None | 2261 self.pyqt5DocAct = None |
2262 | 2262 |
2263 def __initPythonDocActions(self): | 2263 def __initPythonDocActions(self): |
2278 """ documentation is assumed to be the doc directory underneath""" | 2278 """ documentation is assumed to be the doc directory underneath""" |
2279 """ the location of the Python 3 executable on Windows and""" | 2279 """ the location of the Python 3 executable on Windows and""" |
2280 """ <i>/usr/share/doc/packages/python/html</i> on Unix. Set""" | 2280 """ <i>/usr/share/doc/packages/python/html</i> on Unix. Set""" |
2281 """ PYTHON3DOCDIR in your environment to override this.</p>""" | 2281 """ PYTHON3DOCDIR in your environment to override this.</p>""" |
2282 )) | 2282 )) |
2283 self.pythonDocAct.triggered[()].connect(self.__showPythonDoc) | 2283 self.pythonDocAct.triggered.connect(self.__showPythonDoc) |
2284 self.actions.append(self.pythonDocAct) | 2284 self.actions.append(self.pythonDocAct) |
2285 | 2285 |
2286 self.python2DocAct = E5Action( | 2286 self.python2DocAct = E5Action( |
2287 self.tr('Python 2 Documentation'), | 2287 self.tr('Python 2 Documentation'), |
2288 self.tr('Python &2 Documentation'), | 2288 self.tr('Python &2 Documentation'), |
2298 """ Windows and""" | 2298 """ Windows and""" |
2299 """ <i>/usr/share/doc/packages/python/html/python-docs-html</i>""" | 2299 """ <i>/usr/share/doc/packages/python/html/python-docs-html</i>""" |
2300 """ on Unix. Set PYTHON2DOCDIR in your environment to override""" | 2300 """ on Unix. Set PYTHON2DOCDIR in your environment to override""" |
2301 """ this. </p>""" | 2301 """ this. </p>""" |
2302 )) | 2302 )) |
2303 self.python2DocAct.triggered[()].connect(self.__showPython2Doc) | 2303 self.python2DocAct.triggered.connect(self.__showPython2Doc) |
2304 self.actions.append(self.python2DocAct) | 2304 self.actions.append(self.python2DocAct) |
2305 | 2305 |
2306 def __initEricDocAction(self): | 2306 def __initEricDocAction(self): |
2307 """ | 2307 """ |
2308 Private slot to initialize the action to show the eric5 documentation. | 2308 Private slot to initialize the action to show the eric5 documentation. |
2317 """<b>Eric API Documentation</b>""" | 2317 """<b>Eric API Documentation</b>""" |
2318 """<p>Display the Eric API documentation. The location for the""" | 2318 """<p>Display the Eric API documentation. The location for the""" |
2319 """ documentation is the Documentation/Source subdirectory of""" | 2319 """ documentation is the Documentation/Source subdirectory of""" |
2320 """ the eric5 installation directory.</p>""" | 2320 """ the eric5 installation directory.</p>""" |
2321 )) | 2321 )) |
2322 self.ericDocAct.triggered[()].connect(self.__showEricDoc) | 2322 self.ericDocAct.triggered.connect(self.__showEricDoc) |
2323 self.actions.append(self.ericDocAct) | 2323 self.actions.append(self.ericDocAct) |
2324 | 2324 |
2325 def __initPySideDocAction(self): | 2325 def __initPySideDocAction(self): |
2326 """ | 2326 """ |
2327 Private slot to initialize the action to show the PySide documentation. | 2327 Private slot to initialize the action to show the PySide documentation. |
2339 """<p>Display the PySide Documentation. Dependent upon your""" | 2339 """<p>Display the PySide Documentation. Dependent upon your""" |
2340 """ settings, this will either show the help in Eric's""" | 2340 """ settings, this will either show the help in Eric's""" |
2341 """ internal help viewer, or execute a web browser or""" | 2341 """ internal help viewer, or execute a web browser or""" |
2342 """ Qt Assistant. </p>""" | 2342 """ Qt Assistant. </p>""" |
2343 )) | 2343 )) |
2344 self.pysideDocAct.triggered[()].connect(self.__showPySideDoc) | 2344 self.pysideDocAct.triggered.connect(self.__showPySideDoc) |
2345 self.actions.append(self.pysideDocAct) | 2345 self.actions.append(self.pysideDocAct) |
2346 else: | 2346 else: |
2347 self.pysideDocAct = None | 2347 self.pysideDocAct = None |
2348 | 2348 |
2349 def __initMenus(self): | 2349 def __initMenus(self): |
2778 if tool['menutext'] != '--': | 2778 if tool['menutext'] != '--': |
2779 act = QAction(UI.PixmapCache.getIcon(tool['icon']), | 2779 act = QAction(UI.PixmapCache.getIcon(tool['icon']), |
2780 tool['menutext'], self) | 2780 tool['menutext'], self) |
2781 act.setObjectName("{0}@@{1}".format(toolGroup[0], | 2781 act.setObjectName("{0}@@{1}".format(toolGroup[0], |
2782 tool['menutext'])) | 2782 tool['menutext'])) |
2783 act.triggered[()].connect(self.__toolActionTriggered) | 2783 act.triggered.connect(self.__toolActionTriggered) |
2784 self.toolGroupActions[act.objectName()] = act | 2784 self.toolGroupActions[act.objectName()] = act |
2785 | 2785 |
2786 self.toolbarManager.addAction(act, category) | 2786 self.toolbarManager.addAction(act, category) |
2787 | 2787 |
2788 def __updateExternalToolsActions(self): | 2788 def __updateExternalToolsActions(self): |
2806 | 2806 |
2807 # step 3: remove all actions not configured any more | 2807 # step 3: remove all actions not configured any more |
2808 for key in groupActionKeys: | 2808 for key in groupActionKeys: |
2809 if key not in ckeys: | 2809 if key not in ckeys: |
2810 self.toolbarManager.removeAction(self.toolGroupActions[key]) | 2810 self.toolbarManager.removeAction(self.toolGroupActions[key]) |
2811 self.toolGroupActions[key].triggered[()].disconnect( | 2811 self.toolGroupActions[key].triggered.disconnect( |
2812 self.__toolActionTriggered) | 2812 self.__toolActionTriggered) |
2813 del self.toolGroupActions[key] | 2813 del self.toolGroupActions[key] |
2814 | 2814 |
2815 # step 4: add all newly configured tools | 2815 # step 4: add all newly configured tools |
2816 category = self.tr("External Tools/{0}").format(toolGroup[0]) | 2816 category = self.tr("External Tools/{0}").format(toolGroup[0]) |
2819 key = "{0}@@{1}".format(toolGroup[0], tool['menutext']) | 2819 key = "{0}@@{1}".format(toolGroup[0], tool['menutext']) |
2820 if key not in groupActionKeys: | 2820 if key not in groupActionKeys: |
2821 act = QAction(UI.PixmapCache.getIcon(tool['icon']), | 2821 act = QAction(UI.PixmapCache.getIcon(tool['icon']), |
2822 tool['menutext'], self) | 2822 tool['menutext'], self) |
2823 act.setObjectName(key) | 2823 act.setObjectName(key) |
2824 act.triggered[()].connect(self.__toolActionTriggered) | 2824 act.triggered.connect(self.__toolActionTriggered) |
2825 self.toolGroupActions[key] = act | 2825 self.toolGroupActions[key] = act |
2826 | 2826 |
2827 self.toolbarManager.addAction(act, category) | 2827 self.toolbarManager.addAction(act, category) |
2828 | 2828 |
2829 def __showFileMenu(self): | 2829 def __showFileMenu(self): |
3587 self.bottomSidebar.setCurrentWidget(self.__currentBottomWidget) | 3587 self.bottomSidebar.setCurrentWidget(self.__currentBottomWidget) |
3588 self.__currentRightWidget = None | 3588 self.__currentRightWidget = None |
3589 self.__currentBottomWidget = None | 3589 self.__currentBottomWidget = None |
3590 self.__activateViewmanager() | 3590 self.__activateViewmanager() |
3591 | 3591 |
3592 @pyqtSlot() | |
3592 def __setEditProfile(self, save=True): | 3593 def __setEditProfile(self, save=True): |
3593 """ | 3594 """ |
3594 Private slot to activate the edit view profile. | 3595 Private slot to activate the edit view profile. |
3595 | 3596 |
3596 @param save flag indicating that the current profile should | 3597 @param save flag indicating that the current profile should |
3597 be saved (boolean) | 3598 be saved (boolean) |
3598 """ | 3599 """ |
3599 self.__activateViewProfile("edit", save) | 3600 self.__activateViewProfile("edit", save) |
3600 self.setEditProfileAct.setChecked(True) | 3601 self.setEditProfileAct.setChecked(True) |
3601 | 3602 |
3603 @pyqtSlot() | |
3602 def setDebugProfile(self, save=True): | 3604 def setDebugProfile(self, save=True): |
3603 """ | 3605 """ |
3604 Public slot to activate the debug view profile. | 3606 Public slot to activate the debug view profile. |
3605 | 3607 |
3606 @param save flag indicating that the current profile should | 3608 @param save flag indicating that the current profile should |
3963 Private slot for displaying the unittest dialog. | 3965 Private slot for displaying the unittest dialog. |
3964 """ | 3966 """ |
3965 self.__createUnitTestDialog() | 3967 self.__createUnitTestDialog() |
3966 self.unittestDialog.show() | 3968 self.unittestDialog.show() |
3967 self.unittestDialog.raise_() | 3969 self.unittestDialog.raise_() |
3968 | 3970 |
3971 @pyqtSlot() | |
3972 @pyqtSlot(str) | |
3969 def __unittestScript(self, prog=None): | 3973 def __unittestScript(self, prog=None): |
3970 """ | 3974 """ |
3971 Private slot for displaying the unittest dialog and run the current | 3975 Private slot for displaying the unittest dialog and run the current |
3972 script. | 3976 script. |
3973 | 3977 |
4180 self.tr('Process Generation Error'), | 4184 self.tr('Process Generation Error'), |
4181 self.tr( | 4185 self.tr( |
4182 '<p>Could not start Qt-Linguist.<br>' | 4186 '<p>Could not start Qt-Linguist.<br>' |
4183 'Ensure that it is available as <b>{0}</b>.</p>' | 4187 'Ensure that it is available as <b>{0}</b>.</p>' |
4184 ).format(linguist)) | 4188 ).format(linguist)) |
4185 | 4189 |
4190 @pyqtSlot() | |
4191 @pyqtSlot(str) | |
4186 def __linguist4(self, fn=None): | 4192 def __linguist4(self, fn=None): |
4187 """ | 4193 """ |
4188 Private slot to start the Qt-Linguist 4 executable. | 4194 Private slot to start the Qt-Linguist 4 executable. |
4189 | 4195 |
4190 @param fn filename of the translation file to be opened | 4196 @param fn filename of the translation file to be opened |
4292 self.tr( | 4298 self.tr( |
4293 '<p>Could not start the help viewer.<br>' | 4299 '<p>Could not start the help viewer.<br>' |
4294 'Ensure that it is available as <b>hh</b>.</p>' | 4300 'Ensure that it is available as <b>hh</b>.</p>' |
4295 )) | 4301 )) |
4296 | 4302 |
4303 @pyqtSlot() | |
4304 @pyqtSlot(str) | |
4297 def __UIPreviewer(self, fn=None): | 4305 def __UIPreviewer(self, fn=None): |
4298 """ | 4306 """ |
4299 Private slot to start the UI Previewer executable. | 4307 Private slot to start the UI Previewer executable. |
4300 | 4308 |
4301 @param fn filename of the form to be previewed (string) | 4309 @param fn filename of the form to be previewed (string) |
4338 self.tr( | 4346 self.tr( |
4339 '<p>Could not start UI Previewer.<br>' | 4347 '<p>Could not start UI Previewer.<br>' |
4340 'Ensure that it is available as <b>{0}</b>.</p>' | 4348 'Ensure that it is available as <b>{0}</b>.</p>' |
4341 ).format(viewer)) | 4349 ).format(viewer)) |
4342 | 4350 |
4351 @pyqtSlot() | |
4352 @pyqtSlot(str) | |
4353 @pyqtSlot(str, bool) | |
4343 def __TRPreviewer(self, fileNames=None, ignore=False): | 4354 def __TRPreviewer(self, fileNames=None, ignore=False): |
4344 """ | 4355 """ |
4345 Private slot to start the Translation Previewer executable. | 4356 Private slot to start the Translation Previewer executable. |
4346 | 4357 |
4347 @param fileNames filenames of forms and/or translations to be previewed | 4358 @param fileNames filenames of forms and/or translations to be previewed |
4411 self.tr( | 4422 self.tr( |
4412 '<p>Could not start SQL Browser.<br>' | 4423 '<p>Could not start SQL Browser.<br>' |
4413 'Ensure that it is available as <b>{0}</b>.</p>' | 4424 'Ensure that it is available as <b>{0}</b>.</p>' |
4414 ).format(browser)) | 4425 ).format(browser)) |
4415 | 4426 |
4427 @pyqtSlot() | |
4428 @pyqtSlot(str) | |
4416 def __editPixmap(self, fn=""): | 4429 def __editPixmap(self, fn=""): |
4417 """ | 4430 """ |
4418 Private slot to show a pixmap in a dialog. | 4431 Private slot to show a pixmap in a dialog. |
4419 | 4432 |
4420 @param fn filename of the file to show (string) | 4433 @param fn filename of the file to show (string) |
4421 """ | 4434 """ |
4422 from IconEditor.IconEditorWindow import IconEditorWindow | 4435 from IconEditor.IconEditorWindow import IconEditorWindow |
4423 dlg = IconEditorWindow(fn, self, fromEric=True, project=self.project) | 4436 dlg = IconEditorWindow(fn, self, fromEric=True, project=self.project) |
4424 dlg.show() | 4437 dlg.show() |
4425 | 4438 |
4439 @pyqtSlot() | |
4440 @pyqtSlot(str) | |
4426 def __showPixmap(self, fn): | 4441 def __showPixmap(self, fn): |
4427 """ | 4442 """ |
4428 Private slot to show a pixmap in a dialog. | 4443 Private slot to show a pixmap in a dialog. |
4429 | 4444 |
4430 @param fn filename of the file to show (string) | 4445 @param fn filename of the file to show (string) |
4432 from Graphics.PixmapDiagram import PixmapDiagram | 4447 from Graphics.PixmapDiagram import PixmapDiagram |
4433 dlg = PixmapDiagram(fn, self) | 4448 dlg = PixmapDiagram(fn, self) |
4434 if dlg.getStatus(): | 4449 if dlg.getStatus(): |
4435 dlg.show() | 4450 dlg.show() |
4436 | 4451 |
4452 @pyqtSlot() | |
4453 @pyqtSlot(str) | |
4437 def __showSvg(self, fn): | 4454 def __showSvg(self, fn): |
4438 """ | 4455 """ |
4439 Private slot to show a SVG file in a dialog. | 4456 Private slot to show a SVG file in a dialog. |
4440 | 4457 |
4441 @param fn filename of the file to show (string) | 4458 @param fn filename of the file to show (string) |
5091 if self.helpWindow is None: | 5108 if self.helpWindow is None: |
5092 self.launchHelpViewer("", useSingle=True) | 5109 self.launchHelpViewer("", useSingle=True) |
5093 self.helpWindow.raise_() | 5110 self.helpWindow.raise_() |
5094 return self.helpWindow | 5111 return self.helpWindow |
5095 | 5112 |
5113 @pyqtSlot() | |
5114 @pyqtSlot(str) | |
5096 def showPreferences(self, pageName=None): | 5115 def showPreferences(self, pageName=None): |
5097 """ | 5116 """ |
5098 Public slot to set the preferences. | 5117 Public slot to set the preferences. |
5099 | 5118 |
5100 @param pageName name of the configuration page to show (string) | 5119 @param pageName name of the configuration page to show (string) |
5578 """ | 5597 """ |
5579 from PluginManager.PluginInfoDialog import PluginInfoDialog | 5598 from PluginManager.PluginInfoDialog import PluginInfoDialog |
5580 self.__pluginInfoDialog = PluginInfoDialog(self.pluginManager, self) | 5599 self.__pluginInfoDialog = PluginInfoDialog(self.pluginManager, self) |
5581 self.__pluginInfoDialog.show() | 5600 self.__pluginInfoDialog.show() |
5582 | 5601 |
5602 @pyqtSlot() | |
5583 def __installPlugins(self, pluginFileNames=[]): | 5603 def __installPlugins(self, pluginFileNames=[]): |
5584 """ | 5604 """ |
5585 Private slot to show a dialog to install a new plugin. | 5605 Private slot to show a dialog to install a new plugin. |
5586 | 5606 |
5587 @param pluginFileNames list of plugin files suggested for | 5607 @param pluginFileNames list of plugin files suggested for |
5769 """ | 5789 """ |
5770 Public method to show the eric5 versions available for download. | 5790 Public method to show the eric5 versions available for download. |
5771 """ | 5791 """ |
5772 self.performVersionCheck(manual=True, showVersions=True) | 5792 self.performVersionCheck(manual=True, showVersions=True) |
5773 | 5793 |
5794 @pyqtSlot() | |
5774 def performVersionCheck(self, manual=True, alternative=0, | 5795 def performVersionCheck(self, manual=True, alternative=0, |
5775 showVersions=False): | 5796 showVersions=False): |
5776 """ | 5797 """ |
5777 Public method to check the internet for an eric5 update. | 5798 Public method to check the internet for an eric5 update. |
5778 | 5799 |
5823 self.__versionCheckProgress.setValue(alternative) | 5844 self.__versionCheckProgress.setValue(alternative) |
5824 request = QNetworkRequest(url) | 5845 request = QNetworkRequest(url) |
5825 request.setAttribute(QNetworkRequest.CacheLoadControlAttribute, | 5846 request.setAttribute(QNetworkRequest.CacheLoadControlAttribute, |
5826 QNetworkRequest.AlwaysNetwork) | 5847 QNetworkRequest.AlwaysNetwork) |
5827 reply = self.__networkManager.get(request) | 5848 reply = self.__networkManager.get(request) |
5828 reply.finished[()].connect(self.__versionsDownloadDone) | 5849 reply.finished.connect(self.__versionsDownloadDone) |
5829 self.__replies.append(reply) | 5850 self.__replies.append(reply) |
5830 | 5851 |
5831 def __versionsDownloadDone(self): | 5852 def __versionsDownloadDone(self): |
5832 """ | 5853 """ |
5833 Private method called, after the versions file has been downloaded | 5854 Private method called, after the versions file has been downloaded |