def create_stage_table(i, week):
    weektitle = GLabel("WeekTitle" + str(i), width=300, height=20)
    weektitle.set_text(week["title"])
    if week["jobs"]:
        tb = crc_duedatetable(week["jobs"])
        b = VBox("Box1" + str(i), [tb])
        return HBox("Box2" + str(i), [weektitle, b])
    else:
        return weektitle
Beispiel #2
0
def create_stage_table(i, week):
    weektitle = GLabel('WeekTitle' + str(i), width=300, height=20)
    weektitle.set_text(week['title'])
    if week['jobs']:
        tb = crc_duedatetable(week['jobs'])
        b = VBox('Box1' + str(i), [tb])
        return HBox('Box2' + str(i), [weektitle, b])
    else:
        return weektitle
Beispiel #3
0
def create_stuff(i, week):
    weektitle = GLabel('WeekTitle' + str(i), width=300, height=20)
    weektitle.set_text(week['title'])
    if week['jobs']:
        wrow = GFrame_Row('WRow'+str(i), [weektitle], height = 40, parms=[WIN, HIN, HC, VC,[0,0,0], [0,0]])
        tb = crc_table(week['jobs'])
        b = VBox('Box1'+str(i), [tb])
        return HBox('Box2'+str(i), [weektitle, b])
    else:
        return weektitle
def create_stuff(i, week):
    weektitle = GLabel("WeekTitle" + str(i), width=300, height=20)
    weektitle.set_text(week["title"])
    if week["jobs"]:
        wrow = GFrame_Row("WRow" + str(i), [weektitle], height=40, parms=[WIN, HIN, HC, VC, [0, 0, 0], [0, 0]])
        tb = crc_table(week["jobs"])
        b = VBox("Box1" + str(i), [tb])
        return HBox("Box2" + str(i), [weektitle, b])
    else:
        return weektitle
from tkinter import ttk
from pymongo import MongoClient
from widgetnode import GLabel, GButton

mongo = MongoClient('localhost', 27017 )
db = mongo.Production
jobs = db.Jobs
job_recs = jobs.find({"company":'MTC', "customer":'CRC'})
x = list(job_recs)
x = sorted(x, key = lambda y: y['received'], reverse=True)
#print (x)
print ('-')
print (x[0])

title = GLabel('Title', width=300, height=20)
title.set_text('Latest CRC Jobs')


header = GFrame_Row('Header', [title], height = 40, parms=[WIN, HIN, HC, VC,[0,0,0], [0,0]])

tb = crc_table(x)
con1 = VBox('Box1', [tb])
con2 = GFrame_Row('Row4',[exit_button], height=40, parms=[WIN, HIN, HC, VC,[0,0,0], [0,0]])
con3 = HBox('Box2', [header,con1, con2])

root = TK.Tk()

g = con3
build_gui(root, g)
exit_button.set_command(root.destroy)
title.widget.configure(foreground="black", font='arial 14 bold', background='white')
Beispiel #6
0
from tkinter import ttk
from pymongo import MongoClient
from widgetnode import GLabel, GButton

mongo = MongoClient('localhost', 27017)
db = mongo.Production
jobs = db.Jobs
job_recs = jobs.find({"company": 'MTC', "customer": 'CRC'})
x = list(job_recs)
x = sorted(x, key=lambda y: y['received'], reverse=True)
#print (x)
print('-')
print(x[0])

title = GLabel('Title', width=300, height=20)
title.set_text('Latest CRC Jobs')

header = GFrame_Row('Header', [title],
                    height=40,
                    parms=[WIN, HIN, HC, VC, [0, 0, 0], [0, 0]])

tb = crc_table(x)
con1 = VBox('Box1', [tb])
con2 = GFrame_Row('Row4', [exit_button],
                  height=40,
                  parms=[WIN, HIN, HC, VC, [0, 0, 0], [0, 0]])
con3 = HBox('Box2', [header, con1, con2])

root = TK.Tk()

g = con3