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


Python KQFileDialog.getExistingDirectory方法代码示例

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


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

示例1: on_exceptDirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_exceptDirButton_clicked(self):
     """
     Private slot to select a file to exempt from translation.
     """
     texcept = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Exempt directory from translation"),
         self.project.ppath,
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
     if not texcept.isEmpty():
         self.exceptionEdit.setText(Utilities.toNativeSeparators(texcept))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:13,代码来源:TranslationPropertiesDialog.py

示例2: on_pathButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_pathButton_clicked(self):
     """
     Private slot called to open a directory selection dialog.
     """
     path = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select source directory"),
         QDir.fromNativeSeparators(self.pathnameEdit.text()),
         QFileDialog.Options(QFileDialog.Option(0)))
     if not path.isEmpty():
         self.pathnameEdit.setText(QDir.toNativeSeparators(path))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:13,代码来源:NewDialogClassDialog.py

示例3: on_transBinPathButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_transBinPathButton_clicked(self):
     """
     Private slot to display a directory selection dialog.
     """
     directory = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select directory for binary translations"),
         self.transBinPathEdit.text(),
         QFileDialog.Options(QFileDialog.Option(0)))
     
     if not directory.isEmpty():
         self.transBinPathEdit.setText(Utilities.toNativeSeparators(directory))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:14,代码来源:TranslationPropertiesDialog.py

示例4: on_projectDirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_projectDirButton_clicked(self):
     """
     Private slot to display a directory selection dialog.
     """
     directory = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select Project Directory"),
         self.vcsProjectDirEdit.text(),
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
     
     if not directory.isEmpty():
         self.vcsProjectDirEdit.setText(Utilities.toNativeSeparators(directory))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:14,代码来源:SvnNewProjectOptionsDialog.py

示例5: on_qt4TransButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_qt4TransButton_clicked(self):
     """
     Private slot to handle the Qt4 translations directory selection.
     """
     dir = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select Qt4 Translations Directory"),
         self.qt4TransEdit.text(),
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
         
     if not dir.isNull():
         self.qt4TransEdit.setText(Utilities.toNativeSeparators(dir))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:14,代码来源:QtPage.py

示例6: on_iconDirectoryButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_iconDirectoryButton_clicked(self):
     """
     Private slot to select an icon directory.
     """
     dir = KQFileDialog.getExistingDirectory(\
         None,
         self.trUtf8("Select icon directory"),
         QString(),
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
         
     if not dir.isEmpty():
         self.iconDirectoryEdit.setText(Utilities.toNativeSeparators(dir))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:14,代码来源:IconsPage.py

示例7: on_dirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_dirButton_clicked(self):
     """
     Private method used to open a directory selection dialog.
     """
     cwd = self.ui.workdirCombo.currentText()
     d = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Working directory"),
         cwd,
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
         
     if not d.isNull() and not d.isEmpty():
         self.ui.workdirCombo.setEditText(Utilities.toNativeSeparators(d))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:15,代码来源:StartDialog.py

示例8: on_workspaceButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_workspaceButton_clicked(self):
     """
     Private slot to display a directory selection dialog.
     """
     default = self.workspaceEdit.text()
     if default.isEmpty():
         default = Utilities.getHomeDir()
     directory = KQFileDialog.getExistingDirectory(
         self,
         self.trUtf8("Select Workspace Directory"),
         default,
         QFileDialog.Options(0))
     
     if not directory.isEmpty():
         self.workspaceEdit.setText(Utilities.toNativeSeparators(directory))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:17,代码来源:MultiProjectPage.py

示例9: on_downloadDirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_downloadDirButton_clicked(self):
     """
     Private slot to handle the directory selection via dialog.
     """
     directory = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select download directory"),
         self.downloadDirEdit.text(),
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
         
     if not directory.isNull():
         dn = unicode(Utilities.toNativeSeparators(directory))
         while dn.endswith(os.sep):
             dn = dn[:-1]
         self.downloadDirEdit.setText(dn)
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:17,代码来源:NetworkPage.py

示例10: on_targetDirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_targetDirButton_clicked(self):
     """
     Private slot to display a directory selection dialog.
     """
     startdir = self.targetDirEdit.text()
     if startdir.isEmpty() and self.startdir is not None:
         startdir = self.startdir
     directory = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select target directory"),
         startdir,
         QFileDialog.Options(QFileDialog.Option(0)))
         
     if not directory.isNull():
         self.targetDirEdit.setText(Utilities.toNativeSeparators(directory))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:17,代码来源:AddFileDialog.py

