Changeset 1946:70b5918b6184 in orange-bioinformatics for orangecontrib/bio/widgets/OWSelectGenes.py


Ignore:
Timestamp:
01/08/14 18:14:24 (3 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added gene count column to Import Gene Sets dialog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/widgets/OWSelectGenes.py

    r1945 r1946  
    14031403        self.gsview.setRootIsDecorated(False) 
    14041404        self.gsview.setSelectionMode(QTreeView.ExtendedSelection) 
     1405        self.gsview.setSortingEnabled(True) 
     1406        self.gsview.setUniformRowHeights(True) 
    14051407        self.proxymodel = QSortFilterProxyModel( 
    14061408            filterKeyColumn=1, sortCaseSensitivity=Qt.CaseInsensitive 
     
    15211523def sets_to_model(gsets): 
    15221524    model = QStandardItemModel() 
    1523     model.setHorizontalHeaderLabels(["Category", "Name"]) 
     1525    model.setHorizontalHeaderLabels(["Category", "Name", "#"]) 
    15241526 
    15251527    for (hier, tid), sets in gsets: 
     
    15401542            name.setEditable(False) 
    15411543            name.setToolTip(tooltip) 
    1542             model.appendRow([category, name]) 
     1544            count = QStandardItem() 
     1545            count.setData(ngenes, Qt.DisplayRole) 
     1546            count.setToolTip(tooltip) 
     1547            model.appendRow([category, name, count]) 
    15431548 
    15441549    return model 
Note: See TracChangeset for help on using the changeset viewer.