mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-06 16:44:06 +00:00
QDialogButtonBox in the single tag editor.
This commit is contained in:
@@ -80,6 +80,12 @@ class EditTagDialog(QtGui.QDialog):
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.ui = Ui_EditTagDialog()
|
||||
self.ui.setupUi(self)
|
||||
button = QtGui.QPushButton(self.style().standardIcon(QtGui.QStyle.SP_DialogOkButton), _('&Ok'))
|
||||
self.ui.buttonbox.addButton(button, QtGui.QDialogButtonBox.AcceptRole)
|
||||
button = QtGui.QPushButton(self.style().standardIcon(QtGui.QStyle.SP_DialogCancelButton), _('&Cancel'))
|
||||
self.ui.buttonbox.addButton(button, QtGui.QDialogButtonBox.RejectRole)
|
||||
self.connect(self.ui.buttonbox, QtCore.SIGNAL('accepted()'), self, QtCore.SLOT('accept()'))
|
||||
self.connect(self.ui.buttonbox, QtCore.SIGNAL('rejected()'), self, QtCore.SLOT('reject()'))
|
||||
self.connect(self.ui.name, QtCore.SIGNAL('currentIndexChanged(int)'), self.on_name_changed)
|
||||
items = []
|
||||
for itemname, label in _tag_names.iteritems():
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/edittagdialog.ui'
|
||||
#
|
||||
# Created: Sat Dec 23 13:51:18 2006
|
||||
# Created: Sun Dec 31 11:09:05 2006
|
||||
# by: PyQt4 UI code generator 4.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@@ -40,31 +40,14 @@ class Ui_EditTagDialog(object):
|
||||
self.value.setObjectName("value")
|
||||
self.vboxlayout.addWidget(self.value)
|
||||
|
||||
self.hboxlayout1 = QtGui.QHBoxLayout()
|
||||
self.hboxlayout1.setMargin(0)
|
||||
self.hboxlayout1.setSpacing(6)
|
||||
self.hboxlayout1.setObjectName("hboxlayout1")
|
||||
|
||||
spacerItem = QtGui.QSpacerItem(131,31,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum)
|
||||
self.hboxlayout1.addItem(spacerItem)
|
||||
|
||||
self.okButton = QtGui.QPushButton(EditTagDialog)
|
||||
self.okButton.setDefault(True)
|
||||
self.okButton.setObjectName("okButton")
|
||||
self.hboxlayout1.addWidget(self.okButton)
|
||||
|
||||
self.cancelButton = QtGui.QPushButton(EditTagDialog)
|
||||
self.cancelButton.setObjectName("cancelButton")
|
||||
self.hboxlayout1.addWidget(self.cancelButton)
|
||||
self.vboxlayout.addLayout(self.hboxlayout1)
|
||||
self.buttonbox = QtGui.QDialogButtonBox(EditTagDialog)
|
||||
self.buttonbox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.buttonbox.setObjectName("buttonbox")
|
||||
self.vboxlayout.addWidget(self.buttonbox)
|
||||
|
||||
self.retranslateUi(EditTagDialog)
|
||||
QtCore.QObject.connect(self.okButton,QtCore.SIGNAL("clicked()"),EditTagDialog.accept)
|
||||
QtCore.QObject.connect(self.cancelButton,QtCore.SIGNAL("clicked()"),EditTagDialog.reject)
|
||||
QtCore.QMetaObject.connectSlotsByName(EditTagDialog)
|
||||
|
||||
def retranslateUi(self, EditTagDialog):
|
||||
EditTagDialog.setWindowTitle(_(u"Edit Tag"))
|
||||
self.okButton.setText(_(u"OK"))
|
||||
self.cancelButton.setText(_(u"Cancel"))
|
||||
|
||||
|
||||
@@ -46,80 +46,14 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
<widget class="QDialogButtonBox" name="buttonbox" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton" >
|
||||
<property name="text" >
|
||||
<string>OK</string>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton" >
|
||||
<property name="text" >
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>EditTagDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>196</x>
|
||||
<y>200</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>108</x>
|
||||
<y>189</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>EditTagDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>275</x>
|
||||
<y>199</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>275</x>
|
||||
<y>217</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user