Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5410

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qgraphicslinearlayout.cpp -->
  <title>Qt 4.8: QGraphicsLinearLayout Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QGraphicsLinearLayout</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#size-hints-and-size-policies-in-qgraphicslinearlayout">Size Hints and Size Policies in QGraphicsLinearLayout</a></li>
<li class="level2"><a href="#spacing-within-qgraphicslinearlayout">Spacing within QGraphicsLinearLayout</a></li>
<li class="level2"><a href="#stretch-factor-in-qgraphicslinearlayout">Stretch Factor in QGraphicsLinearLayout</a></li>
<li class="level2"><a href="#qgraphicslinearlayout-compared-to-other-layouts">QGraphicsLinearLayout Compared to Other Layouts</a></li>
</ul>
</div>
<h1 class="title">QGraphicsLinearLayout Class Reference</h1>
<!-- $$$QGraphicsLinearLayout-brief -->
<p>The QGraphicsLinearLayout class provides a horizontal or vertical layout for managing widgets in Graphics View. <a href="#details">More...</a></p>
<!-- @@@QGraphicsLinearLayout -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QGraphicsLinearLayout&gt;</span></pre><p><b>Inherits: </b><a href="qgraphicslayout.html">QGraphicsLayout</a>.</p>
<p>This class was introduced in Qt 4.4.</p>
<ul>
<li><a href="qgraphicslinearlayout-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#QGraphicsLinearLayout">QGraphicsLinearLayout</a></b> ( QGraphicsLayoutItem * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#QGraphicsLinearLayout-2">QGraphicsLinearLayout</a></b> ( Qt::Orientation <i>orientation</i>, QGraphicsLayoutItem * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#dtor.QGraphicsLinearLayout">~QGraphicsLinearLayout</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#addItem">addItem</a></b> ( QGraphicsLayoutItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#addStretch">addStretch</a></b> ( int <i>stretch</i> = 1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#alignment">alignment</a></b> ( QGraphicsLayoutItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#insertItem">insertItem</a></b> ( int <i>index</i>, QGraphicsLayoutItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#insertStretch">insertStretch</a></b> ( int <i>index</i>, int <i>stretch</i> = 1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#itemSpacing">itemSpacing</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Orientation </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#orientation">orientation</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#removeItem">removeItem</a></b> ( QGraphicsLayoutItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setAlignment">setAlignment</a></b> ( QGraphicsLayoutItem * <i>item</i>, Qt::Alignment <i>alignment</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a></b> ( int <i>index</i>, qreal <i>spacing</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setOrientation">setOrientation</a></b> ( Qt::Orientation <i>orientation</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setSpacing">setSpacing</a></b> ( qreal <i>spacing</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a></b> ( QGraphicsLayoutItem * <i>item</i>, int <i>stretch</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#spacing">spacing</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#stretchFactor">stretchFactor</a></b> ( QGraphicsLayoutItem * <i>item</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#count">count</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#invalidate">invalidate</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QGraphicsLayoutItem * </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#itemAt">itemAt</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#removeAt">removeAt</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setGeometry">setGeometry</a></b> ( const QRectF &amp; <i>rect</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#sizeHint">sizeHint</a></b> ( Qt::SizeHint <i>which</i>, const QSizeF &amp; <i>constraint</i> = QSizeF() ) const</td></tr>
</table>
<ul>
<li class="fn">10 public functions inherited from <a href="qgraphicslayout.html#public-functions">QGraphicsLayout</a></li>
<li class="fn">35 public functions inherited from <a href="qgraphicslayoutitem.html#public-functions">QGraphicsLayoutItem</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">2 static public members inherited from <a href="qgraphicslayout.html#static-public-members">QGraphicsLayout</a></li>
<li class="fn">1 protected function inherited from <a href="qgraphicslayout.html#protected-functions">QGraphicsLayout</a></li>
<li class="fn">3 protected functions inherited from <a href="qgraphicslayoutitem.html#protected-functions">QGraphicsLayoutItem</a></li>
</ul>
<a name="details"></a>
<!-- $$$QGraphicsLinearLayout-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QGraphicsLinearLayout class provides a horizontal or vertical layout for managing widgets in Graphics View.</p>
<p>The default orientation for a linear layout is <a href="qt.html#Orientation-enum">Qt::Horizontal</a>. You can choose a vertical orientation either by calling <a href="qgraphicslinearlayout.html#setOrientation">setOrientation</a>(), or by passing <a href="qt.html#Orientation-enum">Qt::Vertical</a> to QGraphicsLinearLayout's constructor.</p>
<p>The most common way to use QGraphicsLinearLayout is to construct an object on the heap with no parent, add widgets and layouts by calling <a href="qgraphicslinearlayout.html#addItem">addItem</a>(), and finally assign the layout to a widget by calling <a href="qgraphicswidget.html#layout-prop">QGraphicsWidget::setLayout</a>().</p>
<pre class="cpp"> <span class="type"><a href="qgraphicsscene.html">QGraphicsScene</a></span> scene;
 <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span> <span class="operator">*</span>textEdit <span class="operator">=</span> scene<span class="operator">.</span>addWidget(<span class="keyword">new</span> <span class="type"><a href="qtextedit.html">QTextEdit</a></span>);
 <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span> <span class="operator">*</span>pushButton <span class="operator">=</span> scene<span class="operator">.</span>addWidget(<span class="keyword">new</span> <span class="type"><a href="qpushbutton.html">QPushButton</a></span>);

 <span class="type">QGraphicsLinearLayout</span> <span class="operator">*</span>layout <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QGraphicsLinearLayout</span>;
 layout<span class="operator">-</span><span class="operator">&gt;</span><a href="qgraphicslinearlayout.html#addItem">addItem</a>(textEdit);
 layout<span class="operator">-</span><span class="operator">&gt;</span><a href="qgraphicslinearlayout.html#addItem">addItem</a>(pushButton);

 <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span> <span class="operator">*</span>form <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span>;
 form<span class="operator">-</span><span class="operator">&gt;</span>setLayout(layout);
 scene<span class="operator">.</span><a href="qgraphicslinearlayout.html#addItem">addItem</a>(form);</pre>
<p>You can add widgets, layouts, stretches (<a href="qgraphicslinearlayout.html#addStretch">addStretch</a>(), <a href="qgraphicslinearlayout.html#insertStretch">insertStretch</a>() or <a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>()), and spacings (<a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>()) to a linear layout. The layout takes ownership of the items. In some cases when the layout item also inherits from <a href="qgraphicsitem.html">QGraphicsItem</a> (such as <a href="qgraphicswidget.html">QGraphicsWidget</a>) there will be a ambiguity in ownership because the layout item belongs to two ownership hierarchies. See the documentation of <a href="qgraphicslayoutitem.html#setOwnedByLayout">QGraphicsLayoutItem::setOwnedByLayout</a>() how to handle this. You can access each item in the layout by calling <a href="qgraphicslinearlayout.html#count">count</a>() and <a href="qgraphicslinearlayout.html#itemAt">itemAt</a>(). Calling <a href="qgraphicslinearlayout.html#removeAt">removeAt</a>() or <a href="qgraphicslinearlayout.html#removeItem">removeItem</a>() will remove an item from the layout, without destroying it.</p>
<a name="size-hints-and-size-policies-in-qgraphicslinearlayout"></a>
<h3>Size Hints and Size Policies in QGraphicsLinearLayout</h3>
<p>QGraphicsLinearLayout respects each item's size hints and size policies, and when the layout contains more space than the items can fill, each item is arranged according to the layout's alignment for that item. You can set an alignment for each item by calling <a href="qgraphicslinearlayout.html#setAlignment">setAlignment</a>(), and check the alignment for any item by calling <a href="qgraphicslinearlayout.html#alignment">alignment</a>(). By default, items are aligned to the top left.</p>
<a name="spacing-within-qgraphicslinearlayout"></a>
<h3>Spacing within QGraphicsLinearLayout</h3>
<p>Between the items, the layout distributes some space. The actual amount of space depends on the managed widget's current style, but the common spacing is 4. You can also set your own spacing by calling <a href="qgraphicslinearlayout.html#setSpacing">setSpacing</a>(), and get the current spacing value by calling <a href="qgraphicslinearlayout.html#spacing">spacing</a>(). If you want to configure individual spacing for your items, you can call <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>().</p>
<a name="stretch-factor-in-qgraphicslinearlayout"></a>
<h3>Stretch Factor in QGraphicsLinearLayout</h3>
<p>You can assign a stretch factor to each item to control how much space it will get compared to the other items. By default, two identical widgets arranged in a linear layout will have the same size, but if the first widget has a stretch factor of 1 and the second widget has a stretch factor of 2, the first widget will get 1/3 of the available space, and the second will get 2/3.</p>
<p>QGraphicsLinearLayout calculates the distribution of sizes by adding up the stretch factors of all items, and then dividing the available space accordingly. The default stretch factor is 0 for all items; a factor of 0 means the item does not have any defined stretch factor; effectively this is the same as setting the stretch factor to 1. The stretch factor only applies to the available space in the lengthwise direction of the layout (following its orientation). If you want to control both the item's horizontal and vertical stretch, you can use <a href="qgraphicsgridlayout.html">QGraphicsGridLayout</a> instead.</p>
<a name="qgraphicslinearlayout-compared-to-other-layouts"></a>
<h3>QGraphicsLinearLayout Compared to Other Layouts</h3>
<p>QGraphicsLinearLayout is very similar to <a href="qvboxlayout.html">QVBoxLayout</a> and <a href="qhboxlayout.html">QHBoxLayout</a>, but in contrast to these classes, it is used to manage <a href="qgraphicswidget.html">QGraphicsWidget</a> and <a href="qgraphicslayout.html">QGraphicsLayout</a> instead of <a href="qwidget.html">QWidget</a> and <a href="qlayout.html">QLayout</a>.</p>
</div>
<p><b>See also </b><a href="qgraphicsgridlayout.html">QGraphicsGridLayout</a> and <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p>
<!-- @@@QGraphicsLinearLayout -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGraphicsLinearLayout[overload1]$$$QGraphicsLinearLayoutQGraphicsLayoutItem* -->
<h3 class="fn"><a name="QGraphicsLinearLayout"></a>QGraphicsLinearLayout::<span class="name">QGraphicsLinearLayout</span> ( <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> instance using <a href="qt.html#Orientation-enum">Qt::Horizontal</a> orientation. <i>parent</i> is passed to <a href="qgraphicslayout.html">QGraphicsLayout</a>'s constructor.</p>
<!-- @@@QGraphicsLinearLayout -->
<!-- $$$QGraphicsLinearLayout$$$QGraphicsLinearLayoutQt::OrientationQGraphicsLayoutItem* -->
<h3 class="fn"><a name="QGraphicsLinearLayout-2"></a>QGraphicsLinearLayout::<span class="name">QGraphicsLinearLayout</span> ( <span class="type"><a href="qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> instance. You can pass the <i>orientation</i> for the layout, either horizontal or vertical, and <i>parent</i> is passed to <a href="qgraphicslayout.html">QGraphicsLayout</a>'s constructor.</p>
<!-- @@@QGraphicsLinearLayout -->
<!-- $$$~QGraphicsLinearLayout[overload1]$$$~QGraphicsLinearLayout -->
<h3 class="fn"><a name="dtor.QGraphicsLinearLayout"></a>QGraphicsLinearLayout::<span class="name">~QGraphicsLinearLayout</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> object.</p>
<!-- @@@~QGraphicsLinearLayout -->
<!-- $$$addItem[overload1]$$$addItemQGraphicsLayoutItem* -->
<h3 class="fn"><a name="addItem"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">addItem</span> ( <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>item</i> )</h3>
<p>This convenience function is equivalent to calling insertItem(-1, <i>item</i>).</p>
<!-- @@@addItem -->
<!-- $$$addStretch[overload1]$$$addStretchint -->
<h3 class="fn"><a name="addStretch"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">addStretch</span> ( <span class="type">int</span> <i>stretch</i> = 1 )</h3>
<p>This convenience function is equivalent to calling insertStretch(-1, <i>stretch</i>).</p>
<!-- @@@addStretch -->
<!-- $$$alignment[overload1]$$$alignmentQGraphicsLayoutItem* -->
<h3 class="fn"><a name="alignment"></a><span class="type"><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> QGraphicsLinearLayout::<span class="name">alignment</span> ( <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the alignment for <i>item</i>. The default alignment is <a href="qt.html#AlignmentFlag-enum">Qt::AlignTop</a> | <a href="qt.html#AlignmentFlag-enum">Qt::AlignLeft</a>.</p>
<p>The alignment decides how the item is positioned within its assigned space in the case where there's more space available in the layout than the widgets can occupy.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setAlignment">setAlignment</a>().</p>
<!-- @@@alignment -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn"><a name="count"></a><span class="type">int</span> QGraphicsLinearLayout::<span class="name">count</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicslayout.html#count">QGraphicsLayout::count</a>().</p>
<!-- @@@count -->
<!-- $$$insertItem[overload1]$$$insertItemintQGraphicsLayoutItem* -->
<h3 class="fn"><a name="insertItem"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">insertItem</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>item</i> )</h3>
<p>Inserts <i>item</i> into the layout at <i>index</i>, or before any item that is currently at <i>index</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#addItem">addItem</a>(), <a href="qgraphicslinearlayout.html#itemAt">itemAt</a>(), <a href="qgraphicslinearlayout.html#insertStretch">insertStretch</a>(), and <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertStretch[overload1]$$$insertStretchintint -->
<h3 class="fn"><a name="insertStretch"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">insertStretch</span> ( <span class="type">int</span> <i>index</i>, <span class="type">int</span> <i>stretch</i> = 1 )</h3>
<p>Inserts a stretch of <i>stretch</i> at <i>index</i>, or before any item that is currently at <i>index</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#addStretch">addStretch</a>(), <a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>(), <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>(), and <a href="qgraphicslinearlayout.html#insertItem">insertItem</a>().</p>
<!-- @@@insertStretch -->
<!-- $$$invalidate[overload1]$$$invalidate -->
<h3 class="fn"><a name="invalidate"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">invalidate</span> ()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicslayout.html#invalidate">QGraphicsLayout::invalidate</a>().</p>
<!-- @@@invalidate -->
<!-- $$$itemAt[overload1]$$$itemAtint -->
<h3 class="fn"><a name="itemAt"></a><span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * QGraphicsLinearLayout::<span class="name">itemAt</span> ( <span class="type">int</span> <i>index</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicslayout.html#itemAt">QGraphicsLayout::itemAt</a>().</p>
<p>When iterating from 0 and up, it will return the items in the visual arranged order.</p>
<!-- @@@itemAt -->
<!-- $$$itemSpacing[overload1]$$$itemSpacingint -->
<h3 class="fn"><a name="itemSpacing"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLinearLayout::<span class="name">itemSpacing</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the spacing after item at <i>index</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>().</p>
<!-- @@@itemSpacing -->
<!-- $$$orientation[overload1]$$$orientation -->
<h3 class="fn"><a name="orientation"></a><span class="type"><a href="qt.html#Orientation-enum">Qt::Orientation</a></span> QGraphicsLinearLayout::<span class="name">orientation</span> () const</h3>
<p>Returns the layout orientation.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setOrientation">setOrientation</a>().</p>
<!-- @@@orientation -->
<!-- $$$removeAt[overload1]$$$removeAtint -->
<h3 class="fn"><a name="removeAt"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">removeAt</span> ( <span class="type">int</span> <i>index</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicslayout.html#removeAt">QGraphicsLayout::removeAt</a>().</p>
<p>Removes the item at <i>index</i> without destroying it. Ownership of the item is transferred to the caller.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#removeItem">removeItem</a>() and <a href="qgraphicslinearlayout.html#insertItem">insertItem</a>().</p>
<!-- @@@removeAt -->
<!-- $$$removeItem[overload1]$$$removeItemQGraphicsLayoutItem* -->
<h3 class="fn"><a name="removeItem"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">removeItem</span> ( <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>item</i> )</h3>
<p>Removes <i>item</i> from the layout without destroying it. Ownership of <i>item</i> is transferred to the caller.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#removeAt">removeAt</a>() and <a href="qgraphicslinearlayout.html#insertItem">insertItem</a>().</p>
<!-- @@@removeItem -->
<!-- $$$setAlignment[overload1]$$$setAlignmentQGraphicsLayoutItem*Qt::Alignment -->
<h3 class="fn"><a name="setAlignment"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setAlignment</span> ( <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>item</i>, <span class="type"><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> <i>alignment</i> )</h3>
<p>Sets the alignment of <i>item</i> to <i>alignment</i>. If <i>item</i>'s alignment changes, the layout is automatically invalidated.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#alignment">alignment</a>() and <a href="qgraphicslinearlayout.html#invalidate">invalidate</a>().</p>
<!-- @@@setAlignment -->
<!-- $$$setGeometry[overload1]$$$setGeometryconstQRectF& -->
<h3 class="fn"><a name="setGeometry"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setGeometry</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rect</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicslayoutitem.html#setGeometry">QGraphicsLayoutItem::setGeometry</a>().</p>
<!-- @@@setGeometry -->
<!-- $$$setItemSpacing[overload1]$$$setItemSpacingintqreal -->
<h3 class="fn"><a name="setItemSpacing"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setItemSpacing</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>spacing</i> )</h3>
<p>Sets the spacing after item at <i>index</i> to <i>spacing</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#itemSpacing">itemSpacing</a>().</p>
<!-- @@@setItemSpacing -->
<!-- $$$setOrientation[overload1]$$$setOrientationQt::Orientation -->
<h3 class="fn"><a name="setOrientation"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setOrientation</span> ( <span class="type"><a href="qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i> )</h3>
<p>Change the layout orientation to <i>orientation</i>. Changing the layout orientation will automatically invalidate the layout.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#orientation">orientation</a>().</p>
<!-- @@@setOrientation -->
<!-- $$$setSpacing[overload1]$$$setSpacingqreal -->
<h3 class="fn"><a name="setSpacing"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setSpacing</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>spacing</i> )</h3>
<p>Sets the layout's spacing to <i>spacing</i>. Spacing refers to the vertical and horizontal distances between items.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#spacing">spacing</a>(), <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>(), <a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>(), and <a href="qgraphicsgridlayout.html#setSpacing">QGraphicsGridLayout::setSpacing</a>().</p>
<!-- @@@setSpacing -->
<!-- $$$setStretchFactor[overload1]$$$setStretchFactorQGraphicsLayoutItem*int -->
<h3 class="fn"><a name="setStretchFactor"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setStretchFactor</span> ( <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>item</i>, <span class="type">int</span> <i>stretch</i> )</h3>
<p>Sets the stretch factor for <i>item</i> to <i>stretch</i>. If an item's stretch factor changes, this function will invalidate the layout.</p>
<p>Setting <i>stretch</i> to 0 removes the stretch factor from the item, and is effectively equivalent to setting <i>stretch</i> to 1.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#stretchFactor">stretchFactor</a>().</p>
<!-- @@@setStretchFactor -->
<!-- $$$sizeHint[overload1]$$$sizeHintQt::SizeHintconstQSizeF& -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QGraphicsLinearLayout::<span class="name">sizeHint</span> ( <span class="type"><a href="qt.html#SizeHint-enum">Qt::SizeHint</a></span> <i>which</i>, const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>constraint</i> = QSizeF() ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgraphicslayoutitem.html#sizeHint">QGraphicsLayoutItem::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$spacing[overload1]$$$spacing -->
<h3 class="fn"><a name="spacing"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLinearLayout::<span class="name">spacing</span> () const</h3>
<p>Returns the layout's spacing. Spacing refers to the vertical and horizontal distances between items.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setSpacing">setSpacing</a>().</p>
<!-- @@@spacing -->
<!-- $$$stretchFactor[overload1]$$$stretchFactorQGraphicsLayoutItem* -->
<h3 class="fn"><a name="stretchFactor"></a><span class="type">int</span> QGraphicsLinearLayout::<span class="name">stretchFactor</span> ( <span class="type"><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the stretch factor for <i>item</i>. The default stretch factor is 0, meaning that the item has no assigned stretch factor.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>().</p>
<!-- @@@stretchFactor -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>