Beispiel #1
0
    def build_ui(self):
        """
        Build and modify this widget's GUI
        Returns
        -------
        None
        """
        self.ui = UI_vertdef.Ui_Form()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.altres_list = RepeatingElement(
            widget_kwargs={
                "label": "Altitude Resolution",
                "line_name": "fgdc_altres",
                "required": True,
            },
            add_text="+",
            remove_text="-",
        )
        self.altres_list.add_another()
        self.ui.altsys_contents.layout().insertWidget(1, self.altres_list)

        self.depthres_list = RepeatingElement(
            widget_kwargs={
                "label": "Depth Resolution",
                "line_name": "fgdc_depthres",
                "required": True,
            },
            add_text="+",
            remove_text="-",
        )
        self.depthres_list.add_another()
        self.ui.depthsys_contents.layout().insertWidget(1, self.depthres_list)
Beispiel #2
0
    def build_ui(self):
        """
        Build and modify this widget's GUI
        Returns
        -------
        None
        """
        self.ui = UI_vertdef.Ui_Form()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.altres_list = RepeatingElement(widget_kwargs={
            'label': 'Altitude Resolution',
            'line_name': 'fgdc_altres',
            'required': True,
        },
                                            add_text='+',
                                            remove_text='-')
        self.altres_list.add_another()
        self.ui.altsys_contents.layout().insertWidget(1, self.altres_list)

        self.depthres_list = RepeatingElement(widget_kwargs={
            'label': 'Depth Resolution',
            'line_name': 'fgdc_depthres',
            'required': True,
        },
                                              add_text='+',
                                              remove_text='-')
        self.depthres_list.add_another()
        self.ui.depthsys_contents.layout().insertWidget(1, self.depthres_list)
    def build_ui(self, ):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_citeinfo.Ui_parent_form()
        self.ui.setupUi(self)

        if self.include_lwork:
            self.lworkcit_widget = Citeinfo(parent=self, include_lwork=False)
            self.lworkcit_widget.ui.lbl_dataset_title.setText(
                'Larger Work Title')
            self.ui.lworkcite_widget.layout().addWidget(self.lworkcit_widget)
            self.lworkcit_widget.ui.fgdc_geoform.setEditText('publication')
        else:
            self.ui.fgdc_lworkcit.hide()
        self.include_lworkext_change(self.ui.radio_lworkyes.isChecked())

        self.ui.series_ext.hide()
        self.ui.pub_ext.hide()
        self.ui.pubdate_widget = FGDCDate(label='YYYYMMDD  ',
                                          show_format=False,
                                          required=True,
                                          fgdc_name='fgdc_pubdate')

        self.ui.pubdate_layout.addWidget(self.ui.pubdate_widget)

        self.onlink_list = RepeatingElement(add_text='Add online link',
                                            remove_text='Remove last',
                                            widget_kwargs={
                                                'label': 'Link',
                                                'line_name': 'fgdc_onlink'
                                            })
        self.onlink_list.add_another()
        self.ui.onlink_layout.addWidget(self.onlink_list)

        self.fgdc_origin = RepeatingElement(
            add_text='Add originator',
            remove_text='Remove last',
            widget_kwargs={
                'label': 'Originator',
                'line_name': 'fgdc_origin',
                'required': True,
                'placeholder_text': self.origin_hint,
                'spellings': False
            },
        )

        self.ui.originator_layout.addWidget(self.fgdc_origin)
        self.fgdc_origin.add_another()

        self.setup_dragdrop(self)

        if not hananero_installed:
            self.ui.btn_import_doi.hide()
Beispiel #4
0
    def build_ui(self):
        """
        Build and modify this widget's GUI
        Returns
        -------
        None
        """
        self.ui = UI_keywords_repeater.Ui_Form()

        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.ui.thesaurus_label = self.thesaurus_label

        widget_kwargs = {
            'label': self.keywords_label,
            'line_name': self.line_name,
            'required': True
        }

        self.keywords = RepeatingElement(
            add_text='Add keyword',
            remove_text='Remove last',
            widget_kwargs=widget_kwargs,
        )
        self.keywords.ui.italic_label.setStyleSheet('')

        self.keywords.add_another()

        self.ui.keywords_layout.insertWidget(0, self.keywords)
Beispiel #5
0
    def build_ui(self):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_theme_list.Ui_theme_list()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.ui.theme_tabs.setStyleSheet(
            "QTabBar::tab::disabled {width: 0; height: 0; margin: 0; padding: 0; border: none;} "
        )
        self.iso_kws = RepeatingElement(
            which="vertical",
            add_text="Add additonal",
            widget=IsoKeyword,
            remove_text="Remove Keyword",
            italic_text="ISO Topic Category Keywords",
        )
        self.iso_kws.add_another()
        self.ui.iso_keywords_layout.addWidget(self.iso_kws)
        self.thesauri = []
