def _createNonHeaderWidgets(self): self.showOnlyCB = wx.CheckBox( self, wx.ID_ANY, _extstr(u"translationeditor.ShowOnlyUntranslated")) #$NON-NLS-1$ self.listProvider = ZStringBundleProvider(self.model) self.listBox = ZListViewEx(self.listProvider, self, wx.ID_ANY) bitmap = getFlagBitmapForLocale(u"en_US") #$NON-NLS-1$ self.englishFlag = ZStaticBitmap(self, bitmap) self.englishLabel = wx.StaticText( self, wx.ID_ANY, _extstr(u"translationeditor.EnglishValue")) #$NON-NLS-1$ bitmap = getFlagBitmapForLocale( self.model.getTranslation().getLocale().toString()) if bitmap is None: bitmap = getEmptyFlagBitmap() self.translationFlag = ZStaticBitmap(self, bitmap) self.translationLabel = wx.StaticText(self, wx.ID_ANY, self.translationDisplayName) self.englishText = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_BESTWRAP) self.translationText = wx.TextCtrl( self, wx.ID_ANY, style=wx.TE_MULTILINE | wx.TE_BESTWRAP | wx.TE_PROCESS_ENTER) self.translationText.Enable(False) self.staticLine = wx.StaticLine(self, wx.HORIZONTAL)
def _createWidgets(self): self.descriptionLabel = wx.StaticText( self, wx.ID_ANY, _extstr(u"flickrprovider.FlickrAuthDescription")) #$NON-NLS-1$ self.stepOneLabel = wx.StaticText( self, wx.ID_ANY, _extstr(u"flickrprovider.BeginAuthLabel")) #$NON-NLS-1$ self.stepOneButton = wx.Button( self, wx.ID_ANY, _extstr(u"flickrprovider.Begin")) #$NON-NLS-1$ self.stepTwoLabel = wx.StaticText( self, wx.ID_ANY, _extstr(u"flickrprovider.ClickHereLabel")) #$NON-NLS-1$ self.stepTwoButton = wx.Button( self, wx.ID_ANY, _extstr(u"flickrprovider.Authorized")) #$NON-NLS-1$ self.resultLabel = wx.StaticText( self, wx.ID_ANY, _extstr(u"flickrprovider.NotYetAuthorized")) #$NON-NLS-1$ self.completeBitmap = getResourceRegistry().getBitmap( u"images/common/check.png") #$NON-NLS-1$ self.completeImage = ZStaticBitmap(self, self.completeBitmap) self.warningBitmap = getResourceRegistry().getBitmap( u"images/common/warning.png") #$NON-NLS-1$ self.warningImage = ZStaticBitmap(self, self.warningBitmap)
def _createHeaderPanel(self, parent): panel = wx.Panel(parent, wx.ID_ANY) panel.SetBackgroundColour(wx.WHITE) self.headerLink = wx.HyperlinkCtrl(panel, wx.ID_ANY, self._getHeaderTitle(), self._getHeaderHelpURL()) self.headerLink.SetFont(getDefaultFontBold()) self.headerMessage = wx.StaticText(panel, wx.ID_ANY, self._getHeaderMessage()) headerImagePath = self._getHeaderImagePath() if not headerImagePath: headerImagePath = u"images/dialogs/image/header_image.png" #$NON-NLS-1$ self.headerIcon = ZStaticBitmap( panel, getResourceRegistry().getBitmap(headerImagePath)) linkAndMsgSizer = wx.BoxSizer(wx.VERTICAL) linkAndMsgSizer.Add(self.headerLink, 0, wx.ALL, 2) linkAndMsgSizer.Add(self.headerMessage, 1, wx.EXPAND | wx.ALL, 2) sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.AddSizer(linkAndMsgSizer, 1, wx.EXPAND | wx.ALL, 5) sizer.Add(self.headerIcon, 0, wx.EXPAND | wx.ALL, 10) panel.SetAutoLayout(True) panel.SetSizer(sizer) return panel
def _createRavenInfoPage(self): self.infoPanel = wx.Panel(self.notebook, wx.ID_ANY) self.infoPanel.SetBackgroundColour(wx.WHITE) self.aboutBmp = getResourceRegistry().getBitmap( u"images/about/about.png") #$NON-NLS-1$ self.aboutImage = ZStaticBitmap(self.infoPanel, self.aboutBmp) ver = version.ZVersion() verDate = ZSchemaDateTime(ver.getBuildDate()) self.versionLabelLabel = wx.StaticText( self.infoPanel, wx.ID_ANY, u"%s: " % _extstr(u"splash.Version")) #$NON-NLS-1$ #$NON-NLS-2$ self.versionLabelLabel.SetFont(getDefaultFontBold()) self.versionLabel = wx.StaticText(self.infoPanel, wx.ID_ANY, ver.getFullVersionString()) self.dateLabelLabel = wx.StaticText( self.infoPanel, wx.ID_ANY, u"%s: " % _extstr(u"splash.BuiltOn")) #$NON-NLS-1$ #$NON-NLS-2$ self.dateLabelLabel.SetFont(getDefaultFontBold()) self.dateLabel = wx.StaticText(self.infoPanel, wx.ID_ANY, verDate.toString(localTime=True)) return self.infoPanel
def _createWizardImageControl(self, imagePath): if imagePath is None: return None if not os.path.isfile(imagePath): return None image = wx.Image(imagePath, getImageType(imagePath)) bitmap = image.ConvertToBitmap() zbitmap = ZStaticBitmap(self, bitmap) zbitmap.setBackgroundColor(wx.Color(255, 255, 255)) return zbitmap
def _createWidgets(self): self.textBox = wx.TextCtrl(self, wx.ID_ANY, style=wx.NO_BORDER | wx.TE_PROCESS_ENTER) hasChoices = len(self.choices) > 1 self.bitmapButton = ZImageButton(self, self.bitmap, hasChoices, None, hasChoices) self.staticBitmap = ZStaticBitmap(self, self.bitmap) self.clearButton = self._createClearButton() self._createChoiceMenu()
def _createSplashPanel(self, parent): ver = version.ZVersion() verDate = ZSchemaDateTime(ver.getBuildDate()) panel = wx.Panel(parent, wx.ID_ANY) panel.SetBackgroundColour(wx.WHITE) splashFilename = u"splash.png" #$NON-NLS-1$ if isPortableEnabled(): splashFilename = u"splash_portable.png" #$NON-NLS-1$ bitmap = getResourceRegistry().getBitmap(u"images/splash/%s" % splashFilename) #$NON-NLS-1$ splashImage = ZStaticBitmap(panel, bitmap) versionLabelLabel = wx.StaticText( panel, wx.ID_ANY, u"%s: " % _extstr(u"splash.Version")) #$NON-NLS-1$ #$NON-NLS-2$ versionLabelLabel.SetFont(getDefaultFontBold()) versionLabel = wx.StaticText(panel, wx.ID_ANY, ver.getFullVersionString()) dateLabelLabel = wx.StaticText( panel, wx.ID_ANY, u"%s: " % _extstr(u"splash.BuiltOn")) #$NON-NLS-1$ #$NON-NLS-2$ dateLabelLabel.SetFont(getDefaultFontBold()) dateLabel = wx.StaticText(panel, wx.ID_ANY, verDate.toString(localTime=True)) verAndDateSizer = wx.BoxSizer(wx.HORIZONTAL) verAndDateSizer.Add(versionLabelLabel, 0, wx.EXPAND | wx.RIGHT, 2) verAndDateSizer.Add(versionLabel, 0, wx.EXPAND | wx.RIGHT, 10) verAndDateSizer.Add(dateLabelLabel, 0, wx.EXPAND | wx.RIGHT, 2) verAndDateSizer.Add(dateLabel, 0, wx.EXPAND) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(splashImage, 0, wx.EXPAND) sizer.AddSizer(verAndDateSizer, 0, wx.EXPAND | wx.ALL, 5) panel.SetSizer(sizer) panel.SetAutoLayout(True) return panel
def _createWidgets(self): self.staticBox = wx.StaticBox(self, wx.ID_ANY, _extstr(u"infodetailswidgets.Preview")) #$NON-NLS-1$ self.generatingMsg = ZProgressLabelCtrl(self, _extstr(u"infodetailswidgets.GeneratingPreview")) #$NON-NLS-1$ self.previewUnavailableMsg = wx.StaticText(self, wx.ID_ANY, _extstr(u"infodetailswidgets.PreviewUnavailable")) #$NON-NLS-1$ self.previewBmp = ZStaticBitmap(self, None)