本文整理汇总了Python中MOSES.getPathToImages方法的典型用法代码示例。如果您正苦于以下问题:Python MOSES.getPathToImages方法的具体用法?Python MOSES.getPathToImages怎么用?Python MOSES.getPathToImages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MOSES
的用法示例。
在下文中一共展示了MOSES.getPathToImages方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def createUI(self, oink_widget_list):
self.label = QtGui.QLabel("Choose A Widget:")
self.combo_box_widgets = QtGui.QComboBox()
self.combo_box_widgets.addItems(oink_widget_list)
self.button = QtGui.QPushButton("Launch")
final_layout = QtGui.QHBoxLayout()
final_layout.addWidget(self.label)
final_layout.addWidget(self.combo_box_widgets)
final_layout.addWidget(self.button)
final_page = QtGui.QWidget()
final_page.setLayout(final_layout)
self.progress_bar = ProgressBar()
self.message = QtGui.QLabel("Loading.....")
loading_layout = QtGui.QVBoxLayout()
loading_layout.addWidget(self.progress_bar)
loading_layout.addWidget(self.message)
loading_page = QtGui.QWidget()
loading_page.setLayout(loading_layout)
self.stacked_widget = QtGui.QStackedWidget()
self.stacked_widget.addWidget(final_page)
self.stacked_widget.addWidget(loading_page)
layout = QtGui.QVBoxLayout()
layout.addWidget(self.stacked_widget)
layout.addWidget(Taunter())
self.setLayout(layout)
self.setWindowTitle("OINK Widget Chooser")
icon_file_name_path = os.path.join(MOSES.getPathToImages(),'PORK_Icon.png')
self.setWindowIcon(QtGui.QIcon(icon_file_name_path))
self.show()
示例2: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def createUI(self):
path_to_image = os.path.join(MOSES.getPathToImages(), "OINK.png")
self.image = ImageLabel(path_to_image, 800, 566)
#self.sharingan = SharinganButton()
self.progress_bar = ProgressBar()
self.message = QtGui.QLabel("Not all those who wander are lost....")
layout = QtGui.QVBoxLayout()
layout.addWidget(self.image)
layout.addWidget(self.progress_bar)
layout.addWidget(self.message)
layout.addWidget(Taunter())
self.setLayout(layout)
self.setWindowTitle("Bulk Buster: The OINK Preloader Screen")
icon_file_name_path = os.path.join(MOSES.getPathToImages(),'PORK_Icon.png')
self.setWindowIcon(QtGui.QIcon(icon_file_name_path))
self.show()
示例3: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def createUI(self):
""""""
path_to_images = MOSES.getPathToImages()
self.raw_data_uploader_button = ImageButton(
os.path.join(path_to_images,"upload_raw_data.png"),
48,
48, os.path.join(path_to_images,"upload_raw_data_mouseover.png"))
self.tna_viewer_button = ImageButton(
os.path.join(path_to_images,"tna.png"),
48,
48,
os.path.join(path_to_images,"tna_mouseover.png")
)
self.piggybank_button = ImageButton(
os.path.join(path_to_images,"piggybank.png"),
48,
48,
os.path.join(path_to_images,"piggybank_mouseover.png")
)
self.seeker_button = ImageButton(
os.path.join(path_to_images,"find.png"),
48,
48,
os.path.join(path_to_images,"find_mouseover.png")
)
self.taunter = Taunter()
self.bacon_icon = ImageButton(
os.path.join(path_to_images,"quality.png"),
150,
150,
os.path.join(path_to_images,"quality_mouseover.png")
)
self.bacon_icon.setToolTip("Get to work, Poozers.")
row_1 = QtGui.QHBoxLayout()
row_1.addWidget(self.raw_data_uploader_button)
row_1.addWidget(self.tna_viewer_button)
row_1.addWidget(self.piggybank_button)
row_1.addWidget(self.seeker_button)
layout = QtGui.QVBoxLayout()
layout.addWidget(self.bacon_icon,0,QtCore.Qt.AlignHCenter)
layout.addLayout(row_1,1)
layout.addWidget(self.taunter,0)
self.main_widget = QtGui.QWidget()
self.main_widget.setLayout(layout)
self.setCentralWidget(self.main_widget)
self.setWindowTitle("BACON - Version %s. Server: %s. User: %s (%s)."%(version(), MOSES.getHostID(), self.user_id,MOSES.getEmpName(self.user_id) if self.user_id != "bigbrother" else "Administrator"))
icon_file_name_path = os.path.join(path_to_images,'PORK_Icon.png')
self.setWindowIcon(QtGui.QIcon(icon_file_name_path))
self.show()
示例4: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def createUI(self):
#self.raw_data_filter_form = FilterForm()
self.fsn_entry_field = FSNTextEdit()
self.raw_data_table = CopiableQTableWidget(0,0)
self.upload_raw_data_button = QtGui.QPushButton("Upload Raw Data from File")
self.progress_bar = ProgressBar()
self.progress_log = QtGui.QTextEdit()
layout = QtGui.QVBoxLayout()
layout.addWidget(self.upload_raw_data_button)
layout.addWidget(self.progress_bar)
layout.addWidget(self.progress_log)
self.setLayout(layout)
self.setWindowTitle("Raw Data Uploader")
self.setWindowIcon(QtGui.QIcon(os.path.join(MOSES.getPathToImages(),"PORK_Icon.png")))
self.show()
示例5: getSharinganFileLists
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def getSharinganFileLists():
import os
import glob
path_to_folder = os.path.join(MOSES.getPathToImages(),"sharingan")
base_sharingan_file = os.path.join(path_to_folder,"sharingan_base.png")
search_string = os.path.join(path_to_folder,"sharingan_mangyeko_*.png")
mangyeko_file_list = glob.glob(search_string)
file_pairs = []
used_files = []
for mangyeko_file in mangyeko_file_list:
if mangyeko_file not in used_files:
mangyeko_pair = [base_sharingan_file, mangyeko_file]
used_files.append(mangyeko_file)
eternal_mangyeko_search_string = os.path.join(
path_to_folder,
os.path.splitext(os.path.basename(mangyeko_file))[0]+"_*.png")
eternal_mangyeko_file_list = sorted(glob.glob(eternal_mangyeko_search_string))
mangyeko_pair.extend(eternal_mangyeko_file_list)
used_files.extend(eternal_mangyeko_file_list)
file_pairs.append([x for x in mangyeko_pair])
return file_pairs
示例6: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def createUI(self):
self.date_label = QtGui.QLabel("Date(s):")
self.start_date = FormattedDateEdit()
self.end_date = FormattedDateEdit()
self.employees_label = QtGui.QLabel("Employees:")
self.employees_selection_box = CheckableComboBox("Employees")
self.all_button = QtGui.QPushButton("Select All")
self.clear_button = QtGui.QPushButton("Clear")
self.refresh_table_button = QtGui.QPushButton("Refresh Table")
self.approve_selected_button = QtGui.QPushButton("Approved")
self.approve_selected_button.setCheckable(True)
self.reject_selected_button = QtGui.QPushButton("Rejected")
self.reject_selected_button.setCheckable(True)
self.pending_selected_button = QtGui.QPushButton("Pending")
self.pending_selected_button.setCheckable(True)
self.button_group = QtGui.QButtonGroup()
self.button_group.addButton(self.approve_selected_button)
self.button_group.addButton(self.reject_selected_button)
self.button_group.addButton(self.pending_selected_button)
self.button_group.setExclusive(True)
self.approval_comment_label = QtGui.QLabel("Approval\\Rejection Comment:")
self.rejection_comment_lineedit = QtGui.QLineEdit()
self.leave_table = CopiableQTableWidget(0, 0)
self.status_label = QtGui.QLabel("Status")
self.status_combobox = QtGui.QComboBox()
self.status_combobox.addItems(["Working","Leave"])
self.comment_label = QtGui.QLabel("Comment")
self.comment_lineedit = QtGui.QLineEdit()
self.save_selected_button = QtGui.QPushButton("Save")
self.save_selected_button.setEnabled(False)
self.save_all_button = QtGui.QPushButton("Save All")
row_1 = QtGui.QHBoxLayout()
row_1.addWidget(self.date_label,0)
row_1.addWidget(self.start_date,0)
row_1.addWidget(self.end_date,0)
row_1.addWidget(self.employees_label,0)
row_1.addWidget(self.employees_selection_box,0)
row_1.addWidget(self.all_button,0)
row_1.addWidget(self.clear_button,0)
self.relaxation_label = QtGui.QLabel("Relaxation")
self.relaxation_spinbox = QtGui.QDoubleSpinBox()
self.relaxation_spinbox.setSuffix("%")
row_2 = QtGui.QHBoxLayout()
row_2.addWidget(self.status_label, 0)
row_2.addWidget(self.status_combobox, 0)
row_2.addWidget(self.relaxation_label, 0)
row_2.addWidget(self.relaxation_spinbox, 0)
row_2.addWidget(self.comment_label, 0)
row_2.addWidget(self.comment_lineedit, 0)
row_3 = QtGui.QHBoxLayout()
row_3.addWidget(self.approval_comment_label,0)
row_3.addWidget(self.rejection_comment_lineedit,0)
row_3.addWidget(self.approve_selected_button,0)
row_3.addWidget(self.reject_selected_button,0)
row_3.addWidget(self.pending_selected_button,0)
row_3.addWidget(self.save_selected_button,0)
row_3.addWidget(self.save_all_button,0)
row_3.addWidget(self.refresh_table_button,0)
layout = QtGui.QVBoxLayout()
layout.addLayout(row_1)
layout.addLayout(row_2)
layout.addLayout(row_3)
layout.addWidget(self.leave_table)
self.setLayout(layout)
self.setWindowTitle("Leaves Manager")
self.setWindowIcon(QtGui.QIcon(os.path.join(MOSES.getPathToImages(),"PORK_Icon.png")))
self.show()
示例7: createUI
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def createUI(self):
self.start_date_label = QtGui.QLabel("<b>Date:</b>")
self.start_date_edit = QtGui.QDateTimeEdit()
self.start_date_edit.setToolTip("Set the date for which you want to generate the report.")
lwd = MOSES.getLastWorkingDate(self.user_id, self.password, queryUser="All")
self.start_date_edit.setDate(lwd)
self.start_date_edit.setDisplayFormat("MMMM dd, yyyy")
self.start_date_edit.setMinimumDate(QtCore.QDate(2015,1,1))
self.start_date_edit.setCalendarPopup(True)
self.end_date_edit = QtGui.QDateTimeEdit()
self.end_date_edit.setToolTip("Select an end date. Only working days will be considered for the calculation.\nThis field will be disabled if the checkbox isn't marked to calculate the average statistics between dates.")
self.end_date_edit.setDate(self.start_date_edit.date())
self.end_date_edit.setDisplayFormat("MMMM dd, yyyy")
self.end_date_edit.setMinimumDate(self.start_date_edit.date())
self.end_date_edit.setCalendarPopup(True)
self.writers_combobox = CheckableComboBox("Writers")
self.writers_combobox.setToolTip("Select a group of writers if you want to check their performance for some time frame.")
report_names = ["Article Count","Efficiency","Audit Count","CFM","GSEO","Stack Rank Index","Efficiency KRA","CFM KRA","GSEO KRA"]#,"Audit Percentage"]
self.parameters_combobox = CheckableComboBox("Report Values")
self.parameters_combobox.addItems(report_names)
self.parameters_combobox.select(["Efficiency","CFM","GSEO", "Article Count", "Audit Count"])
self.report_time_frames_combobox = CheckableComboBox("Timeframe")
self.report_time_frames_combobox.addItems(["Daily","Weekly","Monthly","Quarterly","Half-Yearly"])
self.report_time_frames_combobox.select(["Daily","Weekly"])
self.sorting_filter_label = QtGui.QLabel("<b>Sort By:</b>")
self.sorting_filter_combobox = QtGui.QComboBox()
self.sorting_filter_combobox.setToolTip("Select the parameter you want to sort the generated reports by.")
self.build_button = QtGui.QPushButton("Build Daily Team Performance Report")
self.build_button.setToolTip("Click this button to start building the report")
self.plot_button = QtGui.QPushButton("Plot")
self.plot_button.setToolTip("Check this if you want to automatically plot the graphs.")
self.build_dbr_button = QtGui.QPushButton("Build DBR Report")
self.build_dbr_button.setToolTip("Check this if you want to automatically plot the graphs.")
self.build_wbr_button = QtGui.QPushButton("Build WBR Report")
self.build_wbr_button.setToolTip("Check this if you want to automatically plot the graphs.")
self.progress_bar = ProgressBar()
self.export_graphs_button = QtGui.QPushButton("Save")
self.export_graphs_button.setToolTip("Click this button to save the generated reports and graphs in a desired folder location.")
self.report = CopiableQTableWidget(0, 0)
self.t_report = CopiableQTableWidget(0, 0)
self.dbr_report = CopiableQTableWidget(0, 0)
self.wbr_report = CopiableQTableWidget(0, 0)
self.graphs = DailyGraphView()
self.t_graphs = DailyGraphView()
self.reports_tab = QtGui.QTabWidget()
self.reports_tab.addTab(self.report,"Writers' Report")
#self.reports_tab.addTab(self.graphs, "Writers' Graphs")
#self.reports_tab.addTab(self.t_report,"Team Report")
#self.reports_tab.addTab(self.t_graphs, "Team Graphs")
self.reports_tab.addTab(self.dbr_report, "DBR Report")
self.reports_tab.addTab(self.wbr_report, "WBR Report")
self.status = QtGui.QLabel("I'm a Porkitzer Prize Winning Reporter.")
options_layout_row_1 = QtGui.QHBoxLayout()
options_layout_row_1.addWidget(self.start_date_label,0)
options_layout_row_1.addWidget(self.start_date_edit,1)
options_layout_row_1.addWidget(self.end_date_edit,1)
options_layout_row_1.addWidget(self.writers_combobox,1)
options_layout_row_1.addWidget(self.parameters_combobox,1)
options_layout_row_1.addWidget(self.report_time_frames_combobox,1)
options_layout_row_1.addStretch(2)
options_layout_row_2 = QtGui.QHBoxLayout()
options_layout_row_2.addWidget(self.sorting_filter_label,0)
options_layout_row_2.addWidget(self.sorting_filter_combobox,1)
options_layout_row_2.addWidget(self.build_button,0)
#options_layout_row_2.addWidget(self.plot_button,0)
options_layout_row_2.addWidget(self.build_dbr_button,0)
options_layout_row_2.addWidget(self.build_wbr_button,0)
options_layout_row_2.addStretch(2)
options_layout = QtGui.QVBoxLayout()
options_layout.addLayout(options_layout_row_1,0)
options_layout.addLayout(options_layout_row_2,0)
self.daily_porker_logo = ImageButton(
os.path.join(MOSES.getPathToImages(),"newspaper.png"),
100,
100,
os.path.join(MOSES.getPathToImages(),"newspaper_mouseover.png")
)
self.daily_porker_logo.setFlat(True)
options = QtGui.QGroupBox("Report Options")
options.setLayout(options_layout)
options_with_logo = QtGui.QHBoxLayout()
options_with_logo.addWidget(self.daily_porker_logo, 0, QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
#.........这里部分代码省略.........
示例8: __init__
# 需要导入模块: import MOSES [as 别名]
# 或者: from MOSES import getPathToImages [as 别名]
def __init__(self, *args, **kwargs):
super(SharinganButton, self).__init__(os.path.join(MOSES.getPathToImages(),"sharingan","sharingan_base.png"), *args, **kwargs)
self.ashura = ThreadOfSixPaths()
self.ashura.updateImage.connect(self.updateImage)