add contact form, some updates
This commit is contained in:
parent
d8b06efd7c
commit
17a48df7e5
3 changed files with 80 additions and 8 deletions
24
src/main.py
24
src/main.py
|
@ -4,13 +4,21 @@ from mainscreen import MainWindow
|
|||
from profile import Profile
|
||||
import sys
|
||||
from PySide import QtCore, QtGui
|
||||
from tox import Tox
|
||||
|
||||
|
||||
class login(object):
|
||||
|
||||
def __init__(self, arr):
|
||||
self.arr = arr
|
||||
|
||||
def login_screen_close(self, t, number=-1, default=False, name=None):
|
||||
""" Function which processes data from login screen
|
||||
:param t: 0 - window was closed, 1 - new profile was created, 2 - profile loaded
|
||||
:param number: num of choosen profile in list (-1 by default)
|
||||
:param default: was or not choosen profile marked as default
|
||||
:param name: name of new profile
|
||||
"""
|
||||
print str(t), str(number), str(default), str(name)
|
||||
self.t = t
|
||||
self.num = number
|
||||
|
@ -22,6 +30,9 @@ class login(object):
|
|||
|
||||
|
||||
def main():
|
||||
"""
|
||||
main function of app. loads loginscreen if needed and starts mainscreen
|
||||
"""
|
||||
app = QtGui.QApplication(sys.argv)
|
||||
app.setWindowIcon(QtGui.QIcon('images/icon.png'))
|
||||
settings = Settings()
|
||||
|
@ -53,11 +64,22 @@ def main():
|
|||
# loading profile
|
||||
print str(path), str(name)
|
||||
data = Profile.open_profile(path, name)
|
||||
# TODO: start tox iterate and set callbacks
|
||||
tox = Tox(data, settings)
|
||||
ms = MainWindow()
|
||||
ms.show()
|
||||
app.connect(app, QtCore.SIGNAL("lastWindowClosed()"), app, QtCore.SLOT("quit()"))
|
||||
app.exec_()
|
||||
# TODO: open mainscreen
|
||||
del tox
|
||||
|
||||
|
||||
class ToxIterateThread(QtCore.QThread):
|
||||
|
||||
def __init__(self):
|
||||
QtCore.QThread.__init__(self)
|
||||
|
||||
def run(self):
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue