当前位置: 首页>>代码示例>>Python>>正文


Python QStringList.join方法代码示例

本文整理汇总了Python中PyQt4.QtCore.QStringList.join方法的典型用法代码示例。如果您正苦于以下问题:Python QStringList.join方法的具体用法?Python QStringList.join怎么用?Python QStringList.join使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.QtCore.QStringList的用法示例。


在下文中一共展示了QStringList.join方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: path_from_index

# 需要导入模块: from PyQt4.QtCore import QStringList [as 别名]
# 或者: from PyQt4.QtCore.QStringList import join [as 别名]
    def path_from_index(self, index):
        """ Reimplemented. Finds part of a path given the index of
        the last part required.

        """
        data_list = QStringList()
        while index.isValid():
            data_list.prepend(self.model().data(index).toString())
            index = index.parent()
        ret = data_list.join("/")
        print "path from index: %s" % (data_list.join(" :: "))
        return ret
开发者ID:aminembarki,项目名称:eilat,代码行数:14,代码来源:MainWin.py

示例2: __qtReorderFilter

# 需要导入模块: from PyQt4.QtCore import QStringList [as 别名]
# 或者: from PyQt4.QtCore.QStringList import join [as 别名]
def __qtReorderFilter(filter, selectedFilter = None):
    """
    Private function to reorder the file filter to cope with a KDE issue introduced
    by distributors usage of KDE file dialogs.
    
    @param filter Qt file filter (QString or string)
    @param selectedFilter this is set to the selected filter (QString or string)
    @return the rearranged Qt file filter (QString)
    """
    if selectedFilter is not None and not Globals.isMacPlatform():
        fileFilters = QStringList(filter.split(';;'))
##        fileFilters.removeAll(selectedFilter)
        fileFilters.prepend(selectedFilter)
        return fileFilters.join(";;")
    else:
        return filter
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:18,代码来源:KQFileDialog.py

示例3: saveAccountData

# 需要导入模块: from PyQt4.QtCore import QStringList [as 别名]
# 或者: from PyQt4.QtCore.QStringList import join [as 别名]
	def saveAccountData(self):
		collId = self.collectionID.text()
		if self.enabledBox.checkState() == Qt.Checked :
			enable = '1'
		else :
			enable = '0'
		collRes = self.collectionResource.text()
		accCommand = self.accountCommand.text()
		params = QStringList() << collId << enable << \
			collRes << self.nameColl << accCommand
		data = params.join(dlm)
		item = self.Parent.editList.accountListBox.currentItem()
		self.Settings.beginGroup('Akonadi account')
		data = self.Settings.setValue(item.text(), data)
		self.Settings.endGroup()
		# data saved
		self.blink(True, False)
开发者ID:prmsh99,项目名称:sample_app,代码行数:19,代码来源:AkonadiResources.py

示例4: __convertFilter

# 需要导入模块: from PyQt4.QtCore import QStringList [as 别名]
# 或者: from PyQt4.QtCore.QStringList import join [as 别名]
 def __convertFilter(filter, selectedFilter = None):
     """
     Private function to convert a Qt file filter to a KDE file filter.
     
     @param filter Qt file filter (QString or string)
     @param selectedFilter this is set to the selected filter
     @return the corresponding KDE file filter (QString)
     """
     rx = QRegExp("^[^(]*\(([^)]*)\).*$")
     fileFilters = filter.split(';;')
     
     newfilter = QStringList()
     for fileFilter in fileFilters:
         sf = selectedFilter and selectedFilter.compare(fileFilter) == 0
         namefilter = QString(fileFilter).replace(rx, "\\1")
         fileFilter = QString(fileFilter).replace('/', '\\/')
         if sf:
             newfilter.prepend("%s|%s" % (namefilter, fileFilter))
         else:
             newfilter.append("%s|%s" % (namefilter, fileFilter))
     return newfilter.join('\n')
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:23,代码来源:KQFileDialog.py

示例5: getSaveFileFiltersList

# 需要导入模块: from PyQt4.QtCore import QStringList [as 别名]
# 或者: from PyQt4.QtCore.QStringList import join [as 别名]