Beispiel #6
0
    def build_ui(self):
        """
        Build and modify this widget's GUI
        Returns
        -------
        None
        """
        self.ui = UI_timeperd.Ui_Form()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.single_date = FGDCDate(label='    Single Date ',
                                    fgdc_name='fgdc_caldate')
        self.ui.fgdc_sngdate.layout().insertWidget(0, self.single_date)

        self.range_start_date = FGDCDate(label='Start  ',
                                         fgdc_name='fgdc_begdate')
        self.range_end_date = FGDCDate(label='End  ', fgdc_name='fgdc_enddate')
        self.ui.layout_daterange.addWidget(self.range_start_date)
        self.ui.layout_daterange.addWidget(self.range_end_date)

        date_widget_kwargs = {
            'show_format': False,
            'label': 'Individual Date   ',
            'fgdc_name': 'fgdc_caldate',
            'parent_fgdc_name': 'fgdc_sngdate'
        }

        self.multi_dates = RepeatingElement(widget=FGDCDate,
                                            widget_kwargs=date_widget_kwargs)

        self.multi_dates.add_another()
        self.switch_primary()
    def build_ui(self):
        """
        Build and modify this widget's GUI
        Returns
        -------
        None
        """
        self.ui = UI_keywords_repeater.Ui_Form()

        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.ui.thesaurus_label = self.thesaurus_label

        widget_kwargs = {
            "label": self.keywords_label,
            "line_name": self.line_name,
            "required": True,
            "spellings": self.spellings,
        }

        self.keywords = RepeatingElement(
            add_text="Add keyword",
            remove_text="Remove last",
            widget_kwargs=widget_kwargs,
        )
        self.keywords.ui.italic_label.setStyleSheet("")

        self.keywords.add_another()

        self.ui.keywords_layout.insertWidget(0, self.keywords)
Beispiel #8
0
    def build_ui(self):
        """
        Build and modify this widget's GUI
        Returns
        -------
        None
        """
        self.ui = UI_timeinfo.Ui_Form()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.single_date = FGDCDate(label="    Single Date ",
                                    fgdc_name="fgdc_caldate")
        self.ui.fgdc_sngdate.layout().insertWidget(0, self.single_date)

        self.range_start_date = FGDCDate(label="Start  ",
                                         fgdc_name="fgdc_begdate")
        self.range_end_date = FGDCDate(label="End  ", fgdc_name="fgdc_enddate")
        self.ui.layout_daterange.addWidget(self.range_start_date)
        self.ui.layout_daterange.addWidget(self.range_end_date)

        date_widget_kwargs = {
            "show_format": False,
            "label": "Individual Date   ",
            "fgdc_name": "fgdc_caldate",
            "parent_fgdc_name": "fgdc_sngdate",
        }

        self.multi_dates = RepeatingElement(widget=FGDCDate,
                                            widget_kwargs=date_widget_kwargs)

        self.multi_dates.add_another()
        self.switch_primary()
Beispiel #9
0
    def build_ui(self):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_crossref.Ui_Form()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.crossrefs = RepeatingElement(
            which="tab",
            tab_label="Crossref",
            add_text="   Add Additional Crossref   ",
            widget=Crossref,
            remove_text="   Remove Selected Crossref   ",
            italic_text="",
        )

        self.crossrefs.add_another()
        self.ui.crossref_widget.layout().addWidget(self.crossrefs)

        self.ui.crossref_widget.hide()
Beispiel #10
0
    def build_ui(self):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_ProcessStep.Ui_Form()
        self.ui.setupUi(self)
        self.ui.fgdc_procdesc.heightMin = 150
        self.setup_dragdrop(self)

        self.single_date = FGDCDate(show_format=False,
                                    required=True,
                                    label="",
                                    fgdc_name="fgdc_procdate")

        self.proccont = ProcessContact()

        self.ui.fgdc_procdate.setLayout(QVBoxLayout())
        self.ui.fgdc_procdate.layout().insertWidget(0, self.single_date)
        self.ui.widget_proccont.layout().insertWidget(0, self.proccont)

        self.srcused_list = RepeatingElement(
            add_text="Add another",
            remove_text="Remove last",
            widget_kwargs={
                "label": "Source used",
                "line_name": "fgdc_srcused"
            },
        )
        self.srcused_list.add_another()
        self.ui.srcused_groupbox.layout().addWidget(self.srcused_list)

        self.srcprod_list = RepeatingElement(
            add_text="Add another",
            remove_text="Remove last",
            widget_kwargs={
                "label": "Source produced:",
                "line_name": "fgdc_srcprod"
            },
        )
        self.srcprod_list.add_another()
        self.ui.srcprod_groupbox.layout().addWidget(self.srcprod_list)

        self.clear_widget()
    def build_ui(self, ):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_Citation.Ui_fgdc_citation()
        self.ui.setupUi(self)

        if self.include_lwork:
            self.lworkcit_widget = Citation(parent=self, include_lwork=False)
            self.ui.lworkcite_widget.layout().addWidget(self.lworkcit_widget)
        else:
            self.ui.fgdc_lworkcit.hide()
        self.include_lworkext_change(self.ui.radio_lworkyes.isChecked())

        self.ui.series_ext.hide()
        self.ui.pub_ext.hide()
        self.ui.pubdate_widget = SingleDate(label='YYYMMDD  ',
                                            show_format=False,
                                            required=True)
        self.ui.pubdate_layout.addWidget(self.ui.pubdate_widget)

        self.onlink_list = RepeatingElement(add_text='Add online link',
                                            remove_text='Remove last',
                                            widget_kwargs={
                                                'label': 'Link',
                                                'line_name': 'fgdc_onlink'
                                            })
        self.onlink_list.add_another()
        self.ui.onlink_layout.addWidget(self.onlink_list)

        self.fgdc_origin = RepeatingElement(add_text='Add originator',
                                            remove_text='Remove last',
                                            widget_kwargs={
                                                'label': 'Originator',
                                                'line_name': 'fgdc_origin',
                                                'required': True
                                            })
        self.fgdc_origin.add_another()
        self.ui.originator_layout.addWidget(self.fgdc_origin)

        self.setup_dragdrop(self)
