Commits

Martin Rieser  committed 1c3fce3

hgcr_ui: path colum moved to the left side.

  • Participants
  • Parent commits ec8e141

Comments (0)

Files changed (3)

File hgcr-gui-qt.py

 class CodeREviewDialog(QDialog):
 
     # file model row enumerations
-    FM_STATUS = 0
-    FM_REVISION = 1
-    FM_ROUND = 2
-    FM_DEVELOPER = 3
-    FM_REVIEWER = 4
-    FM_PATH = 5
+    FM_PATH = 0
+    FM_STATUS = 1
+    FM_REVISION = 2
+    FM_ROUND = 3
+    FM_DEVELOPER = 4
+    FM_REVIEWER = 5
+    
 
     VIEW_ALL = 0
     VIEW_MY_FILES = 1
                 row = self._qui.list_of_files.rowCount()
                 self._qui.list_of_files.insertRow(row)                
 
+                #file path
+                item = QTableWidgetItem('%s' % f)
+                item.setTextColor(color)
+                item.setFlags(item.flags() & ~Qt.ItemIsEditable)
+                self._qui.list_of_files.setItem(row, self.FM_PATH, item);
+                
+                #file state
                 item = QTableWidgetItem('%s' % res)
                 item.setTextColor(color)
                 item.setFlags(item.flags() & ~Qt.ItemIsEditable)
                 self._qui.list_of_files.setItem(row, self.FM_STATUS, item)
 
+                #base revision
                 item = QTableWidgetItem('%s' % base)
                 item.setTextColor(color)
                 item.setFlags(item.flags() & ~Qt.ItemIsEditable)
                 self._qui.list_of_files.setItem(row, self.FM_REVISION, item)
                 
+                #review round
                 item = QTableWidgetItem('%s' % round)
                 item.setTextColor(color)
                 item.setFlags(item.flags() & ~Qt.ItemIsEditable)
                 self._qui.list_of_files.setItem(row, self.FM_ROUND, item)
                 
+                #developer email address
                 item = QTableWidgetItem('%s' % developer)
                 item.setTextColor(color)
                 item.setFlags(item.flags() | Qt.ItemIsEditable)
                 self._qui.list_of_files.setItem(row, self.FM_DEVELOPER, item)
                 
+                #reviewer email address
                 item = QTableWidgetItem('%s' % reviewer)
                 item.setTextColor(color)
                 item.setFlags(item.flags() | Qt.ItemIsEditable)
                 self._qui.list_of_files.setItem(row, self.FM_REVIEWER, item)
                 
-                item = QTableWidgetItem('%s' % f)
-                item.setTextColor(color)
-                item.setFlags(item.flags() & ~Qt.ItemIsEditable)
-                self._qui.list_of_files.setItem(row, self.FM_PATH, item);
-                
                 #adjust row hieght
                 self._qui.list_of_files.setRowHeight(row, 18)
 
      </attribute>
      <column>
       <property name="text">
+       <string notr="true">Path</string>
+      </property>
+     </column>
+     <column>
+      <property name="text">
        <string>Status</string>
       </property>
      </column>
        <string>Reviewer</string>
       </property>
      </column>
-     <column>
-      <property name="text">
-       <string notr="true">Path</string>
-      </property>
-     </column>
     </widget>
    </item>
    <item>
 
 # Form implementation generated from reading ui file 'hgcr.ui'
 #
-# Created: Sat Nov 03 15:37:14 2012
+# Created: Sat Nov 03 17:12:02 2012
 #      by: PyQt4 UI code generator 4.9.4
 #
 # WARNING! All changes made in this file will be lost!
         self.list_of_files.setColumnCount(6)
         self.list_of_files.setRowCount(0)
         item = QtGui.QTableWidgetItem()
+        item.setText(_fromUtf8("Path"))
         self.list_of_files.setHorizontalHeaderItem(0, item)
         item = QtGui.QTableWidgetItem()
         self.list_of_files.setHorizontalHeaderItem(1, item)
         item = QtGui.QTableWidgetItem()
         self.list_of_files.setHorizontalHeaderItem(4, item)
         item = QtGui.QTableWidgetItem()
-        item.setText(_fromUtf8("Path"))
         self.list_of_files.setHorizontalHeaderItem(5, item)
         self.list_of_files.horizontalHeader().setSortIndicatorShown(True)
         self.list_of_files.horizontalHeader().setStretchLastSection(True)
         self.labelStatus.setText(QtGui.QApplication.translate("CodeREviewDialog", "Status:", None, QtGui.QApplication.UnicodeUTF8))
         self.labelResponcibility.setText(QtGui.QApplication.translate("CodeREviewDialog", "Reviewer / Developer Filter:", None, QtGui.QApplication.UnicodeUTF8))
         self.list_of_files.setSortingEnabled(True)
-        item = self.list_of_files.horizontalHeaderItem(0)
+        item = self.list_of_files.horizontalHeaderItem(1)
         item.setText(QtGui.QApplication.translate("CodeREviewDialog", "Status", None, QtGui.QApplication.UnicodeUTF8))
-        item = self.list_of_files.horizontalHeaderItem(1)
+        item = self.list_of_files.horizontalHeaderItem(2)
         item.setText(QtGui.QApplication.translate("CodeREviewDialog", "Revision", None, QtGui.QApplication.UnicodeUTF8))
-        item = self.list_of_files.horizontalHeaderItem(2)
+        item = self.list_of_files.horizontalHeaderItem(3)
         item.setText(QtGui.QApplication.translate("CodeREviewDialog", "Round", None, QtGui.QApplication.UnicodeUTF8))
-        item = self.list_of_files.horizontalHeaderItem(3)
+        item = self.list_of_files.horizontalHeaderItem(4)
         item.setText(QtGui.QApplication.translate("CodeREviewDialog", "Developer", None, QtGui.QApplication.UnicodeUTF8))
-        item = self.list_of_files.horizontalHeaderItem(4)
+        item = self.list_of_files.horizontalHeaderItem(5)
         item.setText(QtGui.QApplication.translate("CodeREviewDialog", "Reviewer", None, QtGui.QApplication.UnicodeUTF8))
         self.status.setText(QtGui.QApplication.translate("CodeREviewDialog", "0 selected, 0 total", None, QtGui.QApplication.UnicodeUTF8))