emailuis/nmailuiwidgets/src/nmattachmentlistwidget.cpp
changeset 44 c2d07d913565
parent 43 99bcbff212ad
child 47 f83bd4ae1fe3
child 54 997a02608b3a
equal deleted inserted replaced
43:99bcbff212ad 44:c2d07d913565
   348             NM_ERROR(1,"NmAttachmentListWidget::constructUi: Widget doesn't have layout!");
   348             NM_ERROR(1,"NmAttachmentListWidget::constructUi: Widget doesn't have layout!");
   349         }
   349         }
   350     } else {
   350     } else {
   351         NM_ERROR(1,"NmAttachmentListWidget::constructUi: DocML loading failed.");
   351         NM_ERROR(1,"NmAttachmentListWidget::constructUi: DocML loading failed.");
   352     }
   352     }
   353 
       
   354 }
   353 }
   355 
   354 
   356 /*!
   355 /*!
   357     Helper slot for handling longpressed signals.
   356     Helper slot for handling longpressed signals.
   358 */
   357 */
   444     //check which orientation in use
   443     //check which orientation in use
   445     //if layout is horizontal, items need to be placed in 2 columns.
   444     //if layout is horizontal, items need to be placed in 2 columns.
   446     if(Qt::Vertical == mOrientation){
   445     if(Qt::Vertical == mOrientation){
   447         mLayout->addItem(item,layout_count,0);
   446         mLayout->addItem(item,layout_count,0);
   448     } else {
   447     } else {
   449         item->setPreferredWidth(preferredWidth() / 2);
   448         // Qt FW sets the correct width automatically based on the width of the child widgets
   450         mLayout->addItem(item,layout_count / 2, layout_count % 2);
   449         mLayout->addItem(item,layout_count / 2, layout_count % 2);
   451     }
   450     }
   452     // Update maximum length of the file name field.
       
   453     item->resetFileNameLength(mOrientation);
       
   454 }
   451 }
   455 
   452 
   456 /*!
   453 /*!
   457     Helper function for rearrange layout after removing or layout change
   454     Helper function for rearrange layout after removing or layout change
   458 */
   455 */