Beispiel #12
0
    def build_ui(self):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_procstep.Ui_Form()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.proc_step = RepeatingElement(which='tab',
                         tab_label='Step', add_text='Additional Step',
                         widget=ProcessStep, remove_text='Remove Step', italic_text='Describe the methods performed to collect or generate the data.\n Provide as much detail as possible.')

        self.proc_step.add_another()
        self.ui.widget_procstep.layout().addWidget(self.proc_step)
    def build_ui(self):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_procstep.Ui_Form()#.Ui_USGSContactInfoWidgetMain()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.proc_step = RepeatingElement(which='tab',
                         tab_label='Step', add_text='Additional Step',
                         widget=ProcessStep, remove_text='Remove Step', italic_text='Processing Steps Taken')

        #self.proc_step = RepeatingElement(params=params, which='tab', tab_label='Source',)
        self.proc_step.add_another()
        self.ui.widget_procstep.layout().addWidget(self.proc_step)
    def build_ui(self):
        """
        Build and modify this widget's GUI
        Returns
        -------
        None
        """
        self.ui = UI_taxoncl.Ui_fgdc_taxoncl()
        self.ui.setupUi(self)

        widget_kwargs = {'line_name': 'common', 'required': False}

        self.commons = RepeatingElement(add_text='Add Common',
                                        remove_text='Remove last',
                                        widget_kwargs=widget_kwargs,
                                        show_buttons=False)
        self.commons.add_another()
        self.ui.horizontalLayout_4.addWidget(self.commons)

        self.child_taxoncl = []

        self.setup_dragdrop(self)
Beispiel #15
0
    def build_ui(self):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_sourceinput.Ui_Form()
        self.ui.setupUi(self)
        self.setup_dragdrop(self)

        self.src_info = RepeatingElement(which='tab',
                                         tab_label='Source',
                                         add_text='Source Input',
                                         widget=SRCInfo,
                                         remove_text='Remove Source',
                                         italic_text='Source')

        self.src_info.add_another()
        self.ui.frame_sourceinfo.layout().addWidget(self.src_info)

        self.ui.frame_sourceinfo.hide()
Beispiel #16
0
    def build_ui(self, ):
        """
        Build and modify this widget's GUI

        Returns
        -------
        None
        """
        self.ui = UI_citeinfo.Ui_parent_form()
        self.ui.setupUi(self)

        if self.include_lwork:
            self.lworkcit_widget = Citeinfo(parent=self, include_lwork=False)
            self.lworkcit_widget.ui.lbl_dataset_title.setText(
                "Larger Work Title")
            self.ui.lworkcite_widget.layout().addWidget(self.lworkcit_widget)
            self.lworkcit_widget.ui.fgdc_geoform.setEditText("publication")
        else:
            self.ui.fgdc_lworkcit.hide()
        self.include_lworkext_change(self.ui.radio_lworkyes.isChecked())

        self.ui.series_ext.hide()
        self.ui.pub_ext.hide()
        self.ui.pubdate_widget = FGDCDate(
            label="YYYYMMDD  ",
            show_format=False,
            required=True,
            fgdc_name="fgdc_pubdate",
        )

        self.ui.pubdate_layout.addWidget(self.ui.pubdate_widget)

        self.onlink_list = RepeatingElement(
            add_text="Add online link",
            remove_text="Remove last",
            italic_text=
            "Is there a link to the data or the agency that produced it? if so, provide the URL(s) ",
            widget_kwargs={
                "label": "Link",
                "line_name": "fgdc_onlink"
            },
        )
        self.onlink_list.add_another()
        self.ui.onlink_layout.addWidget(self.onlink_list)

        self.fgdc_origin = RepeatingElement(
            add_text="Add originator",
            remove_text="Remove last",
            italic_text=
            "Who created the dataset? List the organization and/or person(s)",
            widget_kwargs={
                "label": "Originator",
                "line_name": "fgdc_origin",
                "required": True,
                "placeholder_text": self.origin_hint,
                "spellings": False,
            },
        )

        self.ui.originator_layout.addWidget(self.fgdc_origin)
        self.fgdc_origin.add_another()

        self.setup_dragdrop(self)

        if not hananero_installed:
            self.ui.btn_import_doi.hide()