Преглед на файлове

Experiment with different enter label dialog

Michael Pitidis преди 13 години
родител
ревизия
3fd40ba286
променени са 4 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. BIN
      icons/delete.png
  2. 4 4
      labelDialog.py
  3. 2 2
      labelme.py
  4. 1 0
      resources.qrc

BIN
icons/delete.png


+ 4 - 4
labelDialog.py

@@ -19,11 +19,11 @@ class LabelDialog(QDialog):
         self.edit.setText(text)
         self.edit.setValidator(labelValidator())
         self.edit.editingFinished.connect(self.postProcess)
-        layout = QHBoxLayout()
+        layout = QVBoxLayout()
         layout.addWidget(self.edit)
-        delete = newButton('Delete', icon='delete', slot=self.delete)
-        undo = newButton('Undo close', icon='undo', slot=self.undo)
-        bb = BB(Qt.Vertical, self)
+        delete = newButton('Cancel\npolygon', icon='delete', slot=self.delete)
+        undo = newButton('Cancel\nlast line', icon='undo', slot=self.undo)
+        bb = BB(Qt.Horizontal, self)
         bb.addButton(BB.Ok)
         bb.addButton(undo, BB.RejectRole)
         bb.addButton(delete, BB.RejectRole)

+ 2 - 2
labelme.py

@@ -33,7 +33,7 @@ __appname__ = 'labelme'
 
 # TODO:
 # - [medium] Zoom should keep the image centered.
-# - [high] Label dialog options are vague.
+# - [high] Save per-shape colors in label file.
 # - [high] Add recently opened files list in File menu.
 # - [high] Escape should cancel editing mode if no point in canvas.
 # - [medium] Maybe have separate colors for different shapes, and
@@ -616,7 +616,7 @@ class MainWindow(QMainWindow, WindowMixin):
 
     def deleteSelectedShape(self):
         yes, no = QMessageBox.Yes, QMessageBox.No
-        msg = u'You are about to delete the polygon for ever, proceed anyway?'
+        msg = u'You are about to permanently delete this polygon, proceed anyway?'
         if yes == QMessageBox.warning(self, u'Attention', msg, yes|no):
             self.remLabel(self.canvas.deleteSelected())
             self.setDirty()

+ 1 - 0
resources.qrc

@@ -5,6 +5,7 @@
 <file alias="close">icons/close.png</file>
 <file alias="fit-width">icons/fit-width.png</file>
 <file alias="fit-window">icons/fit-window.png</file>
+<file alias="undo">icons/undo.png</file>
 <file alias="hide">icons/eye.png</file>
 <file alias="quit">icons/quit.png</file>
 <file alias="copy">icons/copy.png</file>