Beispiel #1
0
 def optionlist_for_circ(opt):
     # all possible values for opt.units, opt.grids
     a_units = ["units", "%"]
     a_grids = ["Grid1", "Grid2", "Grid3", "Grid4", "Grid5"]
     # build an input array for OptionsList:
     #   [(Caption, OptionName, OptionEntry), ....]
     ar = [
             ("Basic", "Grid name", SimpleOptionEntry(opt, "name")),
             ("Geometry", "X coordinate", SimpleOptionEntry(opt, "px")),
             ("Geometry", "Y coordinate", SimpleOptionEntry(opt, "py")),
             ("Geometry", "Radius", SimpleOptionEntry(opt, "rad")),
             ("Partition", "Radius Partition",
                 BoundedIntOptionEntry(opt, "Nr", 1, 1e2)),
             ("Partition", "Arch Partition",
                 BoundedIntOptionEntry(opt, "Na", 3, 1e2)),
             ("Partition", "Triangulate center cell",
                 BoolOptionEntry(opt, "is_trian")),
             ("Additional", "Units",
                 SingleChoiceOptionEntry(opt, "units", a_units)),
             ("Additional", "Choice",
                 MultipleChoiceOptionEntry(opt, "grids", a_grids)),
             ("Additional", "Point", XYOptionEntry(opt, "point")),
             ("Additional", "Tree",
                 CheckTreeOptionEntry(opt, "multikeys"))
         ]
     return optview.OptionsList(ar)
Beispiel #2
0
 def olist(self):
     return optview.OptionsList([
         ("Import", "New table name",
          optwdg.SimpleOptionEntry(self, "tabname", dostrip=True)),
         ("Ranges", "First line",
          optwdg.BoundedIntOptionEntry(self, 'firstline', 1)),
         ("Ranges", "Last line",
          optwdg.BoundedIntOptionEntry(self, 'lastline', -1)),
         ("Ranges", "Caption from first row",
          optwdg.BoolOptionEntry(self, "read_cap")),
         ("Format", "Columns separator",
          optwdg.SingleChoiceEditOptionEntry(
              self, "col_sep",
              ["whitespaces", "tabular", ",", "in double quotes"])),
         ("Format", "Max columns count",
          optwdg.BoundedIntOptionEntry(self, "colcount", -1)),
         ("Format", "Row separator",
          optwdg.SingleChoiceEditOptionEntry(
              self, "row_sep", ["newline", ";", "no (use column count)"])),
         ("Format", "Ignore empty lines",
          optwdg.BoolOptionEntry(self, "ignore_blank")),
         ("Format", "Comment sign",
          optwdg.SingleChoiceEditOptionEntry(self, "comment_sign",
                                             ["", "#", "//", "*"])),
     ])
Beispiel #3
0
 def olist(self):
     return optview.OptionsList([
         ("New table", "Source table name", optwdg.SimpleOptionEntry(
             self, 'tablename', dostrip=True)),
         ("New table", "Include source id", optwdg.BoolOptionEntry(
             self, 'include_source_id')),
         ])
Beispiel #4
0
 def olist(self):
     return optview.OptionsList([
         ("Options", "bias", optwdg.SingleChoiceOptionEntry(
             self, "bias", ['population', 'sample'])),
         ("Options", "matrix type", optwdg.SingleChoiceOptionEntry(
             self, "matsym", ['lower', 'upper', 'symmetrical'])),
         self.cat_olist()
         ])
Beispiel #5
0
 def olist(self):
     flt = [('Excel files', ('xlsx',))]
     return optview.OptionsList([
         ("Import from", "Filename", optwdg.OpenFileOptionEntry(
             self, "filename", flt)),
         ("Import from", "Format", optwdg.SingleChoiceOptionEntry(
             self, "format", ["xlsx", "plain text"])),
         ])
Beispiel #6
0
 def olist(self):
     return optview.OptionsList([
         ("Merging", "Algorithm", optwdg.SingleChoiceOptionEntry(
             self, "algo", ['arithmetic mean', 'median',
                            'maximum', 'minimum', 'median+', 'median-'])),
         ("Categories", "Group by", optwdg.CheckTreeOptionEntry(
             self, "cat", 1)),
         ])
Beispiel #7
0
 def olist(self):
     return optview.OptionsList([
         ("Return", "Column name", optwdg.SimpleOptionEntry(
             self, 'colname', dostrip=True)),
         ("Function", "x-column", optwdg.SingleChoiceOptionEntry(
             self, "xcol", self.all_cols)),
         ("Function", "y-column", optwdg.SingleChoiceOptionEntry(
             self, "ycol", self.all_cols)),
         ])
Beispiel #8
0
 def olist(self):
     return optview.OptionsList([
         ("Basic", "Hide used columns", optwdg.BoolOptionEntry(
             self, "do_hide")),
         ("Basic", "Delimiter", optwdg.SimpleOptionEntry(
             self, "delim")),
         ("Categories", "Column list", optwdg.CheckTreeOptionEntry(
             self, "cat", 1)),
         ])
Beispiel #9
0
 def olist(self):
     funlist = ['average', 'median', 'max', 'min', 'sum', 'product']
     return optview.OptionsList([
         ("Return", "Column name", optwdg.SimpleOptionEntry(
             self, 'colname', dostrip=True)),
         ("Function", "function", optwdg.SingleChoiceOptionEntry(
             self, "func", funlist)),
         ("Function", "use before grouping", optwdg.BoolOptionEntry(
             self, "before_grouping")),
         self.cat_olist(),
         ])
