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


Python QtCore.QStringList类代码示例

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


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

示例1: __init__

 def __init__(self):
     """
     Constructor
     """
     ConfigurationPageBase.__init__(self)
     self.setupUi(self)
     self.setObjectName("EditorKeywordsPage")
     
     # set initial values
     self.__keywords = {
         "": QStringList(["", "", "", "", "", "", "", "", "", ""])
     }
     languages = [''] + QScintilla.Lexers.getSupportedLanguages().keys()
     languages.sort()
     for lang in languages:
         if lang:
             lex = QScintilla.Lexers.getLexer(lang)
             if isinstance(lex, LexerContainer):
                 continue
             keywords = Preferences.getEditorKeywords(lang)[:]
             if keywords.isEmpty():
                 keywords = QStringList("")
                 for kwSet in range(1, 10):
                     kw = lex.keywords(kwSet)
                     if kw is None:
                         kw = ""
                     keywords.append(kw)
             self.__keywords[lang] = keywords
         self.languageCombo.addItem(lang)
     
     self.currentLanguage = QString()
     self.currentSet = 1
     self.on_languageCombo_activated(self.currentLanguage)
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:33,代码来源:EditorKeywordsPage.py

示例2: __init__

    def __init__(self, methodName):
        """Run once on class initialisation."""
        unittest.TestCase.__init__(self, methodName)
        myPath = os.path.join(TEST_DATA_DIR, 'landsat.tif')
        rasterFileInfo = QFileInfo(myPath)
        mRasterLayer = QgsRasterLayer(rasterFileInfo.filePath(),
                                      rasterFileInfo.completeBaseName())
        rasterRenderer = QgsMultiBandColorRenderer(
            mRasterLayer.dataProvider(), 2, 3, 4)
        mRasterLayer.setRenderer(rasterRenderer)
        #pipe = mRasterLayer.pipe()
        #assert pipe.set(rasterRenderer), 'Cannot set pipe renderer'
        QgsMapLayerRegistry.instance().addMapLayers([mRasterLayer])

        # create composition with composer map
        self.mMapRenderer = QgsMapRenderer()
        layerStringList = QStringList()
        layerStringList.append(mRasterLayer.id())
        self.mMapRenderer.setLayerSet(layerStringList)
        self.mMapRenderer.setProjectionsEnabled(False)
        self.mComposition = QgsComposition(self.mMapRenderer)
        self.mComposition.setPaperSize(297, 210)
        self.mComposerMap = QgsComposerMap(self.mComposition, 20, 20, 200, 100)
        self.mComposerMap.setFrameEnabled(True)
        self.mComposition.addComposerMap(self.mComposerMap)
开发者ID:Arctictern265,项目名称:Quantum-GIS,代码行数:25,代码来源:test_qgscomposermap.py

示例3: onSelectFolder

    def onSelectFolder(self):

        Fdialog = QFileDialog()
        Fdialog.setFileMode(QFileDialog.DirectoryOnly)
        if Fdialog.exec_():
            folderPath = QStringList(Fdialog.selectedFiles())
            self.ui.dirEdit.setText(folderPath.takeFirst())
开发者ID:blackdev1l,项目名称:Fap-Folder-Creator,代码行数:7,代码来源:fccGui.py

示例4: get_string_list

 def get_string_list(self, column):
     """Returns a column as a QStringList"""
     tempList = QStringList()
     result = QtSql.QSqlQuery('''SELECT DISTINCT %s FROM presentations''' % column)
     while result.next():
         tempList.append(result.value(0).toString())
     return tempList
开发者ID:chungsharo,项目名称:freeseer,代码行数:7,代码来源:database.py

示例5: set_root_folder

    def set_root_folder(self, root_folder):
        self.tree.clear()
        self.clear_all_load_animations()
        
        if self.root_folder != None:
            del self.root_folder
        self.root_folder = root_folder

        # Add root
        columns = QStringList()
        columns.append(root_folder.get_name())
        columns.append(root_folder.get_size())
        root_item = QTreeWidgetItem(columns)

        self.set_icon(root_folder.mime_type, root_item)
        
        self.tree.addTopLevelItem(root_item)
        root_item.setExpanded(True)
        root_folder.tree_item = root_item

        self.generate_children(root_folder)
        self.add_loading_widgets(root_folder)

        self.tree.setCurrentItem(root_item)
        self.start_load_anim(root_folder)
        
        self.tree.header().resizeSections(QHeaderView.ResizeToContents)
开发者ID:Sohil876,项目名称:DropN900,代码行数:27,代码来源:uicontroller.py

示例6: __init__

	def __init__(self, parent=None, TreeFileName=DefaultTreeFileName):
		QTreeWidget.__init__(self, parent)
		self.parent = parent
		self.setGeometry(0,0, self.parent.width(), self.parent.height())
		self.setColumnCount(2)
		self.setColumnWidth(0,270)
		#self.header().setStretchLastSection(False)
		#self.resizeColumnToContents(1)
		headerTitles = QStringList()
		headerTitles.append(QString("Parameter"))
		headerTitles.append(QString("Value"))
		self.setHeaderLabels(headerTitles)
		self.setEditTriggers(QTreeWidget.DoubleClicked|QTreeWidget.EditKeyPressed)
		self.rootItems = []
		self.currentItemChanged.connect(self.visit)
		self.itemDoubleClicked.connect(self.edit_)
		self.editing = None
		self.expandAll()
		self.ScenarioName = ''
		self.NodeDescriptions = dict()  # textual parameter descriptions
		self.ParamScenario = dict()  # name of corresponding scenario for parameters
		self.changed = False
		self.ApplicationPath = ''
		self.TreeFileName = TreeFileName
		self.RunCfgFileName = DefaultCfgFileName
		self.load()
		self.parent.setWindowTitle(self.NodeValue('Title').replace('_',' ') + ' ' + DefaultTtitle)
