QDockAreaLayoutItem Struct Reference

#include <qdockwidgetlayout_p.h>

Collaboration diagram for QDockAreaLayoutItem:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 62 of file qdockwidgetlayout_p.h.

Public Member Functions

 QDockAreaLayoutItem (QWidgetItem *_widgetItem=0)
 QDockAreaLayoutItem (QDockAreaLayoutInfo *_subinfo)
 QDockAreaLayoutItem (const QDockAreaLayoutItem &other)
 ~QDockAreaLayoutItem ()
QDockAreaLayoutItemoperator= (const QDockAreaLayoutItem &other)
bool skip () const
QSize minimumSize () const
QSize maximumSize () const
QSize sizeHint () const
bool expansive (Qt::Orientation o) const

Public Attributes

QWidgetItemwidgetItem
QDockAreaLayoutInfosubinfo
int pos
int size
bool gap
bool keep_size


Constructor & Destructor Documentation

QDockAreaLayoutItem::QDockAreaLayoutItem ( QWidgetItem _widgetItem = 0  ) 

Definition at line 132 of file qdockwidgetlayout.cpp.

00133     : widgetItem(_widgetItem), subinfo(0), pos(0), size(-1), gap(false),
00134         keep_size(false)
00135 {
00136 }

QDockAreaLayoutItem::QDockAreaLayoutItem ( QDockAreaLayoutInfo _subinfo  ) 

Definition at line 138 of file qdockwidgetlayout.cpp.

00139     : widgetItem(0), subinfo(_subinfo), pos(0), size(-1), gap(false),
00140         keep_size(false)
00141 {
00142 }

QDockAreaLayoutItem::QDockAreaLayoutItem ( const QDockAreaLayoutItem other  ) 

Definition at line 144 of file qdockwidgetlayout.cpp.

References subinfo, and widgetItem.

00145     : widgetItem(other.widgetItem), subinfo(0), pos(other.pos),
00146         size(other.size), gap(other.gap), keep_size(other.keep_size)
00147 {
00148     if (other.subinfo != 0)
00149         subinfo = new QDockAreaLayoutInfo(*other.subinfo);
00150     Q_ASSERT(widgetItem == 0 || subinfo == 0);
00151 }

QDockAreaLayoutItem::~QDockAreaLayoutItem (  ) 

Definition at line 153 of file qdockwidgetlayout.cpp.

References subinfo.

00154 {
00155     delete subinfo;
00156 }


Member Function Documentation

QDockAreaLayoutItem & QDockAreaLayoutItem::operator= ( const QDockAreaLayoutItem other  ) 

Definition at line 240 of file qdockwidgetlayout.cpp.

References gap, pos, size, subinfo, and widgetItem.

00241 {
00242     widgetItem = other.widgetItem;
00243     if (other.subinfo == 0)
00244         subinfo = 0;
00245     else
00246         subinfo = new QDockAreaLayoutInfo(*other.subinfo);
00247     pos = other.pos;
00248     size = other.size;
00249     gap = other.gap;
00250 
00251     return *this;
00252 }

bool QDockAreaLayoutItem::skip (  )  const

Definition at line 158 of file qdockwidgetlayout.cpp.

References QList< T >::at(), QList< T >::count(), gap, i, QWidget::isHidden(), QWidget::isWindow(), QDockAreaLayoutInfo::item_list, skip(), subinfo, QWidgetItem::widget(), and widgetItem.

