83 |
83 |
84 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
84 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
85 from E5Gui.E5Action import E5Action, createActionGroup |
85 from E5Gui.E5Action import E5Action, createActionGroup |
86 from E5Gui.E5ToolBarManager import E5ToolBarManager |
86 from E5Gui.E5ToolBarManager import E5ToolBarManager |
87 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
87 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
88 from E5Gui.E5SqueezeLabels import E5SqueezeLabelPath |
|
89 from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox |
88 from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox |
90 from E5Gui.E5SideBar import E5SideBar |
89 from E5Gui.E5SideBar import E5SideBar |
91 from E5Gui import E5MessageBox, E5FileDialog |
90 from E5Gui import E5MessageBox, E5FileDialog |
92 from E5Gui.E5Application import e5App |
91 from E5Gui.E5Application import e5App |
93 from E5Gui.E5MainWindow import E5MainWindow |
92 from E5Gui.E5MainWindow import E5MainWindow |
193 reloadAPIs = pyqtSignal() |
192 reloadAPIs = pyqtSignal() |
194 showMenu = pyqtSignal(str, QMenu) |
193 showMenu = pyqtSignal(str, QMenu) |
195 masterPasswordChanged = pyqtSignal(str, str) |
194 masterPasswordChanged = pyqtSignal(str, str) |
196 |
195 |
197 maxFilePathLen = 100 |
196 maxFilePathLen = 100 |
198 maxSbFilePathLen = 150 |
|
199 maxMenuFilePathLen = 75 |
197 maxMenuFilePathLen = 75 |
200 |
198 |
201 LeftSide = 1 |
199 LeftSide = 1 |
202 BottomSide = 2 |
200 BottomSide = 2 |
203 RightSide = 3 |
201 RightSide = 3 |
2482 self.sbWritable.setWhatsThis(self.trUtf8( |
2480 self.sbWritable.setWhatsThis(self.trUtf8( |
2483 """<p>This part of the status bar displays an indication of the""" |
2481 """<p>This part of the status bar displays an indication of the""" |
2484 """ current editors files writability.</p>""" |
2482 """ current editors files writability.</p>""" |
2485 )) |
2483 )) |
2486 |
2484 |
2487 self.sbFile = E5SqueezeLabelPath(self.__statusBar) |
|
2488 self.sbFile.setMaximumWidth(500) |
|
2489 self.sbFile.setMinimumWidth(100) |
|
2490 self.__statusBar.addPermanentWidget(self.sbFile, True) |
|
2491 self.sbFile.setWhatsThis(self.trUtf8( |
|
2492 """<p>This part of the status bar displays the name of the file of""" |
|
2493 """ the current editor.</p>""" |
|
2494 )) |
|
2495 |
|
2496 self.sbLine = QLabel(self.__statusBar) |
2485 self.sbLine = QLabel(self.__statusBar) |
2497 self.__statusBar.addPermanentWidget(self.sbLine) |
2486 self.__statusBar.addPermanentWidget(self.sbLine) |
2498 self.sbLine.setWhatsThis(self.trUtf8( |
2487 self.sbLine.setWhatsThis(self.trUtf8( |
2499 """<p>This part of the status bar displays the line number of the""" |
2488 """<p>This part of the status bar displays the line number of the""" |
2500 """ current editor.</p>""" |
2489 """ current editor.</p>""" |
2505 self.sbPos.setWhatsThis(self.trUtf8( |
2494 self.sbPos.setWhatsThis(self.trUtf8( |
2506 """<p>This part of the status bar displays the cursor position of""" |
2495 """<p>This part of the status bar displays the cursor position of""" |
2507 """ the current editor.</p>""" |
2496 """ the current editor.</p>""" |
2508 )) |
2497 )) |
2509 |
2498 |
2510 self.viewmanager.setSbInfo(self.sbFile, self.sbLine, self.sbPos, |
2499 self.viewmanager.setSbInfo(self.sbLine, self.sbPos, self.sbWritable, |
2511 self.sbWritable, self.sbEncoding, self.sbLanguage, |
2500 self.sbEncoding, self.sbLanguage, self.sbEol) |
2512 self.sbEol) |
|
2513 |
2501 |
2514 self.sbVcsMonitorLed = StatusMonitorLed(self.project, self.__statusBar) |
2502 self.sbVcsMonitorLed = StatusMonitorLed(self.project, self.__statusBar) |
2515 self.__statusBar.addPermanentWidget(self.sbVcsMonitorLed) |
2503 self.__statusBar.addPermanentWidget(self.sbVcsMonitorLed) |
2516 |
2504 |
2517 def __initExternalToolsActions(self): |
2505 def __initExternalToolsActions(self): |
4385 Private method to show the Qt documentation. |
4373 Private method to show the Qt documentation. |
4386 |
4374 |
4387 @param version Qt version to show documentation for (integer) |
4375 @param version Qt version to show documentation for (integer) |
4388 """ |
4376 """ |
4389 assert version in [4, 5] |
4377 assert version in [4, 5] |
4390 ## qt4DocDir = Preferences.getHelp("Qt4DocDir") |
|
4391 ## if not qt4DocDir: |
|
4392 ## qt4DocDir = Utilities.getEnvironmentEntry("QT4DOCDIR", "") |
|
4393 ## if not qt4DocDir: |
|
4394 ## qt4DocDir = os.path.join(Preferences.getQt4DocDir(), "html") |
|
4395 if version == 4: |
4378 if version == 4: |
4396 qtDocDir = Preferences.getQt4DocDir() |
4379 qtDocDir = Preferences.getQt4DocDir() |
4397 elif version == 5: |
4380 elif version == 5: |
4398 qtDocDir = Preferences.getQt5DocDir() |
4381 qtDocDir = Preferences.getQt5DocDir() |
4399 |
4382 |