#.........这里部分代码省略.........
        << QApplication.translate('Lexers', 
            "HTML Files (*.html)") \
        << QApplication.translate('Lexers', 
            "PHP Files (*.php)") \
        << QApplication.translate('Lexers', 
            "ASP Files (*.asp)") \
        << QApplication.translate('Lexers', 
            "CSS Files (*.css)") \
        << QApplication.translate('Lexers', 
            "QSS Files (*.qss)") \
        << QApplication.translate('Lexers', 
            "XML Files (*.xml)") \
        << QApplication.translate('Lexers', 
            "XSL Files (*.xsl)") \
        << QApplication.translate('Lexers', 
            "DTD Files (*.dtd)") \
        << QApplication.translate('Lexers', 
            "Qt Resource Files (*.qrc)") \
        << QApplication.translate('Lexers', 
            "D Files (*.d)") \
        << QApplication.translate('Lexers', 
            "D Interface Files (*.di)") \
        << QApplication.translate('Lexers', 
            "Java Files (*.java)") \
        << QApplication.translate('Lexers', 
            "JavaScript Files (*.js)") \
        << QApplication.translate('Lexers', 
            "SQL Files (*.sql)") \
        << QApplication.translate('Lexers', 
            "Docbook Files (*.docbook)") \
        << QApplication.translate('Lexers', 
            "Perl Files (*.pl)") \
        << QApplication.translate('Lexers', 
            "Perl Module Files (*.pm)") \
        << QApplication.translate('Lexers', 
            "Lua Files (*.lua)") \
        << QApplication.translate('Lexers', 
            "Shell Files (*.sh)") \
        << QApplication.translate('Lexers', 
            "Batch Files (*.bat)") \
        << QApplication.translate('Lexers', 
            "TeX Files (*.tex)") \
        << QApplication.translate('Lexers', 
            "TeX Template Files (*.sty)") \
        << QApplication.translate('Lexers', 
            "Diff Files (*.diff)") \
        << QApplication.translate('Lexers', 
            "Make Files (*.mak)") \
        << QApplication.translate('Lexers', 
            "Properties Files (*.ini)") \
        << QApplication.translate('Lexers', 
            "Configuration Files (*.cfg)") \
        << QApplication.translate('Lexers', 
            'Povray Files (*.pov)') \
        << QApplication.translate('Lexers', 
            'CMake Files (CMakeLists.txt)') \
        << QApplication.translate('Lexers', 
            'CMake Macro Files (*.cmake)') \
        << QApplication.translate('Lexers', 
            'VHDL Files (*.vhd)')
    
    if QSCINTILLA_VERSION() >= 0x020201:
        saveFileFiltersList \
            << QApplication.translate('Lexers', 
                'TCL Files (*.tcl)') \
            << QApplication.translate('Lexers', 
                'Tk Files (*.tk)') \
            << QApplication.translate('Lexers', 
                'Fortran Files (*.f95)') \
            << QApplication.translate('Lexers', 
                'Fortran77 Files (*.f)') \
            << QApplication.translate('Lexers', 
                'Pascal Files (*.pas)') \
            << QApplication.translate('Lexers', 
                'PostScript Files (*.ps)') \
            << QApplication.translate('Lexers', 
                'YAML Files (*.yml)')
    
    if QSCINTILLA_VERSION() >= 0x020501:
        saveFileFiltersList \
            << QApplication.translate('Lexers',
                'Matlab Files (*.m)') \
            << QApplication.translate('Lexers',
                'Octave Files (*.m.octave)')
    
    for name in LexerRegistry:
        saveFileFiltersList << LexerRegistry[name][4]
    
    if withAdditional:
        saveFileFiltersList += Preferences.getEditor("AdditionalSaveFilters")
    
    saveFileFiltersList.sort()
    
    if includeAll:
        saveFileFiltersList.append(QApplication.translate('Lexers', 'All Files (*)'))
    
    if asString:
        return saveFileFiltersList.join(';;')
    else:
        return saveFileFiltersList
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:104,代码来源:__init__.py

示例6: getOpenFileFiltersList

# 需要导入模块: from PyQt4.QtCore import QStringList [as 别名]
# 或者: from PyQt4.QtCore.QStringList import join [as 别名]

