本文整理汇总了Python中tortoisehg.hgqt.qtlib.geticon函数的典型用法代码示例。如果您正苦于以下问题:Python geticon函数的具体用法?Python geticon怎么用?Python geticon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了geticon函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, repoagent, parent=None):
QDialog.__init__(self, parent)
self.setWindowTitle(_('TortoiseHg Lock Tool - %s') % \
repoagent.shortName())
self.setWindowIcon(qtlib.geticon('thg-password'))
layout = QVBoxLayout()
layout.setContentsMargins(2, 2, 2, 2)
layout.setSpacing(4)
self.setLayout(layout)
self._repoagent = repoagent
self._cmdsession = cmdcore.nullCmdSession()
self._repoagent.configChanged.connect(self.reload)
tb = QToolBar(self)
tb.setIconSize(qtlib.toolBarIconSize())
tb.setStyleSheet(qtlib.tbstylesheet)
self.layout().addWidget(tb)
self.refreshAction = a = QAction(self)
a.setToolTip(_('Refresh lock information'))
a.setIcon(qtlib.geticon('view-refresh'))
a.triggered.connect(self.reload)
tb.addAction(a)
self.addAction = a = QAction(self)
a.setToolTip(_('Lock a file not described in .hglocks'))
a.setIcon(qtlib.geticon('new-group')) # TODO: not the best icon
a.triggered.connect(self.lockany)
tb.addAction(a)
self.stopAction = a = QAction(self)
a.setToolTip(_('Stop current operation'))
a.setIcon(qtlib.geticon('process-stop'))
a.triggered.connect(self.stopclicked)
tb.addAction(a)
lbl = QLabel(_('Locked And Lockable Files:'))
self.locktw = tw = QTreeWidget(self)
tw.setColumnCount(3)
tw.setHeaderLabels([_('Path'), _('Locking User'), _('Purpose')])
tw.setEnabled(False)
tw.doubleClicked.connect(self.rowDoubleClicked)
layout.addWidget(lbl)
layout.addWidget(tw)
self._stbar = cmdui.ThgStatusBar()
layout.addWidget(self._stbar)
self.showMessage.connect(self._stbar.showMessage)
s = QSettings()
self.restoreGeometry(s.value('lock/geom').toByteArray())
self.locktw.header().restoreState(s.value('lock/treestate').toByteArray())
QTimer.singleShot(0, self.finishSetup)
开发者ID:seewindcn,项目名称:tortoisehg,代码行数:58,代码来源:locktool.py
示例2: _initicons
def _initicons(self):
def setstdicon(w, name):
w.setIcon(self.style().standardIcon(name))
setstdicon(self._qui.open_button, QStyle.SP_DialogOpenButton)
setstdicon(self._qui.save_button, QStyle.SP_DialogSaveButton)
self._qui.add_button.setIcon(qtlib.geticon('fileadd'))
self._qui.edit_button.setIcon(qtlib.geticon('edit-file'))
self._qui.remove_button.setIcon(qtlib.geticon('filedelete'))
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:9,代码来源:webconf.py
示例3: _newSubrepoIcon
def _newSubrepoIcon(repotype, valid=True):
subiconame = _subrepoType2IcoMap.get(repotype)
if subiconame is None:
ico = qtlib.geticon('thg-subrepo')
else:
ico = qtlib.geticon(subiconame)
ico = qtlib.getoverlaidicon(ico, qtlib.geticon('thg-subrepo'))
if not valid:
ico = qtlib.getoverlaidicon(ico, qtlib.geticon('dialog-warning'))
return ico
开发者ID:velorientc,项目名称:git_test7,代码行数:10,代码来源:repotreeitem.py
示例4: data
def data(self, column, role):
if role == Qt.DecorationRole and column == 0:
baseiconname = 'hg'
if paths.is_unc_path(self.rootpath()):
baseiconname = 'thg-remote-repo'
ico = qtlib.geticon(baseiconname)
if not self._valid:
ico = qtlib.getoverlaidicon(ico, qtlib.geticon('dialog-warning'))
return ico
elif role in (Qt.DisplayRole, Qt.EditRole):
return [self.shortname, self.shortpath][column]()
开发者ID:velorientc,项目名称:git_test7,代码行数:11,代码来源:repotreeitem.py
示例5: createActions
def createActions(self):
self.actionClose.triggered.connect(self.close)
self.actionReload.triggered.connect(self.reload)
self.actionReload.setIcon(qtlib.geticon('view-refresh'))
self.actionBack = QAction(_('Back'), self, enabled=False,
icon=qtlib.geticon('go-previous'))
self.actionForward = QAction(_('Forward'), self, enabled=False,
icon=qtlib.geticon('go-next'))
self.repoview.revisionSelected.connect(self._updateHistoryActions)
self.actionBack.triggered.connect(self.repoview.back)
self.actionForward.triggered.connect(self.repoview.forward)
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:12,代码来源:filedialogs.py
示例6: __init__
def __init__(self, parent=None):
super(SearchToolBar, self).__init__(_('Search'), parent,
objectName='search')
self.setIconSize(qtlib.smallIconSize())
a = self.addAction(qtlib.geticon('window-close'), '')
a.setShortcut(Qt.Key_Escape)
a.setShortcutContext(Qt.WidgetWithChildrenShortcut)
a.triggered.connect(self.hide)
self.addWidget(qtlib.Spacer(2, 2))
self._le = QLineEdit()
if hasattr(self._le, 'setPlaceholderText'): # Qt >= 4.7
self._le.setPlaceholderText(_('### regular expression ###'))
else:
self._lbl = QLabel(_('Regexp:'),
toolTip=_('Regular expression search pattern'))
self.addWidget(self._lbl)
self._lbl.setBuddy(self._le)
self._le.returnPressed.connect(self._emitSearchRequested)
self.addWidget(self._le)
self.addWidget(qtlib.Spacer(4, 4))
self._chk = QCheckBox(_('Ignore case'))
self.addWidget(self._chk)
self._wrapchk = QCheckBox(_('Wrap search'))
self.addWidget(self._wrapchk)
self._prevact = self.addAction(qtlib.geticon('go-up'), _('Prev'))
self._prevact.setShortcuts(QKeySequence.FindPrevious)
self._nextact = self.addAction(qtlib.geticon('go-down'), _('Next'))
self._nextact.setShortcuts(QKeySequence.FindNext)
for a in [self._prevact, self._nextact]:
a.setShortcutContext(Qt.WidgetWithChildrenShortcut)
a.triggered.connect(self._emitSearchRequested)
w = self.widgetForAction(a)
w.setAutoRaise(False) # no flat button
w.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
self._le.textChanged.connect(self._updateSearchButtons)
self.setFocusProxy(self._le)
self.setStyleSheet(qtlib.tbstylesheet)
self._settings = QSettings()
self._settings.beginGroup('searchtoolbar')
self.searchRequested.connect(self._writesettings)
self._readsettings()
self._le.textChanged.connect(self._emitConditionChanged)
self._chk.toggled.connect(self._emitConditionChanged)
self._wrapchk.toggled.connect(self._emitConditionChanged)
self._updateSearchButtons()
开发者ID:seewindcn,项目名称:tortoisehg,代码行数:53,代码来源:qscilib.py
示例7: _createFileListActions
def _createFileListActions(self):
tbar = self.filelisttbar
self._actionManifestMode = a = tbar.addAction(_('Ma&nifest Mode'))
a.setCheckable(True)
a.setIcon(qtlib.geticon('hg-annotate'))
a.setToolTip(_('Show all version-controlled files in tree view'))
a.triggered.connect(self._applyManifestMode)
self._actionFlatFileList = a = QAction(_('&Flat List'), self)
a.setCheckable(True)
a.setChecked(True)
a.triggered.connect(self._applyFlatFileList)
le = QLineEdit()
if hasattr(le, 'setPlaceholderText'): # Qt >= 4.7
le.setPlaceholderText(_('### filter text ###'))
self.filefilter = le
tbar.addWidget(self.filefilter)
t = QTimer(self, interval=200, singleShot=True)
t.timeout.connect(self._applyFileNameFilter)
le.textEdited.connect(t.start)
le.returnPressed.connect(self.filelist.expandAll)
w = status.StatusFilterActionGroup('MARS', 'MARCS', self)
self._fileStatusFilter = w
w.statusChanged.connect(self._applyFileStatusFilter)
# TODO: p1/p2 toggle should be merged with fileview's
self._parentToggleGroup = QActionGroup(self)
self._parentToggleGroup.triggered.connect(self._selectParentRevision)
for i, (icon, text, tip) in enumerate([
('hg-merged-both', _('Changed by &This Commit'),
_('Show files changed by this commit')),
('hg-merged-p1', _('Compare to &1st Parent'),
_('Show changes from first parent')),
('hg-merged-p2', _('Compare to &2nd Parent'),
_('Show changes from second parent'))]):
a = self._parentToggleGroup.addAction(qtlib.geticon(icon), text)
a.setCheckable(True)
a.setData(i)
a.setStatusTip(tip)
w = QToolButton(self)
m = QMenu(w)
m.addActions(self._parentToggleGroup.actions())
w.setMenu(m)
w.setPopupMode(QToolButton.MenuButtonPopup)
self._actionParentToggle = a = tbar.addWidget(w)
a.setIcon(qtlib.geticon('hg-merged-both'))
a.setToolTip(_('Toggle parent to be used as the base revision'))
a.triggered.connect(self._toggleParentRevision)
w.setDefaultAction(a)
开发者ID:seewindcn,项目名称:tortoisehg,代码行数:52,代码来源:revdetails.py
示例8: __init__
def __init__(self, parent=None, hidable=False):
super(SearchToolBar, self).__init__(_('Search'), parent,
objectName='search',
iconSize=QSize(16, 16))
if hidable:
self._close_button = QToolButton(icon=qtlib.geticon('window-close'),
shortcut=Qt.Key_Escape)
self._close_button.clicked.connect(self.hide)
self.addWidget(self._close_button)
self.addWidget(qtlib.Spacer(2, 2))
self._le = QLineEdit()
if hasattr(self._le, 'setPlaceholderText'): # Qt >= 4.7
self._le.setPlaceholderText(_('### regular expression ###'))
else:
self._lbl = QLabel(_('Regexp:'),
toolTip=_('Regular expression search pattern'))
self.addWidget(self._lbl)
self._lbl.setBuddy(self._le)
self._le.returnPressed.connect(self._emitSearchRequested)
self.addWidget(self._le)
self.addWidget(qtlib.Spacer(4, 4))
self._chk = QCheckBox(_('Ignore case'))
self.addWidget(self._chk)
self._wrapchk = QCheckBox(_('Wrap search'))
self.addWidget(self._wrapchk)
self._btprev = QPushButton(_('Prev'), icon=qtlib.geticon('go-up'),
iconSize=QSize(16, 16))
self._btprev.clicked.connect(
lambda: self._emitSearchRequested(forward=False))
self.addWidget(self._btprev)
self._bt = QPushButton(_('Next'), icon=qtlib.geticon('go-down'),
iconSize=QSize(16, 16))
self._bt.clicked.connect(self._emitSearchRequested)
self._le.textChanged.connect(self._updateSearchButtons)
self.addWidget(self._bt)
self.setFocusProxy(self._le)
self.setStyleSheet(qtlib.tbstylesheet)
self._settings = QSettings()
self._settings.beginGroup('searchtoolbar')
self.searchRequested.connect(self._writesettings)
self._readsettings()
self._le.textChanged.connect(self._emitConditionChanged)
self._chk.toggled.connect(self._emitConditionChanged)
self._wrapchk.toggled.connect(self._emitConditionChanged)
self._updateSearchButtons()
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:50,代码来源:qscilib.py
示例9: __init__
def __init__(self, rev, repo, parent):
super(BackoutDialog, self).__init__(parent)
f = self.windowFlags()
self.setWindowFlags(f & ~Qt.WindowContextHelpButtonHint)
self.backoutrev = rev
self.parentbackout = False
self.backoutmergeparentrev = None
self.setWindowTitle(_('Backout - %s') % repo.displayname)
self.setWindowIcon(qtlib.geticon('hg-revert'))
self.setOption(QWizard.NoBackButtonOnStartPage, True)
self.setOption(QWizard.NoBackButtonOnLastPage, True)
self.setOption(QWizard.IndependentPages, True)
self.addPage(SummaryPage(repo, self))
self.addPage(BackoutPage(repo, self))
self.addPage(CommitPage(repo, self))
self.addPage(ResultPage(repo, self))
self.currentIdChanged.connect(self.pageChanged)
self.resize(QSize(700, 489).expandedTo(self.minimumSizeHint()))
repo.repositoryChanged.connect(self.repositoryChanged)
repo.configChanged.connect(self.configChanged)
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:25,代码来源:backout.py
示例10: __init__
def __init__(self, parent=None):
super(LicenseDialog, self).__init__(parent)
self.setWindowIcon(qtlib.geticon('thg_logo'))
self.setWindowTitle(_('License'))
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)
self.resize(700, 400)
self.lic_txt = QPlainTextEdit()
self.lic_txt.setFont(QFont('Monospace'))
self.lic_txt.setTextInteractionFlags(
Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse)
try:
lic = open(paths.get_license_path(), 'rb').read()
self.lic_txt.setPlainText(lic)
except (IOError):
pass
self.hspacer = QSpacerItem(40, 20,
QSizePolicy.Expanding, QSizePolicy.Minimum)
self.close_btn = QPushButton(_('&Close'))
self.close_btn.clicked.connect(self.close)
self.hbox = QHBoxLayout()
self.hbox.addItem(self.hspacer)
self.hbox.addWidget(self.close_btn)
self.vbox = QVBoxLayout()
self.vbox.setSpacing(6)
self.vbox.addWidget(self.lic_txt)
self.vbox.addLayout(self.hbox)
self.setLayout(self.vbox)
self._readsettings()
self.setModal(True)
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:34,代码来源:license.py
示例11: createActions
def createActions(self):
self.actionUpdate = a = self.filelisttbar.addAction(
qtlib.geticon('hg-update'), _('Update to this revision'))
a.triggered.connect(lambda: self.updateToRevision.emit(self.ctx.rev()))
self.filelisttbar.addSeparator()
self.actionShowAllMerge = QAction(_('Show All'), self)
self.actionShowAllMerge.setToolTip(
_('Toggle display of all files and the direction they were merged'))
self.actionShowAllMerge.setCheckable(True)
self.actionShowAllMerge.setChecked(False)
self.actionShowAllMerge.setEnabled(False)
self.filelisttbar.addAction(self.actionShowAllMerge)
self.actionNextLine = QAction('Next line', self)
self.actionNextLine.setShortcut(Qt.SHIFT + Qt.Key_Down)
self.actionNextLine.triggered.connect(self.fileview.nextLine)
self.addAction(self.actionNextLine)
self.actionPrevLine = QAction('Prev line', self)
self.actionPrevLine.setShortcut(Qt.SHIFT + Qt.Key_Up)
self.actionPrevLine.triggered.connect(self.fileview.prevLine)
self.addAction(self.actionPrevLine)
self.actionNextCol = QAction('Next column', self)
self.actionNextCol.setShortcut(Qt.SHIFT + Qt.Key_Right)
self.actionNextCol.triggered.connect(self.fileview.nextCol)
self.addAction(self.actionNextCol)
self.actionPrevCol = QAction('Prev column', self)
self.actionPrevCol.setShortcut(Qt.SHIFT + Qt.Key_Left)
self.actionPrevCol.triggered.connect(self.fileview.prevCol)
self.addAction(self.actionPrevCol)
self._fileactions = filectxactions.FilectxActions(self.repo, self,
rev=self.ctx.rev())
self._fileactions.linkActivated.connect(self.linkActivated)
self.addActions(self._fileactions.actions())
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:34,代码来源:revdetails.py
示例12: getSubrepoIcoDict
def getSubrepoIcoDict():
"Return a dictionary mapping each subrepo type to the corresponding icon"
_subrepoType2IcoMap = {
"hg": "hg",
"git": "thg-git-subrepo",
"svn": "thg-svn-subrepo",
"hgsubversion": "thg-svn-subrepo",
"empty": "hg",
}
icOverlay = geticon("thg-subrepo")
subrepoIcoDict = {}
for stype in _subrepoType2IcoMap:
ic = geticon(_subrepoType2IcoMap[stype])
ic = getoverlaidicon(ic, icOverlay)
subrepoIcoDict[stype] = ic
return subrepoIcoDict
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:16,代码来源:filelistmodel.py
示例13: __init__
def __init__(self, repoagent, parent):
super(FilectxActions, self).__init__(parent)
if not isinstance(parent, QWidget):
raise ValueError('parent must be a QWidget')
self._repoagent = repoagent
self._cmdsession = cmdcore.nullCmdSession()
self._selfds = []
self._nav_dialogs = qtlib.DialogKeeper(FilectxActions._createnavdialog,
FilectxActions._gennavdialogkey,
self)
self._actions = {}
self._customactions = {}
for name, d in self._actiontable.iteritems():
desc, icon, key, tip, fdfilters = d
# QAction must be owned by QWidget; otherwise statusTip for context
# menu cannot be displayed (QTBUG-16114)
act = QAction(desc, self.parent())
if icon:
act.setIcon(qtlib.geticon(icon))
if key:
act.setShortcut(key)
act.setShortcutContext(Qt.WidgetWithChildrenShortcut)
if tip:
act.setStatusTip(tip)
QObject.connect(act, SIGNAL('triggered()'),
self, SLOT('%s()' % name))
self._addAction(name, act, fdfilters)
self._initAdditionalActions()
self._updateActions()
开发者ID:seewindcn,项目名称:tortoisehg,代码行数:33,代码来源:filectxactions.py
示例14: getSubrepoIcoDict
def getSubrepoIcoDict():
'Return a dictionary mapping each subrepo type to the corresponding icon'
_subrepoType2IcoMap = {
'hg': 'hg',
'git': 'thg-git-subrepo',
'svn': 'thg-svn-subrepo',
'hgsubversion': 'thg-svn-subrepo',
'empty': 'hg'
}
icOverlay = geticon('thg-subrepo')
subrepoIcoDict = {}
for stype in _subrepoType2IcoMap:
ic = geticon(_subrepoType2IcoMap[stype])
ic = getoverlaidicon(ic, icOverlay)
subrepoIcoDict[stype] = ic
return subrepoIcoDict
开发者ID:velorientc,项目名称:git_test7,代码行数:16,代码来源:filelistmodel.py
示例15: setupCustomToolsMenu
def setupCustomToolsMenu(self, location):
tools, toollist = hglib.tortoisehgtools(self._ui, location)
submenu = QMenu(_('Custom Tools'), self.parent())
submenu.triggered.connect(self._runCustomCommandByMenu)
for name in toollist:
if name == '|':
submenu.addSeparator()
continue
info = tools.get(name, None)
if info is None:
continue
command = info.get('command', None)
if not command:
continue
label = info.get('label', name)
icon = info.get('icon', customtools.DEFAULTICONNAME)
status = info.get('status')
a = submenu.addAction(label)
a.setData(name)
if icon:
a.setIcon(qtlib.geticon(icon))
if status:
fdfilters = (_filestatus(status),)
else:
fdfilters = ()
self._customactions[name] = (a, fdfilters)
submenu.menuAction().setVisible(bool(self._customactions))
self._addAction('customToolsMenu', submenu.menuAction(), ())
self._updateActions()
开发者ID:seewindcn,项目名称:tortoisehg,代码行数:29,代码来源:filectxactions.py
示例16: __init__
def __init__(self, repoagent, rev='.', parent=None):
QDialog.__init__(self, parent)
self.setWindowFlags(Qt.Window)
self.setWindowIcon(qtlib.geticon('hg-log'))
layout = QVBoxLayout()
layout.setMargin(0)
self.setLayout(layout)
toplayout = QVBoxLayout()
toplayout.setContentsMargins(5, 5, 5, 0)
layout.addLayout(toplayout)
revdetails = RevDetailsWidget(repoagent, parent, rev=rev)
toplayout.addWidget(revdetails, 1)
self.statusbar = cmdui.ThgStatusBar(self)
revdetails.showMessage.connect(self.statusbar.showMessage)
revdetails.linkActivated.connect(self.linkActivated)
layout.addWidget(self.statusbar)
s = QSettings()
self.restoreGeometry(s.value('revdetails/geom').toByteArray())
revdetails.loadSettings(s)
repoagent.repositoryChanged.connect(self.refresh)
self.revdetails = revdetails
self.setRev(rev)
qtlib.newshortcutsforstdkey(QKeySequence.Refresh, self, self.refresh)
开发者ID:velorientc,项目名称:git_test7,代码行数:30,代码来源:revdetails.py
示例17: __init__
def __init__(self, repoagent, pats, opts, parent=None):
QDialog.__init__(self, parent)
self.setWindowIcon(qtlib.geticon('hg-status'))
self._repoagent = repoagent
layout = QVBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
self.setLayout(layout)
toplayout = QVBoxLayout()
toplayout.setContentsMargins(10, 10, 10, 0)
self.stwidget = StatusWidget(repoagent, pats, opts, self,
checkable=False)
toplayout.addWidget(self.stwidget, 1)
layout.addLayout(toplayout)
self.statusbar = cmdui.ThgStatusBar(self)
layout.addWidget(self.statusbar)
self.stwidget.showMessage.connect(self.statusbar.showMessage)
self.stwidget.progress.connect(self.statusbar.progress)
self.stwidget.titleTextChanged.connect(self.setWindowTitle)
self.stwidget.linkActivated.connect(self.linkActivated)
self._subdialogs = qtlib.DialogKeeper(StatusDialog._createSubDialog,
parent=self)
self.setWindowTitle(self.stwidget.getTitle())
self.setWindowFlags(Qt.Window)
self.loadSettings()
qtlib.newshortcutsforstdkey(QKeySequence.Refresh, self,
self.stwidget.refreshWctx)
QTimer.singleShot(0, self.stwidget.refreshWctx)
开发者ID:seewindcn,项目名称:tortoisehg,代码行数:32,代码来源:status.py
示例18: __init__
def __init__(self, repoagent, rev, parent=None):
super(BackoutDialog, self).__init__(parent)
self._repoagent = repoagent
f = self.windowFlags()
self.setWindowFlags(f & ~Qt.WindowContextHelpButtonHint)
repo = repoagent.rawRepo()
parentbackout = repo[rev] == repo['.']
self.setWindowTitle(_('Backout - %s') % repoagent.displayName())
self.setWindowIcon(qtlib.geticon('hg-revert'))
self.setOption(QWizard.NoBackButtonOnStartPage, True)
self.setOption(QWizard.NoBackButtonOnLastPage, True)
self.setOption(QWizard.IndependentPages, True)
self.addPage(SummaryPage(repoagent, rev, parentbackout, self))
self.addPage(BackoutPage(repoagent, rev, parentbackout, self))
self.addPage(CommitPage(repoagent, rev, parentbackout, self))
self.addPage(ResultPage(repoagent, self))
self.currentIdChanged.connect(self.pageChanged)
self.resize(QSize(700, 489).expandedTo(self.minimumSizeHint()))
repoagent.repositoryChanged.connect(self.repositoryChanged)
repoagent.configChanged.connect(self.configChanged)
self._readSettings()
开发者ID:seewindcn,项目名称:tortoisehg,代码行数:27,代码来源:backout.py
示例19: __init__
def __init__(self, repo, patches, parent):
super(QDeleteDialog, self).__init__(parent)
self.setWindowTitle(_('Patch remove - %s') % repo.displayname)
self.setWindowIcon(qtlib.geticon('hg-qdelete'))
f = self.windowFlags()
self.setWindowFlags(f & ~Qt.WindowContextHelpButtonHint)
self.repo = repo
self.patches = patches
self.setLayout(QVBoxLayout())
msg = _('Remove patches from queue?')
patchesu = u'<li>'.join([hglib.tounicode(p) for p in patches])
lbl = QLabel(u'<b>%s<ul><li>%s</ul></b>' % (msg, patchesu))
self.layout().addWidget(lbl)
self.keepchk = QCheckBox(_('Keep patch files'))
self.keepchk.setChecked(True)
self.layout().addWidget(self.keepchk)
self.cmd = cmdui.Runner(False, self)
self.cmd.output.connect(self.output)
self.cmd.makeLogVisible.connect(self.makeLogVisible)
BB = QDialogButtonBox
bbox = QDialogButtonBox(BB.Ok|BB.Cancel)
bbox.accepted.connect(self.accept)
bbox.rejected.connect(self.reject)
self.layout().addWidget(bbox)
self.bbox = bbox
开发者ID:velorientc,项目名称:git_test7,代码行数:30,代码来源:qdelete.py
示例20: __init__
def __init__(self, otherrev, repo, parent):
super(MergeDialog, self).__init__(parent)
f = self.windowFlags()
self.setWindowFlags(f & ~Qt.WindowContextHelpButtonHint)
self.otherrev = str(otherrev)
self.localrev = str(repo['.'].rev())
self.setWindowTitle(_('Merge - %s') % repo.displayname)
self.setWindowIcon(qtlib.geticon('hg-merge'))
self.setOption(QWizard.NoBackButtonOnStartPage, True)
self.setOption(QWizard.NoBackButtonOnLastPage, True)
self.setOption(QWizard.IndependentPages, True)
# set pages
summarypage = SummaryPage(repo, self)
self.addPage(summarypage)
self.addPage(MergePage(repo, self))
self.addPage(CommitPage(repo, self))
self.addPage(ResultPage(repo, self))
self.currentIdChanged.connect(self.pageChanged)
# move focus to "Next" button so that "Cancel" doesn't eat Enter key
summarypage.refreshFinished.connect(
self.button(QWizard.NextButton).setFocus)
self.resize(QSize(700, 489).expandedTo(self.minimumSizeHint()))
repo.repositoryChanged.connect(self.repositoryChanged)
repo.configChanged.connect(self.configChanged)
self.repo = repo
开发者ID:gilshwartz,项目名称:tortoisehg-caja,代码行数:31,代码来源:merge.py
注:本文中的tortoisehg.hgqt.qtlib.geticon函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论