فهرست منبع

Remove old files

Michael Pitidis 13 سال پیش
والد
کامیت
dcbb86d2da
3فایلهای تغییر یافته به همراه1 افزوده شده و 155 حذف شده
  1. 0 76
      LabelMe2.py
  2. 1 0
      labelme.py
  3. 0 79
      shape.py

+ 0 - 76
LabelMe2.py

@@ -1,76 +0,0 @@
-#!/usr/bin/env python
-
-
-import re
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
-import ui_LabelME
-from shape import *
-
-MAC = "qt_mac_set_native_menubar" in dir()
-
-
-class LabelMeWindow(QMainWindow,
-        ui_LabelME.Ui_MainWindow):
-
-    def __init__(self, text, parent=None):
-        super(LabelMeWindow, self).__init__(parent)
-        self.__text = unicode(text)
-        self.__index = 0
-        
-        self.pic=QPixmap()
-        t=self.pic.load('me2.jpg')
-        self.shapes=[]
-        self.counter=0
-        sp=shape('one',QColor(0,255,0))
-        self.shapes.append(sp)
-        
-        self.setupUi(self)
-        self.dockWidget.setVisible(False)
-        
-    def text(self):
-
-        return self.__text
-
-
-    def paintEvent(self, event):
-
-       for shape in self.shapes:
-        	qpt = QPainter()
-        	qpt.begin(self)
-       	 	shape.drawShape(qpt)
-       	 	qpt.end()
-        
-           
-    
-  
-            
-   
-        
-        
-    def mousePressEvent(self, ev):
-        index=self.counter
-        if ev.button()==1:
-        
-        	self.shapes[index].addPoint(ev.pos())
-        if ev.button()==2:
-        	self.shapes[index].setFill(True)
-        	self.counter=index+1
-        	self.shapes.append(shape('one',QColor(0,255,0)))
-        	
-        self.repaint()
-
-
-if __name__ == "__main__":
-    import sys
-
-    text = "text"
-
-    
-
-    app = QApplication(sys.argv)
-    form = LabelMeWindow(text)
-    
-    form.show()
-    app.exec_()
-

+ 1 - 0
labelme.py

@@ -31,6 +31,7 @@ __appname__ = 'labelme'
 #   alternate files. Either keep enabled, or add "Save As" button.
 
 # TODO:
+# - [high] Add polygon movement with arrow keys
 # - [high] Automatically add file suffix when saving.
 # - [high] Deselect shape when clicking and already selected(?)
 # - [high] Sanitize shortcuts between beginner/advanced mode.

+ 0 - 79
shape.py

@@ -1,79 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file '/Users/hussein/Desktop/LabelME/LabelME.ui'
-#
-# Created: Sun Oct  2 07:41:13 2011
-#      by: PyQt4 UI code generator 4.8.5
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-try:
-    _fromUtf8 = QtCore.QString.fromUtf8
-except AttributeError:
-    _fromUtf8 = lambda s: s
-
-class Ui_MainWindow(object):
-    def setupUi(self, MainWindow):
-        MainWindow.setObjectName(_fromUtf8("MainWindow"))
-        MainWindow.resize(780, 568)
-        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
-        self.centralwidget = QtGui.QWidget(MainWindow)
-        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
-        self.dockWidget = QtGui.QDockWidget(self.centralwidget)
-        self.dockWidget.setEnabled(True)
-        self.dockWidget.setGeometry(QtCore.QRect(100, 200, 381, 101))
-        self.dockWidget.setFloating(False)
-        self.dockWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
-        self.dockWidget.setAllowedAreas(QtCore.Qt.NoDockWidgetArea)
-        self.dockWidget.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Add Label", None, QtGui.QApplication.UnicodeUTF8))
-        self.dockWidget.setObjectName(_fromUtf8("dockWidget"))
-        self.dockWidgetContents = QtGui.QWidget()
-        self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
-        self.lineEdit = QtGui.QLineEdit(self.dockWidgetContents)
-        self.lineEdit.setGeometry(QtCore.QRect(80, 10, 221, 22))
-        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
-        self.pushButton_3 = QtGui.QPushButton(self.dockWidgetContents)
-        self.pushButton_3.setGeometry(QtCore.QRect(140, 40, 114, 32))
-        self.pushButton_3.setText(QtGui.QApplication.translate("MainWindow", "OK", None, QtGui.QApplication.UnicodeUTF8))
-        self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
-        self.label = QtGui.QLabel(self.dockWidgetContents)
-        self.label.setGeometry(QtCore.QRect(20, 10, 62, 16))
-        self.label.setText(QtGui.QApplication.translate("MainWindow", "Label", None, QtGui.QApplication.UnicodeUTF8))
-        self.label.setObjectName(_fromUtf8("label"))
-        self.dockWidget.setWidget(self.dockWidgetContents)
-        self.WPicture = QtGui.QWidget(self.centralwidget)
-        self.WPicture.setGeometry(QtCore.QRect(10, 10, 691, 491))
-        self.WPicture.setObjectName(_fromUtf8("WPicture"))
-        MainWindow.setCentralWidget(self.centralwidget)
-        self.menubar = QtGui.QMenuBar(MainWindow)
-        self.menubar.setGeometry(QtCore.QRect(0, 0, 780, 22))
-        self.menubar.setObjectName(_fromUtf8("menubar"))
-        self.menuFile = QtGui.QMenu(self.menubar)
-        self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
-        self.menuFile.setObjectName(_fromUtf8("menuFile"))
-        MainWindow.setMenuBar(self.menubar)
-        self.statusbar = QtGui.QStatusBar(MainWindow)
-        self.statusbar.setObjectName(_fromUtf8("statusbar"))
-        MainWindow.setStatusBar(self.statusbar)
-        self.toolBar = QtGui.QToolBar(MainWindow)
-        self.toolBar.setMinimumSize(QtCore.QSize(32, 32))
-        self.toolBar.setWindowTitle(QtGui.QApplication.translate("MainWindow", "toolBar", None, QtGui.QApplication.UnicodeUTF8))
-        self.toolBar.setMovable(True)
-        self.toolBar.setAllowedAreas(QtCore.Qt.AllToolBarAreas)
-        self.toolBar.setObjectName(_fromUtf8("toolBar"))
-        MainWindow.addToolBar(QtCore.Qt.LeftToolBarArea, self.toolBar)
-        MainWindow.insertToolBarBreak(self.toolBar)
-        self.actionClose = QtGui.QAction(MainWindow)
-        self.actionClose.setText(QtGui.QApplication.translate("MainWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionClose.setObjectName(_fromUtf8("actionClose"))
-        self.menuFile.addAction(self.actionClose)
-        self.menubar.addAction(self.menuFile.menuAction())
-
-        self.retranslateUi(MainWindow)
-        QtCore.QMetaObject.connectSlotsByName(MainWindow)
-
-    def retranslateUi(self, MainWindow):
-        pass
-