tier_points.py (1606B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\cosmetics\client\ships\qa\tier_points.py 2 import eveicon 3 from carbonui import uiconst 4 from carbonui.control.forms import formComponent 5 from carbonui.control.forms.form import Form, FormActionSubmit, FormActionCancel 6 from carbonui.control.forms.formWindow import FormWindow 7 from carbonui.primitives.containerAutoSize import ContainerAutoSize 8 from cosmetics.client.ships.skins.live_data import current_skin_design 9 10 class QATierPointsDialogue(FormWindow): 11 default_windowID = 'QATierPointsDialogue' 12 13 def ApplyAttributes(self, attributes): 14 super(FormWindow, self).ApplyAttributes(attributes) 15 self.window_name = 'Set QA Tier Points' 16 components = [formComponent.Integer(name='QA Tier Points', label='QA Tier Points', value=current_skin_design.get().qa_tier_points)] 17 self.form = Form(name=self.window_name, icon=eveicon.load, components=components, actions=[FormActionSubmit(label='Save', func=self.on_form_submit), FormActionCancel()]) 18 self.SetCaption(self.form.name) 19 if self.form.icon: 20 self.icon = self.form.icon 21 self.formCont = ContainerAutoSize(name='formCont', parent=self.content, align=uiconst.TOTOP, callback=self.OnFormContHeightChanged) 22 self.ConstructLayout() 23 self.ConnectSignals() 24 25 def on_form_submit(self, form): 26 current_skin_design.get().set_qa_tier_points(form.get_component('QA Tier Points').get_value()) 27 28 29 def set_current_design_qa_tier_points(): 30 dialogue = QATierPointsDialogue() 31 dialogue.ShowModal()