开发者ID:lesyk,项目名称:Evolife,代码行数:27,代码来源:TreeExplore.py

示例7: _nameList

 def _nameList(self, filt = None, without = None, upto = None):
     # need to search all tables for a string list of object names
     # filt is a ModuleBase subclass to filter by
     # without is a row number to exclude from the current table
     # upto means only look at objects up to "upto" row in the current table
     if (filt, without, upto) in self._cachedNameList:
         timestamp, sl = self._cachedNameList[(filt, without, upto)]
         if self._parent.lastModified() < timestamp:
             return sl
     sl = QStringList()
     for name in self._parent.getTableNames():
         table = self._parent._tables[name]
         # if we have a filter, then make sure this table is a subclass of it
         if filt is not None and not issubclass(table.ob, filt):
             # if we are only going up to a certain table and this is it
             if table == self and upto is not None:
                 return sl
             continue
         for i,trow in enumerate(table.rows):
             if table == self:
                 # if the current table is self, make sure we are excluding
                 # the without row
                 if without is not None and without == i:
                     continue
                 # make sure we only go up to upto
                 if upto is not None and upto == i:
                     return sl
             # add a non-null name, which is not commented out to the list
             if not trow[2].isNull() and not \
                     (not trow[0].isNull() and trow[0].toBool() == True):
                 sl.append(trow[2].toString())
     # store the cached value
     self._cachedNameList[(filt, without, upto)] = (time.time(), sl)
     return sl
开发者ID:rorydog1,项目名称:epics,代码行数:34,代码来源:xmltable.py

示例8: getThemeList

    def getThemeList(self):

        dir = QDir("/usr/share/enlightenment/data/themes")
        dir.setFilter( QDir.NoSymLinks | QDir.Files )
        a = QStringList()
        a.append("*.edj")
        dir.setNameFilters(a)
        return dir.entryList()
开发者ID:ademirel,项目名称:COMAK,代码行数:8,代码来源:enlightenment.py

示例9: save

 def save(self):
     """
     Public slot to save the Icons configuration.
     """
     dirList = QStringList()
     for i in range(self.iconDirectoryList.count()):
         dirList.append(self.iconDirectoryList.item(i).text())
     Preferences.setIcons("Path", dirList)
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:8,代码来源:IconsPage.py

示例10: list

 def list(self):
     q = QSqlQueryModel()
     q.setQuery("SELECT name FROM platform")
     strlist = QStringList()
     strlist.append(u"全部")
     for i in range(q.rowCount()):
         strlist.append(q.record(i).value(0).toString())
     return strlist
开发者ID:BlueAaron,项目名称:-,代码行数:8,代码来源:platform.py

示例11: set_devlist

 def set_devlist(self, devlist, isWIN32):
     qslist = QStringList()
     if isWIN32:
         for dev in devlist:
             qslist.append(QString(dev.description))
     else:
         for dev in self.capturer.devlist:
             qslist.append(QString(dev.name))
     self.devComboBox.addItems(qslist)
开发者ID:futureer,项目名称:QSniffer,代码行数:9,代码来源:MainWindow.py

示例12: buildQStringList

def buildQStringList(items):
	"""
	@rtype: QStringList
	"""
	returnData = QStringList()
	for item in items:
		returnData.append(item)

	return returnData
开发者ID:Fapiko,项目名称:pyHeidi,代码行数:9,代码来源:helper_methods.py

示例13: fieldNames

def fieldNames(layer):
    fields = layer.dataProvider().fields()

    if QGis.QGIS_VERSION_INT < 10900:
        from PyQt4.QtCore import QStringList
        fieldNames = QStringList()
        for field in fields.values():
            fieldNames.append(field.name())
    else:
        return map(lambda field: field.name(), fields)
开发者ID:Frederikssund,项目名称:xytools,代码行数:10,代码来源:utils.py

示例14: __extractFileFilters

 def __extractFileFilters(self):
     """
     Private method to extract the file filters.
     """
     filters = QStringList()
     for row in range(self.fileFiltersList.count()):
         filters.append(self.fileFiltersList.item(row).text())
     if self.__showsOpenFilters:
         self.openFileFilters = filters
     else:
         self.saveFileFilters = filters
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:11,代码来源:EditorFilePage.py

示例15: mimeTypes

	def mimeTypes(self):
		"""
		Reimplements the :meth:`QAbstractItemModel.mimeTypes` method.
		
		:return: Mime types.
		:rtype: QStringList
		"""

		types = QStringList()
		types.append("application/x-umbragraphmodeldatalist")
		return types
开发者ID:KelSolaar,项目名称:Umbra,代码行数:11,代码来源:models.py


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