Ignore:
Timestamp:
06/10/13 14:42:12 (10 months ago)
Author:
markotoplak
Branch:
default
Message:

Minor changes in widget appearance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/widgets/prototypes/OWCustomSets.py

    r1820 r1821  
    1616from Orange.bio.obiGeneSets import loadGMT, list_local, register, local_path, remove_local, modification_date, getGenesetsStats 
    1717 
    18 class standard_icons(object): 
    19     def __init__(self, qwidget=None, style=None): 
    20         self.qwidget = qwidget 
    21         if qwidget is None: 
    22             self.style = QApplication.instance().style() 
    23         else: 
    24             self.style = qwidget.style() 
    25  
    26     @property 
    27     def dir_open_icon(self): 
    28         return self.style.standardIcon(QStyle.SP_DirOpenIcon) 
    29  
    30     @property 
    31     def reload_icon(self): 
    32         return self.style.standardIcon(QStyle.SP_BrowserReload) 
    33  
    34  
    3518class OWCustomSets(OWWidget): 
    3619 
    3720    def __init__(self, parent=None, signalManager=None, 
    38                  title="Custom Geneset File (*.gmt) Manager"): 
     21                 title="Custom Gene Set Manager"): 
    3922        OWWidget.__init__(self, parent, signalManager, title, 
    4023                          wantMainArea=True) 
     
    4528        self.selected_file = ""  
    4629 
    47         layout = QHBoxLayout() 
    48         box = OWGUI.widgetBox(self.controlArea, "Gene Set Import", orientation=layout) 
     30        self.browse_button = OWGUI.button(self.controlArea, self, 'Import Gene Sets ...', callback = self.on_open_dialog) 
     31        self.browse_button.setIcon(self.style().standardIcon(QStyle.SP_DirOpenIcon)) 
    4932 
    50         icons = standard_icons(self) 
    51  
    52         self.browse_button = QPushButton(" ...", icon=icons.dir_open_icon, 
    53                                          toolTip="Browse filesystem", 
    54                                          clicked=self.on_open_dialog) 
    55  
    56         layout.addWidget(self.browse_button) 
    57         
    5833        # The preview field         
    5934        box = OWGUI.widgetBox(self.controlArea, "Imported Gene Sets") 
     
    11186                    num_sets, uniq_genes, avg_genes = str(stats[0]), str(stats[1]), str(stats[2]) 
    11287                    break 
    113             self.info.setText("Gene Sets: %d\nUnique Genes: %d\nAverage Gene Set size: %d" % (int(num_sets), int(uniq_genes), int(avg_genes))) 
     88            self.info.setText("Gene Sets: %d\nUnique Genes: %d\nAverage Gene Set Size: %d" % (int(num_sets), int(uniq_genes), int(avg_genes))) 
    11489        else: 
    11590            self.info.setText("No gene set selected") 
Note: See TracChangeset for help on using the changeset viewer.