Пример #1
0
def create_loader(icon, callback, entry):
    """Create a loader made of a button and an entry for selecting data"""
    loader = qt.QWidget()
    lay = qt.QHBoxLayout(loader)
    lay.addWidget(GC.create_icon_button(icon, callback))
    lay.addWidget(entry)
    return loader
 def __init__(self, mod, model, wfield, exp_sel):
     qt.QWidget.__init__(self)
     self._mod = mod
     self._model = model
     self._wfield = wfield
     self._exp_sel = exp_sel
     icon_name = "load-browser-entry.png"
     self._but = GC.create_icon_button(icon_name, self._load_msh)
     self._lab = qt.QLabel()
     self._build_gui()
Пример #3
0
 def __init__(self, mod, model, wfield, exp_sel):
     qt.QWidget.__init__(self)
     self._mod = mod
     self._model = model
     self._wfield = wfield
     self._exp_sel = exp_sel
     icon_name = "load-browser-entry.png"
     self._but = GC.create_icon_button(icon_name, self._load_msh)
     self._lab = qt.QLabel()
     self._build_gui()
def add_command_file_page(wiz, final_page):
    """Add the page for choosing the filename for writting the
    command file"""
    print "Check (add_command_file_page)"
#    page = wiz.add_page(u"Filename for writting command file", final_page)
#    page = wiz.add_page(u"コマンドファイルを保存するときのファイル名の設定", final_page)
    page = wiz.add_page(qt.QApplication.translate("WizardCommon", "Filename for writting command file", None, qt.QApplication.UnicodeUTF8), final_page)
    lay = page.use(qt.QHBoxLayout())
#    lay.addWidget(qt.QLabel(u"Aster command file"))
#    lay.addWidget(qt.QLabel(u"Code_Asterのコマンドファイル"))
    lay.addWidget(qt.QLabel(qt.QApplication.translate("WizardCommon", "Aster command file", None, qt.QApplication.UnicodeUTF8)))
    entry = CommandFileEntry()
    lay.addWidget(entry)
    page.register_qt_field("command-file*", entry)
    but = GC.create_icon_button("load-file.png", entry.load_from_disk)
    lay.addWidget(but)
    def add_to(self, main_lay):
        """Add the table to the layout and keep the selector
        alive by using the layout parent widget
        """
        cont = self._cont
        lay = qt.QHBoxLayout(cont)
        lay.addWidget(GC.create_icon_button("wizards/add.png", self.add_cond))
        lab = qt.QLabel(self._title)
        lab.setSizePolicy(Policy.Expanding, Policy.Preferred)
        lay.addWidget(lab)
        if not self._default_cond:
            cont.setEnabled(False)

        main_lay.addWidget(cont)
        main_lay.addWidget(self._tab)
        self.setParent(main_lay.parentWidget())
Пример #6
0
    def add_to(self, main_lay):
        """Add the table to the layout and keep the selector
        alive by using the layout parent widget
        """
        cont = self._cont
        lay = qt.QHBoxLayout(cont)
        lay.addWidget(GC.create_icon_button("wizards/add.png", self.add_cond))
        lab = qt.QLabel(self._title)
        lab.setSizePolicy(Policy.Expanding, Policy.Preferred)
        lay.addWidget(lab)
        if not self._default_cond:
            cont.setEnabled(False)

        main_lay.addWidget(cont)
        main_lay.addWidget(self._tab)
        self.setParent(main_lay.parentWidget())
Пример #7
0
def add_command_file_page(wiz, final_page):
    """Add the page for choosing the filename for writting the
    command file"""
    print "Check (add_command_file_page)"
    #    page = wiz.add_page(u"Filename for writting command file", final_page)
    #    page = wiz.add_page(u"コマンドファイルを保存するときのファイル名の設定", final_page)
    page = wiz.add_page(
        qt.QApplication.translate("WizardCommon",
                                  "Filename for writting command file", None,
                                  qt.QApplication.UnicodeUTF8), final_page)
    lay = page.use(qt.QHBoxLayout())
    #    lay.addWidget(qt.QLabel(u"Aster command file"))
    #    lay.addWidget(qt.QLabel(u"Code_Asterのコマンドファイル"))
    lay.addWidget(
        qt.QLabel(
            qt.QApplication.translate("WizardCommon", "Aster command file",
                                      None, qt.QApplication.UnicodeUTF8)))
    entry = CommandFileEntry()
    lay.addWidget(entry)
    page.register_qt_field("command-file*", entry)
    but = GC.create_icon_button("load-file.png", entry.load_from_disk)
    lay.addWidget(but)