Sat, 05 Dec 2015 12:23:39 +0100
Modified the last dialogs to use the path picker widgets.
--- a/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.py Thu Dec 03 19:11:22 2015 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.py Sat Dec 05 12:23:39 2015 +0100 @@ -15,14 +15,12 @@ from PyQt5.QtCore import QDir, pyqtSlot from PyQt5.QtWidgets import QDialog, QDialogButtonBox -from E5Gui.E5Completers import E5DirCompleter -from E5Gui import E5FileDialog +from E5Gui.E5PathPicker import E5PathPickerModes from .Ui_SvnOptionsDialog import Ui_SvnOptionsDialog from .Config import ConfigSvnProtocols import Utilities -import UI.PixmapCache class SvnOptionsDialog(QDialog, Ui_SvnOptionsDialog): @@ -41,9 +39,7 @@ super(SvnOptionsDialog, self).__init__(parent) self.setupUi(self) - self.vcsUrlButton.setIcon(UI.PixmapCache.getIcon("open.png")) - - self.vcsDirectoryCompleter = E5DirCompleter(self.vcsUrlEdit) + self.vcsUrlPicker.setMode(E5PathPickerModes.DirectoryMode) self.project = project @@ -51,7 +47,7 @@ hd = Utilities.toNativeSeparators(QDir.homePath()) hd = os.path.join(hd, 'subversionroot') - self.vcsUrlEdit.setText(hd) + self.vcsUrlPicker.setText(hd) self.vcs = vcs @@ -63,33 +59,22 @@ self.resize(max(self.width(), msh.width()), msh.height()) @pyqtSlot() - def on_vcsUrlButton_clicked(self): + def on_vcsUrlPicker_pickerButtonClicked(self): """ - Private slot to display a selection dialog. + Private slot to display a repository browser dialog. """ - if self.protocolCombo.currentText() == "file://": - directory = E5FileDialog.getExistingDirectory( - self, - self.tr("Select Repository-Directory"), - self.vcsUrlEdit.text(), - E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) - - if directory: - self.vcsUrlEdit.setText( - Utilities.toNativeSeparators(directory)) - else: - from .SvnRepoBrowserDialog import SvnRepoBrowserDialog - 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 url: - protocol = url.split("://")[0] - path = url.split("://")[1] - self.protocolCombo.setCurrentIndex( - self.protocolCombo.findText(protocol + "://")) - self.vcsUrlEdit.setText(path) + from .SvnRepoBrowserDialog import SvnRepoBrowserDialog + dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) + dlg.start( + self.protocolCombo.currentText() + self.vcsUrlPicker.text()) + if dlg.exec_() == QDialog.Accepted: + url = dlg.getSelectedUrl() + if url: + protocol = url.split("://")[0] + path = url.split("://")[1] + self.protocolCombo.setCurrentIndex( + self.protocolCombo.findText(protocol + "://")) + self.vcsUrlPicker.setText(path) @pyqtSlot(str) def on_protocolCombo_activated(self, protocol): @@ -99,19 +84,19 @@ @param protocol selected protocol (string) """ if protocol == "file://": - self.networkPath = self.vcsUrlEdit.text() - self.vcsUrlEdit.setText(self.localPath) + self.networkPath = self.vcsUrlPicker.text() + self.vcsUrlPicker.setText(self.localPath) self.vcsUrlLabel.setText(self.tr("Pat&h:")) self.localProtocol = True else: if self.localProtocol: - self.localPath = self.vcsUrlEdit.text() - self.vcsUrlEdit.setText(self.networkPath) + self.localPath = self.vcsUrlPicker.text() + self.vcsUrlPicker.setText(self.networkPath) self.vcsUrlLabel.setText(self.tr("&URL:")) self.localProtocol = False @pyqtSlot(str) - def on_vcsUrlEdit_textChanged(self, txt): + def on_vcsUrlPicker_textChanged(self, txt): """ Private slot to handle changes of the URL. @@ -127,7 +112,7 @@ @return a dictionary containing the data entered """ scheme = self.protocolCombo.currentText() - url = self.vcsUrlEdit.text() + url = self.vcsUrlPicker.text() vcsdatadict = { "url": '{0}{1}'.format(scheme, url), "message": self.vcsLogEdit.text(),
--- a/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.ui Thu Dec 03 19:11:22 2015 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.ui Sat Dec 05 12:23:39 2015 +0100 @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>565</width> - <height>169</height> + <height>149</height> </rect> </property> <property name="windowTitle"> @@ -21,96 +21,94 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QVBoxLayout"> - <item> - <layout class="QGridLayout"> - <item row="2" column="0"> - <widget class="QLabel" name="TextLabel5"> - <property name="text"> - <string>Log &Message:</string> - </property> - <property name="buddy"> - <cstring>vcsLogEdit</cstring> - </property> - </widget> - </item> - <item row="3" column="0" colspan="2"> - <widget class="QCheckBox" name="layoutCheckBox"> - <property name="toolTip"> - <string>Select, if the standard repository layout (projectdir/trunk, projectdir/tags, projectdir/branches) should be generated</string> - </property> - <property name="text"> - <string>Create standard repository &layout</string> - </property> - <property name="shortcut"> - <string>Alt+L</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QComboBox" name="protocolCombo"> - <property name="toolTip"> - <string>Select the protocol to access the repository</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="vcsUrlLabel"> - <property name="text"> - <string>&URL:</string> - </property> - <property name="buddy"> - <cstring>vcsUrlEdit</cstring> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="vcsLogEdit"> - <property name="toolTip"> - <string>Enter the log message for the new project.</string> - </property> - <property name="whatsThis"> - <string><b>Log Message</b> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="textLabel1"> + <property name="text"> + <string>&Protocol:</string> + </property> + <property name="buddy"> + <cstring>protocolCombo</cstring> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="protocolCombo"> + <property name="toolTip"> + <string>Select the protocol to access the repository</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="vcsUrlLabel"> + <property name="text"> + <string>&URL:</string> + </property> + <property name="buddy"> + <cstring>vcsUrlPicker</cstring> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="E5PathPicker" name="vcsUrlPicker" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="toolTip"> + <string>Enter the url path of the module in the repository (without protocol part)</string> + </property> + <property name="whatsThis"> + <string><b>URL</b><p>Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.</p></string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="TextLabel5"> + <property name="text"> + <string>Log &Message:</string> + </property> + <property name="buddy"> + <cstring>vcsLogEdit</cstring> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="vcsLogEdit"> + <property name="toolTip"> + <string>Enter the log message for the new project.</string> + </property> + <property name="whatsThis"> + <string><b>Log Message</b> <p>Enter the log message to be used for the new project.</p></string> - </property> - <property name="text"> - <string>new project started</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="textLabel1"> - <property name="text"> - <string>&Protocol:</string> - </property> - <property name="buddy"> - <cstring>protocolCombo</cstring> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="vcsUrlEdit"> - <property name="toolTip"> - <string>Enter the url path of the module in the repository (without protocol part)</string> - </property> - <property name="whatsThis"> - <string><b>URL</b><p>Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.</p></string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QToolButton" name="vcsUrlButton"> - <property name="toolTip"> - <string>Select the repository url via a directory selection dialog or the repository browser</string> - </property> - </widget> - </item> - </layout> + </property> + <property name="text"> + <string>new project started</string> + </property> + </widget> </item> - <item> + <item row="3" column="0" colspan="2"> + <widget class="QCheckBox" name="layoutCheckBox"> + <property name="toolTip"> + <string>Select, if the standard repository layout (projectdir/trunk, projectdir/tags, projectdir/branches) should be generated</string> + </property> + <property name="text"> + <string>Create standard repository &layout</string> + </property> + <property name="shortcut"> + <string>Alt+L</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="4" column="0" colspan="2"> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -124,10 +122,17 @@ </widget> <layoutdefault spacing="6" margin="6"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> + <customwidgets> + <customwidget> + <class>E5PathPicker</class> + <extends>QWidget</extends> + <header>E5Gui/E5PathPicker.h</header> + <container>1</container> + </customwidget> + </customwidgets> <tabstops> <tabstop>protocolCombo</tabstop> - <tabstop>vcsUrlEdit</tabstop> - <tabstop>vcsUrlButton</tabstop> + <tabstop>vcsUrlPicker</tabstop> <tabstop>vcsLogEdit</tabstop> <tabstop>layoutCheckBox</tabstop> </tabstops>
--- a/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py Thu Dec 03 19:11:22 2015 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py Sat Dec 05 12:23:39 2015 +0100 @@ -15,14 +15,12 @@ from PyQt5.QtCore import QDir, pyqtSlot from PyQt5.QtWidgets import QDialog, QDialogButtonBox -from E5Gui.E5Completers import E5DirCompleter -from E5Gui import E5FileDialog +from E5Gui.E5PathPicker import E5PathPickerModes from .Ui_SvnOptionsDialog import Ui_SvnOptionsDialog from .Config import ConfigSvnProtocols import Utilities -import UI.PixmapCache class SvnOptionsDialog(QDialog, Ui_SvnOptionsDialog): @@ -41,9 +39,7 @@ super(SvnOptionsDialog, self).__init__(parent) self.setupUi(self) - self.vcsUrlButton.setIcon(UI.PixmapCache.getIcon("open.png")) - - self.vcsDirectoryCompleter = E5DirCompleter(self.vcsUrlEdit) + self.vcsUrlPicker.setMode(E5PathPickerModes.DirectoryMode) self.project = project @@ -51,7 +47,7 @@ hd = Utilities.toNativeSeparators(QDir.homePath()) hd = os.path.join(hd, 'subversionroot') - self.vcsUrlEdit.setText(hd) + self.vcsUrlPicker.setText(hd) self.vcs = vcs @@ -63,33 +59,22 @@ self.resize(max(self.width(), msh.width()), msh.height()) @pyqtSlot() - def on_vcsUrlButton_clicked(self): + def on_vcsUrlPicker_pickerButtonClicked(self): """ - Private slot to display a selection dialog. + Private slot to display a repository browser dialog. """ - if self.protocolCombo.currentText() == "file://": - directory = E5FileDialog.getExistingDirectory( - self, - self.tr("Select Repository-Directory"), - self.vcsUrlEdit.text(), - E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) - - if directory: - self.vcsUrlEdit.setText( - Utilities.toNativeSeparators(directory)) - else: - from .SvnRepoBrowserDialog import SvnRepoBrowserDialog - 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 url: - protocol = url.split("://")[0] - path = url.split("://")[1] - self.protocolCombo.setCurrentIndex( - self.protocolCombo.findText(protocol + "://")) - self.vcsUrlEdit.setText(path) + from .SvnRepoBrowserDialog import SvnRepoBrowserDialog + dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) + dlg.start( + self.protocolCombo.currentText() + self.vcsUrlPicker.text()) + if dlg.exec_() == QDialog.Accepted: + url = dlg.getSelectedUrl() + if url: + protocol = url.split("://")[0] + path = url.split("://")[1] + self.protocolCombo.setCurrentIndex( + self.protocolCombo.findText(protocol + "://")) + self.vcsUrlPicker.setText(path) @pyqtSlot(str) def on_protocolCombo_activated(self, protocol): @@ -99,19 +84,19 @@ @param protocol selected protocol (string) """ if protocol == "file://": - self.networkPath = self.vcsUrlEdit.text() - self.vcsUrlEdit.setText(self.localPath) + self.networkPath = self.vcsUrlPicker.text() + self.vcsUrlPicker.setText(self.localPath) self.vcsUrlLabel.setText(self.tr("Pat&h:")) self.localProtocol = True else: if self.localProtocol: - self.localPath = self.vcsUrlEdit.text() - self.vcsUrlEdit.setText(self.networkPath) + self.localPath = self.vcsUrlPicker.text() + self.vcsUrlPicker.setText(self.networkPath) self.vcsUrlLabel.setText(self.tr("&URL:")) self.localProtocol = False @pyqtSlot(str) - def on_vcsUrlEdit_textChanged(self, txt): + def on_vcsUrlPicker_textChanged(self, txt): """ Private slot to handle changes of the URL. @@ -127,7 +112,7 @@ @return a dictionary containing the data entered """ scheme = self.protocolCombo.currentText() - url = self.vcsUrlEdit.text() + url = self.vcsUrlPicker.text() vcsdatadict = { "url": '{0}{1}'.format(scheme, url), "message": self.vcsLogEdit.text(),
--- a/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.ui Thu Dec 03 19:11:22 2015 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.ui Sat Dec 05 12:23:39 2015 +0100 @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>565</width> - <height>169</height> + <height>149</height> </rect> </property> <property name="windowTitle"> @@ -21,96 +21,94 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QVBoxLayout"> - <item> - <layout class="QGridLayout"> - <item row="2" column="0"> - <widget class="QLabel" name="TextLabel5"> - <property name="text"> - <string>Log &Message:</string> - </property> - <property name="buddy"> - <cstring>vcsLogEdit</cstring> - </property> - </widget> - </item> - <item row="3" column="0" colspan="2"> - <widget class="QCheckBox" name="layoutCheckBox"> - <property name="toolTip"> - <string>Select, if the standard repository layout (projectdir/trunk, projectdir/tags, projectdir/branches) should be generated</string> - </property> - <property name="text"> - <string>Create standard repository &layout</string> - </property> - <property name="shortcut"> - <string>Alt+L</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QComboBox" name="protocolCombo"> - <property name="toolTip"> - <string>Select the protocol to access the repository</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="vcsUrlLabel"> - <property name="text"> - <string>&URL:</string> - </property> - <property name="buddy"> - <cstring>vcsUrlEdit</cstring> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="vcsLogEdit"> - <property name="toolTip"> - <string>Enter the log message for the new project.</string> - </property> - <property name="whatsThis"> - <string><b>Log Message</b> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="textLabel1"> + <property name="text"> + <string>&Protocol:</string> + </property> + <property name="buddy"> + <cstring>protocolCombo</cstring> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="protocolCombo"> + <property name="toolTip"> + <string>Select the protocol to access the repository</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="vcsUrlLabel"> + <property name="text"> + <string>&URL:</string> + </property> + <property name="buddy"> + <cstring>vcsUrlPicker</cstring> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="E5PathPicker" name="vcsUrlPicker" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="toolTip"> + <string>Enter the url path of the module in the repository (without protocol part)</string> + </property> + <property name="whatsThis"> + <string><b>URL</b><p>Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.</p></string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="TextLabel5"> + <property name="text"> + <string>Log &Message:</string> + </property> + <property name="buddy"> + <cstring>vcsLogEdit</cstring> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="vcsLogEdit"> + <property name="toolTip"> + <string>Enter the log message for the new project.</string> + </property> + <property name="whatsThis"> + <string><b>Log Message</b> <p>Enter the log message to be used for the new project.</p></string> - </property> - <property name="text"> - <string>new project started</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="textLabel1"> - <property name="text"> - <string>&Protocol:</string> - </property> - <property name="buddy"> - <cstring>protocolCombo</cstring> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="vcsUrlEdit"> - <property name="toolTip"> - <string>Enter the url path of the module in the repository (without protocol part)</string> - </property> - <property name="whatsThis"> - <string><b>URL</b><p>Enter the URL to the module. For a repository with standard layout, this must not contain the trunk, tags or branches part.</p></string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QToolButton" name="vcsUrlButton"> - <property name="toolTip"> - <string>Select the repository url via a directory selection dialog or the repository browser</string> - </property> - </widget> - </item> - </layout> + </property> + <property name="text"> + <string>new project started</string> + </property> + </widget> </item> - <item> + <item row="3" column="0" colspan="2"> + <widget class="QCheckBox" name="layoutCheckBox"> + <property name="toolTip"> + <string>Select, if the standard repository layout (projectdir/trunk, projectdir/tags, projectdir/branches) should be generated</string> + </property> + <property name="text"> + <string>Create standard repository &layout</string> + </property> + <property name="shortcut"> + <string>Alt+L</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="4" column="0" colspan="2"> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -124,10 +122,17 @@ </widget> <layoutdefault spacing="6" margin="6"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> + <customwidgets> + <customwidget> + <class>E5PathPicker</class> + <extends>QWidget</extends> + <header>E5Gui/E5PathPicker.h</header> + <container>1</container> + </customwidget> + </customwidgets> <tabstops> <tabstop>protocolCombo</tabstop> - <tabstop>vcsUrlEdit</tabstop> - <tabstop>vcsUrlButton</tabstop> + <tabstop>vcsUrlPicker</tabstop> <tabstop>vcsLogEdit</tabstop> <tabstop>layoutCheckBox</tabstop> </tabstops>
--- a/Plugins/VcsPlugins/vcsSubversion/SvnPropSetDialog.py Thu Dec 03 19:11:22 2015 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnPropSetDialog.py Sat Dec 05 12:23:39 2015 +0100 @@ -9,17 +9,12 @@ from __future__ import unicode_literals -from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QDialog -from E5Gui.E5Completers import E5FileCompleter -from E5Gui import E5FileDialog +from E5Gui.E5PathPicker import E5PathPickerModes from .Ui_SvnPropSetDialog import Ui_SvnPropSetDialog -import Utilities -import UI.PixmapCache - class SvnPropSetDialog(QDialog, Ui_SvnPropSetDialog): """ @@ -34,23 +29,7 @@ super(SvnPropSetDialog, self).__init__(parent) self.setupUi(self) - self.fileButton.setIcon(UI.PixmapCache.getIcon("open.png")) - - self.propFileCompleter = E5FileCompleter(self.propFileEdit) - - @pyqtSlot() - def on_fileButton_clicked(self): - """ - Private slot called by pressing the file selection button. - """ - fn = E5FileDialog.getOpenFileName( - self, - self.tr("Select file for property"), - self.propFileEdit.text(), - "") - - if fn: - self.propFileEdit.setText(Utilities.toNativeSeparators(fn)) + self.propFilePicker.setMode(E5PathPickerModes.OpenFileMode) def getData(self): """ @@ -61,7 +40,7 @@ or the selected filename. (string, boolean, string) """ if self.fileRadioButton.isChecked(): - return (self.propNameEdit.text(), True, self.propFileEdit.text()) + return (self.propNameEdit.text(), True, self.propFilePicker.text()) else: return (self.propNameEdit.text(), False, self.propTextEdit.toPlainText())
--- a/Plugins/VcsPlugins/vcsSubversion/SvnPropSetDialog.ui Thu Dec 03 19:11:22 2015 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnPropSetDialog.ui Sat Dec 05 12:23:39 2015 +0100 @@ -16,7 +16,7 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QVBoxLayout"> + <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <layout class="QHBoxLayout"> <item> @@ -40,18 +40,8 @@ <property name="title"> <string>Select property source</string> </property> - <layout class="QGridLayout"> - <item row="2" column="0" colspan="2"> - <widget class="QRadioButton" name="fileRadioButton"> - <property name="focusPolicy"> - <enum>Qt::NoFocus</enum> - </property> - <property name="text"> - <string>File</string> - </property> - </widget> - </item> - <item row="0" column="0" colspan="2"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> <widget class="QRadioButton" name="textRadioButton"> <property name="text"> <string>Text</string> @@ -61,7 +51,7 @@ </property> </widget> </item> - <item row="1" column="0" colspan="2"> + <item> <widget class="QTextEdit" name="propTextEdit"> <property name="toolTip"> <string>Enter text of the property</string> @@ -74,26 +64,35 @@ </property> </widget> </item> - <item row="3" column="0"> - <widget class="QLineEdit" name="propFileEdit"> + <item> + <widget class="QRadioButton" name="fileRadioButton"> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>File</string> + </property> + </widget> + </item> + <item> + <widget class="E5PathPicker" name="propFilePicker" native="true"> <property name="enabled"> <bool>false</bool> </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> <property name="toolTip"> <string>Enter the name of a file for the property</string> </property> </widget> </item> - <item row="3" column="1"> - <widget class="QToolButton" name="fileButton"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Press to select the file via a file selection dialog</string> - </property> - </widget> - </item> </layout> </widget> </item> @@ -111,12 +110,19 @@ </widget> <layoutdefault spacing="6" margin="6"/> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> + <customwidgets> + <customwidget> + <class>E5PathPicker</class> + <extends>QWidget</extends> + <header>E5Gui/E5PathPicker.h</header> + <container>1</container> + </customwidget> + </customwidgets> <tabstops> <tabstop>propNameEdit</tabstop> <tabstop>textRadioButton</tabstop> <tabstop>propTextEdit</tabstop> - <tabstop>propFileEdit</tabstop> - <tabstop>fileButton</tabstop> + <tabstop>propFilePicker</tabstop> </tabstops> <resources/> <connections> @@ -137,22 +143,6 @@ </hints> </connection> <connection> - <sender>fileRadioButton</sender> - <signal>toggled(bool)</signal> - <receiver>propFileEdit</receiver> - <slot>setEnabled(bool)</slot> - <hints> - <hint type="sourcelabel"> - <x>35</x> - <y>287</y> - </hint> - <hint type="destinationlabel"> - <x>49</x> - <y>319</y> - </hint> - </hints> - </connection> - <connection> <sender>buttonBox</sender> <signal>accepted()</signal> <receiver>SvnPropSetDialog</receiver> @@ -175,8 +165,8 @@ <slot>reject()</slot> <hints> <hint type="sourcelabel"> - <x>196</x> - <y>367</y> + <x>175</x> + <y>374</y> </hint> <hint type="destinationlabel"> <x>199</x> @@ -184,5 +174,21 @@ </hint> </hints> </connection> + <connection> + <sender>fileRadioButton</sender> + <signal>toggled(bool)</signal> + <receiver>propFilePicker</receiver> + <slot>setEnabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>35</x> + <y>291</y> + </hint> + <hint type="destinationlabel"> + <x>283</x> + <y>321</y> + </hint> + </hints> + </connection> </connections> </ui>