Changeset 561 for trunk/src/gui/kernel/qlayout.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/kernel/qlayout.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 62 62 if (result != -1) 63 63 return result; 64 result = menubar->sizeHint().height(); 64 result = menubar->sizeHint() 65 .expandedTo(menubar->minimumSize()) 66 .expandedTo(menubar->minimumSizeHint()) 67 .boundedTo(menubar->maximumSize()).height(); 65 68 if (result != -1) 66 69 return result; … … 73 76 \brief The QLayout class is the base class of geometry managers. 74 77 75 \ingroup appearance76 78 \ingroup geomanagement 77 79 … … 81 83 For users of QLayout subclasses or of QMainWindow there is seldom 82 84 any need to use the basic functions provided by QLayout, such as 83 setSizeConstraint() or setMenuBar(). See \l{Layout Classes}85 setSizeConstraint() or setMenuBar(). See \l{Layout Management} 84 86 for more information. 85 87 … … 96 98 Geometry management stops when the layout manager is deleted. 97 99 98 \sa QLayoutItem, {Layout Classes}, {Basic Layouts Example},100 \sa QLayoutItem, {Layout Management}, {Basic Layouts Example}, 99 101 {Border Layout Example}, {Flow Layout Example} 100 102 */ … … 146 148 d->topLevel = true; 147 149 w->d_func()->layout = this; 148 invalidate(); 150 QT_TRY { 151 invalidate(); 152 } QT_CATCH(...) { 153 w->d_func()->layout = 0; 154 QT_RETHROW; 155 } 149 156 } 150 157 } … … 231 238 d->topLevel = true; 232 239 parent->d_func()->layout = this; 233 invalidate(); 240 QT_TRY { 241 invalidate(); 242 } QT_CATCH(...) { 243 parent->d_func()->layout = 0; 244 QT_RETHROW; 245 } 234 246 } 235 247 } … … 485 497 486 498 /*! 499 \since 4.6 500 501 Sets the \a margins to use around the layout. 502 503 By default, QLayout uses the values provided by the style. On 504 most platforms, the margin is 11 pixels in all directions. 505 506 \sa contentsMargins() 507 */ 508 void QLayout::setContentsMargins(const QMargins &margins) 509 { 510 setContentsMargins(margins.left(), margins.top(), margins.right(), margins.bottom()); 511 } 512 513 /*! 487 514 \since 4.3 488 515 … … 507 534 d->getMargin(right, d->userRightMargin, QStyle::PM_LayoutRightMargin); 508 535 d->getMargin(bottom, d->userBottomMargin, QStyle::PM_LayoutBottomMargin); 536 } 537 538 /*! 539 \since 4.6 540 541 Returns the margins used around the layout. 542 543 By default, QLayout uses the values provided by the style. On 544 most platforms, the margin is 11 pixels in all directions. 545 546 \sa setContentsMargins() 547 */ 548 QMargins QLayout::contentsMargins() const 549 { 550 int left, top, right, bottom; 551 getContentsMargins(&left, &top, &right, &bottom); 552 return QMargins(left, top, right, bottom); 509 553 } 510 554 … … 1029 1073 { 1030 1074 Q_D(QLayout); 1031 if (widget) 1032 addChildWidget(widget); 1075 1076 #ifdef Q_OS_WINCE_WM 1077 if (widget && widget->size().height() > 0) 1078 #else 1079 if (widget) 1080 #endif 1081 addChildWidget(widget); 1033 1082 d->menubar = widget; 1034 1083 } … … 1240 1289 index from the layout, and return the item. If there is no such 1241 1290 item, the function must do nothing and return 0. Items are numbered 1242 consecutively from 0. If an item is deleted, other items will be1291 consecutively from 0. If an item is removed, other items will be 1243 1292 renumbered. 1244 1293 … … 1579 1628 return stream >> policy.data; 1580 1629 } 1581 1582 #endif 1583 1630 #endif // QT_NO_DATASTREAM 1584 1631 1585 1632 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.