示例11: __dirDialog

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def __dirDialog(self, textEdit):
     """
     Private slot to display a directory selection dialog.
     
     @param textEdit field for the display of the selected directory name
             (QLineEdit)
     """
     startdir = textEdit.text()
     if startdir.isEmpty() and self.startdir is not None:
         startdir = self.startdir
     
     directory = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select directory"),
         startdir,
         QFileDialog.Options(QFileDialog.Option(0)))
     
     if not directory.isEmpty():
         textEdit.setText(Utilities.toNativeSeparators(directory))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:21,代码来源:AddDirectoryDialog.py

示例12: on_qtHelpDirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_qtHelpDirButton_clicked(self):
     """
     Private slot to select the output directory for the QtHelp files.
     
     It displays a directory selection dialog to
     select the directory the QtHelp files are written to.
     """
     directory = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select output directory for QtHelp files"),
         self.qtHelpDirEdit.text(),
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
         
     if not directory.isNull():
         # make it relative, if it is a subdirectory of the project path 
         dn = unicode(Utilities.toNativeSeparators(directory))
         dn = self.project.getRelativePath(dn)
         while dn.endswith(os.sep):
             dn = dn[:-1]
         self.qtHelpDirEdit.setText(dn)
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:22,代码来源:EricdocConfigDialog.py

示例13: on_dirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_dirButton_clicked(self):
     """
     Private slot to handle the button press for selecting the target via a 
     selection dialog.
     """
     if os.path.isdir(self.source):
         target = KQFileDialog.getExistingDirectory(\
             None,
             self.trUtf8("Select target"),
             self.targetEdit.text(),
             QFileDialog.Options(QFileDialog.ShowDirsOnly))
     else:
         target = KQFileDialog.getSaveFileName(\
             None,
             self.trUtf8("Select target"),
             self.targetEdit.text(),
             QString(),
             None,
             QFileDialog.Options(QFileDialog.DontConfirmOverwrite))
     
     if not target.isEmpty():
         self.targetEdit.setText(Utilities.toNativeSeparators(target))
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:24,代码来源:SvnCopyDialog.py

示例14: on_ignoreDirButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_ignoreDirButton_clicked(self):
     """
     Private slot to select a directory to be ignored.
     
     It displays a directory selection dialog to
     select a directory to be ignored.
     """
     startDir = self.ignoreDirEdit.text()
     if startDir.isEmpty():
         startDir = self.ppath
     directory = KQFileDialog.getExistingDirectory(\
         self,
         self.trUtf8("Select directory to exclude"),
         startDir,
         QFileDialog.Options(QFileDialog.ShowDirsOnly))
         
     if not directory.isNull():
         # make it relative, if it is a subdirectory of the project path 
         dn = unicode(Utilities.toNativeSeparators(directory))
         dn = self.project.getRelativePath(dn)
         while dn.endswith(os.sep):
             dn = dn[:-1]
         self.ignoreDirEdit.setText(dn)
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:25,代码来源:EricapiConfigDialog.py

示例15: on_vcsUrlButton_clicked

# 需要导入模块: from KdeQt import KQFileDialog [as 别名]
# 或者: from KdeQt.KQFileDialog import getExistingDirectory [as 别名]
 def on_vcsUrlButton_clicked(self):
     """
     Private slot to display a selection dialog.
     """
     if self.protocolCombo.currentText() == "file://":
         directory = KQFileDialog.getExistingDirectory(\
             self,
             self.trUtf8("Select Repository-Directory"),
             self.vcsUrlEdit.text(),
             QFileDialog.Options(QFileDialog.ShowDirsOnly))
         
         if not directory.isEmpty():
             self.vcsUrlEdit.setText(Utilities.toNativeSeparators(directory))
     else:
         dlg = SvnRepoBrowserDialog(self.vcs, mode = "select", parent = self)
         dlg.start(self.protocolCombo.currentText() + self.vcsUrlEdit.text())
         if dlg.exec_() == QDialog.Accepted:
             url = dlg.getSelectedUrl()
             if not url.isEmpty():
                 protocol = url.section("://", 0, 0)
                 path = url.section("://", 1, 1)
                 self.protocolCombo.setCurrentIndex(\
                     self.protocolCombo.findText(protocol + "://"))
                 self.vcsUrlEdit.setText(path)
开发者ID:usc-bbdl,项目名称:R01_HSC_cadaver_system,代码行数:26,代码来源:SvnNewProjectOptionsDialog.py


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