Preferences/ConfigurationDialog.py

changeset 934
657269549914
parent 825
9cdec3c5bc07
child 945
8cd4d08fa9f6
equal deleted inserted replaced
932:efd23a913a09 934:657269549914
501 page = self.__initPage(pageData) 501 page = self.__initPage(pageData)
502 else: 502 else:
503 page = pageData[-1] 503 page = pageData[-1]
504 if page is None: 504 if page is None:
505 page = self.emptyPage 505 page = self.emptyPage
506 else:
507 items = self.configList.findItems(pageData[0],
508 Qt.MatchFixedString | Qt.MatchRecursive)
509 if items:
510 self.configList.setCurrentItem(items[0])
506 self.configStack.setCurrentWidget(page) 511 self.configStack.setCurrentWidget(page)
507 ssize = self.scrollArea.size() 512 ssize = self.scrollArea.size()
508 if self.scrollArea.horizontalScrollBar(): 513 if self.scrollArea.horizontalScrollBar():
509 ssize.setHeight( 514 ssize.setHeight(
510 ssize.height() - self.scrollArea.horizontalScrollBar().height() - 2) 515 ssize.height() - self.scrollArea.horizontalScrollBar().height() - 2)
526 # reset scrollbars 531 # reset scrollbars
527 for sb in [self.scrollArea.horizontalScrollBar(), 532 for sb in [self.scrollArea.horizontalScrollBar(),
528 self.scrollArea.verticalScrollBar()]: 533 self.scrollArea.verticalScrollBar()]:
529 if sb: 534 if sb:
530 sb.setValue(0) 535 sb.setValue(0)
536
537 self.__currentConfigurationPageName = pageName
538
539 def getConfigurationPageName(self):
540 """
541 Public method to get the page name of the current page.
542
543 @param page name of the current page (string)
544 """
545 return self.__currentConfigurationPageName
531 546
532 def calledFromEric(self): 547 def calledFromEric(self):
533 """ 548 """
534 Public method to check, if invoked from within eric. 549 Public method to check, if invoked from within eric.
535 550
662 677
663 @param pageName name of the configuration page to show (string) 678 @param pageName name of the configuration page to show (string)
664 """ 679 """
665 self.cw.showConfigurationPageByName(pageName) 680 self.cw.showConfigurationPageByName(pageName)
666 681
682 def getConfigurationPageName(self):
683 """
684 Public method to get the page name of the current page.
685
686 @param page name of the current page (string)
687 """
688 return self.cw.getConfigurationPageName()
689
667 def setPreferences(self): 690 def setPreferences(self):
668 """ 691 """
669 Public method called to store the selected values into the preferences storage. 692 Public method called to store the selected values into the preferences storage.
670 """ 693 """
671 self.cw.setPreferences() 694 self.cw.setPreferences()

eric ide

mercurial