Permalink
Browse files

Refactoring: ItemsDialog: some renamings in *.ui

  • Loading branch information...
1 parent e9e0fc7 commit e4c1ddb921a2f8d3d46c7a9c1dfaf3e7b7c931a9 @vlkv committed Mar 31, 2012
Showing with 175 additions and 174 deletions.
  1. +8 −8 src/items_dialog.py
  2. +51 −50 ui/itemsdialog.ui
  3. +116 −116 ui/ui_itemsdialog.py
View
@@ -54,9 +54,9 @@ def __init__(self, parent=None, items=[], mode=EDIT_MODE, same_dst_path=True, co
self.dst_path = None
self.group_has_files = False
- #If this field is true, all items will be moved into selected destination path
+ #If this field is true, all items will be moved into one selected destination path
self.same_dst_path = same_dst_path
-
+
self.completer = completer
if len(items) <= 1:
@@ -66,7 +66,7 @@ def __init__(self, parent=None, items=[], mode=EDIT_MODE, same_dst_path=True, co
self.connect(self.ui.buttonBox, QtCore.SIGNAL("accepted()"), self.button_ok)
self.connect(self.ui.buttonBox, QtCore.SIGNAL("rejected()"), self.button_cancel)
- self.connect(self.ui.pushButton_select_dst_path, QtCore.SIGNAL("clicked()"), self.select_dst_path)
+ self.connect(self.ui.buttonSelectLocationDirRelPath, QtCore.SIGNAL("clicked()"), self.selectLocationDirRelPath)
self.ui.textEdit_tags = CustomTextEdit()
@@ -282,23 +282,23 @@ def read(self):
#Все элементы не содержат ссылок на файлы (Либо нет DataRef объектов, либо они есть но не типа FILE)
self.dst_path = None
self.group_has_files = False
- self.ui.lineEdit_dst_path.setText(self.tr('<not applicable>'))
+ self.ui.locationDirRelPath.setText(self.tr('<not applicable>'))
elif same_path == 'yes':
#Все элементы, связанные с DataRef-ами типа FILE, находятся в ОДНОЙ директории
self.group_has_files = True
- self.ui.lineEdit_dst_path.setText(self.dst_path)
+ self.ui.locationDirRelPath.setText(self.dst_path)
else:
#Элементы, связанные с DataRef-ами типа FILE, находятся в РАЗНЫХ директориях
self.dst_path = None #Обнуляем это поле
self.group_has_files = True
- self.ui.lineEdit_dst_path.setText(self.tr('<different values>'))
+ self.ui.locationDirRelPath.setText(self.tr('<different values>'))
elif self.mode == ItemsDialog.CREATE_MODE:
pass
- def select_dst_path(self):
+ def selectLocationDirRelPath(self):
try:
if self.mode == ItemsDialog.EDIT_MODE and not self.group_has_files:
raise MsgException(self.tr("Selected group of items doesn't reference any physical files on filesysem."))
@@ -312,7 +312,7 @@ def select_dst_path(self):
raise MsgException(self.tr("Chosen directory is out of active repository."))
else:
self.dst_path = os.path.relpath(dir, self.parent.active_repo.base_path)
- self.ui.lineEdit_dst_path.setText(self.dst_path)
+ self.ui.locationDirRelPath.setText(self.dst_path)
except Exception as ex:
helpers.show_exc_info(self, ex)
View
@@ -1,40 +1,41 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>ItemsDialog</class>
- <widget class="QDialog" name="ItemsDialog" >
- <property name="geometry" >
+ <widget class="QDialog" name="ItemsDialog">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>521</width>
<height>411</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>ItemsDialog</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_4" >
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>Number of items: </string>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_num_of_items" >
- <property name="text" >
+ <widget class="QLabel" name="label_num_of_items">
+ <property name="text">
<string>0</string>
</property>
</widget>
</item>
<item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -45,51 +46,51 @@
</layout>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_5" >
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
- <widget class="QLabel" name="label_8" >
- <property name="text" >
- <string>Destination path:</string>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Location in repository:</string>
</property>
</widget>
</item>
<item>
- <widget class="QLineEdit" name="lineEdit_dst_path" >
- <property name="toolTip" >
+ <widget class="QLineEdit" name="locationDirRelPath">
+ <property name="toolTip">
<string>Path where to put the files in the repository.</string>
</property>
- <property name="readOnly" >
+ <property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_select_dst_path" >
- <property name="text" >
+ <widget class="QPushButton" name="buttonSelectLocationDirRelPath">
+ <property name="text">
<string>Select</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <layout class="QVBoxLayout" name="verticalLayout_fields" >
+ <layout class="QVBoxLayout" name="verticalLayout_fields">
<item>
- <widget class="QLabel" name="label_fields" >
- <property name="text" >
+ <widget class="QLabel" name="label_fields">
+ <property name="text">
<string>Fields:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_tags" >
+ <layout class="QVBoxLayout" name="verticalLayout_tags">
<item>
- <widget class="QLabel" name="label_tags" >
- <property name="text" >
+ <widget class="QLabel" name="label_tags">
+ <property name="text">
<string>Tags:</string>
</property>
</widget>
@@ -99,23 +100,23 @@
</layout>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <layout class="QVBoxLayout" name="verticalLayout_fields_add" >
+ <layout class="QVBoxLayout" name="verticalLayout_fields_add">
<item>
- <widget class="QLabel" name="label_9" >
- <property name="text" >
+ <widget class="QLabel" name="label_9">
+ <property name="text">
<string>Fields to add:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_tags_add" >
+ <layout class="QVBoxLayout" name="verticalLayout_tags_add">
<item>
- <widget class="QLabel" name="label_10" >
- <property name="text" >
+ <widget class="QLabel" name="label_10">
+ <property name="text">
<string>Tags to add:</string>
</property>
</widget>
@@ -125,23 +126,23 @@
</layout>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <layout class="QVBoxLayout" name="verticalLayout_fields_rm" >
+ <layout class="QVBoxLayout" name="verticalLayout_fields_rm">
<item>
- <widget class="QLabel" name="label_fields_rm" >
- <property name="text" >
+ <widget class="QLabel" name="label_fields_rm">
+ <property name="text">
<string>Field names to remove:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_tags_rm" >
+ <layout class="QVBoxLayout" name="verticalLayout_tags_rm">
<item>
- <widget class="QLabel" name="label_tags_rm" >
- <property name="text" >
+ <widget class="QLabel" name="label_tags_rm">
+ <property name="text">
<string>Tags to remove:</string>
</property>
</widget>
@@ -151,11 +152,11 @@
</layout>
</item>
<item>
- <widget class="QDialogButtonBox" name="buttonBox" >
- <property name="orientation" >
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="standardButtons" >
+ <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
@@ -170,11 +171,11 @@
<receiver>ItemsDialog</receiver>
<slot>accept()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
@@ -186,11 +187,11 @@
<receiver>ItemsDialog</receiver>
<slot>reject()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
Oops, something went wrong.

0 comments on commit e4c1ddb

Please sign in to comment.