Ejemplo n.º 1
0
def create_schedule_day(gui_window, scraper_object, current_date):
    """Create the schedule for all trips for the given day

    Parameters
    ----------
    gui_window : Ui_Form
        The Ui_Form object associated with the main gui
    scraper_object : scraper
        The scraper object used to extract data from the inputted excel file
    current_date : date
        A date object representing the date for which a schedule must be
        created

    Method Calls
    ------------
        -reset_this_period()
        -add_new_date()
        -calculate_previous_date()
        -get_total_guides()
        -get_total_drivers()
        -create_schedule_role()
        -copy_schedule_role()
    """

    #copyfile('trips.db', 'trips_backup.db')
    #copyfile('staff.db', 'staff_backup.db')

    #try:
    day_of_week = int(
        datetime.datetime.strptime(current_date, '%Y-%m-%d').strftime('%w'))

    print("DAY OF WEEK: ", day_of_week)

    if day_of_week == 0:
        print("MAKING SCHEDULE FOR MONDAY")
        manage_staff.staff_util.reset_this_period(session_guide,
                                                  session_driver)

    current_date_object = create_new_schedule.add_new_date(current_date)
    temp_guide = 0
    temp_driver = 0
    print("\n")
    print("CREATING SHEDULE FOR ", current_date)
    trips = scraper_object.get_day(current_date)
    trip_role_assignment = {}
    class_IV_needed = {}
    num_clients = {}
    num_drivers = {}
    num_guides = {}
    num_class_IV_drivers = 0
    max_drivers = [0, 0, 0, 0, 0, 0, 0, 0]
    max_guides = [0, 0, 0, 0, 0, 0, 0, 0]
    num_safety = 0

    previous_date = schedule_util.calculate_previous_date(current_date)

    for trip_name in trips:
        num_clients[trip_name] = int(trips[trip_name])
        if trip_name == "Ticket to Ride - 09:30:00":

            if num_clients[trip_name] > 0:

                num_guides[trip_name] = int((num_clients[trip_name] // 10) +
                                            (num_clients[trip_name] % 10 > 0))

                num_drivers[trip_name] = int((num_clients[trip_name] // 20) +
                                             (num_clients[trip_name] % 20 > 0))

                max_guides[
                    create_schedule.schedule_dictionaries.
                    max_guides_trip_swictch[trip_name]] = num_guides[trip_name]

                max_drivers[create_schedule.schedule_dictionaries.
                            max_guides_trip_swictch[trip_name]] = num_drivers[
                                trip_name]

                DialogBox = QtWidgets.QDialog()
                ui_guides = popups.overnight_popup.Ui_overnight_popup()
                ui_guides.setupUi(DialogBox, num_guides[trip_name],
                                  current_date, trip_role_assignment,
                                  DialogBox)
                DialogBox.show()

                if DialogBox.exec_():
                    trip_role_assignment = ui_guides.return_data()

            else:

                num_guides[trip_name] = 0
                num_drivers[trip_name] = 0

        else:

            num_guides[trip_name] = int((num_clients[trip_name] // 10) +
                                        (num_clients[trip_name] % 10 > 0))

            num_drivers[trip_name] = int((num_clients[trip_name] // 20) +
                                         (num_clients[trip_name] % 20 > 0))

            if num_guides[trip_name] > max_guides[
                    create_schedule.schedule_dictionaries.
                    max_guides_trip_swictch[trip_name]]:

                max_guides[
                    create_schedule.schedule_dictionaries.
                    max_guides_trip_swictch[trip_name]] = num_guides[trip_name]

            if num_drivers[trip_name] > max_drivers[
                    create_schedule.schedule_dictionaries.
                    max_guides_trip_swictch[trip_name]]:
                max_drivers[create_schedule.schedule_dictionaries.
                            max_guides_trip_swictch[trip_name]] = num_drivers[
                                trip_name]

            print("\n")
            print("FOR: ", trip_name)
            print("NUMBER OF CLIENTS: ", num_clients[trip_name])
            print("NUMBER OF GUIDES NEEDED: ", num_guides[trip_name])
            print("NUMBER OF DRIVERS NEEDED: ", num_drivers[trip_name])
            print("\n")

    total_guides_needed = 0
    total_drivers_needed = 0

    for x in num_guides:
        total_guides_needed += num_guides[x]

    for x in num_drivers:
        total_drivers_needed += num_drivers[x]

    if total_guides_needed > len(
            manage_staff.staff_util.get_total_guides(session_guide)):

        num_times = total_guides_needed - len(
            manage_staff.staff_util.get_total_guides(session_guide))
        print("TEMP GUIDES NEEDED: ", num_times)

        for i in range(num_times):

            print("CHOOSING TEMP GUIDE ", i)
            DialogBox = QtWidgets.QDialog()
            ui_guides = popups.not_enough_guides_popup.Ui_not_enough_guides_popup(
            )
            ui_guides.setupUi(DialogBox, DialogBox)
            DialogBox.show()

            if DialogBox.exec_():
                temp_guide = ui_guides.return_temp_guide()

                temp_guide_object = session_guide.query(
                    manage_staff.guide.guide).filter(
                        manage_staff.guide.guide.name.in_(
                            [temp_guide])).update({'in_stream': 'true'},
                                                  synchronize_session=False)

                session_guide.commit()

                print("\n")
                print(
                    "TEMP GUIDE INSTREAM SET TO TRUE: ",
                    session_guide.query(manage_staff.guide.guide).filter(
                        manage_staff.guide.guide.name.in_([temp_guide])))
                print("\n")

    if total_drivers_needed > len(
            manage_staff.staff_util.get_total_drivers(session_driver)):

        num_times = total_drivers_needed - len(
            manage_staff.staff_util.get_total_drivers(session_driver))
        print("TEMP DRIVERS NEEDED: ", num_times)

        for i in range(num_times):

            print("CHOOSING TEMP DRIVER ", i)

            DialogBox = QtWidgets.QDialog()
            ui_drivers = popups.not_enough_drivers_popup.Ui_not_enough_drivers_popup(
            )
            ui_drivers.setupUi(DialogBox, DialogBox)
            DialogBox.show()

            print("shown")

            if DialogBox.exec_():
                print("exec")
                temp_driver = ui_drivers.return_temp_driver()

                temp_driver_object = session_driver.query(
                    manage_staff.driver.driver).filter(
                        manage_staff.driver.driver.name.in_(
                            [temp_driver])).update({'in_stream': 'true'},
                                                   synchronize_session=False)

                session_driver.commit()

                print(
                    "Set to true : ",
                    session_driver.query(manage_staff.driver.driver).filter(
                        manage_staff.driver.driver.name.in_([temp_driver])))

    for trip in create_schedule.schedule_dictionaries.trip_number_switch:

        if trip not in num_clients:

            num_clients[trip] = 0
            num_guides[trip] = 0
            num_drivers[trip] = 0

            print("\n")
            print("FOR: ", trip_name)
            print("NUMBER OF CLIENTS: ", num_clients)
            print("NUMBER OF GUIDES NEEDED: ", num_guides)
            print("NUMBER OF DRIVERS NEEDED: ", num_drivers)
            print("\n")

    num_class_IV_drivers = total_drivers_needed
    print("\n")
    print("NUM CLASS IV DRIVERS NEEDED: ", num_class_IV_drivers)

    total_drivers = manage_staff.staff_util.get_total_drivers(session_driver)
    drivers_with_class_IV = 0

    for index, value in enumerate(total_drivers):
        if total_drivers[index]['has_class_IV'] == '1':
            drivers_with_class_IV += 1

    print("DRIVERS WITH CLASS IV: ", drivers_with_class_IV)
    print("\n")

    trips_needing_class_IV_guide = 0
    if drivers_with_class_IV < num_class_IV_drivers:
        trips_needing_class_IV_guide = num_class_IV_drivers - drivers_with_class_IV

    for trip, value in enumerate(
            create_schedule.schedule_dictionaries.trip_types):
        if trip != 4:
            if (max_guides[trip] <= 4 and max_guides[trip] > 1):
                for role_needed in range(max_guides[trip]):
                    trips_needing_class_IV_guide = create_schedule_role.create_schedule_role(
                        role_needed, current_date, trip_role_assignment, trip,
                        class_IV_needed, trips_needing_class_IV_guide)

            elif (max_guides[trip] == 1):

                trips_needing_class_IV_guide = create_schedule_role.create_schedule_role(
                    0, current_date, trip_role_assignment, trip,
                    class_IV_needed, trips_needing_class_IV_guide)
                trips_needing_class_IV_guide = create_schedule_role.create_schedule_role(
                    4, current_date, trip_role_assignment, trip,
                    class_IV_needed, trips_needing_class_IV_guide)

            for role_needed in range(max_drivers[trip]):
                trips_needing_class_IV_guide = create_schedule_role.create_schedule_role(
                    role_needed + 5, current_date, trip_role_assignment, trip,
                    class_IV_needed, trips_needing_class_IV_guide)
    print("\n")
    print("CLASS IV NEEDED: ", class_IV_needed)
    print("\n")
    create_schedule.copy_schedule_role.copy_schedule_role(
        session_guide, session_driver, session_schedule, trips,
        trip_role_assignment, num_drivers, num_safety, num_clients, num_guides,
        max_guides, max_drivers, current_date_object, current_date)

    if temp_guide != 0:

        temp_guide_object = session_guide.query(
            manage_staff.guide.guide).filter(
                manage_staff.guide.guide.name.in_([temp_guide])).update(
                    {
                        'in_stream': 'false',
                        'tl_this_summer_four_hour': 0,
                        'tl_this_summer_c_wave': 0,
                        'tl_this_summer_full_day': 0,
                        'tl_this_summer_scenic_float': 0,
                        'tl_this_summer_overnight': 0,
                        'tl_this_period_four_hour': 0,
                        'tl_this_period_c_wave': 0,
                        'tl_this_period_full_day': 0,
                        'tl_this_period_scenic_float': 0,
                        'tl_this_period_overnight': 0,
                        'guided_this_summer_four_hour': 0,
                        'guided_this_summer_c_wave': 0,
                        'guided_this_summer_full_day': 0,
                        'guided_this_summer_scenic_float': 0,
                        'guided_this_summer_overnight': 0,
                        'guided_this_period_four_hour': 0,
                        'guided_this_period_c_wave': 0,
                        'guided_this_period_full_day': 0,
                        'guided_this_period_scenic_float': 0,
                        'guided_this_period_overnight': 0,
                        'safety_this_summer_four_hour': 0,
                        'safety_this_summer_c_wave': 0,
                        'safety_this_summer_full_day': 0,
                        'safety_this_summer_scenic_float': 0,
                        'safety_this_summer_overnight': 0,
                        'safety_this_period_four_hour': 0,
                        'safety_this_period_c_wave': 0,
                        'safety_this_period_full_day': 0,
                        'safety_this_period_scenic_float': 0,
                        'safety_this_period_overnight': 0
                    },
                    synchronize_session=False)

        session_guide.commit()
        print("\n")
        print(
            "TEMP GUIDE INSTREAM RETURNED TO FALSE: ",
            session_guide.query(manage_staff.guide.guide).filter(
                manage_staff.guide.guide.name.in_([temp_guide])))
        print("\n")

    if temp_driver != 0:

        temp_driver_object = session_driver.query(
            manage_staff.driver.driver).filter(
                manage_staff.driver.driver.name.in_([temp_driver])).update(
                    {
                        'in_stream': 'false',
                        'driven_this_summer_four_hour': 0,
                        'driven_this_summer_c_wave': 0,
                        'driven_this_summer_full_day': 0,
                        'driven_this_summer_scenic_float': 0,
                        'driven_this_summer_overnight': 0,
                        'driven_this_period_four_hour': 0,
                        'driven_this_period_c_wave': 0,
                        'driven_this_period_full_day': 0,
                        'driven_this_period_scenic_float': 0,
                        'driven_this_period_overnight': 0
                    },
                    synchronize_session=False)

        session_driver.commit()
        print("\n")
        print(
            "TEMP GUIDE INSTREAM RETURNED TO FALSE: ",
            session_driver.query(manage_staff.driver.driver).filter(
                manage_staff.driver.driver.name.in_([temp_driver])))
        print("\n")
Ejemplo n.º 2
0
 def showAbout(self):
     """opens the about window"""
     self.dia = QtWidgets.QDialog()
     self.ui = about.Ui_Form()
     self.ui.setupUi(self.dia)
     self.dia.show()
Ejemplo n.º 3
0
class SDAnimate():
	# Initial variables and attributes
	parameter_value   = 0
	step_value        = 0.1
	sprites_number    = 1
	parameter_index   = 0
	folder_path       = None
	file_type         = '\*.png'
	file_prefix       = ""

	# Get the application and the UI Manager.
	app   = sd.getContext().getSDApplication()
	uiMgr = app.getQtForPythonUIMgr()

	# Create a new dialog. For shortcuts to work correctly
	mainWindow = uiMgr.getMainWindow()
	dialog     = QtWidgets.QDialog(parent=mainWindow)
	dialog.setWindowTitle("SDAnimate v1.0 - by Shady Tantawy")
	dialog.setFixedSize(QtCore.QSize(400, 300))

	# Get the current graph and the selected node
	current_graph  = uiMgr.getCurrentGraph()

	# Getting the graph properties (Exposed parameters)
	input_section = SDPropertyCategory.Input
	props         = current_graph.getProperties(input_section)
	prop          = props[parameter_index]

	props_labels = []
	for p in props:
		props_labels.append(p.getLabel())


	# Create a layout
	layout = QtWidgets.QVBoxLayout()
	margin_value = 30
	layout.setContentsMargins(margin_value,margin_value,margin_value,margin_value)


	# Labels (lbl)
	lbl_exposed_parameters = QtWidgets.QLabel("Parameter (must be exposed)")
	lbl_step_value         = QtWidgets.QLabel("Step Value")
	lbl_sprites_number     = QtWidgets.QLabel("Sprites Number")
	lbl_file_prefix        = QtWidgets.QLabel("File Prefix")
	lbl_folder_path        = QtWidgets.QLabel("")

	lbl_exposed_parameters.setFont(QFont("Times", 10, QFont.Bold))
	lbl_step_value.setFont(QFont("Times", 10, QFont.Bold))
	lbl_sprites_number.setFont(QFont("Times", 10, QFont.Bold))
	lbl_file_prefix.setFont(QFont("Times", 10, QFont.Bold))

	# Buttons (btn)
	btn_generate_flipbook = QtWidgets.QPushButton("Generate")
	btn_browse_folder     = QtWidgets.QPushButton("Browse Folder")

	btn_generate_flipbook.setStyleSheet("background-color : green")

	# Drop down menus (ddm)
	ddm_exposed_parameters = QtWidgets.QComboBox()
	
	ddm_exposed_parameters.addItems(props_labels)
	

	# Spin Box (sb)
	sb_step_value = QtWidgets.QDoubleSpinBox()
	sb_step_value.setSingleStep(0.1)
	sb_step_value.setMinimum(0.1)
	sb_step_value.setMaximum(1)

	sb_sprites_number = QtWidgets.QSpinBox()
	sb_sprites_number.setSingleStep(1)
	sb_sprites_number.setMinimum(1)
	sb_sprites_number.setMaximum(16)

	# Line Edit (le)
	le_file_prefix = QtWidgets.QLineEdit()
	le_file_prefix.setPlaceholderText("Default: " + "[index].png")
	le_file_prefix.setMaxLength(20)

	# Add widgets to layout
	layout.addWidget(lbl_exposed_parameters)
	layout.addWidget(ddm_exposed_parameters)
	layout.addWidget(lbl_step_value)
	layout.addWidget(sb_step_value)
	layout.addWidget(lbl_sprites_number)
	layout.addWidget(sb_sprites_number)
	layout.addWidget(lbl_file_prefix)
	layout.addWidget(le_file_prefix)
	layout.addWidget(btn_browse_folder)
	layout.addWidget(lbl_folder_path)
	layout.addWidget(btn_generate_flipbook)
	dialog.setLayout(layout)
	
	def __init__(self):
		# Actions (Widgets)
		self.btn_generate_flipbook.clicked.connect(self.on_btn_generate_flipbook)
		self.btn_browse_folder.clicked.connect(self.on_btn_browse_folder)
		self.ddm_exposed_parameters.currentIndexChanged.connect(self.on_ddm_exposed_parameters_index_change)
		self.sb_step_value.valueChanged.connect(self.on_sb_step_value_change)
		self.sb_sprites_number.valueChanged.connect(self.on_sb_sprites_number_change)
		self.le_file_prefix.textChanged.connect(self.on_le_file_prefix_change)
	

	# Functions
	@classmethod
	def on_btn_generate_flipbook(self):
		print("Generating images...")
		if not self.folder_path:
			self.lbl_folder_path.setText("You must select a folder!")
			print("You must select a folder!")
			return

		for x in range(sprites_number):
			export.exportSDGraphOutputs(self.current_graph, self.folder_path, str(x) + ".png")
			self.current_graph.setPropertyValue(self.prop, SDValueFloat.sNew(self.parameter_value))
			self.parameter_value += self.step_value

			# File Naming
			files               = glob.glob(self.folder_path + self.file_type)
			newest_file_created = max(files, key=os.path.getctime)
			new_file_name       = self.file_prefix + str(x) + ".png"
			os.rename(newest_file_created, os.path.join(self.folder_path, new_file_name))


	@classmethod
	def on_btn_browse_folder(self):
		f = str(QtWidgets.QFileDialog.getExistingDirectory())
		self.folder_path = f
		self.lbl_folder_path.setText(f)
		print(f)


	@classmethod
	def on_ddm_exposed_parameters_index_change(self, i):
		self.parameter_index = i
		self.prop = self.props[i]
		print("[Parameter Selected]" + '\n' 
		+ "Label: " + self.prop.getLabel() + '\n'
		+ "ID: " + self.prop.getId() + '\n'
		+ "Index: " + str(i))
		

	@classmethod
	def on_sb_step_value_change(self, i):
		global step_value
		x = round(i, 1)
		step_value = x

	@classmethod
	def on_sb_sprites_number_change(self, i):
		global sprites_number
		sprites_number = i

	@classmethod
	def on_le_file_prefix_change(self, s):
		self.file_prefix = s
Ejemplo n.º 4
0
        self.textBrowser.setObjectName("textBrowser")

        self.retranslateUi(about)
        QtCore.QMetaObject.connectSlotsByName(about)

    def retranslateUi(self, about):
        _translate = QtCore.QCoreApplication.translate
        about.setWindowTitle(_translate("about", "Dialog"))
        self.textBrowser.setHtml(
            _translate(
                "about",
                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
                "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
                "p, li { white-space: pre-wrap; }\n"
                "</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Vasp Studio </p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">v0.2</p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">author: WANG Baochuan</p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">github: https://github.com/B-C-WANG</p></body></html>"
            ))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    about = QtWidgets.QDialog()
    ui = Ui_about()
    ui.setupUi(about)
    about.show()
    sys.exit(app.exec_())
Ejemplo n.º 5
0
    def showAboutDialog(self):
        self.about = QtWidgets.QDialog()
        self.about.setMinimumSize(700, 318)
        self.about.setMaximumSize(700, 318)
        self.about.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.WindowStaysOnTopHint)
                
        #defines a function, 'closeAboutDialog,' that will close the 'self.about' widget when called
        def closeAboutDialog(*args, **kwargs):
            self.about.close()        
        #when the 'mousePressEvent' is triggered, call the function 'closeAboutDialog'
        self.about.mousePressEvent = closeAboutDialog
        
        #--- BEGIN IMAGE PREPARATION ---#
        #stores images as base64 encoded strings so that the images may be self contained within the script
        mfxLogo256w_encoded = "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nO2dDZQdRZmGXwRhkCh3NGIE2cQhuyDCMDLoohKJGAUDQvQYHBSV36AuRxJXSVTIIiAGf4giu0IgGiOLI+weg/wsC1GCoGY1kSGw/GgSgwYcFkIGMyEDBHpPHd9yy97uO119u+/0vfU+5/S5M/ferv65XW999dVXX+0QRRGEEGHyIv3uQoSLBECIgJEACBEwEgAhAkYCIETASACECBgJgBABIwEQImAkAEIEjARAiICRAAgRMBIAIQJGAiBEwEgAhAgYCYAQASMBECJgJABCBIwEQIiAkQAIETASACECRgIgRMBIAIQIGAmAEAEjARAiYCQAQgSMBECIgJEACBEwEgAhAkYCIETASACECBgJgBABIwEQImAkAPnpAfBDALcAOAfAlFa9kBakBqAPwGUAJoZ+MxphhyiKWvfsx4YHAezLI78A4HEArwCwE98bAfAUgA3cVgIYALAipJtUAKaSH0WhNdsEAHsB2B3AMwAeAfAYgIMBjAPwBID3Arir5a+8iUgA/DE37NsA1gFYD6CfJcQf2EkAXsWHcyfnKEMAtgLYCGCQgjIYmEiYe3MoK7W9VzVWcHO/OgAM8z65QrqC98nlKwA+w8+WAfj62F5aayEB8GczgOu5VwdN0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UkoLn5GXImCqDR54yUU5616INqL996JkPQObsqUvMUAeWfjdnWGoMGfR1wGC4k/SDjvHGJaWSV2xoX+JPDNbCcSE0gAwBCyUl+FP63c485wPvS+Su+deZytgt2mLJjcMHaXDm6FjpH4VjBgmOnvU6FC/YTtSchVV7T4F2G1fA4W82SjGwskNqw44twmP0pqrEfhMFrpxNwtxoEtfQVmLDYwQJVzrjOitXvDimqy/SRjbQ7nEB2guF7JGashIvUiclHzjWq+/SLIdAr2SnHvkeC3SYkBJgRe++UJDIpRTenOKgVHfpIGHLubQz9Kzeb1j/4E5Qi3JaJBed5sQ2q1x6GRLT3j5Dfe3ii/SVemICrMm+ZDbhkpFOKFL7hYOk5Hhze3s7LtxLAHgCgAsA+JEQrW5RkEvLGRom4HOksDUKNfL3TvhuQWP95gHpfGJ0Dwsd0X7H3x55+QIAH9mCl9Aq0A6f8Pqr4D94XTBn5XOf2O/E4hmf/8auY2D76QccH9F+2wi/oDdQn5DmgTW1n5G+LXsIzRx+WrA1RDLWyNca12cIWubPF4wX0t9lqB31L1MpFIpJ6N+TUCgUk9AgoVAoJqFBQqFQ+AEAvwDkKpNN+CldLQAAAABJRU5ErkJggg=="
        #'base64.decodestring()' is a method used to decode a base64 encoded string
        mfxLogo_decoded = base64.decodestring(mfxLogo256w_encoded)
        toolTitle_decoded = base64.decodestring(toolTitle256w_encoded)
        #'QtGui.QPixmap()' is an object for containing image representations
        pixMap_logo = QtGui.QPixmap()
        pixMap_title = QtGui.QPixmap()
        #'loadFromData' is a function within the 'QtGui.QPixmap' object that loads an image that was encoded as a base64 string
        pixMap_logo.loadFromData(mfxLogo_decoded)
        pixMap_title.loadFromData(toolTitle_decoded)
        #--- END IMAGE PREPARATION ---#
        
        #creates a 'QtWidgets.QLabel' object and assigns a given 'QtGui.QPixmap()' object to it using the 'QtGui.setPixmap()' method
        img_mfxLogo = QtWidgets.QLabel()
        img_toolTitle = QtWidgets.QLabel()
        img_mfxLogo.setPixmap(pixMap_logo)
        img_toolTitle.setPixmap(pixMap_title)
        
        #creates a 'QtWidgets.QLabel()' object that stores this tool's version number and calendar year
        txt_versionNum = QtWidgets.QLabel()
        txt_versionNum.setText('Version 1.0 (2018)')
        
        #creates a 'QtWidgets.QPlainTextEdit' object and sets it's 'readOnly()' method to 'true' for displaying typical disclaimer text
        txt_disclaimer = QtWidgets.QPlainTextEdit('This is a free tool for simultaneously adjusting the directories of multiple Read and Write Nodes within Nuke, and was made by Eric A. Mercado.\n\nThis tool was written using Python 2.7.xx, and Qt for Python (PySide), as to align with the software trends described by www.vfxplatform.com/.\n\nPlease feel free to contact me with any issues, comments, or concerns and I will address them as soon as I can.\n\nThank you.')
        txt_disclaimer.setReadOnly(1)

        #creates 'QtWidgets.QLabel()' objects and arranges them into a 'QtWidgets.QHBoxLayout()' object for simplfied grouping
        txt_email = QtWidgets.QLabel()
        txt_email.setText('*****@*****.**')
        txt_phone = QtWidgets.QLabel()
        txt_phone.setText('(816) 786-4189')
        contactLayout = QtWidgets.QVBoxLayout()
        contactLayout.addWidget(txt_email)
        contactLayout.addWidget(txt_phone)
        
        leftSide = QtWidgets.QVBoxLayout()
        leftSide.addWidget(img_mfxLogo)
        rightSide = QtWidgets.QVBoxLayout()
        rightSide.addWidget(img_toolTitle)
        rightSide.addWidget(txt_versionNum)
        rightSide.addWidget(txt_disclaimer)
        rightSide.addLayout(contactLayout)
        
        #----------------------------------------------------------------------#
        #--- BEGIN STYLING for 'self.about', a 'QtWidgets.QDialog()' object ---#
        #----------------------------------------------------------------------#
        #initializes the 'pixMap_BG' object that will serve has a containing widget for the generated 'painter' background
        pixMap_BG = QtGui.QPixmap(700, 318)
        pixMap_BG.fill(QtGui.QColor(0, 0, 0, 255))

        #creates the 'QtGui.QPainter()' object, and begins the painting operations
        BG_painter = QtGui.QPainter(self.about)
        BG_painter.begin(pixMap_BG)

        #initializes a 'QtCore.QRectF()' object that will serve has the basic shape for the background.  In this case, it should be the same size as the 'QtWidgets.Dialog()' object
        rectangle = QtCore.QRectF(0, 0, 700, 318)

        #--- BEGIN LAYER 01 ---#
        solid_brush = QtGui.QBrush(QtGui.QColor(36, 36, 36, 255), QtCore.Qt.SolidPattern)
        BG_painter.setCompositionMode(QtGui.QPainter.CompositionMode_SourceOver)        
        BG_painter.setBrush(solid_brush)
        BG_painter.drawRect(rectangle)
        #---- END LAYER 01 ----#
        #--- BEGIN LAYER 02 ---#
        stripes_brush = QtGui.QBrush(QtGui.QColor(50, 50, 50, 255), QtCore.Qt.BDiagPattern)
        BG_painter.setCompositionMode(QtGui.QPainter.CompositionMode_SourceOver) 
        BG_painter.setBrush(stripes_brush)
        BG_painter.drawRect(rectangle)
        #---- END LAYER 02 ----#
        #--- BEGIN LAYER 03 ---#
        gradient_style = QtGui.QLinearGradient(0, 0, 0, rectangle.height()) #QtGui.QLinearGradient(startX, startY, endX, endY)
        gradient_style.setColorAt(0.80, QtGui.QColor(255, 255, 255, 255)) #QtGui.QLinearGradient().setColorAt(positionFloat, color)
        gradient_style.setColorAt(1.00, QtGui.QColor(128, 128, 128, 255)) #QtGui.QLinearGradient().setColorAt(positionFloat, color)
        BG_painter.setCompositionMode(QtGui.QPainter.CompositionMode_Multiply)
        gradient_brush = QtGui.QBrush(gradient_style)
        BG_painter.setBrush(gradient_brush)
        BG_painter.drawRect(rectangle)
        #---- END LAYER 03 ----#

        #'BG_painter.end()' ends the painting instance
        BG_painter.end()

        #converts the 'QtGui.QPixMap()' object into a 'QtGui.QImage' object
        BG_converted = pixMap_BG.toImage()
        #creates a 'QtGui.QBrush()' object that uses 'BG_converted' as a 'QtCore.Qt.TexturePattern'
        palette_brush = QtGui.QBrush(QtCore.Qt.TexturePattern)
        palette_brush.setTextureImage(BG_converted)
        #creates a new 'QtGui.QPalette()' object, with the previously created 'palette_brush' object to fill the 'QtGui.QPalette.Background' color role
        dialogPalette = QtGui.QPalette()
        dialogPalette.setBrush(QtGui.QPalette.Background, palette_brush)
        #applies the newly created 'dialogPalette' to the 'self.about' dialog object 
        self.about.setPalette(dialogPalette)
        #----------------------------------------------------------------------#
        #---- END STYLING for 'self.about', a 'QtWidgets.QDialog()' object ----#
        #----------------------------------------------------------------------#

        dialogLayout_about = QtWidgets.QHBoxLayout()
        dialogLayout_about.addLayout(leftSide)
        dialogLayout_about.addLayout(rightSide)

        self.about.setLayout(dialogLayout_about)
        self.about.exec_()        
Ejemplo n.º 6
0
def create_grid_gui(app):
    active_region = active_screen_region(app)
    active_win = WinData.active_window_id()

    window = QtWidgets.QDialog()

    # set window flagsfsdf
    window.setWindowFlags(QtCore.Qt.FramelessWindowHint |
                          QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.Tool |
                          QtCore.Qt.X11BypassWindowManagerHint)

    # set window properties
    window.setFixedSize(290, 320)
    window.setStyleSheet('background-color: rgb(%s, %s, %s)' %
                         (FRAME_COLOR.red(), FRAME_COLOR.green(), FRAME_COLOR.blue()))
    window.setWindowOpacity(0.95)

    # set window layout
    layout = QtWidgets.QGridLayout(window)

    # add Q button
    up_left = create_button('↖', GRID_BG_COLOR, LEGEND_COLOR)
    up_left.setFixedWidth(25)
    up_left.setFixedHeight(25)
    layout.addWidget(up_left, 0, 0)

    # add W/Up button
    up = create_button('↑', GRID_BG_COLOR, LEGEND_COLOR)
    up.setFixedHeight(25)
    layout.addWidget(up, 0, 1)

    # add E button
    up_right = create_button('↗', GRID_BG_COLOR, LEGEND_COLOR)
    up_right.setFixedWidth(25)
    up_right.setFixedHeight(25)
    layout.addWidget(up_right, 0, 2)

    # create grid component
    grid = QtWidgets.QFrame()
    grid.setFixedSize(200, 200)
    grid.setStyleSheet('background-color: rgb(%s, %s, %s)' %
                       (GRID_BG_COLOR.red(), GRID_BG_COLOR.green(), GRID_BG_COLOR.blue()))

    # setup drag bounds
    drag = QtCore.QRect(-1, -1, -1, -1)

    # create grid drawer
    def override_paint_event(evt):
        # create the painter
        painter = QtGui.QPainter(grid)
        # create the grid callback

        def grid_callback(rect):
            painter.setPen(QtGui.QPen(GRID_COLOR))
            painter.drawRect(rect)
            if rect.intersects(drag):
                painter.fillRect(rect, REGION_COLOR)

        # draw the grid
        do_grid(grid, grid_callback)

        # draw axis
        painter.setPen(QtGui.QPen(AXIS_COLOR))
        painter.drawLine(grid.width() / 2, 0, grid.width() / 2, grid.height())
        painter.drawLine(0, grid.height() / 2, grid.width(), grid.height() / 2)
    grid.paintEvent = override_paint_event

    initial = QtCore.QPoint(-1, -1)

    # create grid drag listeners
    def override_mouse_press_event(evt):
        initial.setX(evt.pos().x())
        initial.setY(evt.pos().y())

    def override_mouse_move_event(evt):
        drag.setWidth(abs(evt.pos().x() - initial.x()))
        drag.setHeight(abs(evt.pos().y() - initial.y()))
        drag.setX(min(evt.pos().x(), initial.x()))
        drag.setY(min(evt.pos().y(), initial.y()))
        grid.repaint()

    def override_mouse_release_event(evt):
        size_and_hide(window, grid, active_region, active_win, drag)
    grid.mousePressEvent = override_mouse_press_event
    grid.mouseMoveEvent = override_mouse_move_event
    grid.mouseReleaseEvent = override_mouse_release_event

    # add A/Left button
    left = create_button('←', GRID_BG_COLOR, LEGEND_COLOR)
    left.setFixedWidth(25)
    left.setFixedHeight(grid.height())
    layout.addWidget(left, 1, 0)

    # add grid
    layout.addWidget(grid, 1, 1)

    # add D/Right button
    right = create_button('→', GRID_BG_COLOR, LEGEND_COLOR)
    right.setFixedWidth(25)
    right.setFixedHeight(grid.height())
    layout.addWidget(right, 1, 2)

    # add Z button
    bot_left = create_button('↙', GRID_BG_COLOR, LEGEND_COLOR)
    bot_left.setFixedWidth(25)
    bot_left.setFixedHeight(25)
    layout.addWidget(bot_left, 2, 0)

    # add S/Down button
    down = create_button('↓', GRID_BG_COLOR, LEGEND_COLOR)
    down.setFixedHeight(25)
    layout.addWidget(down, 2, 1)

    # add C button
    bot_right = create_button('↘', GRID_BG_COLOR, LEGEND_COLOR)
    bot_right.setFixedWidth(25)
    bot_right.setFixedHeight(25)
    layout.addWidget(bot_right, 2, 2)

    # add export button
    export = create_button('EXPORT', GRID_BG_COLOR, LEGEND_COLOR)
    export.setFixedHeight(25)
    layout.addWidget(export, 3, 0, 1, 3)

    # grab focus upon showing
    def override_show_event(evt):
        window.raise_()
        window.activateWindow()
        window.setFocus()
    window.showEvent = override_show_event

    # exit the program upon hiding
    def override_close_event(evt):
        window.hide()
        app.exit()  # close the program since it is a one-run type of program
    window.closeEvent = override_close_event

    # add mouse press events
    up_left.clicked.connect(lambda: snap_nw(
        window, grid, active_region, active_win, drag))
    up.clicked.connect(lambda: snap_top_50(
        window, grid, active_region, active_win, drag))
    up_right.clicked.connect(lambda: snap_ne(
        window, grid, active_region, active_win, drag))
    left.clicked.connect(lambda: snap_left_50(
        window, grid, active_region, active_win, drag))
    right.clicked.connect(lambda: snap_right_50(
        window, grid, active_region, active_win, drag))
    bot_left.clicked.connect(lambda: snap_sw(
        window, grid, active_region, active_win, drag))
    down.clicked.connect(lambda: snap_bot_50(
        window, grid, active_region, active_win, drag))
    bot_right.clicked.connect(lambda: snap_se(
        window, grid, active_region, active_win, drag))
    export.clicked.connect(lambda: export_config(app, window))

    # add key press events
    def override_key_press_event(evt):
        if evt.key() == QtCore.Qt.Key_Escape:
            window.close()
        elif evt.key() == QtCore.Qt.Key_Q:
            snap_nw(window, grid, active_region, active_win, drag)
        elif evt.key() == QtCore.Qt.Key_E:
            snap_ne(window, grid, active_region, active_win, drag)
        elif evt.key() == QtCore.Qt.Key_Z:
            snap_sw(window, grid, active_region, active_win, drag)
        elif evt.key() == QtCore.Qt.Key_C:
            snap_se(window, grid, active_region, active_win, drag)
        elif evt.key() == QtCore.Qt.Key_W or evt.key() == QtCore.Qt.Key_Up:
            snap_top_50(window, grid, active_region, active_win, drag)
        elif evt.key() == QtCore.Qt.Key_A or evt.key() == QtCore.Qt.Key_Left:
            snap_left_50(window, grid, active_region, active_win, drag)
        elif evt.key() == QtCore.Qt.Key_S or evt.key() == QtCore.Qt.Key_Down:
            snap_bot_50(window, grid, active_region, active_win, drag)
        elif evt.key() == QtCore.Qt.Key_D or evt.key() == QtCore.Qt.Key_Right:
            snap_right_50(window, grid, active_region, active_win, drag)

    window.keyPressEvent = override_key_press_event

    # center the window and show it
    mid_x = (active_region.topLeft().x() +
             (active_region.width() / 2)) - (window.width() / 2)
    mid_y = (active_region.height() / 2) - (window.height() / 2)

    window.move(mid_x, mid_y)
    window.show()

    return window
Ejemplo n.º 7
0
def OpenRegistForm():
    global Dialog
    Dialog = QtWidgets.QDialog()
    ui = Ui_Registration()
    ui.setupUi(Dialog)
    Dialog.show()
Ejemplo n.º 8
0
    def import_fct(self):
        """main fonction

        it'll copy, import, rename and set correctly all the file in nuke
        """
        self.progressWindow = QtWidgets.QDialog()

        self.progress = QtWidgets.QProgressBar(self)

        layout = QtWidgets.QHBoxLayout(self.progressWindow)
        layout.addWidget(self.progress)

        self.progressWindow.show()

        # define the proxy folder
        proxy_path = 'D:/TEMP_NUKE'
        dic_frame = {}
        path = nuke.root().name()
        path = path.split('/')

        path_directory = self.HD_path

        version = self.version_drop_down.currentText()

        selected = self.path_tree.selectedItems()

        # create proxy folder
        proxy_path = os.path.join(proxy_path, path[-4], path[-3])

        # if the box is check it'will import all pass of a layer or all layer
        if self.checkbox_passes.isChecked():
            child_list = []
            # get layers
            layer = self.pass_drop_down.currentText()
            if layer in self.parentitem:
                layer_sel = self.parentitem[layer]
                layer_sel.setSelected(True)
                count = layer_sel.childCount()
                for i in range(count):
                    child = layer_sel.child(i)
                    child_list.append(child)
                    selected = child_list
            if layer == 'All layers':
                for key, value in self.parentitem.iteritems():
                    value.setSelected(True)
                    count = value.childCount()
                    for i in range(count):
                        child = value.child(i)
                        child_list.append(child)
                        selected = child_list

        # import by selected pass

        for i in selected:
            selected = i.text(0)
            qual = 'HD'
            if self.ld_checkbox.isChecked():
                path_directory = self.LD_path
                qual = 'LD'
            elif self.fml_checkbox.isChecked():
                path_directory = self.FML_path
                qual = 'FML'

            if QtWidgets.QTreeWidgetItem.parent(i):
                pass_type = QtWidgets.QTreeWidgetItem.parent(i)
                pass_type = pass_type.text(0)
                path_path = os.path.abspath(
                    os.path.join(path_directory, version, pass_type))
                all_frame_list = os.listdir(path_path)
                selectedlist = []
                for frame in all_frame_list:
                    name_frame = frame[:-9] + '_'
                    if '_' + selected in name_frame:
                        frame_nbr = frame[-8:]
                        frame_nbr = frame_nbr[:-4]
                        selectedlist.append(int(frame_nbr))
                        selectedlist = sorted(selectedlist)
                        end = selectedlist[-1]
                        first = selectedlist[0]
                        start_end = [first, end]
                        dic_frame = {name_frame: start_end}

                # create the path

                for key, value in dic_frame.items():
                    self.progress.setValue(0)
                    new_path = (os.path.abspath("{}/{}####.exr {}-{}".format(
                        path_path, key, value[0],
                        value[1]))).replace("\\", "/")
                    main_path = (os.path.abspath("{}/{}####.exr".format(
                        path_path, key))).replace("\\", "/")
                    proxy = os.path.join(proxy_path, qual)
                    proxycoucou = proxy
                    new_proxy_path = "{}/{}####.exr {}-{}".format(
                        proxy, key, value[0], value[1])
                    name = pass_type + '_' + selected

                    # if the node already exist just update the path

                    if nuke.exists(name):
                        node = nuke.toNode(name)
                        node.knob('file').fromUserText(
                            os.path.abspath(new_path))
                        if self.checkbox.isChecked():
                            self.progressWindow.setWindowTitle(selected)
                            self.copy_files_with_progress(
                                path_path, proxycoucou, key)
                            node.knob('proxy').fromUserText(
                                os.path.normpath(new_proxy_path))

                    # else create the node

                    else:
                        print(new_path)
                        readNode = nuke.nodes.Read(file=main_path,
                                                   first=value[0],
                                                   last=value[1],
                                                   name=name)
                        node = nuke.toNode(name)
                        if self.checkbox.isChecked():
                            self.progressWindow.setWindowTitle(selected)
                            self.copy_files_with_progress(
                                path_path, proxycoucou, key)
                            # self.progressWindow.close()
                            node.knob('proxy').fromUserText(
                                os.path.normpath(new_proxy_path))
        self.progressWindow.close()

        # auto create Deep EXRID network

        if nuke.exists('ALL_ALL_ExrID'):

            value = nuke.toNode('ALL_ALL_ExrID').knob('file').getValue()
            value = value.replace('%04d', '####')

            first = nuke.toNode('ALL_ALL_ExrID').knob('first').getValue()
            last = nuke.toNode('ALL_ALL_ExrID').knob('last').getValue()

            value = value + ' {}-{}'.format(int(first), int(last))

            infopath = nuke.root().name()

            infopath = infopath.split('/')

            nodename = infopath[-4] + '_' + infopath[-3] + '_DeepRead'

            if nuke.exists(nodename):
                print('exist')
                my_node = nuke.toNode(nodename)

            else:
                my_node = nuke.createNode('DeepRead')
                my_node.setName(nodename)
                my_node.knob('on_error').setValue(3)

            my_node.knob('file').fromUserText(value)

            open_exrid = nodename.replace('DeepRead', 'OpenEXRId')
            if nuke.exists(open_exrid):
                print('exist')
                key = nuke.toNode(open_exrid)

            else:
                key = nuke.createNode('DeepOpenEXRId')
                key.setName(open_exrid)

            key.setInput(0, my_node)

            deeptoimage = nodename.replace('DeepRead', 'DeepToImage')
            if nuke.exists(deeptoimage):
                print('exist')
                value = nuke.toNode(deeptoimage)

            else:
                value = nuke.createNode('DeepToImage')
                value.setName(deeptoimage)

            value.setInput(0, key)

            exr_pass = nuke.toNode('ALL_ALL_ExrID')
            nuke.delete(exr_pass)
Ejemplo n.º 9
0
def start():

    # UI
    app = QtWidgets.QApplication(sys.argv)
    Dialog = QtWidgets.QDialog()
    ui = Ui_Dialog()
    ui.setupUi(Dialog)
    Dialog.show()

    vt = VirusTotal()
    parser = argparse.ArgumentParser(description='Virustotal File Scan')
    parser.add_argument("-p",
                        "--private",
                        help="the API key belongs to a private API service",
                        action="store_true")
    parser.add_argument("-v",
                        "--verbose",
                        help="print verbose log (everything in response)",
                        action="store_true")
    parser.add_argument("-s",
                        "--send",
                        help="send a file or a directory of files to scan",
                        metavar="PATH")
    parser.add_argument(
        "-r",
        "--retrieve",
        help="retrieve reports on a file or a directory of files",
        metavar="PATH")
    parser.add_argument(
        "-m",
        "--retrievefrommeta",
        help=
        "retrieve reports based on checksums in a metafile (one sha256 checksum for each line)",
        metavar="METAFILE")
    parser.add_argument("-l",
                        "--log",
                        help="log actions and responses in file",
                        metavar="LOGFILE")
    args = parser.parse_args()
    vt.send_files(["C:\\Users\\Alex\\Downloads\\SpyMAX\\Spy MAX.exe"])
    if args.log:
        filelog = logging.FileHandler(args.log)
        filelog.setFormatter(
            logging.Formatter("[%(asctime)s %(levelname)s] %(message)s",
                              datefmt="%m/%d/%Y %I:%M:%S"))
        vt.logger.addHandler(filelog)

    if args.private:
        vt.is_public_api = False

    if args.verbose:
        vt.is_verboselog = True

    # system init end, start to perform operations
    api_comments = {True: 'Public', False: 'Private'}
    vt.logger.info("API KEY loaded. %s API used.",
                   api_comments[vt.is_public_api])

    if args.send:
        vt.send_files(list_all_files(args.send))

    if args.retrieve:
        vt.retrieve_files_reports(list_all_files(args.retrieve))

    if args.retrievefrommeta:
        vt.retrieve_from_meta(args.retrievefrommeta)
    def __init__(self):
        self.transfer_function = None
        """
        Create the CopyDeformerWeights UI
        """
        self.dialog = QtWidgets.QDialog()
        self.dialog_name = "copy_deformer_weights_dialog"
        self.delete_instances()

        self.maya_main_window_ptr = OpenMayaUI.MQtUtil.mainWindow()
        self.maya_main_window = wrapInstance(long(self.maya_main_window_ptr),
                                             QtWidgets.QMainWindow)
        self.dialog.setParent(self.maya_main_window)
        self.dialog.setWindowFlags(QtCore.Qt.Window)

        self.dialog.setObjectName(self.dialog_name)
        self.dialog.setFixedSize(400, 500)
        self.dialog.setWindowTitle("Copy Deformer Weights")

        self.dialog_layout = QtWidgets.QGridLayout(self.dialog)
        self.dialog_layout.setObjectName("dialog_layout")

        self.main_layout = QtWidgets.QVBoxLayout()
        self.main_layout.setObjectName("main_layout")

        self.source_group_box = QtWidgets.QGroupBox(self.dialog)
        self.source_group_box.setObjectName("source_group_box")
        self.source_group_box.setTitle("Source")

        self.source_gb_layout = QtWidgets.QGridLayout(self.source_group_box)
        self.source_gb_layout.setObjectName("source_gb_layout")

        self.source_layout = QtWidgets.QVBoxLayout()
        self.source_layout.setObjectName("source_layout")

        self.btn_source = QtWidgets.QPushButton(self.source_group_box)
        self.btn_source.setObjectName("btn_source")
        self.btn_source.setText("Get Source")
        self.btn_source.clicked.connect(lambda: self.get_source_items())
        self.source_layout.addWidget(self.btn_source)

        self.source_list_layout = QtWidgets.QHBoxLayout()
        self.source_list_layout.setObjectName("source_list_layout")

        self.object_source_list = QtWidgets.QListWidget(self.source_group_box)
        self.object_source_list.setObjectName("object_source_list")
        self.object_source_list.currentItemChanged.connect(
            lambda: self.update_source_deformer_list())
        self.source_list_layout.addWidget(self.object_source_list)

        self.deformer_source_list = QtWidgets.QListWidget(
            self.source_group_box)
        self.deformer_source_list.setObjectName("deformer_source_list")
        self.source_list_layout.addWidget(self.deformer_source_list)

        self.source_layout.addLayout(self.source_list_layout)
        self.source_gb_layout.addLayout(self.source_layout, 0, 0, 1, 1)

        self.main_layout.addWidget(self.source_group_box)

        self.target_group_box = QtWidgets.QGroupBox(self.dialog)
        self.target_group_box.setObjectName("target_group_box")
        self.target_group_box.setTitle("Target")

        self.target_gb_layout = QtWidgets.QGridLayout(self.target_group_box)
        self.target_gb_layout.setObjectName("target_gb_layout")

        self.target_layout = QtWidgets.QVBoxLayout()
        self.target_layout.setObjectName("target_layout")

        self.btn_target = QtWidgets.QPushButton(self.target_group_box)
        self.btn_target.setObjectName("btn_target")
        self.btn_target.setText("Get Target")
        self.btn_target.clicked.connect(lambda: self.get_target_items())
        self.target_layout.addWidget(self.btn_target)

        self.target_list_layout = QtWidgets.QHBoxLayout()
        self.target_list_layout.setObjectName("target_list_layout")

        self.object_target_list = QtWidgets.QListWidget(self.target_group_box)
        self.object_target_list.setObjectName("object_target_list")
        self.object_target_list.currentItemChanged.connect(
            lambda: self.update_target_deformer_list())
        self.target_list_layout.addWidget(self.object_target_list)

        self.deformer_target_list = QtWidgets.QListWidget(
            self.target_group_box)
        self.deformer_target_list.setObjectName("deformer_target_list")
        self.target_list_layout.addWidget(self.deformer_target_list)

        self.target_layout.addLayout(self.target_list_layout)
        self.target_gb_layout.addLayout(self.target_layout, 0, 0, 1, 1)
        self.main_layout.addWidget(self.target_group_box)

        self.progress_bar_layout = QtWidgets.QVBoxLayout()
        self.progress_bar_layout.setObjectName("progress_bar_layout")
        self.progress_bar = QtWidgets.QProgressBar(self.dialog)

        self.progress_bar.setProperty("value", -1)
        self.progress_bar.setTextVisible(False)
        self.progress_bar.setObjectName("progress_bar")
        self.progress_bar_layout.addWidget(self.progress_bar)

        self.progress_label = QtWidgets.QLabel(self.dialog)
        self.progress_label.setObjectName("progress_label")
        self.progress_label.setMinimumSize(QtCore.QSize(0, 21))
        self.progress_label.setAlignment(QtCore.Qt.AlignCenter)
        self.progress_bar_layout.addWidget(self.progress_label)
        self.main_layout.addLayout(self.progress_bar_layout)
        self._progress_bar_steps = 8
        self._progress_bar_value = -1

        self.buttons_group_box = QtWidgets.QGroupBox(self.dialog)
        self.buttons_group_box.setTitle("")
        self.buttons_group_box.setObjectName("buttons_group_box")

        self.buttons_gb_layout = QtWidgets.QHBoxLayout(self.buttons_group_box)
        self.buttons_gb_layout.setObjectName("buttons_gb_layout")

        self.copy_button = QtWidgets.QPushButton(self.buttons_group_box)
        self.copy_button.setObjectName("copy_button")
        self.copy_button.setText("Copy")
        self.copy_button.clicked.connect(lambda: self.copy_deformer_weights())
        self.buttons_gb_layout.addWidget(self.copy_button)

        self.cancel_button = QtWidgets.QPushButton(self.buttons_group_box)
        self.cancel_button.setObjectName("cancel_button")
        self.cancel_button.setText("Cancel")
        self.cancel_button.clicked.connect(lambda: self.delete_instances())
        self.buttons_gb_layout.addWidget(self.cancel_button)

        self.main_layout.addWidget(self.buttons_group_box)
        self.dialog_layout.addLayout(self.main_layout, 0, 0, 1, 1)
Ejemplo n.º 11
0
    def __init__(self):
        super().__init__()
        self.msg = QtWidgets.QDialog(
            None, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint
            | QtCore.Qt.WindowCloseButtonHint)
        self.msg.setFixedHeight(400)
        self.msg.setFixedWidth(500)

        self.pixmap = QtGui.QPixmap.scaled(QtGui.QPixmap("nasa.ico"), 100, 100)

        self.infotext1 = QtWidgets.QLabel(self.msg)
        self.infotext1.setGeometry(QtCore.QRect(0, 10, 500, 28))
        self.infotext1.setFont(QtGui.QFont("Times", 9))
        self.infotext1.setAlignment(QtCore.Qt.AlignCenter)
        self.infotext1.setText(
            "<b>To add a subreddit use full url to or use ending after reddit.com/r/</b>"
        )

        self.infotext2 = QtWidgets.QLabel(self.msg)
        self.infotext2.setGeometry(QtCore.QRect(0, 30, 500, 28))
        self.infotext2.setText(
            "<b>To add a directory please use full path</b>")
        self.infotext2.setAlignment(QtCore.Qt.AlignCenter)
        self.infotext2.setFont(QtGui.QFont("Times", 9))

        self.infotext3 = QtWidgets.QLabel(self.msg)
        self.infotext3.setGeometry(QtCore.QRect(0, 70, 500, 28))
        self.infotext3.setText("<b>Use enter to confirm path</b>")
        self.infotext3.setAlignment(QtCore.Qt.AlignCenter)
        self.infotext3.setFont(QtGui.QFont("Times", 9))

        self.txtdialog = QtWidgets.QLineEdit(self.msg)
        self.txtdialog.setGeometry(QtCore.QRect(40, 100, 400, 28))
        self.txtdialog.setPlaceholderText("Write url or directory path")
        self.txtdialog.setClearButtonEnabled(True)

        self.horizontalLayoutWidget = QtWidgets.QWidget(self.msg)
        self.horizontalLayoutWidget.setGeometry(QtCore.QRect(
            40, 120, 400, 200))
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
        self.horizontalLayout = QtWidgets.QHBoxLayout(
            self.horizontalLayoutWidget)

        self.previewPic1 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.previewPic1.setFixedWidth(100)
        self.previewPic1.setFixedHeight(100)
        self.previewPic1.setFlat(True)

        self.previewPic2 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
        self.previewPic2.setFixedWidth(100)
        self.previewPic2.setFixedHeight(100)
        self.previewPic2.setFlat(True)

        self.horizontalLayout.addWidget(self.previewPic1)
        self.horizontalLayout.addWidget(self.previewPic2)
        self.horizontalLayout.setSpacing(80)

        self.radioButton1 = QtWidgets.QRadioButton(self.msg)
        self.radioButton1.move(128, 280)
        self.radioButton2 = QtWidgets.QRadioButton(self.msg)
        self.radioButton2.move(340, 280)

        self.pushButton3 = QtWidgets.QPushButton(self.msg)
        self.pushButton3.setText("Add to library")
        self.pushButton3.move(200, 350)

        self.pushButton4 = QtWidgets.QPushButton(self.msg)
        self.pushButton4.setText("Cancel")
        self.pushButton4.move(380, 350)

        self.previewPic1.hide()
        self.previewPic2.hide()
        self.radioButton1.hide()
        self.radioButton2.hide()

        self.txtdialog.editingFinished.connect(self.showPreview)
        self.repeater = False
        self.previewPic1.clicked.connect(self.radioButton1.animateClick)
        self.previewPic2.clicked.connect(self.radioButton2.animateClick)
        self.pushButton3.clicked.connect(self.addNew)
        self.pushButton4.clicked.connect(self.msg.reject)

        self.msg.setWindowTitle("Add a subreddit or directory")
        self.msg.setWindowIcon(self.pixmap)

        x = self.msg.exec_()
Ejemplo n.º 12
0
from PySide2 import QtCore, QtGui, QtWidgets
import sys
from ui import Ui_FileTransfer
import shutil
import os

# Creat App
app = QtWidgets.QApplication(sys.argv)

# Create Form
FileTransfer = QtWidgets.QDialog()
ui = Ui_FileTransfer()
ui.setupUi(FileTransfer)
FileTransfer.show()


# Hook Logic
# ------------------------ ALL FUNCTIONS -------------------------
def viewdata1():
    try:
        f1p = []
        f1 = open('data1.txt', 'r')
        for line in f1:
            f1p.append(line)
        ui.lineEdit.setText(f1p[0][0:len(f1p[0]) - 1])
        ui.lineEdit_2.setText(f1p[1][0:len(f1p[1]) - 1])
        ui.lineEdit_3.setText(f1p[2])
        f1.close()
    except:
        print('Empty path 1')
Ejemplo n.º 13
0
 def open_about(self):
     self._about = QtWidgets.QDialog()
     self._ui = about.Ui_AboutDialog()
     self._ui.setupUi(AboutDialog=self._about)
     #self._about.show()
     self._about.exec_()
Ejemplo n.º 14
0
        self.label_3 = QtWidgets.QLabel(Create)
        self.label_3.setGeometry(QtCore.QRect(20, 70, 61, 16))
        self.label_3.setObjectName("label_3")
        self.value = QtWidgets.QLineEdit(Create)
        self.value.setGeometry(QtCore.QRect(80, 70, 271, 20))
        self.value.setReadOnly(False)
        self.value.setObjectName("value")

        self.retranslateUi(Create)
        QtCore.QMetaObject.connectSlotsByName(Create)

    def retranslateUi(self, Create):
        _translate = QtCore.QCoreApplication.translate
        Create.setWindowTitle(_translate("Create", "CreateTextItem"))
        self.label.setText(_translate("Create", "Name"))
        self.ok.setText(_translate("Create", "OK"))
        self.cancle.setText(_translate("Create", "Cancle"))
        self.label_2.setText(_translate("Create", "Key"))
        self.label_3.setText(_translate("Create", "Value"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Create = QtWidgets.QDialog()
    ui = Ui_Create()
    ui.setupUi(Create)
    Create.show()
    sys.exit(app.exec_())

Ejemplo n.º 15
0
                "    <body>\n"
                "        <ol style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\">\n"
                "            <li align=\"justify\"\n"
                "                style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\n"
                "                Σε περίπτωση που ο κέρσορας στην γραμμή εισαγωγής των voucher <br />βρίσκεται στο μέσο του πεδίου, δεν\n"
                "                θα μπορέσει να εισάγει το <br />σκαναρισμένο barcode. Πιέστε το πλήκτρο Home, ώστε να μπορέσετε <br />να\n"
                "                σκανάρετε. <br /></li>\n"
                "            <li align=\"justify\"\n"
                "                style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\n"
                "                Το όνομα του αποστολέα γίνεται δεκτό <u>μόνο με ελληνικούς κεφαλαίους</u></li>\n"
                "            <p align=\"justify\">χαρακτήρες και πρέπει να είναι της μορφής:</p>\n"
                "            <p align=\"justify\">Ο. ΕΠΩΝΥΜΟ </p>\n"
                "            <li align=\"justify\"\n"
                "                style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\n"
                "                Για να γίνει επιτυχώς η αποστολή του e-mail, πρέπει ΟΛΑ τα στοιχεία<br />του πίνακα να είναι\n"
                "                συμπληρωμένα.</li>\n"
                "        </ol>\n"
                "    </body>\n"
                "\n"
                "</html>"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Dialog_Instructions = QtWidgets.QDialog()
    ui = Ui_Dialog_Instructions()
    ui.setupUi(Dialog_Instructions)
    Dialog_Instructions.show()
    sys.exit(app.exec_())
Ejemplo n.º 16
0
            QtWidgets.QApplication.translate("surfacing_Dialog",
                                             "Surfacing_Dialog", None, -1))
        self.depth_label.setText(
            QtWidgets.QApplication.translate("surfacing_Dialog", "depth\n"
                                             "[units]", None, -1))
        self.length_label.setText(
            QtWidgets.QApplication.translate("surfacing_Dialog", "length\n"
                                             "[units]", None, -1))
        self.feed_label.setText(
            QtWidgets.QApplication.translate("surfacing_Dialog", "feed rate\n"
                                             "[units/min]", None, -1))
        self.rpm_label.setText(
            QtWidgets.QApplication.translate("surfacing_Dialog", "rpm", None,
                                             -1))
        self.unit_label.setText(
            QtWidgets.QApplication.translate("surfacing_Dialog", "units", None,
                                             -1))
        self.create_pushButton.setText(
            QtWidgets.QApplication.translate("surfacing_Dialog",
                                             "create gcode", None, -1))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    surfacing_Dialog = QtWidgets.QDialog()
    ui = Ui_surfacing_Dialog()
    ui.setupUi(surfacing_Dialog)
    surfacing_Dialog.show()
    sys.exit(app.exec_())
Ejemplo n.º 17
0
from KenKenGameV3 import Game
import sys
from PySide2 import QtCore, QtWidgets

app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Game()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())
Ejemplo n.º 18
0
        font.setStyleStrategy(QtGui.QFont.PreferDefault)
        self.label_4.setFont(font)
        self.label_4.setObjectName("label_4")
        self.buttonBox = QtWidgets.QDialogButtonBox(checking)
        self.buttonBox.setGeometry(QtCore.QRect(100, 140, 193, 28))
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")

        self.retranslateUi(checking)
        self.buttonBox.accepted.connect(checking.accept)
        self.buttonBox.rejected.connect(checking.reject)
        QtCore.QMetaObject.connectSlotsByName(checking)

    def retranslateUi(self, checking):
        _translate = QtCore.QCoreApplication.translate
        checking.setWindowTitle(_translate("checking", "checking"))
        self.label_4.setText(
            _translate("checking",
                       "    check the cells of first three columns!!!"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    checking = QtWidgets.QDialog()
    ui = Ui_checking()
    ui.setupUi(checking)
    checking.show()
    sys.exit(app.exec_())