Beispiel #10
0
 def olist(self):
     return optview.OptionsList([
         ("Import", "Sheet name",
          optwdg.SingleChoiceEditOptionEntry(self, "sheetname",
                                             self.sheets)),
         ("Import", "New table name",
          optwdg.SimpleOptionEntry(self, "tabname", dostrip=True)),
         ("Ranges", "Data range",
          optwdg.SimpleOptionEntry(self, 'range', dostrip=True)),
         ("Ranges", "Caption from first row",
          optwdg.BoolOptionEntry(self, "read_cap")),
     ])
Beispiel #11
0
 def olist(self):
     return optview.OptionsList([
         ("Method", "Distance method",
          optwdg.SingleChoiceOptionEntry(
              self, 'distance_method',
              self.iopts.possible_distance_methods)),
         ("Representation", "Font size",
          optwdg.BoundedIntOptionEntry(self, "font_size", 3, 100)),
         ("Representation", "Show slider",
          optwdg.BoolOptionEntry(self, "show_slider")),
         ("Representation", "Use colors",
          optwdg.BoolOptionEntry(self, "use_colors")),
     ])
Beispiel #12
0
 def olist(self):
     return optview.OptionsList([
         ("Main table", "Font size", optwdg.BoundedIntOptionEntry(
             self, "basic_font_size", minv=3)),
         ("Main table", "Boolean values as", optwdg.SingleChoiceOptionEntry(
             self, "show_bool_as", ['icons', 'codes', 'Yes/No'])),
         ("Main table", "Real number digits", optwdg.BoundedIntOptionEntry(
             self, "real_numbers_prec", minv=0)),
         ("External programs", "Xlsx editor", optwdg.OpenFileOptionEntry(
             self, "external_xlsx_editor", [])),
         ("External programs", "Text editor", optwdg.OpenFileOptionEntry(
             self, "external_txt_editor", [])),
         ("Behaviour", "Open recent db on start", optwdg.BoolOptionEntry(
             self, "open_recent_db_on_start")),
         ])
Beispiel #13
0
 def olist(self):
     cshnames = list(self.schemes.keys())
     return optview.OptionsList([
         ("Source", "Column", optwdg.SingleChoiceOptionEntry(
             self, "column", self.clist)),
         ("Source", "Range", optwdg.SingleChoiceOptionEntry(
             self, "range", ["Local", "Global"])),
         ("Color scheme", "Preset", optwdg.SingleChoiceWImgOptionEntry(
             self, "preset", cshnames, self.pics)),
         ("Color scheme", "None color", optwdg.SingleChoiceColorOptionEntry(
             self, "none_color",
             list(self.defcolors.keys()), list(self.defcolors.values()))),
         ("Color scheme", "Reversed", optwdg.BoolOptionEntry(
             self, "reversed")),
         ("Color scheme", "Discrete", optwdg.BoolOptionEntry(
             self, "discrete")),
         ("Color scheme", "Discrete count", optwdg.BoundedIntOptionEntry(
             self, "discrete_count", minv=-1)),
         ])
Beispiel #14
0
 def olist(self):
     flt = [('Excel files', ('xlsx',))]
     return optview.OptionsList([
         ("Export to", "Filename", optwdg.SaveFileOptionEntry(
             self, "filename", flt)),
         ("Export to", "Format", optwdg.SingleChoiceOptionEntry(
             self, "format", ["xlsx", "plain text"])),
         ("Additional", "Include caption", optwdg.BoolOptionEntry(
             self, "with_caption")),
         ("Additional", "Include id column", optwdg.BoolOptionEntry(
             self, "with_id")),
         ("Additional", "Preserve formatting", optwdg.BoolOptionEntry(
             self, "with_formatting")),
         ("Additional", "Enums as integers", optwdg.BoolOptionEntry(
             self, "numeric_enums")),
         ("Additional", "Non-unique groups", optwdg.SingleChoiceOptionEntry(
             self, "grouped_categories", ['None', 'Comma separated',
                                          'Unique count'])),
         ])
Beispiel #15
0
 def olist(self):
     return optview.OptionsList([
         ("Return", "Column name", optwdg.SimpleOptionEntry(
             self, 'colname', dostrip=True)),
         ("Return", "Regression type", optwdg.SingleChoiceOptionEntry(
             self, "regtp", self.regtp)),
         ("Function", "x-column", optwdg.SingleChoiceOptionEntry(
             self, "xcol", self.all_cols)),
         ("Function", "y-column", optwdg.SingleChoiceOptionEntry(
             self, "ycol", self.all_cols)),
         ("Output columns", "A (slope)", optwdg.BoolOptionEntry(
             self, "a")),
         ("Output columns", "B (intercept)", optwdg.BoolOptionEntry(
             self, "b")),
         ("Output columns", "std error", optwdg.BoolOptionEntry(
             self, "stderr")),
         ("Output columns", "slope error", optwdg.BoolOptionEntry(
             self, "slopeerr")),
         ("Output columns", "correlation coef.", optwdg.BoolOptionEntry(
             self, "corrcoef")),
         ])
Beispiel #16
0
 def olist(self):
     return optview.OptionsList([
         ("Column name", "Column name", optwdg.SimpleOptionEntry(
             self, 'colname', dostrip=True)),
         ])
Beispiel #17
0
 def olist(self):
     return optview.OptionsList([
         self.cat_olist(),
         ])