def __init__(self, master=None):
        Window.__init__(self, master)
        #self.allVehicles  = db.getList("vehicleList")
        # Iterable lists for options. Subject to change depending on Depot/Vendor.
        self.depots = db.getList("transpoList")
        self.depotIndex = 0  # For choosing depots.
        self.depotObj = self.depots[
            self.depotIndex]  # First depot in list pre-loaded.
        self.company = self.depotObj.transporter
        self.cars = []  # Filled in as the user picks a depot.
        self.bikes = []  # And whether or not they want a car or a bike.
        self.drives = []  # Ditto above.
        self.gears = []  # And double ditto.

        # User choices with which to make a vehicle.
        self.carOrBike = 0  # 0 = Car, 1 = Bike
        self.chosenModel = None  # Index for Model Object
        self.chosenDrive = None  # Index for Drive Object
        self.chosenGears = None  # Index for Gears Object
        self.price = 0.0  # Float to hold the price for the vehicle.
        # Determined once model/depot is selected.
        self.newName = ""  # Name
        self.newDesc = ""  # Description

        # Image Directory + Icons and Images
        self.imgDir = "./img/vehicleCreator/"
        self.icons = {
            "Car": "icon_Car.png",
            "Bike": "icon_Bike.png",
            "Manual": "icon_Gears.png",
            "Automatic": "icon_Drive.png",
            "Wheel": "icon_Wheel.png"
        }
        self.vehicleCreatorControl()
Beispiel #2
0
    def __init__(self, master=None):
        Window.__init__(self, master)
        self.curInd = 0  # Current index picked for which set of DB records to go through.
        # IE: Index 0 is essentially:
        #("Customers", "customerList", "Customer", ["tid","pid","id","name","fname","lname","desc"] + ["contacts","address"])
        # Respectively from listNames, allLists, objTypes, and the default attributes list extended by the index's additional attribs list.
        self.defaults = db.getDefaultAttributes(
        )  # A copy of a list of default attributes to look for in each object.
        self.listNames = db.getListNames(
        )  # List of user-friendly Names of data-lists in DB.
        self.allLists = db.getAllLists(
        )  # List of program-friendly names of data-lists in DB.
        # Used in conjunction with db.getList("listName") function.
        # To specify which 'table' in the DB to check.
        self.objTypes = db.getAllowedObjs(
        )  # List of names of allowed object classes within.
        # For checking against with checkObject(Object),
        # Which returns Class Name as String.
        self.attribs = db.getAttributes(
        )  # List of a list of strings of attribute names to check through an object for.
        # Iterated through per object to collect data.

        self.searchList = [
        ]  # Where any search items are sent to if they match criteria.
        self.searchWindow()  # Finally, this line runs the whole shebang.
    def __init__(self, master=None, listName=""):
        # Listname is just some additional text data. You'll see what its for.
        Window.__init__(self, master)
        self.master = master

        # Do the database/list name check before proceeding.
        if (checkDB(listName) == True):
            # Database check returned True.
            print("List '" + str(listName) + "' in database found! Opening...")
            # Start the Data window stuff.
            self.databaseWindow(getattr(db, listName), listName)
            self.editView = None
        else:
            # Database check returned False. Delete self to save memory.
            print(
                "List in database not found. Aborting window creation and deleting self."
            )
            del self
    def __init__(self, master=None):
        Window.__init__(self, master)
        # Variable setup.
        self.hotels = db.getList("hotelList")
        self.hoteliers = db.getList("hotelierList")
        self.rooms = db.getList("hotelRoomList")
        self.features = db.getList("hotelFeatureList")
        self.locations = db.getList("locationList")

        self.hotelierObj = self.hoteliers[0]
        self.roomObj = self.rooms[0]
        self.locationObj = self.locations[0]
        self.featuresChosen = []

        self.priceMax = 0.0
        self.priceMin = 0.0
        self.results = []

        self.hotelSearch()
Beispiel #5
0
    def __init__(self, master=None):
        Window.__init__(self, master)
        # Set up variables for searching through and adding to dropdowns, etc.
        self.flights = db.getList("flightList")
        self.airports = db.getList("airportList")
        self.airlines = db.getList("airlineList")
        self.tickets = db.getList("airTicketList")

        self.dateFromDateObj = None
        self.dateToDateObj = None
        self.airportsDep_index = -1
        self.airportsArr_index = -1
        self.airline_index = 0
        self.ticketType_index = 0
        self.priceFromFloat = 0.0
        self.priceToFloat = 0.0
        self.results = []

        self.flightSearch()
Beispiel #6
0
    def __init__(self,master=None,listName=""):
        Window.__init__(self,master)
        self.master   = master
        self.name     = ""                      # User friendly variable, set below before the window runs.
        self.listName = listName                # Not a User-Friendly variable. Programming name of incoming list.
        self.list     = db.getList(listName)
        self.person   = None

        devList  = db.getAllLists()
        nameList = db.getListNames()
        i = devList.index(self.listName)
        self.name = nameList[i]

        # This window can be summoned for either Customers, or Staff.
        # It'll load them in. I'll do the bolts and bananas on this.
        if(listName in ["customerList","staffList"]):
            self.peopleWindow()
        else:
            print("Hey a sec, this isn't meant to happen.\nPlease use this with \"customerList\" or \"staffList\" please. :(")
Beispiel #7
0
    def __init__(self, master=None, flight=None):
        Window.__init__(self, master)

        self.flight_obj = flight
        self.showFlight()
Beispiel #8
0
 def __init__(self, master=None):
     Window.__init__(self, master)
     self.master = master
     self.introWindow()
     self.dataWin = None