Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QToolBarAreaLayout Class Reference

#include <qtoolbararealayout_p.h>

+ Collaboration diagram for QToolBarAreaLayout:

Public Types

enum  { ToolBarStateMarker = 0xfe , ToolBarStateMarkerEx = 0xfc }
 

Public Member Functions

 QToolBarAreaLayout (const QMainWindow *win)
 
QRect fitLayout ()
 
QSize minimumSize (const QSize &centerMin) const
 
QRect rectHint (const QRect &r) const
 
QSize sizeHint (const QSize &center) const
 
void apply (bool animate)
 
QLayoutItemitemAt (int *x, int index) const
 
QLayoutItemtakeAt (int *x, int index)
 
void deleteAllLayoutItems ()
 
QLayoutIteminsertToolBar (QToolBar *before, QToolBar *toolBar)
 
void removeToolBar (QToolBar *toolBar)
 
QLayoutItemaddToolBar (QInternal::DockPosition pos, QToolBar *toolBar)
 
void insertToolBarBreak (QToolBar *before)
 
void removeToolBarBreak (QToolBar *before)
 
void addToolBarBreak (QInternal::DockPosition pos)
 
void moveToolBar (QToolBar *toolbar, int pos)
 
void insertItem (QInternal::DockPosition pos, QLayoutItem *item)
 
void insertItem (QToolBar *before, QLayoutItem *item)
 
QInternal::DockPosition findToolBar (const QToolBar *toolBar) const
 
bool toolBarBreak (QToolBar *toolBar) const
 
void getStyleOptionInfo (QStyleOptionToolBar *option, QToolBar *toolBar) const
 
QList< int > indexOf (QWidget *toolBar) const
 
QList< int > gapIndex (const QPoint &pos) const
 
QList< int > currentGapIndex () const
 
bool insertGap (const QList< int > &path, QLayoutItem *item)
 
void remove (const QList< int > &path)
 
void remove (QLayoutItem *item)
 
void clear ()
 
QToolBarAreaLayoutItemitem (const QList< int > &path)
 
QRect itemRect (const QList< int > &path) const
 
QLayoutItemplug (const QList< int > &path)
 
QLayoutItemunplug (const QList< int > &path, QToolBarAreaLayout *other)
 
void saveState (QDataStream &stream) const
 
bool restoreState (QDataStream &stream, const QList< QToolBar * > &toolBars, uchar tmarker, bool testing=false)
 
bool isEmpty () const
 

Public Attributes

QRect rect
 
const QMainWindowmainWindow
 
QToolBarAreaLayoutInfo docks [4]
 
bool visible
 

Detailed Description

Definition at line 126 of file qtoolbararealayout_p.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ToolBarStateMarker 
ToolBarStateMarkerEx 

Definition at line 129 of file qtoolbararealayout_p.h.

Constructor & Destructor Documentation

◆ QToolBarAreaLayout()

QToolBarAreaLayout::QToolBarAreaLayout ( const QMainWindow * win)

Definition at line 593 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, i, and pos.

Member Function Documentation

◆ addToolBar()

QLayoutItem * QToolBarAreaLayout::addToolBar ( QInternal::DockPosition pos,
QToolBar * toolBar )

Definition at line 791 of file qtoolbararealayout.cpp.

References docks, QToolBarAreaLayoutInfo::insertToolBar(), and pos.

+ Here is the call graph for this function:

◆ addToolBarBreak()

void QToolBarAreaLayout::addToolBarBreak ( QInternal::DockPosition pos)

Definition at line 812 of file qtoolbararealayout.cpp.

References docks, QToolBarAreaLayoutInfo::insertToolBarBreak(), and pos.

+ Here is the call graph for this function:

◆ apply()

void QToolBarAreaLayout::apply ( bool animate)

Definition at line 842 of file qtoolbararealayout.cpp.

