added pyQt4
This commit is contained in:
parent
d3e988fe2e
commit
12f86ecc20
2 changed files with 10 additions and 8 deletions
|
@ -1,18 +1,19 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
import gtk
|
import sys
|
||||||
|
from PyQt4 import QtCore, QtGui
|
||||||
import TentiaWindows
|
import TentiaWindows
|
||||||
|
|
||||||
class Tentia:
|
class Tentia:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.controller = Controller()
|
self.app = QtGui.QApplication(sys.argv)
|
||||||
|
self.controller = Controller(self)
|
||||||
|
|
||||||
self.setup_windows()
|
self.setup_windows()
|
||||||
self.preferences.show()
|
self.preferences.show()
|
||||||
gtk.main()
|
|
||||||
|
|
||||||
def quit(self, sender):
|
def quit(self, sender):
|
||||||
gtk.main_quit()
|
print "quit"
|
||||||
|
|
||||||
def setup_windows(self):
|
def setup_windows(self):
|
||||||
self.preferences = TentiaWindows.Preferences(self)
|
self.preferences = TentiaWindows.Preferences(self)
|
||||||
|
@ -23,7 +24,7 @@ class Tentia:
|
||||||
return "../"
|
return "../"
|
||||||
|
|
||||||
def login_with_entity(self, entity):
|
def login_with_entity(self, entity):
|
||||||
self.controller.setString_forKey_("entity", entity)
|
self.controller.setStringForKey("entity", entity)
|
||||||
self.oauth_implementation = TentiaWindows.OauthImplementation(self)
|
self.oauth_implementation = TentiaWindows.OauthImplementation(self)
|
||||||
|
|
||||||
def controller():
|
def controller():
|
||||||
|
@ -34,11 +35,12 @@ class Controller:
|
||||||
|
|
||||||
def __init__(self, app):
|
def __init__(self, app):
|
||||||
self.app = app
|
self.app = app
|
||||||
|
self.user_defaults =
|
||||||
|
|
||||||
def setString_forKey_(self, string, key):
|
def setStringForKey(self, string, key):
|
||||||
self.user_defaults[string] = key
|
self.user_defaults[string] = key
|
||||||
|
|
||||||
def getStringForKey_(self, key):
|
def getStringForKey(self, key):
|
||||||
return self.user_defaults[key]
|
return self.user_defaults[key]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import gtk, webkit
|
from PyQt4 import QtCore, QtGui, QtWebKit
|
||||||
|
|
||||||
class Preferences:
|
class Preferences:
|
||||||
|
|
||||||
|
|
Reference in a new issue