def __init__(self, root):
     self.view = view.Window(root)
     self.model = model.Model()
     self.text_to_display = ""
     self.current_deck = ""
     self.view.e1.config(textvariable=self.model.username)
     self.view.e2.config(textvariable=self.model.password)
     self.view.ok.config(command=self.get_user_password)
     self.view.add_rem_deck.config(textvariable=self.model.rem_add_deck)
     self.view.deck_add.config(command=self.addDeck)
     self.view.deck_remove.config(command=self.removeDeck)
     self.view.change_deck.config(textvariable=self.model.change_deck)
     self.view.change_card.config(textvariable=self.model.change_card)
     self.view.card_rem.config(command=self.removeCard)
     self.view.card_add.config(command=self.addCard)
     self.view.show_current_deck.config(command=self.displayDeck)
     self.view.cur_deck.config(textvariable=self.model.cur_deck)
     self.view.show_cards.config(command=self.displayCards)
     self.view.show_arenas.config(command=self.displayArenas)
     self.view.show_chests.config(command=self.displayChests)
     self.view.show_player.config(command=self.displayPlayer)
     self.view.show_deck.config(command=self.displayDecks)
     self.view.updateDeckNameButton.config(command=self.update_DeckName)
     self.view.oldDeckName.config(textvariable=self.model.oldDeckName)
     self.view.newDeckName.config(textvariable=self.model.newDeckName)
def start():
    root = Tk()
    root.geometry("500x350")

    #create folder.
    path_test_folder = fs.project_root_path() + fs.create_test_folder()
    path_maze_folder = fs.project_root_path() + fs.create_maze_folder()

    fs.create_folder(path_maze_folder)
    fs.create_folder(path_test_folder)

    # Icon til Ico.
    ico_name = "icon.ico"  #icon ligger i ico mappen
    path = fs.project_root_path() + fs.ico_folder() + ico_name
    root.iconbitmap(path)

    # start mainloop
    app = view.Window(root)
    root.mainloop()
Exemple #3
0
    #imshow( dstWin, dt )

    #n = cv2.normalize(dt, dt, 0, 1.0, cv2.NORM_MINMAX)
    #n =  cv2.morphologyEx(d,cv2.MORPH_OPEN,kernel)
    #n =  cv2.morphologyEx(th1,cv2.MORPH_CLOSE,kernel)
    #imshow( dstWin, n )
    #n =  cv2.morphologyEx(n,cv2.MORPH_OPEN,kernel)

    #contours,hierarchy = cv2.findContours(n, 1, 2)

    #for cnt in contours:
    #rastr.novo(cnt)

    #rastr.rastreia()
    #color2 = copy.copy(color)
    colorWin = view.Window("ColoredImage", color)

    #for o in rastr.objects:
    #    colorWin.mostraPonto(o)
    #colorWin.show()

    bg2 = bgs2.apply(t)
    # cv2.imshow( "bg2", bg2 )
    colorWin = view.Window("ColoredImage", color)
    colorWin2 = view.Window("ColoredImage2", copy.copy(bg2))
    kernel3 = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (7, 7))
    k3 = cv2.morphologyEx(bg2, cv2.MORPH_OPEN, kernel3)

    contours2, hierarchy2 = cv2.findContours(bg2, 1, 2)
    for cnt in contours2:
        rastr2.novo(cnt)
Exemple #4
0
#!/usr/bin/python3
from PyQt5.QtSql import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import sys
from PyQt5.uic import *
import config
import view
app = QApplication(sys.argv)

if __name__ == '__main__':
    window = view.Window("examRecord")
    window.view.filter('', '', '', '', 'All', 'All', 'All', 'All', 'All')
    window.view.hideColumn(0)
    sys.exit(app.exec_())
import view as v
import controller as co
import random

#additional modules needed: WCK

PROFILE_MODE = False

if __name__ == '__main__':
    mapRad = 41
    alpha = 1
    beta = round(random.uniform(0, 0.95), 2)
    gamma = random.uniform(0, 1)

    c = co.Controller(alpha, beta, gamma, mapRad)

    if PROFILE_MODE:
        import cProfile as cp
        cp.run('v.Window(c)', 'snow_stats')

        import pstats
        p = pstats.Stats('snow_stats')
        p.strip_dirs().sort_stats("pcalls").print_stats()
        p.sort_stats('tottime').print_stats(0.5)
    else:
        w = v.Window(c)
Exemple #6
0
        self, 'Sold for: ' + str(SP) + ', Return: ' +
        str(round(SP - parameters.get('Entry Price (EP)'), 3)) +
        ', highest was: ' + str(live_data['VP'].max()))
    v.Window.log(self, str(dt.datetime.now().hour) + ":" + \
                    str(dt.datetime.now().minute) + ":" + \
                    str(dt.datetime.now().second) + \
                    ": Trading done")


def stop(self):
    sys.exit()


def prompt_login(self):
    self.login_window = v.login_window()


def rh_login(self):
    rh.set_credentials(v.Window.get_credentials(self))
    rh.login(self)
    # v.Window.log(str(dt.datetime.now().hour) + ":" + \
    #                   str(dt.datetime.now().minute) + ":" + \
    #                   str(dt.datetime.now().second) + \
    #                   ": Logged into Robinhood!")
    m.set_trading_type(v.Window.get_trading_type(self))


if __name__ == '__main__':
    window = v.Window()
    sys.exit(App.exec())
Exemple #7
0
 def __init__(self):
     self._app = QtWidgets.QApplication(sys.argv)
     self._model = Model()
     self._view = view.Window()
Exemple #8
0
from PyQt4 import Qt
import view
import sys
# The main function to initialize the app and create the GUI object
app = Qt.QApplication(sys.argv)
GUI = view.Window()
sys.exit(app.exec_())