References QString::at(), QRect::bottom(), dir, QInternal::DockCount, docks, Qt::Horizontal, i, item, j, layout, QWidget::layoutDirection, QString::left(), line, mainWindow, QGraphicsItem::pos(), Q_ASSERT, qt_mainwindow_layout(), rect, QRect::right(), QString::right(), QRect::setTop(), QString::size(), tr, visible, QStyle::visualRect(), and widget.

+ Here is the call graph for this function:

◆ clear()

void QToolBarAreaLayout::clear ( )

Definition at line 1072 of file qtoolbararealayout.cpp.

References clear(), QInternal::DockCount, docks, i, and rect.

Referenced by clear().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ currentGapIndex()

QList< int > QToolBarAreaLayout::currentGapIndex ( ) const

Definition at line 1014 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, i, j, line, and QString::size().

+ Here is the call graph for this function:

◆ deleteAllLayoutItems()

void QToolBarAreaLayout::deleteAllLayoutItems ( )

Definition at line 738 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, i, item, j, line, and QString::size().

+ Here is the call graph for this function:

◆ findToolBar()

QInternal::DockPosition QToolBarAreaLayout::findToolBar ( const QToolBar * toolBar) const

Definition at line 756 of file qtoolbararealayout.cpp.

References QString::at(), QInternal::DockCount, docks, i, j, line, and QString::size().

Referenced by insertItem(), insertToolBar(), insertToolBarBreak(), moveToolBar(), removeToolBar(), and removeToolBarBreak().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fitLayout()

QRect QToolBarAreaLayout::fitLayout ( )

Definition at line 601 of file qtoolbararealayout.cpp.

References QRect::adjusted(), QInternal::BottomDock, docks, QToolBarAreaLayoutInfo::fitLayout(), QRect::left(), QInternal::LeftDock, QToolBarAreaLayoutInfo::rect, rect, QInternal::RightDock, QToolBarAreaLayoutInfo::sizeHint(), QRect::top(), QInternal::TopDock, visible, and QRect::width().

+ Here is the call graph for this function:

◆ gapIndex()

QList< int > QToolBarAreaLayout::gapIndex ( const QPoint & pos) const

Definition at line 995 of file qtoolbararealayout.cpp.

References dir, QInternal::DockCount, docks, QToolBarAreaLayoutInfo::gapIndex(), Qt::Horizontal, i, QWidget::layoutDirection, mainWindow, o, pos, QList< T >::prepend(), rect, ret, and QStyle::visualPos().

+ Here is the call graph for this function:

◆ getStyleOptionInfo()

void QToolBarAreaLayout::getStyleOptionInfo ( QStyleOptionToolBar * option,
QToolBar * toolBar ) const

Definition at line 923 of file qtoolbararealayout.cpp.

References QString::at(), QInternal::DockCount, docks, i, j, line, and QString::size().

+ Here is the call graph for this function:

◆ indexOf()

QList< int > QToolBarAreaLayout::indexOf ( QWidget * toolBar) const

Definition at line 958 of file qtoolbararealayout.cpp.

References QString::at(), QInternal::DockCount, docks, i, item, j, line, and QString::size().

+ Here is the call graph for this function:

◆ insertGap()

bool QToolBarAreaLayout::insertGap ( const QList< int > & path,
QLayoutItem * item )

Definition at line 1034 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, i, QToolBarAreaLayoutInfo::insertGap(), item, and Q_ASSERT.

+ Here is the call graph for this function:

◆ insertItem() [1/2]

void QToolBarAreaLayout::insertItem ( QInternal::DockPosition pos,
QLayoutItem * item )

Definition at line 826 of file qtoolbararealayout.cpp.

References QList< T >::append(), docks, item, QList< T >::last(), QToolBarAreaLayoutInfo::lines, o, pos, and QToolBarAreaLayoutLine::toolBarItems.

+ Here is the call graph for this function:

◆ insertItem() [2/2]

void QToolBarAreaLayout::insertItem ( QToolBar * before,
QLayoutItem * item )

