From: Tarek Date: Sun, 4 Apr 2010 17:23:30 +0000 (+0200) Subject: Warn about overwriting previously imported SMS X-Git-Url: http://git.maemo.org/git/?p=retroconv;a=commitdiff_plain;h=39b7e1e9a1d3e90acae7d9a300b849f5f9a202d8 Warn about overwriting previously imported SMS --- diff --git a/GUI/main.ui b/GUI/main.ui index 3495cdf..88c7d5e 100644 --- a/GUI/main.ui +++ b/GUI/main.ui @@ -63,8 +63,29 @@ 25 + + + Import + + + + + + + + Import Inbox + + + true + + + + + Import Sent + + diff --git a/GUI/main_window.py b/GUI/main_window.py index 6b58e6c..064a539 100644 --- a/GUI/main_window.py +++ b/GUI/main_window.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'main.ui' # -# Created: Mon Feb 22 18:09:04 2010 +# Created: Thu Mar 4 13:22:17 2010 # by: PyQt4 UI code generator 4.6 # # WARNING! All changes made in this file will be lost! @@ -10,16 +10,14 @@ from PyQt4 import QtCore, QtGui class Ui_MainWindow(QtGui.QMainWindow): - def __init__(self): QtGui.QMainWindow.__init__(self) - self.setObjectName("MainWindow") + self.setObjectName("self") self.resize(800, 400) - self.centralwidget = QtGui.QWidget(self) self.centralwidget.setObjectName("centralwidget") self.verticalLayoutWidget = QtGui.QWidget(self.centralwidget) - self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 800, 400)) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 801, 371)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget) self.verticalLayout.setObjectName("verticalLayout") @@ -29,25 +27,35 @@ class Ui_MainWindow(QtGui.QMainWindow): self.sent_button = QtGui.QPushButton(self.verticalLayoutWidget) self.sent_button.setObjectName("sent_button") self.verticalLayout.addWidget(self.sent_button) - self.spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.verticalLayout.addItem(self.spacerItem) + spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout.addItem(spacerItem) self.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(self) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25)) self.menubar.setObjectName("menubar") + #self.menuImport = QtGui.QMenu(self.menubar) + #self.menuImport.setObjectName("menuImport") self.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(self) self.statusbar.setObjectName("statusbar") self.setStatusBar(self.statusbar) + self.actionImport = QtGui.QAction(self) + self.actionImport.setVisible(True) + self.actionImport.setObjectName("actionImport") + self.actionImport_Sent = QtGui.QAction(self) + self.actionImport_Sent.setObjectName("actionImport_Sent") + self.menubar.addAction(self.actionImport) + self.menubar.addAction(self.actionImport_Sent) + #self.menubar.addAction(self.menuImport.menuAction()) self.retranslateUi() QtCore.QMetaObject.connectSlotsByName(self) - - - #self.setAttribute(QtCore.Qt.WA_Maemo5StackedWindow) def retranslateUi(self): - self.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) - self.inbox_button.setText(QtGui.QApplication.translate("MainWindow", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) - self.sent_button.setText(QtGui.QApplication.translate("MainWindow", "Sent", None, QtGui.QApplication.UnicodeUTF8)) + self.setWindowTitle(QtGui.QApplication.translate("self", "Retro Conversations", None, QtGui.QApplication.UnicodeUTF8)) + self.inbox_button.setText(QtGui.QApplication.translate("self", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_button.setText(QtGui.QApplication.translate("self", "Sent", None, QtGui.QApplication.UnicodeUTF8)) + #self.menuImport.setTitle(QtGui.QApplication.translate("self", "Import", None, QtGui.QApplication.UnicodeUTF8)) + self.actionImport.setText(QtGui.QApplication.translate("self", "Import Inbox", None, QtGui.QApplication.UnicodeUTF8)) + self.actionImport_Sent.setText(QtGui.QApplication.translate("self", "Import Sent", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/GUI/main_window.py.bak b/GUI/main_window.py.bak new file mode 100644 index 0000000..6b58e6c --- /dev/null +++ b/GUI/main_window.py.bak @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'main.ui' +# +# Created: Mon Feb 22 18:09:04 2010 +# by: PyQt4 UI code generator 4.6 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_MainWindow(QtGui.QMainWindow): + + def __init__(self): + QtGui.QMainWindow.__init__(self) + self.setObjectName("MainWindow") + self.resize(800, 400) + + self.centralwidget = QtGui.QWidget(self) + self.centralwidget.setObjectName("centralwidget") + self.verticalLayoutWidget = QtGui.QWidget(self.centralwidget) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 800, 400)) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") + self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setObjectName("verticalLayout") + self.inbox_button = QtGui.QPushButton(self.verticalLayoutWidget) + self.inbox_button.setObjectName("inbox_button") + self.verticalLayout.addWidget(self.inbox_button) + self.sent_button = QtGui.QPushButton(self.verticalLayoutWidget) + self.sent_button.setObjectName("sent_button") + self.verticalLayout.addWidget(self.sent_button) + self.spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout.addItem(self.spacerItem) + self.setCentralWidget(self.centralwidget) + self.menubar = QtGui.QMenuBar(self) + self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25)) + self.menubar.setObjectName("menubar") + self.setMenuBar(self.menubar) + self.statusbar = QtGui.QStatusBar(self) + self.statusbar.setObjectName("statusbar") + self.setStatusBar(self.statusbar) + + self.retranslateUi() + QtCore.QMetaObject.connectSlotsByName(self) + + + #self.setAttribute(QtCore.Qt.WA_Maemo5StackedWindow) + + def retranslateUi(self): + self.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) + self.inbox_button.setText(QtGui.QApplication.translate("MainWindow", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_button.setText(QtGui.QApplication.translate("MainWindow", "Sent", None, QtGui.QApplication.UnicodeUTF8)) + diff --git a/GUI/main_window.pyc b/GUI/main_window.pyc index 261a690..0504a31 100644 Binary files a/GUI/main_window.pyc and b/GUI/main_window.pyc differ diff --git a/GUI/main_window.py~ b/GUI/main_window.py~ index 6b58e6c..d2d6df8 100644 --- a/GUI/main_window.py~ +++ b/GUI/main_window.py~ @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'main.ui' # -# Created: Mon Feb 22 18:09:04 2010 +# Created: Thu Mar 4 13:22:17 2010 # by: PyQt4 UI code generator 4.6 # # WARNING! All changes made in this file will be lost! @@ -10,16 +10,14 @@ from PyQt4 import QtCore, QtGui class Ui_MainWindow(QtGui.QMainWindow): - def __init__(self): QtGui.QMainWindow.__init__(self) - self.setObjectName("MainWindow") + self.setObjectName("self") self.resize(800, 400) - self.centralwidget = QtGui.QWidget(self) self.centralwidget.setObjectName("centralwidget") self.verticalLayoutWidget = QtGui.QWidget(self.centralwidget) - self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 800, 400)) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 801, 371)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget) self.verticalLayout.setObjectName("verticalLayout") @@ -29,25 +27,35 @@ class Ui_MainWindow(QtGui.QMainWindow): self.sent_button = QtGui.QPushButton(self.verticalLayoutWidget) self.sent_button.setObjectName("sent_button") self.verticalLayout.addWidget(self.sent_button) - self.spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.verticalLayout.addItem(self.spacerItem) + spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout.addItem(spacerItem) self.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(self) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25)) self.menubar.setObjectName("menubar") + #self.menuImport = QtGui.QMenu(self.menubar) + #self.menuImport.setObjectName("menuImport") self.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(self) self.statusbar.setObjectName("statusbar") self.setStatusBar(self.statusbar) + self.actionImport = QtGui.QAction(self) + self.actionImport.setVisible(True) + self.actionImport.setObjectName("actionImport") + self.actionImport_Sent = QtGui.QAction(self) + self.actionImport_Sent.setObjectName("actionImport_Sent") + self.menubar.addAction(self.actionImport) + self.menubar.addAction(self.actionImport_Sent) + #self.menubar.addAction(self.menuImport.menuAction()) self.retranslateUi() QtCore.QMetaObject.connectSlotsByName(self) - - - #self.setAttribute(QtCore.Qt.WA_Maemo5StackedWindow) def retranslateUi(self): - self.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) - self.inbox_button.setText(QtGui.QApplication.translate("MainWindow", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) - self.sent_button.setText(QtGui.QApplication.translate("MainWindow", "Sent", None, QtGui.QApplication.UnicodeUTF8)) + self.setWindowTitle(QtGui.QApplication.translate("self", "self", None, QtGui.QApplication.UnicodeUTF8)) + self.inbox_button.setText(QtGui.QApplication.translate("self", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_button.setText(QtGui.QApplication.translate("self", "Sent", None, QtGui.QApplication.UnicodeUTF8)) + self.menuImport.setTitle(QtGui.QApplication.translate("self", "Import", None, QtGui.QApplication.UnicodeUTF8)) + self.actionImport.setText(QtGui.QApplication.translate("self", "Import Inbox", None, QtGui.QApplication.UnicodeUTF8)) + self.actionImport_Sent.setText(QtGui.QApplication.translate("self", "Import Sent", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/GUI/test.py b/GUI/test.py new file mode 100644 index 0000000..436cdfb --- /dev/null +++ b/GUI/test.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'main.ui' +# +# Created: Thu Feb 25 06:05:41 2010 +# by: PyQt4 UI code generator 4.6 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_MainWindow(QtGui.QMainWindow): + + def __init__(self): + QtGui.QMainWindow.__init__(self) + self.setObjectName("MainWindow") + self.resize(800, 400) + self.centralwidget = QtGui.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.verticalLayoutWidget = QtGui.QWidget(self.centralwidget) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 801, 371)) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") + self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setObjectName("verticalLayout") + self.inbox_button = QtGui.QPushButton(self.verticalLayoutWidget) + self.inbox_button.setObjectName("inbox_button") + self.verticalLayout.addWidget(self.inbox_button) + self.sent_button = QtGui.QPushButton(self.verticalLayoutWidget) + self.sent_button.setObjectName("sent_button") + self.verticalLayout.addWidget(self.sent_button) + spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout.addItem(spacerItem) + self.setCentralWidget(self.centralwidget) + self.menubar = QtGui.QMenuBar(self) + self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25)) + self.menubar.setObjectName("menubar") + #self.menuImport = QtGui.QMenu(self.menubar) + #self.menuImport.setObjectName("menuImport") + self.setMenuBar(self.menubar) + self.statusbar = QtGui.QStatusBar(self) + self.statusbar.setObjectName("statusbar") + self.setStatusBar(self.statusbar) + self.actionImport = QtGui.QAction(self) + self.actionImport.setVisible(True) + self.actionImport.setObjectName("actionImport") + self.menubar.addAction(self.actionImport) + #self.menubar.addAction(self.menuImport.menuAction()) + + self.retranslateUi(self) + QtCore.QMetaObject.connectSlotsByName(self) + + def retranslateUi(self): + self.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) + self.inbox_button.setText(QtGui.QApplication.translate("MainWindow", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_button.setText(QtGui.QApplication.translate("MainWindow", "Sent", None, QtGui.QApplication.UnicodeUTF8)) + #self.menuImport.setTitle(QtGui.QApplication.translate("MainWindow", "Import", None, QtGui.QApplication.UnicodeUTF8)) + self.actionImport.setText(QtGui.QApplication.translate("MainWindow", "Import", None, QtGui.QApplication.UnicodeUTF8)) + diff --git a/GUI/test.py~ b/GUI/test.py~ new file mode 100644 index 0000000..697949b --- /dev/null +++ b/GUI/test.py~ @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'main.ui' +# +# Created: Thu Feb 25 06:05:41 2010 +# by: PyQt4 UI code generator 4.6 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_MainWindow(QtGui.QMainWindow): + + def __init(self)__: + QtGui.QMainWindow.__init__(self) + self.setObjectName("MainWindow") + self.resize(800, 400) + self.centralwidget = QtGui.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.verticalLayoutWidget = QtGui.QWidget(self.centralwidget) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 0, 801, 371)) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") + self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setObjectName("verticalLayout") + self.inbox_button = QtGui.QPushButton(self.verticalLayoutWidget) + self.inbox_button.setObjectName("inbox_button") + self.verticalLayout.addWidget(self.inbox_button) + self.sent_button = QtGui.QPushButton(self.verticalLayoutWidget) + self.sent_button.setObjectName("sent_button") + self.verticalLayout.addWidget(self.sent_button) + spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout.addItem(spacerItem) + self.setCentralWidget(self.centralwidget) + self.menubar = QtGui.QMenuBar(self) + self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25)) + self.menubar.setObjectName("menubar") + #self.menuImport = QtGui.QMenu(self.menubar) + #self.menuImport.setObjectName("menuImport") + self.setMenuBar(self.menubar) + self.statusbar = QtGui.QStatusBar(self) + self.statusbar.setObjectName("statusbar") + self.setStatusBar(self.statusbar) + self.actionImport = QtGui.QAction(self) + self.actionImport.setVisible(True) + self.actionImport.setObjectName("actionImport") + self.menuImport.addAction(self.actionImport) + self.menubar.addAction(self.menuImport.menuAction()) + + self.retranslateUi(self) + QtCore.QMetaObject.connectSlotsByName(self) + + def retranslateUi(self): + self.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) + self.inbox_button.setText(QtGui.QApplication.translate("MainWindow", "Inbox", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_button.setText(QtGui.QApplication.translate("MainWindow", "Sent", None, QtGui.QApplication.UnicodeUTF8)) + self.menuImport.setTitle(QtGui.QApplication.translate("MainWindow", "Import", None, QtGui.QApplication.UnicodeUTF8)) + self.actionImport.setText(QtGui.QApplication.translate("MainWindow", "Import", None, QtGui.QApplication.UnicodeUTF8)) + diff --git a/GUI/testX.py b/GUI/testX.py new file mode 100644 index 0000000..96ee103 --- /dev/null +++ b/GUI/testX.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'stacked2.ui' +# +# Created: Tue Mar 2 19:27:04 2010 +# by: PyQt4 UI code generator 4.6 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(800, 400) + self.centralwidget = QtGui.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.sentMessageView = QtGui.QWidget(self.centralwidget) + self.sentMessageView.setObjectName("sentMessageView") + self.verticalLayoutWidget_3 = QtGui.QWidget(self.sentMessageView) + self.verticalLayoutWidget_3.setGeometry(QtCore.QRect(0, 0, 800, 400)) + self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3") + self.verticalLayout_3 = QtGui.QVBoxLayout(self.verticalLayoutWidget_3) + self.verticalLayout_3.setSizeConstraint(QtGui.QLayout.SetMaximumSize) + self.verticalLayout_3.setObjectName("verticalLayout_3") + self.horizontalLayout_3 = QtGui.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + self.frame = QtGui.QLabel(self.verticalLayoutWidget_3) + self.frame.setFrameShape(QtGui.QFrame.Box) + self.frame.setFrameShadow(QtGui.QFrame.Raised) + self.frame.setLineWidth(5) + self.frame.setMidLineWidth(0) + self.frame.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) + self.frame.setObjectName("frame") + self.horizontalLayout_3.addWidget(self.frame) + self.verticalLayout_4 = QtGui.QVBoxLayout() + self.verticalLayout_4.setContentsMargins(5, -1, 0, -1) + self.verticalLayout_4.setObjectName("verticalLayout_4") + self.sent_msg_to = QtGui.QLabel(self.verticalLayoutWidget_3) + font = QtGui.QFont() + font.setPointSize(26) + self.sent_msg_to.setFont(font) + self.sent_msg_to.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) + self.sent_msg_to.setObjectName("sent_msg_to") + self.verticalLayout_4.addWidget(self.sent_msg_to) + self.sent_msg_date = QtGui.QLabel(self.verticalLayoutWidget_3) + self.sent_msg_date.setFrameShape(QtGui.QFrame.StyledPanel) + self.sent_msg_date.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) + self.sent_msg_date.setObjectName("sent_msg_date") + self.verticalLayout_4.addWidget(self.sent_msg_date) + spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout_4.addItem(spacerItem) + self.horizontalLayout_3.addLayout(self.verticalLayout_4) + spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_3.addItem(spacerItem1) + self.verticalLayout_3.addLayout(self.horizontalLayout_3) + self.line_3 = QtGui.QFrame(self.verticalLayoutWidget_3) + self.line_3.setFrameShadow(QtGui.QFrame.Plain) + self.line_3.setLineWidth(5) + self.line_3.setFrameShape(QtGui.QFrame.HLine) + self.line_3.setFrameShadow(QtGui.QFrame.Sunken) + self.line_3.setObjectName("line_3") + self.verticalLayout_3.addWidget(self.line_3) + self.sent_msg_text = QtGui.QLabel(self.verticalLayoutWidget_3) + self.sent_msg_text.setWordWrap(True) + self.sent_msg_text.setObjectName("sent_msg_text") + self.verticalLayout_3.addWidget(self.sent_msg_text) + spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout_3.addItem(spacerItem2) + self.horizontalLayout_4 = QtGui.QHBoxLayout() + self.horizontalLayout_4.setObjectName("horizontalLayout_4") + self.sent_msg_delete = QtGui.QPushButton(self.verticalLayoutWidget_3) + self.sent_msg_delete.setObjectName("sent_msg_delete") + self.horizontalLayout_4.addWidget(self.sent_msg_delete) + self.sent_msg_back = QtGui.QPushButton(self.verticalLayoutWidget_3) + self.sent_msg_back.setObjectName("sent_msg_back") + self.horizontalLayout_4.addWidget(self.sent_msg_back) + self.verticalLayout_3.addLayout(self.horizontalLayout_4) + MainWindow.setCentralWidget(self.centralwidget) + self.menubar = QtGui.QMenuBar(MainWindow) + self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25)) + self.menubar.setObjectName("menubar") + MainWindow.setMenuBar(self.menubar) + self.statusbar = QtGui.QStatusBar(MainWindow) + self.statusbar.setObjectName("statusbar") + MainWindow.setStatusBar(self.statusbar) + self.actionOption_1 = QtGui.QAction(MainWindow) + self.actionOption_1.setObjectName("actionOption_1") + self.actionOption_2 = QtGui.QAction(MainWindow) + self.actionOption_2.setObjectName("actionOption_2") + self.actionBlabla2 = QtGui.QAction(MainWindow) + self.actionBlabla2.setObjectName("actionBlabla2") + + self.retranslateUi(MainWindow) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): + MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Retro Conversations", None, QtGui.QApplication.UnicodeUTF8)) + self.frame.setText(QtGui.QApplication.translate("MainWindow", "xxxxxx", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_msg_to.setStyleSheet(QtGui.QApplication.translate("MainWindow", "color:rgb(106, 106, 106)", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_msg_to.setText(QtGui.QApplication.translate("MainWindow", "TextLabel", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_msg_date.setText(QtGui.QApplication.translate("MainWindow", "TextLabel", None, QtGui.QApplication.UnicodeUTF8)) + self.line_3.setStyleSheet(QtGui.QApplication.translate("MainWindow", "background:rgb(50, 50, 50);", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_msg_text.setStyleSheet(QtGui.QApplication.translate("MainWindow", "margin-top:5px", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_msg_text.setText(QtGui.QApplication.translate("MainWindow", "TextLabel", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_msg_delete.setText(QtGui.QApplication.translate("MainWindow", "Delete", None, QtGui.QApplication.UnicodeUTF8)) + self.sent_msg_back.setText(QtGui.QApplication.translate("MainWindow", "Back", None, QtGui.QApplication.UnicodeUTF8)) + self.actionOption_1.setText(QtGui.QApplication.translate("MainWindow", "Option 1", None, QtGui.QApplication.UnicodeUTF8)) + self.actionOption_2.setText(QtGui.QApplication.translate("MainWindow", "Option 2", None, QtGui.QApplication.UnicodeUTF8)) + self.actionBlabla2.setText(QtGui.QApplication.translate("MainWindow", "blabla2", None, QtGui.QApplication.UnicodeUTF8)) + + +if __name__ == "__main__": + import sys + app = QtGui.QApplication(sys.argv) + MainWindow = QtGui.QMainWindow() + ui = Ui_MainWindow() + ui.setupUi(MainWindow) + MainWindow.show() + sys.exit(app.exec_()) + diff --git a/GUI/testother.py b/GUI/testother.py new file mode 100644 index 0000000..78f8f7b --- /dev/null +++ b/GUI/testother.py @@ -0,0 +1,15 @@ +from PyQt4.QtCore import * +from PyQt4.QtGui import * +import sys +#import gtk +import evolution + +app = QApplication(sys.argv) + +win = QMainWindow() + +win.show() + +path = QFileDialog.getOpenFileName(None,"Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)"); + +sys.exit(app.exec_()) diff --git a/GUI/testother.py~ b/GUI/testother.py~ new file mode 100644 index 0000000..0f19551 --- /dev/null +++ b/GUI/testother.py~ @@ -0,0 +1,15 @@ +from PySide.QtCore import * +from PySide.QtGui import * +import sys +#import gtk +import evolution + +app = QApplication(sys.argv) + +win = QMainWindow() + +win.show() + +path = QFileDialog.getOpenFileName(None,"Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)"); + +sys.exit(app.exec_()) diff --git a/contactsServ.py b/contactsServ.py index 93e5fa3..d1a42fc 100644 --- a/contactsServ.py +++ b/contactsServ.py @@ -1,112 +1,61 @@ -import evolution -from pygobject import * -from ctypes import * +from evolution import ebook +import pygobject +import ctypes +import sys #from wrapper import * -ebook = CDLL('libebook-1.2.so.9') +#ebook = CDLL('libebook-1.2.so.5') E_CONTACT_HOMEPAGE_URL = 42 E_CONTACT_PHOTO = 94 E_CONTACT_EMAIL = 97 E_CONTACT_BIRTHDAY_DATE = 107 class address_book: - - def getContactNameFromPhone(self, phoneNum): - - - addresses = evolution.ebook.open_addressbook('default') - contacts = addresses.get_all_contacts() - - - #ai = GList.new(ebook.e_contact_get_attributes(hash(self._contact), E_CONTACT_EMAIL)) - - for econtact in contacts: - - try: - #print econtact.get_name() - phones = econtact.get_property('phone') - - phones_p=int(str(phones)[13:-1],16) - phoneList = GList.new(phones_p) - - while phoneList.has_next(): - currPhone = string_at(phoneList.next()) - - if currPhone == phoneNum: - return econtact.get_name() - except: - continue - - - def populateNames(self, recvLst, sentLst): - addresses = evolution.ebook.open_addressbook('default') + addresses = ebook.open_addressbook('default') contacts = addresses.get_all_contacts() listX=[] - - - """"for msg in recvLst: - for contact in contacts: - try: - phones = contact.get_property('phone') - phones_p=int(str(phones)[13:-1],16) - except: - continue - - phoneList = GList.new(phones_p) - - while phoneList.has_next(): - currPhone = string_at(phoneList.next()) - if currPhone[-7:] == msg.fromNum[-7:]: - msg.setSenderName(contact.get_name()) - break - """ - + for contact in contacts: try: phones = contact.get_property('phone') phones_p=int(str(phones)[13:-1],16) - phoneList = GList.new(phones_p) - - - - - - - - + phoneList = pygobject.GList.new(phones_p) while phoneList.has_next(): - currPhone = string_at(phoneList.next()) + currPhone = ctypes.string_at(phoneList.next()) for msg in recvLst: if currPhone[-7:] == msg.fromNum[-7:]: msg.setSenderName(contact.get_name()) photo = contact.get_property('photo') - pi = cast(c_void_p(hash(photo)), POINTER(EContactPhoto)) + pi = ctypes.cast(ctypes.c_void_p(hash(photo)), ctypes.POINTER(pygobject.EContactPhoto)) if pi.contents.data.uri.startswith("image/"): #data = string_at(pi.contents.data.inlined.data) - data = string_at(pi.contents.data.inlined.data, pi.contents.data.inlined.length) + data = ctypes.string_at(pi.contents.data.inlined.data, pi.contents.data.inlined.length) length = pi.contents.data.inlined.length msg.setImageData(data, length) + #else: + #print contact.get_name()+" : "+pi.contents.data.uri for msg in sentLst: if currPhone[-7:] == msg.toNum[-7:]: msg.setRecName(contact.get_name()) photo = contact.get_property('photo') - pi = cast(c_void_p(hash(photo)), POINTER(EContactPhoto)) + pi = ctypes.cast(ctypes.c_void_p(hash(photo)), ctypes.POINTER(pygobject.EContactPhoto)) if pi.contents.data.uri.startswith("image/"): #data = string_at(pi.contents.data.inlined.data) - data = string_at(pi.contents.data.inlined.data, pi.contents.data.inlined.length) + data = ctypes.string_at(pi.contents.data.inlined.data, pi.contents.data.inlined.length) length = pi.contents.data.inlined.length msg.setImageData(data, length) except: + #print sys.exc_info() continue diff --git a/contactsServ.pyc b/contactsServ.pyc index 0c0e091..07e6e8f 100644 Binary files a/contactsServ.pyc and b/contactsServ.pyc differ diff --git a/contactsServ.py~ b/contactsServ.py~ new file mode 100644 index 0000000..a06e643 --- /dev/null +++ b/contactsServ.py~ @@ -0,0 +1,61 @@ +from evolution import ebook +import pygobject +import ctypes +import sys +#from wrapper import * + + +#ebook = CDLL('libebook-1.2.so.5') +E_CONTACT_HOMEPAGE_URL = 42 +E_CONTACT_PHOTO = 94 +E_CONTACT_EMAIL = 97 +E_CONTACT_BIRTHDAY_DATE = 107 + +class address_book: + + def populateNames(self, recvLst, sentLst): + + addresses = ebook.open_addressbook('default') + contacts = addresses.get_all_contacts() + + listX=[] + + for contact in contacts: + + try: + phones = contact.get_property('phone') + phones_p=int(str(phones)[13:-1],16) + phoneList = pygobject.GList.new(phones_p) + + while phoneList.has_next(): + currPhone = ctypes.string_at(phoneList.next()) + for msg in recvLst: + if currPhone[-7:] == msg.fromNum[-7:]: + msg.setSenderName(contact.get_name()) + photo = contact.get_property('photo') + pi = ctypes.cast(ctypes.c_void_p(hash(photo)), ctypes.POINTER(pygobject.EContactPhoto)) + + if pi.contents.data.uri.startswith("image/"): + #data = string_at(pi.contents.data.inlined.data) + data = ctypes.string_at(pi.contents.data.inlined.data, pi.contents.data.inlined.length) + length = pi.contents.data.inlined.length + msg.setImageData(data, length) + else: + print contact.get_name()+" : "+pi.contents.data.uri + + for msg in sentLst: + if currPhone[-7:] == msg.toNum[-7:]: + msg.setRecName(contact.get_name()) + photo = contact.get_property('photo') + pi = ctypes.cast(ctypes.c_void_p(hash(photo)), ctypes.POINTER(pygobject.EContactPhoto)) + + if pi.contents.data.uri.startswith("image/"): + #data = string_at(pi.contents.data.inlined.data) + data = ctypes.string_at(pi.contents.data.inlined.data, pi.contents.data.inlined.length) + length = pi.contents.data.inlined.length + msg.setImageData(data, length) + + + except: + #print sys.exc_info() + continue diff --git a/csv_service.py b/csv_service.py index b50f24d..029fd24 100644 --- a/csv_service.py +++ b/csv_service.py @@ -2,42 +2,94 @@ import csv from recv import recv from sent import sent from contactsServ import * +import os class csvServ: - def __init__(self, recvFile, sentFile): - ifile = open(recvFile, "r") - reader=csv.reader(ifile) + + def __init__(self): + + + self.pathToHome = "/home/tarek/" + self.pathToApp = self.pathToHome+".retroconv/" + self.pathToInbox = self.pathToApp+"inbox.csv" + self.pathToSent = self.pathToApp+"sent.csv" + self.recvLst=[] + self.sentLst=[] self.recvNumbers=[] + self.sentNumbers=[] + + self.checkInitialLaunch() + + def checkInitialLaunch(self): + if not os.path.isdir(self.pathToApp): + os.system("mkdir "+self.pathToApp) + + + + + def checkFileValidity(self): + print "Checking validity" + + #Check Extra Lines + #Check number of fields + #Check submit, deliver, sms (constant fields) + + def fetchInbox(self): + ifile = open(self.pathToInbox, "r") + reader=csv.reader(ifile) + #self.recvLst=[] + #self.recvNumbers=[] for row in reader: self.recvLst.append(recv(row[2],row[5], row[7])) self.recvNumbers.append(row[2][-7:]) - #print "WILL" - - #self.recvLst = z.populateNames(self.recvLst) - ifile.close() - ############################################## - - ifile = open(sentFile, "r") + def fetchSent(self): + ifile = open(self.pathToSent, "r") reader=csv.reader(ifile) - self.sentLst=[] - self.sentNumbers=[] + #self.sentLst=[] + #self.sentNumbers=[] for row in reader: self.sentLst.append(sent(row[3],row[5], row[7])) self.sentNumbers.append(row[3][-7:]) - abook=address_book() - - abook.populateNames(self.recvLst, self.sentLst) - + ifile.close() + + def fetchContactsInfo(self): + abook=address_book() + abook.populateNames(self.recvLst, self.sentLst) + + def hasImportedSent(self): + return os.path.isfile (self.pathToSent) + + + def hasImportedInbox(self): + return os.path.isfile (self.pathToInbox) + + + def importSent(self, path): + try: + os.system("cp "+str(path).replace(" ", "\ ")+ " "+self.pathToSent) + self.fetchSent() + return True + except: + return False + + def importInbox(self, path): + try: + os.system("cp "+str(path).replace(" ", "\ ")+ " "+self.pathToInbox) + self.fetchInbox() + return True + except: + return False + def getAllReceivedMsgs(self): msgs=[] diff --git a/csv_service.pyc b/csv_service.pyc index 75666b0..efc188d 100644 Binary files a/csv_service.pyc and b/csv_service.pyc differ diff --git a/csv_service.py~ b/csv_service.py~ new file mode 100644 index 0000000..f698468 --- /dev/null +++ b/csv_service.py~ @@ -0,0 +1,113 @@ +import csv +from recv import recv +from sent import sent +from contactsServ import * +import os + +class csvServ: + + def __init__(self): + + + self.pathToHome = "/home/tarek/" + self.pathToApp = self.pathToHome+".retroconv/" + self.pathToInbox = self.pathToApp+"inbox.csv" + self.pathToSent = self.pathToApp+"sent.csv" + + self.recvLst=[] + self.sentLst=[] + self.recvNumbers=[] + self.sentNumbers=[] + + self.checkInitialLaunch() + + def checkInitialLaunch(self): + if not os.path.isdir(self.pathToApp): + os.system("mkdir "+self.pathToApp) + + + + + def checkCsvValidity(self): + print "Checking validity" + + #Check Extra Lines + #Check number of fields + #Check submit, deliver, sms (constant fields) + + def fetchInbox(self): + ifile = open(self.pathToInbox, "r") + reader=csv.reader(ifile) + #self.recvLst=[] + #self.recvNumbers=[] + for row in reader: + self.recvLst.append(recv(row[2],row[5], row[7])) + self.recvNumbers.append(row[2][-7:]) + + + ifile.close() + + def fetchSent(self): + ifile = open(self.pathToSent, "r") + reader=csv.reader(ifile) + #self.sentLst=[] + #self.sentNumbers=[] + for row in reader: + self.sentLst.append(sent(row[3],row[5], row[7])) + self.sentNumbers.append(row[3][-7:]) + + + + + + ifile.close() + + def fetchContactsInfo(self): + abook=address_book() + abook.populateNames(self.recvLst, self.sentLst) + + def hasImportedSent(self): + return os.path.isfile (self.pathToSent) + + + def hasImportedInbox(self): + return os.path.isfile (self.pathToInbox) + + + def importSent(self, path): + try: + os.system("cp "+str(path).replace(" ", "\ ")+ " "+self.pathToSent) + self.fetchSent() + return True + except: + return False + + def importInbox(self, path): + try: + os.system("cp "+str(path).replace(" ", "\ ")+ " "+self.pathToInbox) + self.fetchInbox() + return True + except: + return False + + + def getAllReceivedMsgs(self): + msgs=[] + for msg in self.recvLst: + msgs.append(msg.getSummary()) + return msgs + + + + + def getMsg(self, msgNum, msgType = 0): + #msgType 0: recv, 1:sent + + if msgType == 0: + return self.recvLst[msgNum] + + return self.sentLst[msgNum] + + + def getMsgText(self, msgNum): + return self.recvLst[msgNum].getMsg() diff --git a/main.py b/main.py index aa102aa..5018484 100644 --- a/main.py +++ b/main.py @@ -1,15 +1,19 @@ import sys from PyQt4.QtCore import * from PyQt4.QtGui import * -from csv_service import csvServ from models import * -#from windows import * from GUI.main_window import * from GUI.inbox_window import * from GUI.message_window import * from GUI.sent_window import * -# -msgs=csvServ("sms.csv", "sent.csv") +from csv_service import * +from notification_service import Notifier +#import gtk +""" +#from windows import * + + +""" def showInboxMessages(): #ui.stackedWidget.setCurrentIndex(1) @@ -22,7 +26,7 @@ def showSentMessages(): def showMsg(): #ui.stackedWidget.setCurrentIndex(2) msg = msgs.getMsg(inboxWindow.listView.currentIndex().row()) - print msg.getMsgText() + #print msg.getMsgText() inboxMsgWindow.msg_text.setText(msg.getMsgText()) inboxMsgWindow.msg_address.setText(msg.getSenderName()) inboxMsgWindow.msg_date.setText(msg.getDate()) @@ -80,6 +84,8 @@ def populateSent(): #for x in msgs.sentLst: #print x.getRecName() +msgs=csvServ() +notifier = Notifier() def init(): ################## Connect SIGNALS ####################### @@ -88,39 +94,130 @@ def init(): QObject.connect(mainWindow.sent_button, SIGNAL("clicked()"),showSentMessages) QObject.connect(inboxWindow.listView, SIGNAL("clicked(QModelIndex)"),showMsg) QObject.connect(sentWindow.listView, SIGNAL("clicked(QModelIndex)"),showSentMsg) + QObject.connect(mainWindow.actionImport, SIGNAL("triggered()"),showInboxDialog) + QObject.connect(mainWindow.actionImport_Sent, SIGNAL("triggered()"),showSentDialog) + QObject.connect(inboxDialog, SIGNAL("fileSelected(QString)"), importInbox) + QObject.connect(sentDialog, SIGNAL("fileSelected(QString)"), importSent) + + #QObject.connect(dialog, SIGNAL("fileSelected(QString)"), importInboxFile) #QObject.connect(ui.msg_back, SIGNAL("clicked()"),showInboxMessages) #QObject.connect(ui.sent_msg_back, SIGNAL("clicked()"),showSentMessages) #QObject.connect(ui.sentView, SIGNAL("clicked(QModelIndex)"),showSentMsg) ############################################################ + ############################################################ + + + + ############################################################ + ################# Other Init functions ##################### - populateInbox() - populateSent() + + fetch = False + + if msgs.hasImportedSent(): + fetch = True + msgs.fetchSent() + populateSent() + + if msgs.hasImportedInbox(): + fetch = True + msgs.fetchInbox() + populateInbox() + + if fetch: + msgs.fetchContactsInfo() + ########################################################### +#def showImportInboxFileDialog(): + #name = QFileDialog.getOpenFileName(None, "Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)"); + #chooser = gtk.FileChooserDialog(title=None,action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) + + +def importInbox(path): + if msgs.importInbox(path): + notifier.requestPatience() + + msgs.fetchContactsInfo() + populateInbox() + + notifier.showSuccess(len(msgs.recvLst)) + else: + notifier.showFailure() + +def importSent(path): + if msgs.importSent(path): + notifier.requestPatience() + + msgs.fetchContactsInfo() + populateSent() + + notifier.showSuccess(len(msgs.sentLst)) + else: + notifier.showFailure() + + +def showInboxDialog(): + if not msgs.hasImportedInbox() : + inboxDialog.open() + else: + print "Inbox is already Imported" + +def showSentDialog(): + if not msgs.hasImportedSent(): + sentDialog.open() + else: + print "Sent is already Imported" + if __name__ == '__main__': app = QApplication(sys.argv) #MainWindow = QtGui.QMainWindow() #ui = Ui_MainWindow() #ui.setupUi(MainWindow) #MainWindow.show() - + ####### Initialization ######### + mainWindow = Ui_MainWindow() inboxWindow = Ui_InboxWindow(mainWindow) sentWindow = Ui_SentWindow(mainWindow) inboxMsgWindow = Ui_MessageWindow(inboxWindow) sentMsgWindow = Ui_MessageWindow(sentWindow) + + + + inboxDialog = QFileDialog(mainWindow); + inboxDialog.setFilter("Recieved SMS CSV Files (*.csv)"); + inboxDialog.setViewMode(QFileDialog.List); + + sentDialog = QFileDialog(mainWindow); + sentDialog.setFilter("Sent SMS CSV Files (*.csv)"); + sentDialog.setViewMode(QFileDialog.List); + + + + + #mainWindow=QMainWindow() init() - + ################################ mainWindow.show() + + + ################################ + + #win = QMainWindow() + #win.show() + + #name = QFileDialog.getOpenFileName(None,"Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)"); + sys.exit(app.exec_()) diff --git a/main.py~ b/main.py~ new file mode 100644 index 0000000..1b9dfdd --- /dev/null +++ b/main.py~ @@ -0,0 +1,225 @@ +import sys +from PyQt4.QtCore import * +from PyQt4.QtGui import * +from models import * +from GUI.main_window import * +from GUI.inbox_window import * +from GUI.message_window import * +from GUI.sent_window import * +from csv_service import * +from notification_service import Notifier +#import gtk +""" +#from windows import * + + +""" + +def showInboxMessages(): + #ui.stackedWidget.setCurrentIndex(1) + inboxWindow.show() + +def showSentMessages(): + #ui.stackedWidget.setCurrentIndex(3) + sentWindow.show() + +def showMsg(): + #ui.stackedWidget.setCurrentIndex(2) + msg = msgs.getMsg(inboxWindow.listView.currentIndex().row()) + #print msg.getMsgText() + inboxMsgWindow.msg_text.setText(msg.getMsgText()) + inboxMsgWindow.msg_address.setText(msg.getSenderName()) + inboxMsgWindow.msg_date.setText(msg.getDate()) + + ##################################### + + + if msg.getImageData() == "": + inboxMsgWindow.frame.setPixmap(QPixmap("graphics/contact_trans_120.png")) + else: + + arr=QByteArray(msg.getImageData()) + img = QPixmap() + img.loadFromData(arr) + + inboxMsgWindow.frame.setPixmap(img.scaled(120,120, Qt.KeepAspectRatioByExpanding)) + + inboxMsgWindow.show() + + +def showSentMsg(): + #ui.stackedWidget.setCurrentIndex(4) + msg = msgs.getMsg(sentWindow.listView.currentIndex().row(), 1) + sentMsgWindow.msg_text.setText(msg.getMsgText()) + sentMsgWindow.msg_address.setText(msg.getRecName()) + sentMsgWindow.msg_date.setText(msg.getDate()) + + ##################################### + + if msg.getImageData() == "": + sentMsgWindow.frame.setPixmap(QPixmap("graphics/contact_trans_120.png")) + else: + arr=QByteArray(msg.getImageData()) + img = QPixmap() + img.loadFromData(arr) + + sentMsgWindow.frame.setPixmap(img.scaled(120,120, Qt.KeepAspectRatioByExpanding)) + + sentMsgWindow.show() + +def populateInbox(): + #allSenders=msgs.getAllSenders() + #for x in allSenders: + + recvModel=RecvModel(msgs.recvLst) + inboxWindow.listView.setModel(recvModel) + +def populateSent(): + #allSenders=msgs.getAllSenders() + #for x in allSenders: + + sentModel=SentModel(msgs.sentLst) + sentWindow.listView.setModel(sentModel) + + #for x in msgs.sentLst: + #print x.getRecName() + +msgs=csvServ() +notifier = Notifier() + +def init(): + ################## Connect SIGNALS ####################### + + QObject.connect(mainWindow.inbox_button, SIGNAL("clicked()"), showInboxMessages) + QObject.connect(mainWindow.sent_button, SIGNAL("clicked()"),showSentMessages) + QObject.connect(inboxWindow.listView, SIGNAL("clicked(QModelIndex)"),showMsg) + QObject.connect(sentWindow.listView, SIGNAL("clicked(QModelIndex)"),showSentMsg) + QObject.connect(mainWindow.actionImport, SIGNAL("triggered()"),showInboxDialog) + QObject.connect(mainWindow.actionImport_sent, SIGNAL("triggered()"),showSentDialog) + QObject.connect(inboxDialog, SIGNAL("fileSelected(QString)"), importInbox) + QObject.connect(sentDialog, SIGNAL("fileSelected(QString)"), importSent) + + #QObject.connect(dialog, SIGNAL("fileSelected(QString)"), importInboxFile) + #QObject.connect(ui.msg_back, SIGNAL("clicked()"),showInboxMessages) + #QObject.connect(ui.sent_msg_back, SIGNAL("clicked()"),showSentMessages) + #QObject.connect(ui.sentView, SIGNAL("clicked(QModelIndex)"),showSentMsg) + + ############################################################ + + ############################################################ + + + + ############################################################ + + ################# Other Init functions ##################### + + + fetch = False + + if msgs.hasImportedSent(): + fetch = True + msgs.fetchSent() + populateSent() + + if msgs.hasImportedInbox(): + fetch = True + msgs.fetchInbox() + populateInbox() + + if fetch: + msgs.fetchContactsInfo() + + + ########################################################### + +#def showImportInboxFileDialog(): + #name = QFileDialog.getOpenFileName(None, "Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)"); + #chooser = gtk.FileChooserDialog(title=None,action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) + + +def importInbox(path): + if msgs.importInbox(path): + notifier.requestPatience() + + msgs.fetchContactsInfo() + populateInbox() + + notifier.showSuccess(len(msgs.recvLst)) + else: + notifier.showFailure() + +def importSent(path): + if msgs.importSent(path): + notifier.requestPatience() + + msgs.fetchContactsInfo() + populateSent() + + notifier.showSuccess(len(msgs.sentLst)) + else: + notifier.showFailure() + + +def showInboxDialog(): + if not msgs.hasImportedInbox() : + inboxDialog.open() + else: + print "Inbox is already Imported" + +def showSentDialog(): + if not msgs.hasImportedSent(): + sentDialog.open() + else: + print "Sent is already Imported" + +if __name__ == '__main__': + app = QApplication(sys.argv) + #MainWindow = QtGui.QMainWindow() + #ui = Ui_MainWindow() + #ui.setupUi(MainWindow) + #MainWindow.show() + + ####### Initialization ######### + + mainWindow = Ui_MainWindow() + inboxWindow = Ui_InboxWindow(mainWindow) + sentWindow = Ui_SentWindow(mainWindow) + inboxMsgWindow = Ui_MessageWindow(inboxWindow) + sentMsgWindow = Ui_MessageWindow(sentWindow) + + + + inboxDialog = QFileDialog(mainWindow); + inboxDialog.setFilter("Recieved SMS CSV Files (*.csv)"); + inboxDialog.setViewMode(QFileDialog.List); + + sentDialog = QFileDialog(mainWindow); + sentDialog.setFilter("Sent SMS CSV Files (*.csv)"); + sentDialog.setViewMode(QFileDialog.List); + + + + + + #mainWindow=QMainWindow() + init() + + ################################ + + + mainWindow.show() + + + ################################ + + #win = QMainWindow() + #win.show() + + #name = QFileDialog.getOpenFileName(None,"Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)"); + + sys.exit(app.exec_()) + + + + diff --git a/notification_service.py b/notification_service.py new file mode 100644 index 0000000..adbf453 --- /dev/null +++ b/notification_service.py @@ -0,0 +1,28 @@ +import sys +import dbus +from dbus.mainloop.glib import DBusGMainLoop + +class Notifier: + + def __init__(self): + self.dbus_loop = DBusGMainLoop(set_as_default=True) + self.bus = dbus.SessionBus(mainloop=self.dbus_loop) + self.provider = self.bus.get_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications') + self.proxy = dbus.Interface(self.provider, 'org.freedesktop.Notifications') + + def showAlert(self,alertText): + self.proxy.SystemNoteDialog(alertText, 0 ,"ok") + + def requestPatience(self): + text = "Please Wait" + self.proxy.SystemNoteInfoprint(text) + + + def showSuccess(self, num): + text = "Successfuly Imported "+str(num)+" messages" + self.proxy.SystemNoteDialog(text, 0 ,"ok") + + def showFailure(self): + text = "Failed to import messages" + self.proxy.SystemNoteDialog(text, 0 ,"ok") + diff --git a/notification_service.pyc b/notification_service.pyc new file mode 100644 index 0000000..927f8dc Binary files /dev/null and b/notification_service.pyc differ diff --git a/notification_service.py~ b/notification_service.py~ new file mode 100644 index 0000000..96f0dab --- /dev/null +++ b/notification_service.py~ @@ -0,0 +1,28 @@ +import sys +import dbus +from dbus.mainloop.glib import DBusGMainLoop + +class Notifier: + + def __init__(self): + self.dbus_loop = DBusGMainLoop(set_as_default=True) + self.bus = dbus.SessionBus(mainloop=self.dbus_loop) + self.provider = self.bus.get_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications') + self.proxy = dbus.Interface(self.provider, 'org.freedesktop.Notifications') + + def showAlert(self,alertText): + self.proxy.SystemNoteDialog(alertText, 0 ,"ok") + + def requestPatience(self): + text = "Please Wait" + self.proxy.SystemNoteInfoprint(text) + + + def showSuccess(self, num): + text = "Successfuly Imported "+num+" messages" + self.proxy.SystemNoteDialog(text, 0 ,"ok") + + def showFailure(self): + text = "Failed to import messages" + self.proxy.SystemNoteDialog(text, 0 ,"ok") + diff --git a/recv.pyc b/recv.pyc index 0aeabeb..fb738ec 100644 Binary files a/recv.pyc and b/recv.pyc differ diff --git a/recv.py~ b/recv.py~ new file mode 100644 index 0000000..0afc751 --- /dev/null +++ b/recv.py~ @@ -0,0 +1,27 @@ +from message import message +#from contactsServ import * + +class recv(message): + + def __init__(self, fromNum, date, msg): + self.fromNum=fromNum + #message.date=date; + #self.contacts=address_book() + + + + message.__init__(self, msg, date) + + + + def setSenderName(self, name): + self.fromName=name + + def getSenderName(self): + try: + return self.fromName + except: + return self.fromNum + + + diff --git a/sms.csv b/sms.csv index 0d64ee0..8746b01 100644 --- a/sms.csv +++ b/sms.csv @@ -1,260 +1,6 @@ -sms,deliver,"Vodafone","","","2010.01.16 17:42","","فودافون حولتلك 3 جنيه تخصم عند أول عملية شحن. رصيدك الحالي 2.83" -sms,deliver,"Vodafone","","","2010.01.16 11:08","","فودافون حولتلك 3 جنيه تخصم عند أول عملية شحن. رصيدك الحالي 2.67" -sms,deliver,"Vodafone","","","2010.01.16 10:45","","فودافون ممكن تحولك6جنيه رصيد على مرتين،3جنيه كل مرة.اضغط#3*868* ب50قرش" -sms,deliver,"9771","","","2010.01.15 18:11","","+20102090035, 04, 15-01-2010 18:21" -sms,deliver,"777","","","2010.01.15 18:09","","You have 4 missed call(s). To retrieve your call(s) dial *777# for 50pt or to receive your missed calls automatically for a month send SMS to 7777 for 5LE" -sms,deliver,"+20123526683","","","2010.01.15 16:25","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" -sms,deliver,"+20123526683","","","2010.01.15 16:15","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" +sms,deliver,"022904719","","","2010.01.15 16:25","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" +sms,deliver,"0118010337","","","2010.01.15 16:15","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" sms,deliver,"+20102412751","","","2010.01.14 13:32","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" sms,deliver,"Bianco","","","2010.01.14 11:55","","Leading fashion footwear Brand in Scandinavia, now open in Mohandeseen 15 Jazeerat el Arab, Benefit from our 30% Discount by showing this sms in the shop To stop SMS adds send STOP to 2020 for free" -sms,deliver,"Bianco","","","2010.01.14 11:39","","Leading fashion footwear Brand in Scandinavia, now open in Mohandeseen 15 Jazeerat el Arab, Benefit from our 30% Discount by showing this sms in the shop" -sms,deliver,"+20124641123","","","2010.01.10 10:22","","Tarek enta sa7y?" -sms,deliver,"+20102412751","","","2010.01.10 00:48","","Tarek eh nzam toM ?Hatro7o emta?" -sms,deliver,"+20102090066","","","2010.01.05 22:05","","Hatly pepsi m3ak" -sms,deliver,"+20108554395","","","2009.12.30 13:18","","3azzab@gmail.com" -sms,deliver,"+20127620656","","","2009.12.28 12:53","","Da ragel me3arras aslo" -sms,deliver,"+20102412751","","","2009.12.25 02:29","","L2 msh 7ga ha2OLHA , ASL EL RAGEL B3atly el aCCEPTANCE LETTER WITH FURTHER Details aBT THE PROJECT AND I CNT REALLY UNDerstand w 7asa el tanya a7la! Lol , i just wanteD 2 KNW UR OPINIOn aBT IT 3SHAN AKARAR MAX BY TOm isA" -sms,deliver,"+20102412751","","","2009.12.25 02:26","","Hi tarek , if u cAN GO Online n0w plz do , 3yZA A7'OD R2YAK F 7GA .. Thnk u so much" -sms,deliver,"+20102412751","","","2009.12.24 12:15","","Tarek 1:30 b2a =)" -sms,deliver,"+20106676915","","","2009.12.16 19:08","","Mat3rfsh tgbhaly" -sms,deliver,"+20106676915","","","2009.12.16 19:03","","Hwa nta 3andak cd el office" -sms,deliver,"+20102090084","","","2009.12.14 11:25","","This is a reminder for todays meeting 5.30 in c1" -sms,deliver,"+20102550678","","","2009.12.11 12:17","","Hey tarek , its menna , bos ana babaya karar en lazem aro7 agib el cAR b3D el sala, so let it be 3la 2 kda" -sms,deliver,"+20102412751","","","2009.12.10 22:27","","Tarek 7'aliha at 1 f cilantro isA AND TELL HESHAM =)" -sms,deliver,"+20100046084","","","2009.12.09 15:43","","Ana fadely 30 mins kda fa shof enta" -sms,deliver,"+20102412751","","","2009.12.08 21:46","","Tarek bos , el net 2ata3 fag2A msh 3rfa leh! Knt araBT A7'ALAS EL PNEUMATICS , FA ANA AFASHT B2A , had7'ol anam w aB2A as7a aBL EL GM3A A3MELO WLA 7GA , START KDA PLC , FI LECTURE KAMLA 3N EL PLC , TAKE IT AS A REFERENCE , LW EL NET GEH Abl manam i'll send it 2 u" -sms,deliver,"+20106676915","","","2009.12.07 00:29","","7abeibyyyy :D" -sms,deliver,"+20106676915","","","2009.12.07 00:24","","Wnta tayb yabo el takateik. Kont hafsha5ak law makontsh kalmtny :D. Fakes ba2a el za3al wl gaw el r5is da :D:D TEKY YA TEKY DON'T B SAD (Y)" -sms,deliver,"+20100046084","","","2009.12.07 00:12","","141 585 019 501 11" -sms,deliver,"+20106614819","","","2009.12.06 03:03","","El nour 2ta3 :s beed" -sms,deliver,"+20106650502","","","2009.11.28 21:20","","Happy feast everyone ,, enjoy =)" -sms,deliver,"+20102249990","","","2009.11.27 15:16","","Happy Eid... Hope u enjoy it 2 da max... Have a blast :) mina samir p.s: that's my new number" -sms,deliver,"+20127200682","","","2009.11.27 08:27","","Kol sana wento tayebeen =)" -sms,deliver,"+20101422278","","","2009.11.26 21:14","","Eid Adha Mubarak everyone :-) budu" -sms,deliver,"+20104994713","","","2009.11.25 13:17","","Please send me the WEP of the wi fi of guc and tell me which one to use on black berry Khaled taha elsherbiny" -sms,deliver,"+20104446308","","","2009.11.24 15:36","","Hey all plz dont b late 2day at 7 isa fi quaY .. WAITING 4 U ALL =)" -sms,deliver,"+20106614819","","","2009.11.23 12:30","","Lecture bedan..lw hatamshy 2oli 3ashan no car" -sms,deliver,"+20102412751","","","2009.11.22 14:12","","Tarek bos , shklaha kda fakes el nharda !" -sms,deliver,"+20124641123","","","2009.11.21 21:24","","Ew3a ya tarek te3mel elly 2olt 3aleh =)" -sms,deliver,"+20100046084","","","2009.11.18 15:17","","Ill call u in 10" -sms,deliver,"+20100046084","","","2009.11.18 15:17","","Quiz :s ill call u in" -sms,deliver,"+20102412751","","","2009.11.18 00:18","","Tarek bos , reem msh hato3od tzaker t0m! W asln el w2t daya2 W 3yzin nerga3 aBL EL MATCH, FA BOS FAKES M0ZAKRA TOm b2a" -sms,deliver,"+20106614819","","","2009.11.17 15:24","","Enta msh gy?" -sms,deliver,"+20146068600","","","2009.11.15 08:40","","A5dt mnk 20 gneh w hdhomlk enhrda 3shan r7t gm3a btaxi" -sms,deliver,"+20127200682","","","2009.11.15 03:08","","fe 3'alta fely ba3ato 11-14 fel lcd metwasalen le 37-40 mesh 21-24 w fel pic 13 w 14 homa ely ma3 elclock" -sms,deliver,"+20180742083","","","2009.11.12 16:51","","I will be abit late due our lovely country's traffic" -sms,deliver,"+20101272889","","","2009.11.09 14:46","","Akeed ur own words e3mel searching from different sources" -sms,deliver,"+20102412751","","","2009.11.09 12:28","","Mashy ya si tarek" -sms,deliver,"+20180742083","","","2009.11.08 10:22","","I have the trainning evaluation forms with me today.. Call me to get it Mostafa sheshtawy" -sms,deliver,"+20103895929","","","2009.11.08 09:23","","Hi tarek, its menna , ana msh hagy el gm3a , s7eit kda 7aseit eny msh adra.. Sorry" -sms,deliver,"+20102540550","","","2009.11.05 09:13","","Sa7y kalmny" -sms,deliver,"+20101272889","","","2009.10.27 08:32","","H9" -sms,deliver,"+20123174186","","","2009.10.21 02:12","","Shrif msh gyely fa eshta momkn tgely mt2a5ar shwia 3la 12:30" -sms,deliver,"+20102540550","","","2009.10.20 01:55","","Lama tes7a kalmny" -sms,deliver,"+20102540550","","","2009.10.19 13:25","","Hatmshy emta" -sms,deliver,"+20123354981","","","2009.10.15 10:27","","Where is ur class?" -sms,deliver,"+20146068600","","","2009.10.09 12:35","","Lw htgeb akl gbly m3ak 1 fol bl bed,1 btates" -sms,deliver,"+20103405520","","","2009.10.06 18:58","","If u will meet sherif today or tomorrow give him the iso image of windows" -sms,deliver,"+20182222662","","","2009.10.04 22:25","","Ya teccccc thnxxxxxx we 7elwa gogellion dih lolllll" -sms,deliver,"+20102540550","","","2009.10.03 10:23","","Ana gy el gam3a now mesh haynfa3 agy ba3d el second" -sms,deliver,"+20123354981","","","2009.09.27 02:56","","Ya man call me whn u wake up to c whether we r going to the uni or not 3shan ana delwa2ty metzawel" -sms,deliver,"+20146068600","","","2009.09.08 13:26","","28905190101116" -sms,deliver,"+20100046084","","","2009.09.07 12:54","","Sloveh-4" -sms,deliver,"+20102412751","","","2009.09.07 02:13","","Mabro0k el 3araBEYA YA 3AM =D , gebt eh? Sry 4 the late reply !" -sms,deliver,"+20102412751","","","2009.08.21 19:39","","Kol sana wento tybin =) ramadan karim =)" -sms,deliver,"+20106504570","","","2009.08.21 16:46","","Kol sana w enta tayeb ya tek Happy ramadan;)" -sms,deliver,"+20103405520","","","2009.08.19 10:19","","We will meet today at 8:00 pm isa at my home at koleyet el banat call me if u need a description 4 the way. Waiting 4 u there my brother" -sms,deliver,"+20146068600","","","2009.08.17 21:54","","Ana neseit gzma fi shantet el 3rbeya" -sms,deliver,"+20146068600","","","2009.08.15 02:27","","Abl mtmsh 2oly" -sms,deliver,"+20100046084","","","2009.08.14 05:25","","TarooKa, nemt wala aa??:D" -sms,deliver,"+20123174186","","","2009.08.11 18:03","","Meeting today at 8 pm sharp Cilantro Abbas" -sms,deliver,"+20120897159","","","2009.08.08 15:15","","Yabny im pierre i have questions" -sms,deliver,"+20120897159","","","2009.08.03 10:15","","Yabny rodd ana pierre" -sms,deliver,"+20100046084","","","2009.08.02 20:43","","Law 7ad m3ah flashaya 3andak garab el program keda w tameny wenaby :D" -sms,deliver,"+491639498283","","","2009.07.28 15:57","","Aug 21 isA! Tyb ana olt ymkn yb2ly" -sms,deliver,"+491639498283","","","2009.07.28 14:10","","Ana lama took my certificates bs tl3ly zayoko f mmkn ykonly floos f law 3rft ts2aly plz=)" -sms,deliver,"+491639498283","","","2009.07.28 13:38","","Tarek 3amel a? Howz evth? Ba2olak 3yzin 7'edma=) mmkn men fdlak law enta fel gm3a t7'od certificate wasfi w ts2alena law leena floos w ad a w law mmkn 7ad ya7'odlna el chek w m7tag a? Plz let me knw .Thank u thank u! Rana tawakkol" -sms,deliver,"+20123354981","","","2009.07.28 02:09","","Ya brence 2morow we go together 2 the uni inshaalah call me when u wake up" -sms,deliver,"+20103405520","","","2009.07.26 01:11","","Tomorrow we will meet with the people at 4:00 at the university" -sms,deliver,"+20102412751","","","2009.07.10 02:10","","Ya tarek thnk u awYYy bgd =)" -sms,deliver,"+20104446308","","","2009.07.09 19:51","","LOL .. m-oltlak 7ayb2a za7ma moot =D lef w arg3 w ta3la bkra ;)" -sms,deliver,"+20102412751","","","2009.07.09 01:51","","Tarek =) hw r u? Ana msh d7'la oNLINE TOD, BUT I WANTEd 2 kn0w whether msheit 3la el etaf2na 3alih yest wla l2 ?! =)" -sms,deliver,"+20123366769","","","2009.07.06 08:02","","Lama tes7a zbatly plz el selk ana mosh un plugged bas mosh shayef 7ad fel network wla fe net" -sms,deliver,"+20106676915","","","2009.07.06 06:14","","Lsa darbin 3aza w a :D 7aga t2rf. Matkalmnish lama tshouf el msg :D:D :D" -sms,deliver,"+20101272889","","","2009.07.01 08:54","","El meeting ma3 abousafy haieb2a el sa3a 12 plz come in time" -sms,deliver,"+20105213977","","","2009.06.25 11:19","","Great, thx" -sms,deliver,"+20105213977","","","2009.06.25 11:16","","Hello Tarek, something has come up I'll have to postpone our meeting today, can u make it Sunday, same time? Sorry for the inconvenience. - Fadia Badrawi, DCI" -sms,deliver,"+20123526683","","","2009.06.15 08:26","","La ta3liik :d:d:d" -sms,deliver,"+20102540550","","","2009.06.09 13:20","","Mesh el eval el sa3a 1 20?" -sms,deliver,"+20102540550","","","2009.06.09 13:18","","Ento fen send back by msg 3alashn ana fi el os" -sms,deliver,"+20101326461","","","2009.06.02 11:27","","Tab momken teb3attha 3alashan manelbessh?" -sms,deliver,"+20101326461","","","2009.06.02 11:26","","Wala tarek u sent the DSD form?" -sms,deliver,"+20101272889","","","2009.05.29 08:21","","Call me when u wake up" -sms,deliver,"+20102540550","","","2009.05.27 17:10","","Ana mashy" -sms,deliver,"+20101272889","","","2009.05.22 09:57","","When u wake up call me" -sms,deliver,"+20106614819","","","2009.05.20 20:51","","On da run" -sms,deliver,"+20106676915","","","2009.05.19 00:33","","U r fuckin welcome :D" -sms,deliver,"+20101884293","","","2009.05.19 00:08","","Happy birthday ya tech=)) have a blast!" -sms,deliver,"+20106676915","","","2009.05.19 00:06","","Happy fuckin bd ya takateiko w isA el sana el gaya tkoun ba2it scadawy ad el donya ;)" -sms,deliver,"+20109900966","","","2009.05.18 23:43","","Happy birthday:):).. Yala b2a msh 5sara fik:p.. U only turn 20 once;)" -sms,deliver,"+20102412751","","","2009.05.17 14:47","","Hi tarek , ezayak ? May u plz cALL ME WHEN U C THis msg .. Asl i have n0 credit =s lol =)" -sms,deliver,"+20161056130","","","2009.05.10 12:16","","WOHOO! Mabrok! Am doin an acnt 2dy isA. W hadeelak kman websites tnya zayo=D" -sms,deliver,"+20101422278","","","2009.05.02 13:20","","10 min n i'll call u" -sms,deliver,"+20106676915","","","2009.04.30 10:51","","Kalmny lama tetla3" -sms,deliver,"+20103405520","","","2009.04.27 02:12","","Please bring tomorrow a copy of ur guc id and ur personal id and forward this msg to wasfi" -sms,deliver,"+20103405520","","","2009.04.26 11:47","","When u finish ur exam please pass by" -sms,deliver,"+20103405520","","","2009.04.25 19:34","","Rabena m3ak my brother in all your exams isa shed 7elak and you will do great isa" -sms,deliver,"+20106676915","","","2009.04.19 12:45","","Ya tch i lost 7.2 kilos in 1 week :D :D" -sms,deliver,"+20112365365","","","2009.04.18 16:12","","PRISON BREAK IS OUT YA MAW" -sms,deliver,"+20119654293","","","2009.04.14 16:55","","" -sms,deliver,"+20108168190","","","2009.04.13 22:52","","Yaa tecccc 3amel eh? Plsss get with u 2morow the office w ana haklmk awl lama aro7 el gam3a. Thank u awi ya tec w ma3lsh 3shan ta3btk" -sms,deliver,"+20102540550","","","2009.04.13 16:45","","Ta3ala 3ala el main gate lama te7'als" -sms,deliver,"+20105350209","","","2009.04.13 05:45","","Thnx ya taroka i found it" -sms,deliver,"+20105350209","","","2009.04.13 05:40","","Ab3atli ya taroka el assignment beta3 el os abl matanzl el gam3a..el samo" -sms,deliver,"+20161056130","","","2009.03.31 12:58","","Hatakol pizza?" -sms,deliver,"+20102540550","","","2009.03.29 13:37","","Fakes ha7'odhom men gohar" -sms,deliver,"+20101272889","","","2009.03.29 12:16","","Can u put the os book on the svn" -sms,deliver,"+20123526683","","","2009.03.28 00:58","","Mn 3ss lel tarook..w enta tayeb ya man ..thnxxx :E:E" -sms,deliver,"+20106676915","","","2009.03.26 20:46","","T3ala online" -sms,deliver,"+20102540550","","","2009.03.25 12:42","","Hatly 7ama ma3ak" -sms,deliver,"+20106676915","","","2009.03.24 16:41","","Nawar yabo tch nawar :D" -sms,deliver,"+20106614819","","","2009.03.24 16:24","","Hatli 3sir manga men cilantro" -sms,deliver,"+20123354981","","","2009.03.23 01:53","","Tarook if u can plz bring z ubunto cd" -sms,deliver,"+20127620656","","","2009.03.17 12:07","","Ah" -sms,deliver,"+20161056130","","","2009.03.09 23:42","","Hagy 1st isA. Cal me wn u gt there isA b2a" -sms,deliver,"+20106614819","","","2009.03.07 14:55","","Enta fean?" -sms,deliver,"+20123354981","","","2009.02.27 20:30","","Username pierre.fares email pierre_247@hotmail.com" -sms,deliver,"+20101884293","","","2009.02.23 23:06","","Wana kaman da kan ra2ii" -sms,deliver,"+20106676915","","","2009.02.23 22:58","","Hwa enta kont montazr rad tany ?" -sms,deliver,"+20106676915","","","2009.02.23 22:55","","Tb bel hana wl shefa" -sms,deliver,"+20106676915","","","2009.02.23 22:52","","???" -sms,deliver,"+20106676915","","","2009.02.23 18:56","","Fi a" -sms,deliver,"+20127620656","","","2009.02.16 16:25","","Hatem.el-ghannam FAT00M_12 , these are zeros not Os .. Can u check also the grade and give me a ring .. Shokran 7obbi" -sms,deliver,"+20109958830","","","2009.02.16 00:29","","Hey there, i'll come bokra met2a5ar. if u need any thing call me i'll be at home :D" -sms,deliver,"+20100046084","","","2009.01.22 23:08","","Etwasa ba2a bel salsa ya basha ..... 7ot ma3la2et salsa kaman ya basha hahahahaha :D" -sms,deliver,"+20109958830","","","2009.01.21 14:34","","Thanks" -sms,deliver,"+20100773775","","","2009.01.20 20:33","","Hey Tarek, sorry 4 disturbing but i'll do the report and i want u to send all procedures. aisha‎" -sms,deliver,"+20101272889","","","2009.01.20 08:34","","Call me" -sms,deliver,"+20100773775","","","2009.01.13 08:37","","Hi Tarek, this is Aisha, i'm in the study room, C7." -sms,deliver,"+20101326461","","","2009.01.08 09:56","","Ana gayy fel seka we ma3aya el cd" -sms,deliver,"+20106504570","","","2009.01.03 22:21","","Tek tek thank u awi 4 caring.bgd enta koko awi:)" -sms,deliver,"+20109958830","","","2009.01.01 00:06","","Happy New Year Tarek! may all ur dreams come true." -sms,deliver,"+20102540550","","","2008.12.31 07:32","","Hatly ma3ak el windos wenaby" -sms,deliver,"+20106086929","","","2008.12.23 23:13","","Ana fakes mesh 2ader anzel..ma3lesh ya tarook" -sms,deliver,"+20101326461","","","2008.12.20 22:31","","Wala tarek please dont forget the sources bokra" -sms,deliver,"+20109958830","","","2008.12.19 17:17","","oh really? congrat if u did it gd 4 u tarek, i didn't reach that level yet :p" -sms,deliver,"+20105350209","","","2008.12.18 14:46","","Database nazel ya tarokaa" -sms,deliver,"+20108168190","","","2008.12.08 16:01","","Happy feast for u and ur family.. Ozo" -sms,deliver,"+20161000453","","","2008.12.08 13:41","","Kol sana wenta tyb ya techi we 3id sa3ed" -sms,deliver,"+20122768786","","","2008.12.08 13:18","","Happy 3iiid...koooooool sanaaaa wenta tayeeeb :) Zaklama" -sms,deliver,"+20182222662","","","2008.12.08 12:27","","Loooool" -sms,deliver,"+20160779553","","","2008.12.07 22:01","","Happy feast ya m3alem... enjoy ;)" -sms,deliver,"+20182222662","","","2008.12.07 18:25","","Kol sana wento tayebeen w 3eed sa3eed 3lekom game3an" -sms,deliver,"+20109958830","","","2008.12.07 15:40","","Tarek, 3edak mobarak :) enjoy" -sms,deliver,"+20101884293","","","2008.12.07 14:38","","جعل الله فجر يوم عرفه لكم نور و ظهره سرور و عصره إستبشار و مغربه غفران و جعل لك دعوة لا ترد و وهبك رزق لا يعد و فتح لك باب في الجنة لا يسد. Happy Eid" -sms,deliver,"+20106676915","","","2008.12.05 17:57","","Hat el sb7a m3ak" -sms,deliver,"+20102540550","","","2008.12.01 12:48","","Wala fih quiz lazem teegy" -sms,deliver,"+20109958830","","","2008.11.30 22:55","","Thanks. i'll call u when i arrive uni bokra no prob gd night :)" -sms,deliver,"+20109958830","","","2008.11.30 22:30","","Hey Tarek, sorry 4 sending at this time. just wana ask about the d.b poject, we choosed no 2 right?" -sms,deliver,"+20106614819","","","2008.11.29 12:15","","Hatli wa7ed btates viena wenaby" -sms,deliver,"+20102540550","","","2008.11.20 10:35","","Lama ts7a kalmny" -sms,deliver,"+20106676915","","","2008.11.18 20:19","","Kalm samo" -sms,deliver,"+20102540550","","","2008.11.17 00:35","","Matnsash wenaby" -sms,deliver,"+20102540550","","","2008.11.15 10:29","","El quiz now" -sms,deliver,"+20123366769","","","2008.11.10 00:58","","Eftah elbab law enta wake" -sms,deliver,"+20102540550","","","2008.11.08 22:23","","7'osh online" -sms,deliver,"+20123366769","","","2008.11.08 07:13","","Law wake eftah el m$n" -sms,deliver,"+20102540550","","","2008.11.03 11:16","","Yala nemshy?" -sms,deliver,"+20102540550","","","2008.11.03 11:14","","Aywa" -sms,deliver,"+20102540550","","","2008.10.31 23:41","","Sherifmoharam89 el pass beta3 el site met law le72t" -sms,deliver,"+20100046084","","","2008.10.30 15:01","","Eshta eb2a olaha b2a en el tickets mawgoda" -sms,deliver,"+20100046084","","","2008.10.30 14:58","","Ana m3aya 2 wa7da liha w wa7da l souka na2es wa7da bta3et sa7ebha da .... Enta a nzamak ??" -sms,deliver,"+20100704241","","","2008.10.29 16:24","","6 tickets? Etla3 tyeb" -sms,deliver,"+20100046084","","","2008.10.29 15:06","","Howa nta 3andak 7aga el 5" -sms,deliver,"+20101202017","","","2008.10.28 18:18","","Come directly at the doctor" -sms,deliver,"+20123366769","","","2008.10.24 10:51","","Law sa7y now rennely" -sms,deliver,"+20101884293","","","2008.10.24 00:14","","Thank u ya techo 2wi=) 2b2a ro7 shof saw bokra b2a;)" -sms,deliver,"Vodafone","","","2008.10.21 18:57","","Dial *999*Mob No#: PUK *999*4#: VF Live Activation *999*5#: Roaming Activation" -sms,deliver,"+20106614819","","","2008.10.21 00:47","","Saw 2 ya man 3la mbc 2" -sms,deliver,"+20106614819","","","2008.10.19 15:32","","Fi mkan 3ndak yad?" -sms,deliver,"+20106676915","","","2008.10.18 13:09","","C+ eb3atly el pas wl user ashoflak" -sms,deliver,"+20106676915","","","2008.10.18 13:02","","El co nezel" -sms,deliver,"+20106676915","","","2008.10.17 16:31","","El rgim etnafa5 :D" -sms,deliver,"+20106504570","","","2008.10.14 21:50","","Thanks ya tektek Allah yesalemk;) adaha w edod isa" -sms,deliver,"+20182222662","","","2008.10.04 00:17","","Thnx ya tec w 3o2bal lama tb2a 20 isa. W 2lbak 2swed 2nta lesa faker.lol" -sms,deliver,"+20127777981","","","2008.09.19 22:05","","Hii hw r u ? Hwz everythin? my birthday is tom (20-9) @ 8 pm n casper cafe out area in citystars... u r invited =)" -sms,deliver,"+20106676915","","","2008.09.09 11:05","","Lama ts7a kalmny" -sms,deliver,"+20102540550","","","2008.09.08 18:35","","Kalmny" -sms,deliver,"+20106960034","","","2008.08.25 13:22","","Lw sa7y klmny" -sms,deliver,"+20101884293","","","2008.08.23 22:11","","TechOoOoOoOo! 3aml eh? Wa7shny wallahi.. Rage3 emta mil sa7el? 3awza ashofak b2a" -sms,deliver,"+20106676915","","","2008.08.14 08:33","","Efta7 el kana el 2oula" -sms,deliver,"+20100704241","","","2008.07.31 23:23","","Look, a friend of mine 90% will pick me up so you dont have to come, i will call you if there's any changes ok. Noha" -sms,deliver,"+20100704241","","","2008.07.31 23:16","","Take your time, 27na lesa mwslnash" -sms,deliver,"+467374940501","","","2008.07.29 03:39","","Hi tghazali! Your Jaiku activation code is: 90e7. Please enter this code on the Web now" -sms,deliver,"+447624801423","","","2008.07.28 22:19","","Your device has been verified and is on. Send 'off' at any time to silence. Send 'help' for more." -sms,deliver,"+20106676915","","","2008.07.25 01:53","","Ma3lish shwaya w gai" -sms,deliver,"+17819060003","","","2008.07.22 00:50","","TeleMessage login details: Login: 20106960035 Password: 57855866" -sms,deliver,"MobinilWiFi","","","2008.07.20 07:36","","Activation Code: 130257" -sms,deliver,"MobinilWiFi","","","2008.07.20 07:36","","Activation Code: 135343" -sms,deliver,"+20118869193","","","2008.07.16 14:10","","Game nazel ya vein" -sms,deliver,"+20106676915","","","2008.07.10 11:22","","Msh da el e7na 3awzeino" -sms,deliver,"+20123526683","","","2008.06.30 19:44","","E7na f ciao..Ely 3and koliet el banat" -sms,deliver,"+20106614819","","","2008.06.24 15:35","","C- ya man" -sms,deliver,"+20100046084","","","2008.06.24 15:32","","Shofly el grades pass: 1234-aaa" -sms,deliver,"+20106676915","","","2008.06.24 15:28","","Ana f dars. 5eirrr" -sms,deliver,"+20106676915","","","2008.06.13 19:10","","Law 7'alst mozakra we 3andk wa2t ta3alaly" -sms,deliver,"+20101884293","","","2008.06.11 16:29","","Vielen Dank Herr Tech:)" -sms,deliver,"+20101726624","","","2008.06.04 23:58","","Tarook matensash ta5od el circuit mn gohar 3ashan bokra el eval" -sms,deliver,"+20102540550","","","2008.06.04 02:39","","Fi bokra mat lab quiz wala la" -sms,deliver,"+20106960034","","","2008.06.02 18:03","","Go online ahmed 3wzk" -sms,deliver,"+20100046084","","","2008.05.28 14:57","","Bye Bye ya RPeee =')" -sms,deliver,"+20106676915","","","2008.05.27 02:21","","Perfect :D" -sms,deliver,"+20102540550","","","2008.05.25 11:31","","Ba2olk ya tarek ma3lshy law fi ay 7aga make it to me" -sms,deliver,"+20100046084","","","2008.05.22 13:05","","Efta7 shof grades el rpw :s" -sms,deliver,"+20182222662","","","2008.05.19 09:58","","Happy birthday ya tec w 3o2bal milliooon sana" -sms,deliver,"+20106676915","","","2008.05.19 01:08","","Haby bezy yoyo haby bezy yoyo haby bezy yo tar2 .haby bezy yoyo" -sms,deliver,"+20106504570","","","2008.05.19 00:06","","Kol sana w enta tayeb ya takatek w 3o2bal kter isa ya best tek ever" -sms,deliver,"+20105541210","","","2008.05.19 00:04","","Kol sana wenta tayeb ya Tch ... W 3o2bal 1,000,000 sana keda .. ;)" -sms,deliver,"+20100048666","","","2008.05.19 00:02","","Happy b-day ticko w 3o2bal 10000000000000000000 sana isa hun.bgd ur one of da bst ppl in ma life.luv u sooo much my bst brother ever:)" -sms,deliver,"+20100046084","","","2008.05.18 23:57","","TeChaaAAAaWaaaaaAAaayyY aiwa ba2a ya maaan 19 sana yedba7o el katkoot :D yalla kol sana wenta tayeb w 3o2bal 1000000 sana ya prince isA :D:D" -sms,deliver,"+20127244556","","","2008.05.15 12:44","","Tar2 matnsanish ha!!" -sms,deliver,"+20123526683","","","2008.05.14 14:27","","Mina alaa..10-3184... Ahmed essam 10-2541" -sms,deliver,"+20121275651","","","2008.05.14 14:21","","Eh yabo tar2 ana omar 3amaltly eh fl hwar sa2alt wala eh" -sms,deliver,"+20101726624","","","2008.05.12 11:30","","Tarook momken lw 3reft ta5odli attendance fi el circuits 10-1200 w ana hakalemak 3la 5 kda 3ashan netefe2 3la el game." -sms,deliver,"+20105726318","","","2008.04.29 01:41","","Eh ya ebniiii shayel mobile ashn msh trod 3lih :@" -sms,deliver,"+20167409090","","","2008.04.19 10:44","","Ya tech mesh 7ynf3 2agy ... See u beleil isa" -sms,deliver,"+20106676915","","","2008.04.15 20:06","","E7na f c5" -sms,deliver,"+20101326461","","","2008.04.13 09:19","","Wala we need your help fe 7aga bas we7yat abook" -sms,deliver,"+20106614819","","","2008.03.29 17:36","","Physics lab nezal" -sms,deliver,"+20100046084","","","2008.03.19 14:31","","Howa a el site bta3 el mob fb ? :)" -sms,deliver,"+20106676915","","","2008.01.28 14:54","","T3ala" -sms,deliver,"+20106676915","","","2008.01.12 14:55","","7awel tektebly attendance ya tech 10-2883" -sms,deliver,"+20101661659","","","2007.12.31 15:02","","Wish you a happy new year full of happiness and joy" -sms,deliver,"+20100046084","","","2007.12.30 09:53","","91% ...... Ya m3alem =D" -sms,deliver,"+20100046084","","","2007.12.30 08:36","","Cs nezel !!" -sms,deliver,"+20108168190","","","2007.12.20 13:38","","Happy feast ya gama3a.hope it will be good feast" -sms,deliver,"+20106014977","","","2007.12.19 13:42","","Kol sana w ento tayben:) samia" -sms,deliver,"+20106676915","","","2007.12.09 10:51","","Afta7 el facebook ezay :D" -sms,deliver,"+20106504570","","","2007.11.08 16:17","","Ana gohar kalm 3sam 2olo ya5d nouchy m3ah .kalmo delwa2ty" -sms,deliver,"+20106676915","","","2007.11.05 02:22","","Matkalmneish bokra 3ashan ana gai el talta" -sms,deliver,"Vodafone","","","2007.10.31 18:52","","(3SSF1A) تم شحن:100.00 رصيدكم الان:115.03 (وزيادة 15% علي رصيدك)" -sms,deliver,"+20106676915","","","2007.10.29 13:21","","Enta fein 3ashan el lab bta3y etla3'a wana zhe2t" -sms,deliver,"+20106676915","","","2007.10.27 12:38","","Enta fein" -sms,deliver,"+20106676915","","","2007.10.20 00:29","","El gadwal nezel :p :p (ma3teeeeeeh)" -sms,deliver,"+20129200988","","","2007.10.13 22:35","","kol sana w enta tayeb ya 7obby!" -sms,deliver,"+20106504570","","","2007.10.13 14:35","","Kol sana w enta tayb ya taktok" -sms,deliver,"+20106504570","","","2007.10.08 16:12","","Tek el gpa tl3 2.1 enta 3mlt e.h? M3lsh kont nyma" -sms,deliver,"+20102221110","","","2007.10.05 23:37","","Gebt el 3arabeyaaaaaa...:)" -sms,deliver,"+20106614819","","","2007.09.27 13:05","","Tarook..ana salet el dohr w hanam nw ab2a sa7iny 3ala 5 b nafs el tari2a bs el marady el 3asr w ab2a at2aked eny se7it isa:)" -sms,deliver,"+20101413071","","","2007.09.21 01:00","","2b2a 2ablny law shoftlha dera3 tany..H" -sms,deliver,"+20106504570","","","2007.09.14 18:50","","Lol walahi lesa kont hb3tlk msg a2olk .mercie ya tek i'll call u kman shwya" -sms,deliver,"+20129200988","","","2007.09.12 14:58","","wa7awy ya wa7awy. Ramadan karim" -sms,deliver,"+20123366769","","","2007.09.11 07:40","","Bta3et link zaharet 2day el sob7 w 3amalt lakad komt belsadad w2alle el net hayege kaman 2 hours wel mosta7akat 752 geneh" -sms,deliver,"+20122310776","","","2007.09.02 14:49","","3mlt 7lw 7mdulilah" -sms,deliver,"+20122310776","","","2007.09.02 08:39","","Merci awe awe bgd howa 1 w nos isA.ed3ili ya tare2 bgd khyfa awe awe aweeee" -sms,deliver,"+20122310776","","","2007.08.20 11:54","","Thank u awe bgd 4 coming yesterday" -sms,deliver,"+20122310776","","","2007.07.24 14:54","","E7em...isA isA!LOL! um on my way 2 uni asln" -sms,deliver,"+20122310776","","","2007.07.24 14:45","","MABROOOOOOKKKKK!!! Bgd enta msh motakhayal ana mabsootalak ezay! Keep it up ya tare2 w 3o2bal kol sana isA ya rab =) yalla enzl entalek w celebrate!" -sms,deliver,"+20161000453","","","2007.07.11 20:20","","5osh 3ala el net" -sms,deliver,"+20106676915","","","2007.07.05 11:49","","3ashan ana ensan fa2ri verb habe msh zay el ba2y byeb2a hast wl tany tele3 3aks mana 3amalto :F :F" -sms,deliver,"+20122502589","","","2007.02.01 09:10","","Kol 3am w enta b 1000 7'er w kol sna ben3ad 3lekm." \ No newline at end of file + + diff --git a/sms.csv~ b/sms.csv~ new file mode 100644 index 0000000..a2f9faf --- /dev/null +++ b/sms.csv~ @@ -0,0 +1,4 @@ +sms,deliver,"022904719","","","2010.01.15 16:25","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" +sms,deliver,"0118010337","","","2010.01.15 16:15","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" +sms,deliver,"+20102412751","","","2010.01.14 13:32","","كلمنى شكرا Pls Call Me اتكلم دولي ب1.99جنيه بس للدقيقة.كلم800مجانا" +sms,deliver,"Bianco","","","2010.01.14 11:55","","Leading fashion footwear Brand in Scandinavia, now open in Mohandeseen 15 Jazeerat el Arab, Benefit from our 30% Discount by showing this sms in the shop To stop SMS adds send STOP to 2020 for free" diff --git a/testother.py b/testother.py index 7c0f766..de67f46 100644 --- a/testother.py +++ b/testother.py @@ -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_()) diff --git a/testother.py~ b/testother.py~ new file mode 100644 index 0000000..78f8f7b --- /dev/null +++ b/testother.py~ @@ -0,0 +1,15 @@ +from PyQt4.QtCore import * +from PyQt4.QtGui import * +import sys +#import gtk +import evolution + +app = QApplication(sys.argv) + +win = QMainWindow() + +win.show() + +path = QFileDialog.getOpenFileName(None,"Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)"); + +sys.exit(app.exec_())