Ignore:
Timestamp:
11/30/12 11:58:25 (17 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Select and accept a scheme with a double click on an item in the preview list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/preview/previewbrowser.py

    r11212 r11215  
    152152    currentIndexChanged = Signal(int) 
    153153 
     154    # Emitted when an item is double clicked in the preview list. 
     155    activated = Signal(int) 
     156 
    154157    def __init__(self, *args): 
    155158        QWidget.__init__(self, *args) 
     
    206209        # An list view with small preview icons. 
    207210        self.__previewList = LinearIconView(objectName="preview-list-view") 
     211        self.__previewList.doubleClicked.connect(self.__onDoubleClicked) 
    208212 
    209213        vlayout.addWidget(self.__previewList) 
     
    290294            self.__update() 
    291295 
     296    def __onDoubleClicked(self, index): 
     297        """Double click on an item in the preview item list. 
     298        """ 
     299        self.activated.emit(index.row()) 
     300 
    292301    def __update(self): 
    293         """Update the description. 
     302        """Update the current description. 
    294303        """ 
    295304        if self.__currentIndex != -1: 
Note: See TracChangeset for help on using the changeset viewer.