Definition at line 833 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, findToolBar(), QToolBarAreaLayoutInfo::insertItem(), item, and pos.

+ Here is the call graph for this function:

◆ insertToolBar()

QLayoutItem * QToolBarAreaLayout::insertToolBar ( QToolBar * before,
QToolBar * toolBar )

Definition at line 774 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, findToolBar(), QToolBarAreaLayoutInfo::insertToolBar(), and pos.

+ Here is the call graph for this function:

◆ insertToolBarBreak()

void QToolBarAreaLayout::insertToolBarBreak ( QToolBar * before)

Definition at line 796 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, findToolBar(), QToolBarAreaLayoutInfo::insertToolBarBreak(), and pos.

+ Here is the call graph for this function:

◆ isEmpty()

bool QToolBarAreaLayout::isEmpty ( ) const

Definition at line 1354 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, and i.

◆ item()

QToolBarAreaLayoutItem * QToolBarAreaLayout::item ( const QList< int > & path)

Definition at line 1079 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, info, line, Q_ASSERT, and QString::size().

+ Here is the call graph for this function:

◆ itemAt()

QLayoutItem * QToolBarAreaLayout::itemAt ( int * x,
int index ) const

Definition at line 694 of file qtoolbararealayout.cpp.

References QString::at(), QInternal::DockCount, docks, i, j, line, Q_ASSERT, and QString::size().

+ Here is the call graph for this function:

◆ itemRect()

QRect QToolBarAreaLayout::itemRect ( const QList< int > & path) const

Definition at line 1094 of file qtoolbararealayout.cpp.

References docks, Qt::Horizontal, i, QToolBarAreaLayoutInfo::itemRect(), QWidget::layoutDirection, mainWindow, o, QToolBarAreaLayoutInfo::rect, and QStyle::visualRect().

+ Here is the call graph for this function:

◆ minimumSize()

QSize QToolBarAreaLayout::minimumSize ( const QSize & centerMin) const

Definition at line 631 of file qtoolbararealayout.cpp.

References QInternal::BottomDock, docks, QInternal::LeftDock, QToolBarAreaLayoutInfo::minimumSize(), qMax(), QInternal::RightDock, QSize::setWidth(), QInternal::TopDock, and visible.

+ Here is the call graph for this function:

◆ moveToolBar()

void QToolBarAreaLayout::moveToolBar ( QToolBar * toolbar,
int pos )

Definition at line 817 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, findToolBar(), QToolBarAreaLayoutInfo::moveToolBar(), and pos.

+ Here is the call graph for this function:

◆ plug()

QLayoutItem * QToolBarAreaLayout::plug ( const QList< int > & path)

Definition at line 1105 of file qtoolbararealayout.cpp.

References item, Q_ASSERT, Q_UNLIKELY, and qWarning.

◆ rectHint()

QRect QToolBarAreaLayout::rectHint ( const QRect & r) const

Definition at line 677 of file qtoolbararealayout.cpp.

References QInternal::BottomDock, docks, QInternal::LeftDock, QInternal::RightDock, QToolBarAreaLayoutInfo::sizeHint(), QInternal::TopDock, and visible.

+ Here is the call graph for this function:

◆ remove() [1/2]

void QToolBarAreaLayout::remove ( const QList< int > & path)

Definition at line 1042 of file qtoolbararealayout.cpp.

References docks, QString::isEmpty(), line, Q_ASSERT, and QString::removeAt().

+ Here is the call graph for this function:

◆ remove() [2/2]

void QToolBarAreaLayout::remove ( QLayoutItem * item)

Definition at line 1052 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, i, QString::isEmpty(), item, j, line, QString::removeAt(), and QString::size().

+ Here is the call graph for this function:

◆ removeToolBar()

void QToolBarAreaLayout::removeToolBar ( QToolBar * toolBar)