#.........这里部分代码省略.........
    openFileFiltersList = QStringList() \
        << QApplication.translate('Lexers', 
            'Python Files (*.py *.py3)') \
        << QApplication.translate('Lexers', 
            'Python GUI Files (*.pyw *.pyw3)') \
        << QApplication.translate('Lexers', 
            'Pyrex Files (*.pyx)') \
        << QApplication.translate('Lexers', 
            'Quixote Template Files (*.ptl)') \
        << QApplication.translate('Lexers', 
            'Ruby Files (*.rb)') \
        << QApplication.translate('Lexers', 
            'IDL Files (*.idl)') \
        << QApplication.translate('Lexers', 
            'C Files (*.h *.c)') \
        << QApplication.translate('Lexers', 
            'C++ Files (*.h *.hpp *.hh *.cxx *.cpp *.cc)') \
        << QApplication.translate('Lexers', 
            'C# Files (*.cs)') \
        << QApplication.translate('Lexers', 
            'HTML Files (*.html *.htm *.asp *.shtml)') \
        << QApplication.translate('Lexers', 
            'CSS Files (*.css)') \
        << QApplication.translate('Lexers', 
            'QSS Files (*.qss)') \
        << QApplication.translate('Lexers', 
            'PHP Files (*.php *.php3 *.php4 *.php5 *.phtml)') \
        << QApplication.translate('Lexers', 
            'XML Files (*.xml *.xsl *.xslt *.dtd *.svg *.xul *.xsd)') \
        << QApplication.translate('Lexers', 
            'Qt Resource Files (*.qrc)') \
        << QApplication.translate('Lexers', 
            'D Files (*.d *.di)') \
        << QApplication.translate('Lexers', 
            'Java Files (*.java)') \
        << QApplication.translate('Lexers', 
            'JavaScript Files (*.js)') \
        << QApplication.translate('Lexers', 
            'SQL Files (*.sql)') \
        << QApplication.translate('Lexers', 
            'Docbook Files (*.docbook)') \
        << QApplication.translate('Lexers', 
            'Perl Files (*.pl *.pm *.ph)') \
        << QApplication.translate('Lexers', 
            'Lua Files (*.lua)') \
        << QApplication.translate('Lexers', 
            'Tex Files (*.tex *.sty *.aux *.toc *.idx)') \
        << QApplication.translate('Lexers', 
            'Shell Files (*.sh)') \
        << QApplication.translate('Lexers', 
            'Batch Files (*.bat *.cmd)') \
        << QApplication.translate('Lexers', 
            'Diff Files (*.diff *.patch)') \
        << QApplication.translate('Lexers', 
            'Makefiles (*.mak)') \
        << QApplication.translate('Lexers', 
            'Properties Files (*.properties *.ini *.inf *.reg *.cfg *.cnf *.rc)') \
        << QApplication.translate('Lexers', 
            'Povray Files (*.pov)') \
        << QApplication.translate('Lexers', 
            'CMake Files (CMakeLists.txt *.cmake *.ctest)') \
        << QApplication.translate('Lexers', 
            'VHDL Files (*.vhd *.vhdl)')
    
    if QSCINTILLA_VERSION() >= 0x020201:
        openFileFiltersList \
            << QApplication.translate('Lexers', 
                'TCL/Tk Files (*.tcl *.tk)') \
            << QApplication.translate('Lexers', 
                'Fortran Files (*.f90 *.f95 *.f2k)') \
            << QApplication.translate('Lexers', 
                'Fortran77 Files (*.f *.for)') \
            << QApplication.translate('Lexers', 
                'Pascal Files (*.dpr *.dpk *.pas *.dfm *.inc *.pp)') \
            << QApplication.translate('Lexers', 
                'PostScript Files (*.ps)') \
            << QApplication.translate('Lexers', 
                'YAML Files (*.yaml *.yml)')
    
    if QSCINTILLA_VERSION() >= 0x020501:
        openFileFiltersList \
            << QApplication.translate('Lexers',
                'Matlab Files (*.m *.m.matlab)') \
            << QApplication.translate('Lexers',
                'Octave Files (*.m *.m.octave)')
    
    for name in LexerRegistry:
        openFileFiltersList << LexerRegistry[name][3]
    
    if withAdditional:
        openFileFiltersList += Preferences.getEditor("AdditionalOpenFilters")
    
    openFileFiltersList.sort()
    if includeAll:
        openFileFiltersList.append(QApplication.translate('Lexers', 'All Files (*)'))
    
    if asString:
        return openFileFiltersList.join(';;')
    else:
        return openFileFiltersList
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:104,代码来源:__init__.py

示例7: SCJProgress

