431 self.projectBrowser.pixmapEditFile.connect(self.__editPixmap) |
431 self.projectBrowser.pixmapEditFile.connect(self.__editPixmap) |
432 self.projectBrowser.pixmapFile.connect(self.__showPixmap) |
432 self.projectBrowser.pixmapFile.connect(self.__showPixmap) |
433 self.projectBrowser.svgFile.connect(self.__showSvg) |
433 self.projectBrowser.svgFile.connect(self.__showSvg) |
434 self.projectBrowser.umlFile.connect(self.__showUml) |
434 self.projectBrowser.umlFile.connect(self.__showUml) |
435 self.projectBrowser.binaryFile.connect(self.__openHexEditor) |
435 self.projectBrowser.binaryFile.connect(self.__openHexEditor) |
|
436 self.projectBrowser.pdfFile.connect(self.__openPdfViewer) |
436 |
437 |
437 self.project.sourceFile.connect(self.viewmanager.openSourceFile) |
438 self.project.sourceFile.connect(self.viewmanager.openSourceFile) |
438 self.project.designerFile.connect(self.__designer) |
439 self.project.designerFile.connect(self.__designer) |
439 self.project.linguistFile.connect(self.__linguist) |
440 self.project.linguistFile.connect(self.__linguist) |
440 self.project.projectOpened.connect(self.viewmanager.projectOpened) |
441 self.project.projectOpened.connect(self.viewmanager.projectOpened) |
515 self.browser.pixmapEditFile.connect(self.__editPixmap) |
516 self.browser.pixmapEditFile.connect(self.__editPixmap) |
516 self.browser.pixmapFile.connect(self.__showPixmap) |
517 self.browser.pixmapFile.connect(self.__showPixmap) |
517 self.browser.svgFile.connect(self.__showSvg) |
518 self.browser.svgFile.connect(self.__showSvg) |
518 self.browser.umlFile.connect(self.__showUml) |
519 self.browser.umlFile.connect(self.__showUml) |
519 self.browser.binaryFile.connect(self.__openHexEditor) |
520 self.browser.binaryFile.connect(self.__openHexEditor) |
|
521 self.browser.pdfFile.connect(self.__openPdfViewer) |
520 self.browser.testFile.connect(self.__startTestScript) |
522 self.browser.testFile.connect(self.__startTestScript) |
521 self.browser.trpreview.connect(self.__TRPreviewer) |
523 self.browser.trpreview.connect(self.__TRPreviewer) |
522 |
524 |
523 self.debuggerUI.debuggingStarted.connect(self.browser.handleProgramChange) |
525 self.debuggerUI.debuggingStarted.connect(self.browser.handleProgramChange) |
524 |
526 |
3139 ) |
3141 ) |
3140 ) |
3142 ) |
3141 self.snapshotAct.triggered.connect(self.__snapshot) |
3143 self.snapshotAct.triggered.connect(self.__snapshot) |
3142 self.actions.append(self.snapshotAct) |
3144 self.actions.append(self.snapshotAct) |
3143 |
3145 |
|
3146 self.pdfViewerAct = EricAction( |
|
3147 self.tr("eric PDF Viewer"), |
|
3148 EricPixmapCache.getIcon("ericPdf"), |
|
3149 self.tr("eric PDF &Viewer..."), |
|
3150 0, |
|
3151 0, |
|
3152 self, |
|
3153 "pdf_viewer", |
|
3154 ) |
|
3155 self.pdfViewerAct.setStatusTip(self.tr("Start the eric PDF Viewer")) |
|
3156 self.pdfViewerAct.setWhatsThis( |
|
3157 self.tr( |
|
3158 """<b>eric PDF Viewer</b>""" |
|
3159 """<p>Starts the eric PDF Viewer for viewing PDF files.</p>""" |
|
3160 ) |
|
3161 ) |
|
3162 self.pdfViewerAct.triggered.connect(self.__openPdfViewer) |
|
3163 self.actions.append(self.pdfViewerAct) |
|
3164 |
3144 self.prefAct = EricAction( |
3165 self.prefAct = EricAction( |
3145 self.tr("Preferences"), |
3166 self.tr("Preferences"), |
3146 EricPixmapCache.getIcon("configure"), |
3167 EricPixmapCache.getIcon("configure"), |
3147 self.tr("&Preferences..."), |
3168 self.tr("&Preferences..."), |
3148 0, |
3169 0, |
4140 toolstb.addSeparator() |
4161 toolstb.addSeparator() |
4141 toolstb.addAction(self.miniEditorAct) |
4162 toolstb.addAction(self.miniEditorAct) |
4142 toolstb.addAction(self.hexEditorAct) |
4163 toolstb.addAction(self.hexEditorAct) |
4143 toolstb.addAction(self.iconEditorAct) |
4164 toolstb.addAction(self.iconEditorAct) |
4144 toolstb.addAction(self.snapshotAct) |
4165 toolstb.addAction(self.snapshotAct) |
|
4166 toolstb.addAction(self.pdfViewerAct) |
4145 if self.webBrowserAct: |
4167 if self.webBrowserAct: |
4146 toolstb.addSeparator() |
4168 toolstb.addSeparator() |
4147 toolstb.addAction(self.webBrowserAct) |
4169 toolstb.addAction(self.webBrowserAct) |
4148 self.toolbarManager.addToolBar(toolstb, toolstb.windowTitle()) |
4170 self.toolbarManager.addToolBar(toolstb, toolstb.windowTitle()) |
4149 |
4171 |
5083 btMenu.addAction(self.sqlBrowserAct) |
5105 btMenu.addAction(self.sqlBrowserAct) |
5084 btMenu.addAction(self.miniEditorAct) |
5106 btMenu.addAction(self.miniEditorAct) |
5085 btMenu.addAction(self.hexEditorAct) |
5107 btMenu.addAction(self.hexEditorAct) |
5086 btMenu.addAction(self.iconEditorAct) |
5108 btMenu.addAction(self.iconEditorAct) |
5087 btMenu.addAction(self.snapshotAct) |
5109 btMenu.addAction(self.snapshotAct) |
|
5110 btMenu.addAction(self.pdfViewerAct) |
5088 if self.webBrowserAct: |
5111 if self.webBrowserAct: |
5089 btMenu.addAction(self.webBrowserAct) |
5112 btMenu.addAction(self.webBrowserAct) |
5090 |
5113 |
5091 ptMenu = QMenu(self.tr("&Plugin Tools"), self) |
5114 ptMenu = QMenu(self.tr("&Plugin Tools"), self) |
5092 ptMenu.aboutToShow.connect(self.__showPluginToolsMenu) |
5115 ptMenu.aboutToShow.connect(self.__showPluginToolsMenu) |
6321 @pyqtSlot(str) |
6344 @pyqtSlot(str) |
6322 def __openHexEditor(self, fn=""): |
6345 def __openHexEditor(self, fn=""): |
6323 """ |
6346 """ |
6324 Private slot to open the hex editor window. |
6347 Private slot to open the hex editor window. |
6325 |
6348 |
6326 @param fn filename of the file to show (string) |
6349 @param fn path of the file to show (defaults to "") |
|
6350 @type str (optional) |
6327 """ |
6351 """ |
6328 from eric7.HexEdit.HexEditMainWindow import HexEditMainWindow |
6352 from eric7.HexEdit.HexEditMainWindow import HexEditMainWindow |
6329 |
6353 |
6330 dlg = HexEditMainWindow(fn, self, fromEric=True, project=self.project) |
6354 dlg = HexEditMainWindow(fn, self, fromEric=True, project=self.project) |
|
6355 dlg.show() |
|
6356 |
|
6357 @pyqtSlot() |
|
6358 @pyqtSlot(str) |
|
6359 def __openPdfViewer(self, fn=""): |
|
6360 """ |
|
6361 Private slot to open the PDF viewer window. |
|
6362 |
|
6363 @param fn path of the file to show (defaults to "") |
|
6364 @type str (optional) |
|
6365 """ |
|
6366 from eric7.PdfViewer.PdfViewerWindow import PdfViewerWindow |
|
6367 |
|
6368 dlg = PdfViewerWindow(fn, self, fromEric=True, project=self.project) |
6331 dlg.show() |
6369 dlg.show() |
6332 |
6370 |
6333 @pyqtSlot() |
6371 @pyqtSlot() |
6334 @pyqtSlot(str) |
6372 @pyqtSlot(str) |
6335 def __editPixmap(self, fn=""): |
6373 def __editPixmap(self, fn=""): |
6336 """ |
6374 """ |
6337 Private slot to show a pixmap in a dialog. |
6375 Private slot to show a pixmap in a dialog. |
6338 |
6376 |
6339 @param fn filename of the file to show (string) |
6377 @param fn path of the file to show (defaults to "") |
|
6378 @type str (optional) |
6340 """ |
6379 """ |
6341 from eric7.IconEditor.IconEditorWindow import IconEditorWindow |
6380 from eric7.IconEditor.IconEditorWindow import IconEditorWindow |
6342 |
6381 |
6343 dlg = IconEditorWindow(fn, self, fromEric=True, project=self.project) |
6382 dlg = IconEditorWindow(fn, self, fromEric=True, project=self.project) |
6344 dlg.show() |
6383 dlg.show() |
6347 @pyqtSlot(str) |
6386 @pyqtSlot(str) |
6348 def __showPixmap(self, fn): |
6387 def __showPixmap(self, fn): |
6349 """ |
6388 """ |
6350 Private slot to show a pixmap in a dialog. |
6389 Private slot to show a pixmap in a dialog. |
6351 |
6390 |
6352 @param fn filename of the file to show (string) |
6391 @param fn path of the file to show (defaults to "") |
|
6392 @type str (optional) |
6353 """ |
6393 """ |
6354 from eric7.Graphics.PixmapDiagram import PixmapDiagram |
6394 from eric7.Graphics.PixmapDiagram import PixmapDiagram |
6355 |
6395 |
6356 dlg = PixmapDiagram(fn, self) |
6396 dlg = PixmapDiagram(fn, self) |
6357 if dlg.getStatus(): |
6397 if dlg.getStatus(): |