Referenced by QDockAreaLayoutInfo::apply(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayoutInfo::fitItems(), QDockAreaLayoutInfo::gapIndex(), QDockAreaLayoutInfo::indexOf(), QDockAreaLayoutInfo::info(), QDockAreaLayoutInfo::insertGap(), QDockAreaLayoutInfo::itemRect(), QDockAreaLayoutInfo::maximumSize(), QDockAreaLayoutInfo::minimumSize(), QDockAreaLayoutInfo::next(), QDockAreaLayoutInfo::paintSeparators(), QDockAreaLayoutInfo::prev(), QDockAreaLayoutInfo::separatorMove(), QDockAreaLayoutInfo::separatorRect(), QDockAreaLayoutInfo::separatorRegion(), QDockAreaLayoutInfo::sizeHint(), skip(), QDockAreaLayoutInfo::updateTabBar(), and QDockAreaLayoutInfo::usedTabBars().

00159 {
00160     if (gap)
00161         return false;
00162 
00163     if (widgetItem != 0) {
00164         QWidget *widget = widgetItem->widget();
00165         return widget->isWindow() || widget->isHidden();
00166     }
00167 
00168     if (subinfo != 0) {
00169         for (int i = 0; i < subinfo->item_list.count(); ++i) {
00170             if (!subinfo->item_list.at(i).skip())
00171                 return false;
00172         }
00173     }
00174 
00175     return true;
00176 }

Here is the call graph for this function:

QSize QDockAreaLayoutItem::minimumSize (  )  const

Definition at line 190 of file qdockwidgetlayout.cpp.

References adjustForFrame(), QDockAreaLayoutInfo::minimumSize(), qSmartMinSize(), subinfo, QWidgetItem::widget(), and widgetItem.

Referenced by QDockAreaLayoutInfo::fitItems(), QDockAreaLayoutInfo::insertGap(), QDockAreaLayoutInfo::minimumSize(), QDockAreaLayoutInfo::saveState(), and QDockAreaLayoutInfo::separatorMove().

00191 {
00192     if (widgetItem != 0)
00193         return qSmartMinSize(widgetItem) + adjustForFrame(widgetItem->widget());
00194     if (subinfo != 0)
00195         return subinfo->minimumSize();
00196     return QSize(0, 0);
00197 }

Here is the call graph for this function:

QSize QDockAreaLayoutItem::maximumSize (  )  const

Definition at line 199 of file qdockwidgetlayout.cpp.

References QDockAreaLayoutInfo::maximumSize(), qSmartMaxSize(), QWIDGETSIZE_MAX, subinfo, and widgetItem.

Referenced by QDockAreaLayoutInfo::fitItems(), QDockAreaLayoutInfo::maximumSize(), QDockAreaLayoutInfo::saveState(), and QDockAreaLayoutInfo::separatorMove().

00200 {
00201     if (widgetItem != 0)
00202         return qSmartMaxSize(widgetItem);
00203     if (subinfo != 0)
00204         return subinfo->maximumSize();
00205     return QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
00206 }

Here is the call graph for this function:

QSize QDockAreaLayoutItem::sizeHint (  )  const

Definition at line 219 of file qdockwidgetlayout.cpp.

References adjustForFrame(), QSizePolicy::Ignored, s, QDockAreaLayoutInfo::sizeHint(), subinfo, w, QWidgetItem::widget(), and widgetItem.

Referenced by QDockAreaLayoutInfo::fitItems(), and QDockAreaLayoutInfo::sizeHint().

00220 {
00221     if (widgetItem != 0) {
00222         QWidget *w = widgetItem->widget();
00223         QSize s = w->sizeHint().expandedTo(w->minimumSizeHint());
00224         if (w->sizePolicy().horizontalPolicy() == QSizePolicy::Ignored)
00225             s.setWidth(0);
00226         if (w->sizePolicy().verticalPolicy() == QSizePolicy::Ignored)
00227             s.setHeight(0);
00228         s = s.boundedTo(w->maximumSize())
00229             .expandedTo(w->minimumSize());
00230 
00231         s += adjustForFrame(w);
00232         return s;
00233     }
00234     if (subinfo != 0)
00235         return subinfo->sizeHint();
00236     return QSize(-1, -1);
00237 }

Here is the call graph for this function:

bool QDockAreaLayoutItem::expansive ( Qt::Orientation  o  )  const

Definition at line 208 of file qdockwidgetlayout.cpp.

References QWidgetItem::expandingDirections(), QDockAreaLayoutInfo::expansive(), gap, subinfo, and widgetItem.

Referenced by QDockAreaLayoutInfo::expansive(), and QDockAreaLayoutInfo::fitItems().

00209 {
00210     if (gap)
00211         return false;
00212     if (widgetItem != 0)
00213         return ((widgetItem->expandingDirections() & o) == o);
00214     if (subinfo != 0)
00215         return subinfo->expansive(o);
00216     return false;
00217 }

Here is the call graph for this function:


Member Data Documentation

QWidgetItem* QDockAreaLayoutItem::widgetItem

Definition at line 77 of file qdockwidgetlayout_p.h.

Referenced by QDockAreaLayoutInfo::apply(), QDockAreaLayoutInfo::convertToGap(), QDockAreaLayoutInfo::convertToWidget(), QDockAreaLayoutInfo::deleteAllLayoutItems(), expansive(), QDockAreaLayoutInfo::indexOf(), QDockAreaLayoutInfo::info(), QDockAreaLayoutInfo::insertGap(), QDockAreaLayoutInfo::itemAt(), maximumSize(), minimumSize(), operator=(), QDockAreaLayoutItem(), QDockAreaLayoutInfo::saveState(), sizeHint(), skip(), QDockAreaLayoutInfo::split(), QDockAreaLayoutInfo::tab(), tabId(), QDockAreaLayoutInfo::takeAt(), QDockAreaLayoutInfo::unnest(), QMainWindowLayout::unplug(), and QDockAreaLayoutInfo::updateTabBar().

QDockAreaLayoutInfo* QDockAreaLayoutItem::subinfo

Definition at line 78 of file qdockwidgetlayout_p.h.

Referenced by QDockAreaLayoutInfo::apply(), QDockAreaLayoutInfo::convertToGap(), QDockAreaLayoutInfo::convertToWidget(), QDockAreaLayoutInfo::deleteAllLayoutItems(), expansive(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayoutInfo::fitItems(), QDockAreaLayoutInfo::gapIndex(), QDockAreaLayoutInfo::indexOf(), QDockAreaLayoutInfo::info(), QDockAreaLayoutInfo::insertGap(), QDockAreaLayoutInfo::item(), QDockAreaLayoutInfo::itemAt(), QDockAreaLayoutInfo::itemRect(), maximumSize(), minimumSize(), operator=(), QDockAreaLayoutInfo::paintSeparators(), QDockAreaLayoutItem(), QDockAreaLayoutInfo::remove(), QDockAreaLayoutInfo::saveState(), QDockAreaLayoutInfo::separatorMove(), QDockAreaLayoutInfo::separatorRect(), QDockAreaLayoutInfo::separatorRegion(), sizeHint(), skip(), QDockAreaLayoutInfo::takeAt(), QDockAreaLayoutInfo::unnest(), QDockAreaLayoutInfo::usedTabBars(), and ~QDockAreaLayoutItem().

int QDockAreaLayoutItem::pos

Definition at line 79 of file qdockwidgetlayout_p.h.

Referenced by QDockAreaLayoutInfo::convertToGap(), QDockAreaLayoutInfo::convertToWidget(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayoutInfo::fitItems(), QDockAreaLayoutInfo::gapIndex(), QDockWidgetLayout::gapRect(), QDockAreaLayoutInfo::insertGap(), QDockAreaLayoutInfo::itemRect(), operator=(), QDockAreaLayoutInfo::restoreState(), QDockAreaLayoutInfo::saveState(), QDockAreaLayoutInfo::separatorMove(), and QDockAreaLayoutInfo::separatorRect().

int QDockAreaLayoutItem::size

Definition at line 80 of file qdockwidgetlayout_p.h.

Referenced by QDockAreaLayoutInfo::convertToGap(), QDockAreaLayoutInfo::convertToWidget(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayoutInfo::fitItems(), QDockAreaLayoutInfo::gapIndex(), QDockWidgetLayout::gapRect(), QDockAreaLayoutInfo::insertGap(), QDockAreaLayoutInfo::itemRect(), operator=(), QDockAreaLayoutInfo::restoreState(), QDockAreaLayoutInfo::saveState(), QDockAreaLayoutInfo::separatorMove(), QDockAreaLayoutInfo::separatorRect(), and QDockAreaLayoutInfo::sizeHint().

bool QDockAreaLayoutItem::gap

Definition at line 81 of file qdockwidgetlayout_p.h.

Referenced by QDockAreaLayoutInfo::apply(), QDockAreaLayoutInfo::convertToGap(), QDockAreaLayoutInfo::convertToWidget(), expansive(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayoutInfo::fitItems(), QDockWidgetLayout::gapRect(), QDockAreaLayoutInfo::insertGap(), operator=(), QDockAreaLayoutInfo::paintSeparators(), QDockAreaLayoutInfo::separatorMove(), QDockAreaLayoutInfo::sizeHint(), skip(), and QDockAreaLayoutInfo::updateTabBar().

bool QDockAreaLayoutItem::keep_size

Definition at line 82 of file qdockwidgetlayout_p.h.

Referenced by QDockAreaLayoutInfo::fitItems(), and QDockWidgetLayout::keepSize().


The documentation for this struct was generated from the following files:
Generated on Thu Mar 15 17:24:44 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1