当前位置: 首页>>代码示例>>C++>>正文


C++ QLayoutItem::minimumSize方法代码示例

本文整理汇总了C++中QLayoutItem::minimumSize方法的典型用法代码示例。如果您正苦于以下问题:C++ QLayoutItem::minimumSize方法的具体用法?C++ QLayoutItem::minimumSize怎么用?C++ QLayoutItem::minimumSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QLayoutItem的用法示例。


在下文中一共展示了QLayoutItem::minimumSize方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: minimumSize

QSize QLayoutItemProto::minimumSize() const
{
  QLayoutItem *item = qscriptvalue_cast<QLayoutItem*>(thisObject());
  if (item)
    return item->minimumSize();
  return QSize();
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例2: minimumSize

QSize FlowLayout::minimumSize() const {
    QSize size;
    QLayoutItem *item;
    foreach (item, itemList)
        size = size.expandedTo(item->minimumSize());

    size += QSize(2*margin(), 2*margin());
    return size;
}
开发者ID:nobodyzzz,项目名称:leechcraft,代码行数:9,代码来源:FlowLayout.cpp

示例3: minimumSize

QSize StatusBarLayout::minimumSize() const
{
    QSize s(0, 0);
    for (int i = 0; i < m_items.size(); ++i) {
        QLayoutItem* item = m_items.at(i);
        s = s.expandedTo(item->minimumSize());
    }
    return s;
}
开发者ID:KDE,项目名称:kimtoy,代码行数:9,代码来源:statusbarlayout.cpp

示例4: minimumSize

QSize SimpleFlow::minimumSize() const
{
    QSize s(0,0);
    QPtrListIterator<QLayoutItem> it(list);
    QLayoutItem *o;
    while ( (o=it.current()) != 0 ) {
	++it;
	s = s.expandedTo( o->minimumSize() );
    }
    return s;
}
开发者ID:OS2World,项目名称:LIB-QT3_Toolkit_Vbox,代码行数:11,代码来源:flow.cpp

示例5: minimumSize

QSize CardLayout::minimumSize() const
{
    QSize s(0,0);
    int n = list.count();
    int i = 0;
    while (i < n) {
        QLayoutItem *o = list.at(i);
        s = s.expandedTo(o->minimumSize());
        ++i;
    }
    return s + n*QSize(spacing(), spacing());
}
开发者ID:lifeIsGame,项目名称:phantomjs,代码行数:12,代码来源:doc_src_layout.cpp

示例6: minimumSize

QSize MonitorLayout::minimumSize() const
{
    QSize size;
    QLayoutItem* item;

    foreach (item, m_items)
    size = size.expandedTo(item->minimumSize());

    size += QSize(2 * margin(), 2 * margin());

    return size;
}
开发者ID:Andersbakken,项目名称:qlc-svn,代码行数:12,代码来源:monitorlayout.cpp

示例7: minimumSize

QSize FlowLayout::minimumSize() const
{
	QSize size;
	QLayoutItem *item;
	Q_FOREACH ( item, itemList )
	size = size.expandedTo ( item->minimumSize() );

	int left, top, right, bottom;
	getContentsMargins ( &left, &top, &right, &bottom );
	size += QSize ( left + right, top + bottom );
	return size;
}
开发者ID:Andrsid,项目名称:myagent-im,代码行数:12,代码来源:flowlayout.cpp

示例8: minimumSize

QSize OverlayLayout::minimumSize() const
{
    QSize s(0,0);
    int n = list.count();
    int i = 0;
    while (i < n) {
        QLayoutItem *o = list.at(i);
        s = s.expandedTo(o->minimumSize());
        ++i;
    }
    return s;
}
开发者ID:DestroyFX,项目名称:EveLogLite,代码行数:12,代码来源:overlaylayout.cpp

示例9: minimumSize

QSize FlowLayout::minimumSize() const
{
    QSize size;
    QLayoutItem *item;
    foreach (item, itemList)
        size = size.expandedTo(item->minimumSize());

    int left, top, right, bottom;
    getContentsMargins(&left, &top, &right, &bottom);
    const int margin = left;

    size += QSize(2*margin, 2*margin);
    return size;
}
开发者ID:Antidote1911,项目名称:Kryvos,代码行数:14,代码来源:flowlayout.cpp

示例10: doLayout

int GroupFlowLayout::doLayout(const QRect &rect, bool testOnly) const
{
    int left, top, right, bottom;
    getContentsMargins(&left, &top, &right, &bottom);
    QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom);
    int x = effectiveRect.x();
    int y = effectiveRect.y();
    int lineHeight = 0;

    QLayoutItem *item;
    foreach (item, itemList) {
        QWidget *wid = item->widget();
        int spaceX = horizontalSpacing();
        if (wid && spaceX == -1)
            spaceX = wid->style()->layoutSpacing(
                        QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
        if (spaceX == -1) spaceX = 5;
        int spaceY = verticalSpacing();
        if (wid && spaceY == -1)
            spaceY = wid->style()->layoutSpacing(
                        QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
        if (spaceY == -1) spaceX = 5;
        int nextX = x + item->sizeHint().width() + spaceX;
        if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) {
            x = effectiveRect.x();
            y = y + lineHeight + spaceY;
            nextX = x + item->sizeHint().width() + spaceX;
            lineHeight = 0;
        }

        if (!testOnly) {
            QSize s = item->sizeHint();
            if (nextX - spaceX > effectiveRect.right()) {
                QSize minSize = item->minimumSize();
                int neededW = effectiveRect.right() - x;
                s.setWidth(qMax(neededW, minSize.width()));
            }
            item->setGeometry(QRect(QPoint(x, y), s));
        }

        x = nextX;
        lineHeight = qMax(lineHeight, item->sizeHint().height());
    }
开发者ID:crayonink,项目名称:calligra-2,代码行数:43,代码来源:ActionOptionWidget.cpp


注:本文中的QLayoutItem::minimumSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。