# 需要导入模块: from PyQt4.QtCore import QStringList [as 别名]
# 或者: from PyQt4.QtCore.QStringList import join [as 别名]
class SCJProgress(QHBoxLayout):
    def __init__(self, parent=None, file=None, format=None, createDir=False ):
        super(SCJProgress, self).__init__(parent)
        self.format = format
        self.filename = file
        self.createDir = createDir
        self.process = SCJ(self.filename, self.format, createDir)
        self.output = QString(self.process.output)
        self.command = QStringList(self.process.command)
        self.log = QStringList()

        self.label = QLabel(self.output)
        self.label.setToolTip(self.trUtf8("Destination: %s" % self.output))
        self.bar = QProgressBar(parent)
        self.bar.setToolTip(self.trUtf8("Source: %s" % self.filename))
        self.bar.setValue(0)
        self.startbtn = QPushButton(parent) 
        self.stopbtn = QPushButton(parent)
        self.cancelbtn = QPushButton(parent)
        self.logbtn = QPushButton(parent)
        self.cancelbtn.setMinimumSize(32,32)
        self.cancelbtn.setFlat(True)
        self.startbtn.setMinimumSize(32,32)
        self.startbtn.setFlat(True)
        self.stopbtn.setMinimumSize(32,32)
        self.stopbtn.setFlat(True)
        self.label.setMinimumSize(200,32)
        self.bar.setMinimumSize(100,16)
        self.bar.setMaximumHeight(16)

        self.addWidget(self.logbtn)
        self.logbtn.hide()
        self.addWidget(self.label)
        self.addWidget(self.bar)
        self.addWidget(self.startbtn)
        self.addWidget(self.stopbtn)
        self.addWidget(self.cancelbtn)
        self.retranslateUi()

        self.connect(self.startbtn, SIGNAL("clicked()"), self.start)
        self.connect(self.stopbtn, SIGNAL("clicked()"),  self.stop)
        self.connect(self.cancelbtn, SIGNAL("clicked()"), self.remove)
        self.connect(self.logbtn, SIGNAL('clicked()'), self.showLog)
        self.connect(self.process, SIGNAL('progress(int)'), self.bar.setValue)
        self.connect(self.process, SIGNAL('error(QString)'), self.addLog)
        self.connect(self.process, SIGNAL('finished()'), self.enable)

    def retranslateUi(self):
        self.startbtn.setIcon(QIcon(u"images/play.png"))
        self.startbtn.setToolTip(self.trUtf8("Demarrer"))
        self.stopbtn.setIcon(QIcon(u"images/stop.png"))
        self.stopbtn.setToolTip(self.trUtf8("Stopper"))
        self.cancelbtn.setIcon(QIcon(u"images/remove.png"))
        self.cancelbtn.setToolTip(self.trUtf8("Annuler"))
        self.logbtn.setIcon(QIcon(u"images/log.png"))
        self.logbtn.setToolTip(self.trUtf8("Voir les details"))

    def start(self):
        self.log.clear()
        self.logbtn.hide()
        self.disable()
        self.process.start()
        self.process.resume()

    def stop(self):
        self.process.cancel()
        self.process.terminate()
        self.enable()

    def remove(self):
        self.removeWidget(self.label)
        self.removeWidget(self.bar)
        self.removeWidget(self.startbtn)
        self.removeWidget(self.stopbtn)
        self.removeWidget(self.cancelbtn)
        self.removeWidget(self.logbtn)
        self.label.hide()
        self.bar.hide()
        self.startbtn.hide()
        self.stopbtn.hide()
        self.cancelbtn.hide()
        self.logbtn.hide()
        self.emit(SIGNAL("void removed(QString)"), self.output)

    def showLog(self):
        QMessageBox.critical(None, u"Ooops", self.log.join("\n"))

    def addLog(self, log):
        self.log.append(log)
        self.logbtn.show()
        palette = QPalette()
        brush = QBrush(QColor(240, 100, 100))
        brush.setStyle(Qt.SolidPattern)
        palette.setBrush(QPalette.Normal, QPalette.Background, brush)
        self.label.setPalette(palette)
        self.label.setAutoFillBackground(True)

    def enable(self):
        self.process = SCJ(self.filename, self.format, self.createDir)
        self.output = QString(self.process.output)
#.........这里部分代码省略.........
开发者ID:Ptaah,项目名称:SCJ,代码行数:103,代码来源:scj.py


注:本文中的PyQt4.QtCore.QStringList.join方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。