OSDN Git Service

rename database_ids & some variables in order to understand easily
[amulettoolsmh4/main.git] / view / gaugedialogview.py
1 # -*- coding: utf-8 -*-
2
3 # 進行状況をゲージで示すダイアログ
4 # 2013/12/05 written by kei9
5 import wx
6 from wx import xrc
7
8 import constnumbers
9
10 class GaugeDialogView():
11     u""" メインのフレームクラス """
12     def __init__(self, filename):
13         self.res = wx.xrc.XmlResource(filename)
14         self._init_dialog()
15
16     def _init_dialog(self):
17         # load controls
18         self.dialog = self.res.LoadDialog(None, "GaugeDialog")
19         self.label = xrc.XRCCTRL(self.dialog, "LabelGaugeDialog")
20         self.gauge = xrc.XRCCTRL(self.dialog, "GaugeProgress")
21         self.button = xrc.XRCCTRL(self.dialog, "wxID_OK")
22
23         self.ID_BUTTON_OK = xrc.XRCID("wxID_OK")
24         # "self.ID_BUTTON_OK" same as "wx.ID_OK"
25
26     def ShowModal(self):
27         self.button.Disable()
28         self.label.SetLabel(u"データベースの生成中...  ")
29         self.ret_code = self.dialog.ShowModal()
30         return self.ret_code
31
32     def finish_generation(self):
33         self.button.Enable()
34         self.label.SetLabel(u"データベースの生成中...完了")
35
36     def Destroy(self):
37         self.dialog.Destroy()
38