Warn about overwriting previously imported SMS
[retroconv] / testother.py
index 7c0f766..de67f46 100644 (file)
@@ -1,48 +1,15 @@
-import sys
 from PyQt4.QtCore import * 
 from PyQt4.QtGui import * 
+import sys
+#import gtk
+from evolution import ebook
 
-#################################################################### 
-def main(): 
-    app = QApplication(sys.argv) 
-    w = MyWindow() 
-    w.show() 
-    sys.exit(app.exec_()) 
-
-#################################################################### 
-class MyWindow(QWidget): 
-    def __init__(self, *args): 
-        QWidget.__init__(self, *args) 
+app = QApplication(sys.argv)
 
-        # create table
-        list_data = ["Tarek","Ehab","Galal"]
-        lm = MyListModel(list_data, self)
-        lv = QListView()
-        lv.setViewMode(QListView.IconMode)
-        lv.setModel(lm)
+win = QMainWindow()
 
-        # layout
-        layout = QVBoxLayout()
-        layout.addWidget(lv) 
-        self.setLayout(layout)
+win.show()
 
-#################################################################### 
-class MyListModel(QAbstractListModel): 
-    def __init__(self, datain, parent=None, *args): 
-        """ datain: a list where each item is a row
-        """
-        QAbstractListModel.__init__(self, parent, *args) 
-        self.listdata = datain
-    def rowCount(self, parent=QModelIndex()): 
-        return len(self.listdata) 
-    def data(self, index, role): 
-        if index.isValid() and role == Qt.DisplayRole:
-            return QVariant(self.listdata[index.row()])
-        else: 
-            return QVariant()
+path = QFileDialog.getOpenFileName(None,"Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)");
 
-####################################################################
-if __name__ == "__main__": 
-    main()
+sys.exit(app.exec_())