Definition at line 783 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, findToolBar(), pos, and QToolBarAreaLayoutInfo::removeToolBar().

+ Here is the call graph for this function:

◆ removeToolBarBreak()

void QToolBarAreaLayout::removeToolBarBreak ( QToolBar * before)

Definition at line 804 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, findToolBar(), pos, and QToolBarAreaLayoutInfo::removeToolBarBreak().

+ Here is the call graph for this function:

◆ restoreState()

bool QToolBarAreaLayout::restoreState ( QDataStream & stream,
const QList< QToolBar * > & toolBars,
uchar tmarker,
bool testing = false )

Definition at line 1274 of file qtoolbararealayout.cpp.

References QString::append(), QInternal::DockCount, docks, QWidgetPrivate::get(), getInt(), Qt::Horizontal, item, j, line, pos, QGraphicsItem::pos(), rect, ToolBarStateMarkerEx, unpackRect(), and Qt::Vertical.

+ Here is the call graph for this function:

◆ saveState()

void QToolBarAreaLayout::saveState ( QDataStream & stream) const

Definition at line 1217 of file qtoolbararealayout.cpp.

References QString::at(), QByteArray::constData(), QInternal::DockCount, docks, QWidget::geometry, i, QString::isEmpty(), QWidget::isHidden(), QWidget::isWindow(), item, j, line, QObject::objectName, packRect(), QGraphicsItem::pos(), Q_UNLIKELY, qWarning, QString::size(), QString::toLocal8Bit(), ToolBarStateMarkerEx, Qt::Vertical, widget, and QWidget::windowTitle.

+ Here is the call graph for this function:

◆ sizeHint()

QSize QToolBarAreaLayout::sizeHint ( const QSize & center) const

Definition at line 654 of file qtoolbararealayout.cpp.

References QInternal::BottomDock, docks, QInternal::LeftDock, qMax(), QInternal::RightDock, QSize::setWidth(), QToolBarAreaLayoutInfo::sizeHint(), QInternal::TopDock, and visible.

+ Here is the call graph for this function:

◆ takeAt()

QLayoutItem * QToolBarAreaLayout::takeAt ( int * x,
int index )

Definition at line 714 of file qtoolbararealayout.cpp.

References QInternal::DockCount, docks, i, QString::isEmpty(), j, line, Q_ASSERT, QString::removeAt(), and QString::size().

+ Here is the call graph for this function:

◆ toolBarBreak()

bool QToolBarAreaLayout::toolBarBreak ( QToolBar * toolBar) const

Definition at line 905 of file qtoolbararealayout.cpp.

References QString::at(), QInternal::DockCount, docks, i, j, line, and QString::size().

+ Here is the call graph for this function:

◆ unplug()

QLayoutItem * QToolBarAreaLayout::unplug ( const QList< int > & path,
QToolBarAreaLayout * other )

Definition at line 1118 of file qtoolbararealayout.cpp.

References QString::at(), docks, i, info, item, j, line, next, other(), pick(), QToolBarAreaLayoutItem::pos, Q_ASSERT, QToolBarAreaLayoutItem::resize(), QString::size(), QToolBarAreaLayoutItem::sizeHint(), and QToolBarAreaLayoutItem::skip().

+ Here is the call graph for this function:

Member Data Documentation

◆ docks

◆ mainWindow

const QMainWindow* QToolBarAreaLayout::mainWindow

Definition at line 135 of file qtoolbararealayout_p.h.

Referenced by apply(), gapIndex(), and itemRect().

◆ rect

QRect QToolBarAreaLayout::rect

Definition at line 134 of file qtoolbararealayout_p.h.

Referenced by apply(), clear(), fitLayout(), gapIndex(), and restoreState().

◆ visible

bool QToolBarAreaLayout::visible

Definition at line 137 of file qtoolbararealayout_p.h.

Referenced by apply(), fitLayout(), minimumSize(), rectHint(), and sizeHint().


The documentation for this class was generated from the following files: