本文整理汇总了Python中Tc2Config.dialogTitle方法的典型用法代码示例。如果您正苦于以下问题:Python Tc2Config.dialogTitle方法的具体用法?Python Tc2Config.dialogTitle怎么用?Python Tc2Config.dialogTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tc2Config
的用法示例。
在下文中一共展示了Tc2Config.dialogTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Tc2Config [as 别名]
# 或者: from Tc2Config import dialogTitle [as 别名]
def __init__(self, topic, parent=None):
QtGui.QDialog.__init__(self, parent)
self.setWindowTitle(Tc2Config.dialogTitle('Help') )
self.setWindowIcon( QtGui.QIcon(Tc2Config.Pixmaps.tableCrab()) )
self.buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok, QtCore.Qt.Horizontal, self)
self.buttonBox.accepted.connect(self.accept)
self.frameHelp = FrameHelp(parent=self)
self.layout()
self.frameHelp.onGlobalObjectInitSettingsFinished(Tc2Config.globalObject)
#NOTE: we do not save zoom factor on instant help. instant help settings are temporary
self.frameHelp.setSettingsPersistent(False)
self.restoreGeometry( Tc2Config.settingsValue(self.SettingsKeyGeometry, QtCore.QByteArray()).toByteArray() )
self.frameHelp.splitter.restoreState( Tc2Config.settingsValue(self.SettingsKeySplitterState, QtCore.QByteArray()).toByteArray() )
self.frameHelp.setTopic(topic)
示例2: __init__
# 需要导入模块: import Tc2Config [as 别名]
# 或者: from Tc2Config import dialogTitle [as 别名]
def __init__(self, info, parent=None):
QtGui.QDialog. __init__(self, parent)
self.setWindowTitle(Tc2Config.dialogTitle('Screenshot Info') )
self._lastScreenshotInfo = info
self.edit = QtGui.QPlainTextEdit(self)
self.edit.setPlainText(info)
self.edit.setReadOnly(True)
self.buttonRefresh = QtGui.QPushButton('Refresh', self)
self.buttonRefresh.clicked.connect(self.onRefresh)
self.buttonRefresh.setToolTip('Save info (Ctrl+R)')
action = QtGui.QAction(self)
action.setShortcut(QtGui.QKeySequence('Ctrl+R') )
action.triggered.connect(self.onRefresh)
self.addAction(action)
self.buttonSave = QtGui.QPushButton('Save..', self)
self.buttonSave.setToolTip('Save info (Ctrl+S)')
self.buttonSave.clicked.connect(self.onSave)
action = QtGui.QAction(self)
action.setShortcut(QtGui.QKeySequence('Ctrl+S') )
action.triggered.connect(self.onSave)
self.addAction(action)
self.buttonHelp = QtGui.QPushButton('Help', self)
self.buttonHelp.setToolTip('Help (F1)')
self.buttonHelp.clicked.connect(self.onHelp)
action = QtGui.QAction(self)
action.setShortcut(QtGui.QKeySequence('F1') )
action.triggered.connect(self.onHelp)
self.addAction(action)
self.buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok, QtCore.Qt.Horizontal, self)
self.buttonBox.addButton(self.buttonRefresh, self.buttonBox.ActionRole)
self.buttonBox.addButton(self.buttonSave, self.buttonBox.ApplyRole )
self.buttonBox.addButton(self.buttonHelp, self.buttonBox.HelpRole)
self.buttonBox.accepted.connect(self.accept)
parent.widgetScreenshotInfo.connect(self.onWidgetScreenshotInfo)
self.layout()
self.restoreGeometry( Tc2Config.settingsValue('Gui/Screenshot/DialogScreenshotInfo/Geometry', QtCore.QByteArray()).toByteArray() )
示例3: __init__
# 需要导入模块: import Tc2Config [as 别名]
# 或者: from Tc2Config import dialogTitle [as 别名]
def __init__(self, pixmap=None, gocrParams=None, gocrParamsDefault=None):
QtGui.QDialog.__init__(self)
self.setWindowTitle(Tc2Config.dialogTitle('Edit char recognition'))
self.gocrParamsDefault = gocrParamsDefault
self.toolBar = QtGui.QToolBar(self)
self.actionScanImage = QtGui.QAction(self)
self.actionScanImage.setText('Scan image')
self.actionScanImage.setShortcut(QtGui.QKeySequence('Alt-N') )
self.actionScanImage.setToolTip('Scan Image (Alt+N)')
self.actionScanImage.triggered.connect(self.onActionScanImageTriggered)
self.toolBar.addAction(self.actionScanImage)
self.actionOpenImage = QtGui.QAction(self)
self.actionOpenImage.setText('Open image..')
self.actionOpenImage.setShortcut(QtGui.QKeySequence('Alt+O') )
self.actionOpenImage.setToolTip('Open Image (Alt+O)')
self.actionOpenImage.triggered.connect(self.onActionOpenImageTriggered)
self.toolBar.addAction(self.actionOpenImage)
self.actionSaveImage = QtGui.QAction(self)
self.actionSaveImage.setText('Save image..')
self.actionSaveImage.setShortcut(QtGui.QKeySequence('Alt+S') )
self.actionSaveImage.setToolTip('Save Image (Alt+S)')
self.actionSaveImage.triggered.connect(self.onActionSaveImageTriggered)
self.toolBar.addAction(self.actionSaveImage)
self.actionOpenSettings = QtGui.QAction(self)
self.actionOpenSettings.setText('Open settings..')
self.actionOpenSettings.setShortcut(QtGui.QKeySequence('Atlt+P') )
self.actionOpenSettings.setToolTip('Open Settings (Alt+P)')
self.actionOpenSettings.triggered.connect(self.onActionOpenSettingsTriggered)
self.toolBar.addAction(self.actionOpenSettings)
self.actionSaveSettings = QtGui.QAction(self)
self.actionSaveSettings.setText('Save settings..')
self.actionSaveSettings.setShortcut(QtGui.QKeySequence('Atlt+A') )
self.actionSaveSettings.setToolTip('Open Settings (Alt+A)')
self.actionSaveSettings.triggered.connect(self.onActionSaveSettingsTriggered)
self.toolBar.addAction(self.actionSaveSettings)
self.actionHelp = QtGui.QAction(self)
self.actionHelp.setText('Help')
self.actionHelp.setShortcut(QtGui.QKeySequence('F1') )
self.actionHelp.setToolTip('Help (F1)')
self.actionHelp.triggered.connect(self.onActionHelpTriggered)
self.toolBar.addAction(self.actionHelp)
self.buttonBox = QtGui.QDialogButtonBox(QtCore.Qt.Horizontal, self)
self.buttonBox.addButton(self.buttonBox.Ok).clicked.connect(self.accept)
self.buttonBox.addButton(self.buttonBox.Cancel).clicked.connect(self.reject)
self.buttonBox.addButton(self.buttonBox.RestoreDefaults).setEnabled(self.gocrParamsDefault is not None)
self.splitterSettings = QtGui.QSplitter(QtCore.Qt.Horizontal, self)
# setup settings pane
self.frameSettings = QtGui.QFrame(self.splitterSettings)
self.splitterSettings.addWidget(self.frameSettings)
self.checkBoxChars = QtGui.QCheckBox('Chars', self.frameSettings)
self.checkBoxChars.stateChanged.connect(self.onCheckBoxCharsStateChanged)
self.editChars = QtGui.QLineEdit(self.frameSettings)
self.checkBoxGraylevel = QtGui.QCheckBox('Gray level', self.frameSettings)
self.checkBoxGraylevel.stateChanged.connect(self.onCheckBoxGraylevelStateChanged)
self.spinGrayLevel = QtGui.QSpinBox(self.frameSettings)
self.spinGrayLevel.setRange(gocr.GrayLevelMin, gocr.GrayLevelMax)
self.checkBoxDustSize = QtGui.QCheckBox('Dust size', self.frameSettings)
self.checkBoxDustSize.stateChanged.connect(self.onCheckBoxDustSizeStateChanged)
self.spinDustSize = QtGui.QSpinBox(self.frameSettings)
self.spinDustSize.setRange(gocr.DustSizeMin, gocr.DustSizeMax)
self.checkBoxWordSpacing = QtGui.QCheckBox('Word spacing', self.frameSettings)
self.checkBoxWordSpacing.stateChanged.connect(self.onCheckBoxWordSpacingStateChanged)
self.spinWordSpacing = QtGui.QSpinBox(self.frameSettings)
self.spinWordSpacing.setRange(gocr.WordSpacingMin, gocr.WordSpacingMax)
self.checkBoxCertainty = QtGui.QCheckBox('Certainty', self.frameSettings)
self.checkBoxCertainty.stateChanged.connect(self.onCheckBoxCertaintyStateChanged)
self.spinCertainty = QtGui.QSpinBox(self.frameSettings)
self.spinCertainty.setRange(gocr.CertaintyMin, gocr.CertaintyMax)
self.checkBoxInvertImage = QtGui.QCheckBox('Invert image', self.frameSettings)
self.checkBoxAnalyzeLayout = QtGui.QCheckBox('Analyze layout', self.frameSettings)
self.checkBoxContextCorrection = QtGui.QCheckBox('Context correction', self.frameSettings)
self.checkBoxCompareUnknownChars = QtGui.QCheckBox('Compare unknown chars', self.frameSettings)
self.checkBoxDivideOverlappingChars = QtGui.QCheckBox('Divide overlapping chars', self.frameSettings)
self.checkBoxPackChars = QtGui.QCheckBox('Pack chars', self.frameSettings)
self.checkBoxOutputType = QtGui.QCheckBox('Output type', self.frameSettings)
self.checkBoxOutputType.stateChanged.connect(self.onCheckBoxOutputTypeStateChanged)
self.comboOutputType = QtGui.QComboBox(self.frameSettings)
self.comboOutputType.addItems(gocr.OutputTypes)
self.checkBoxOutputPattern = QtGui.QCheckBox('Output pattern', self.frameSettings)
#.........这里部分代码省略.........