def _createWidgets(self, layout): """ """ from type_handler import DateTimeHandler widgetLength = IntHandler.getInputWidget(self) widgetUnits = QtGui.QComboBox(self) widgetUnits.addItems( common.DATETIME_DURATIONS if self._dataTypeHandler is DateTimeHandler else common.DATE_DURATIONS) widgetUnits.setSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) layout.addWidget(widgetLength) layout.addWidget(widgetUnits) return [widgetLength, widgetUnits]
def getInputWidget(cls, parentWidget): widget = QtGui.QComboBox(parentWidget) return widget