Changeset 11763:7d6c7587cfb2 in orange


Ignore:
Timestamp:
11/14/13 15:43:52 (5 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed "Concatenate" widget layout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Data/OWConcatenate.py

    r11748 r11763  
    1919     
    2020    def __init__(self,parent=None, signalManager = None): 
    21         OWWidget.__init__(self, parent, signalManager, "Concatenate", wantMainArea=0) 
     21        OWWidget.__init__(self, parent, signalManager, "Concatenate", 
     22                          wantMainArea=False, resizingEnabled=False) 
    2223        self.inputs = [("Primary Data", orange.ExampleTable, self.setData), 
    2324                       ("Additional Data", orange.ExampleTable, self.setMoreData, Multiple)] 
     
    3839        OWGUI.appendRadioButton(bg, self, "mergeAttributes", "Union of attributes appearing in all tables") 
    3940        OWGUI.appendRadioButton(bg, self, "mergeAttributes", "Intersection of attributes in all tables") 
    40         OWGUI.widgetLabel(bg, "The resulting table will have class only if there is no conflict between input classes.") 
     41        bg.layout().addSpacing(6) 
     42        label = OWGUI.widgetLabel(bg, "The resulting table will have class only if there is no conflict between input classes.") 
     43        label.setWordWrap(True) 
    4144 
    4245        OWGUI.separator(self.controlArea) 
     
    4447        cb = OWGUI.checkBox(box, self, "dataSourceSelected", "Append data source IDs") 
    4548        self.classificationBox = ib = OWGUI.indentedBox(box, sep=OWGUI.checkButtonOffsetHint(cb)) 
    46         le = OWGUI.lineEdit(ib, self, "dataSourceName", "Name" + "  ", orientation='horizontal', valueType = str) 
    47         OWGUI.separator(ib, height = 4) 
    48         aa = OWGUI.comboBox(ib, self, "addIdAs", label = "Place" + "  ", orientation = 'horizontal', items = ["Class attribute", "Attribute", "Meta attribute"]) 
     49 
     50        form = QFormLayout( 
     51            spacing=8, labelAlignment=Qt.AlignLeft, formAlignment=Qt.AlignLeft, 
     52            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow 
     53        ) 
     54        ib.layout().addLayout(form) 
     55 
     56        form.addRow("Name", 
     57                    OWGUI.lineEdit(ib, self, "dataSourceName", valueType=str)) 
     58 
     59        aa = OWGUI.comboBox(ib, self, "addIdAs", items=["Class attribute", "Attribute", "Meta attribute"]) 
    4960        cb.disables.append(ib) 
    5061        cb.makeConsistent() 
    51          
     62        form.addRow("Place", aa) 
     63 
    5264        OWGUI.button(self.controlArea, self, "Apply Changes", callback = self.apply, default=True) 
    5365         
     
    191203            self.reportData(None, "Additional table") 
    192204        self.reportData(self.dataReport, "Merged data") 
    193          
     205 
     206 
    194207if __name__ == "__main__": 
    195208    app = QApplication(sys.argv) 
Note: See TracChangeset for help on using the changeset viewer.