42 #include "QtGui/qapplication.h" 43 #include "QtGui/qwidget.h" 44 #include "QtGui/qtabbar.h" 45 #include "QtGui/qstyle.h" 46 #include "QtGui/qdesktopwidget.h" 47 #include "QtCore/qvariant.h" 54 #include <private/qlayoutengine_p.h> 59 #ifndef QT_NO_DOCKWIDGET 86 : widgetItem(_widgetItem), subinfo(0), placeHolderItem(0), pos(0), size(-1), flags(NoFlags)
188 return QSize(-1, -1);
231 , tabbed(false), tabBar(0), tabBarShape(
QTabBar::RoundedSouth)
266 return next(-1) == -1;
290 a +=
pick(
o, min_size);
323 #endif // QT_NO_TABBAR 358 a +=
pick(
o, max_size);
368 b =
qMax(b, min_perp);
390 #endif // QT_NO_TABBAR 425 a += gap ? item.
size :
pick(
o, size_hint);
432 max_perp =
qMax(max_perp, min_perp);
433 b =
qMax(b, min_perp);
434 b =
qMin(b, max_perp);
462 #endif // QT_NO_TABBAR 559 if (previous && !gap) {
572 if (size < min_size) {
575 min_size -= item.
size;
577 min_size =
qMax(0, min_size);
578 }
else if (size > max_size) {
581 max_size -= item.
size;
606 layout_struct_list.resize(j);
610 if (size > max_size && last_index != -1) {
612 layout_struct_list[last_index].expansive =
true;
618 bool prev_gap =
false;
626 if (!first && !gap && !prev_gap)
655 int w = rect.
width();
660 if (nestingEnabled) {
683 if (x > w/6 && x < w*5/6)
693 if (y > h/6 && y < 5*h/6)
699 if (nestingEnabled) {
746 bool nestingEnabled,
TabMode tabMode)
const 758 int pos =
pick(
o, _pos);
768 if (item.
pos + item.
size < pos)
801 result << item_index;
803 result << item_index << 0;
808 result << item_index + 1;
810 result << item_index << 1;
814 result << item_index << 0;
816 result << item_index;
820 result << item_index << 1;
822 result << item_index + 1;
825 result << (-item_index - 1) << 0;
840 int old_size = ls.
size;
842 return old_size - ls.
size;
849 int old_size = ls.
size;
851 return ls.
size - old_size;
858 for (
int i = 0; i < list.
size(); ++i) {
870 for (
int i = 0; i<=
index; ++i) {
880 if (delta > growlimit)
884 for (
int i = index + 1; d < delta && i < list.
count(); ++i)
885 d +=
shrink(list[i], delta - d);
888 for (
int i = index; d < delta && i >= 0; --i)
889 d +=
grow(list[i], delta - d);
890 }
else if (delta < 0) {
892 for (
int i = index + 1; i < list.
count(); ++i) {
902 if (-delta > growlimit)
906 for (
int i = index; d < -delta && i >= 0; --i)
907 d +=
shrink(list[i], -delta - d);
910 for (
int i = index + 1; d < -delta && i < list.
count(); ++i)
911 d +=
grow(list[i], -delta - d);
916 for (
int i = 0; i < list.
size(); ++i) {
919 ls.
pos = pos + (first ? 0 :
sep);
939 for (
int i = 0; i < list.size(); ++i) {
949 ls.
size = item.
size + separatorSpace;
959 for (
int i = 0; i < list.size(); ++i) {
965 item.
size = ls.
size - separatorSpace;
992 }
else if (child.
subinfo != 0) {
1006 if (path.
count() > 1) {
1026 if (path.
count() > 1) {
1040 #ifndef QT_NO_TABBAR 1061 result =
QRect(pos, s);
1072 if (path.
count() > 1) {
1085 #ifndef QT_NO_TABBAR 1101 #ifndef QT_NO_TABBAR 1133 #endif // QT_NO_TABBAR 1137 int titleHeight = 0;
1145 result.
adjust(0, -titleHeight, 0, 0);
1153 bool insert_tabbed =
false;
1156 insert_tabbed =
true;
1162 if (path.
count() > 1) {
1196 new_info->item_list.append(new_item);
1197 #ifndef QT_NO_TABBAR 1198 if (insert_tabbed) {
1199 new_info->tabbed =
true;
1212 #ifndef QT_NO_TABBAR 1267 if (gap_size + sep_size > space)
1269 gap_item.
size = gap_size + sep_size;
1287 #ifndef QT_NO_TABBAR 1325 #ifndef QT_NO_TABBAR 1338 result =
QRect(pos, s);
1349 if (path.
count() > 1) {
1360 #ifndef QT_NO_TABBAR 1374 return QRect(pos, s);
1382 if (path.
count() > 1) {
1392 #ifndef QT_NO_TABBAR 1397 int pos =
pick(
o, _pos);
1404 if (item.
pos + item.
size > pos) {
1422 sepRect.
adjust(-2, -2, 2, 2);
1501 #ifndef QT_NO_TABBAR 1534 #endif // QT_NO_TABBAR 1555 widgetAnimator.
animate(w, r, animate);
1567 #ifndef QT_NO_TABBAR 1570 #endif //QT_NO_TABBAR 1595 #ifndef QT_NO_TABBAR 1621 const QPoint &mouse)
const 1625 #ifndef QT_NO_TABBAR 1665 for (
int i = index - 1; i >= 0; --i) {
1693 #endif // QT_NO_TABBAR 1699 if (orientation ==
o) {
1718 if (path.
count() > 1) {
1736 if ((*x)++ ==
index)
1755 if ((*x)++ == index) {
1759 if (item.
size != -1)
1783 #ifndef QT_NO_TABBAR 1798 #endif // QT_NO_TABBAR 1812 qWarning(
"QMainWindow::saveState(): 'objectName' not set for QDockWidget %p '%s;",
1824 if (w->isWindow()) {
1825 stream << w->x() << w->y() << w->width() << w->height();
1843 stream << item.
pos << item.
size << (int)0 << (
int)0;
1845 }
else if (item.
subinfo != 0) {
1885 #ifndef QT_NO_TABBAR 1894 stream >> orientation;
1900 for (
int i = 0; i < cnt; ++i) {
1902 stream >> nextMarker;
1906 stream >> name >> flags;
1909 stream >> dummy >> dummy >> dummy >> dummy;
1914 for (
int j = 0; j < widgets.
count(); ++j) {
1916 widget = widgets.
takeAt(j);
1928 if (placeHolder->
window) {
1930 stream >> x >> y >> w >> h;
1934 stream >> item.
pos >> item.
size >> dummy >> dummy;
1936 if (item.
size != -1)
1943 bool drawer =
false;
1944 #ifdef Q_WS_MAC // drawer support 1957 stream >> x >> y >> w >> h;
1959 #ifdef Q_WS_MAC // drawer support 1967 QRect r(x, y, w, h);
1983 stream >> item.
pos >> item.
size >> dummy >> dummy;
2003 stream >> item.
pos >> item.
size >> dummy >> dummy;
2019 #ifndef QT_NO_TABBAR 2024 if (!testing && *
sep == 1)
2031 #ifndef QT_NO_TABBAR 2067 #ifndef QT_MAC_USE_COCOA 2082 #endif //QT_NO_TABBAR 2084 #ifndef QT_NO_TABBAR 2115 QString title = dw->d_func()->fixedWindowTitle;
2119 #ifndef QT_NO_TOOLTIP 2123 }
else if (qvariant_cast<quintptr>(
tabBar->
tabData(tab_idx)) !=
id) {
2129 #ifndef QT_NO_TOOLTIP 2138 #ifndef QT_NO_TOOLTIP 2146 while (tab_idx < tabBar->count()) {
2256 #endif // QT_NO_TABBAR 2266 #ifndef QT_NO_TABBAR 2269 const int tabShape = 0;
2311 for (
int i = 0; i < 4; ++i)
2312 stream << static_cast<int>(
corners[i]);
2321 for (
int i = 0; i < cnt; ++i) {
2343 for (
int i = 0; i < 4; ++i)
2344 stream >> cornerData[i];
2346 for (
int i = 0; i < 4; ++i)
2347 corners[i] = static_cast<Qt::DockWidgetArea>(cornerData[i]);
2386 #ifndef QT_NO_TABBAR 2394 nestingEnabled =
false;
2455 rect.
adjust(-2, -2, 2, 2);
2487 if (path.
count() == 1)
2488 return &
docks[index];
2542 if (path.
count() == 1)
2580 static inline int qMin(
int i1,
int i2,
int i3) {
return qMin(i1,
qMin(i2, i3)); }
2581 static inline int qMax(
int i1,
int i2,
int i3) {
return qMax(i1,
qMax(i2, i3)); }
2586 QSize center_hint(0, 0);
2587 QSize center_min(0, 0);
2636 if (_ver_struct_list != 0) {
2638 ver_struct_list.
resize(3);
2641 ver_struct_list[0].init();
2642 ver_struct_list[0].stretch = 0;
2643 ver_struct_list[0].sizeHint = top_hint.
height();
2644 ver_struct_list[0].minimumSize = top_min.
height();
2645 ver_struct_list[0].maximumSize = top_max.
height();
2646 ver_struct_list[0].expansive =
false;
2652 ver_struct_list[1].init();
2653 ver_struct_list[1].stretch = center_hint.
height();
2664 int left = (tl_significant && bl_significant) ? left_hint.
height() : 0;
2665 int right = (tr_significant && br_significant) ? right_hint.
height() : 0;
2666 ver_struct_list[1].sizeHint =
qMax(left, center_hint.
height(),
right);
2668 left = (tl_significant && bl_significant) ? left_min.
height() : 0;
2669 right = (tr_significant && br_significant) ? right_min.
height() : 0;
2670 ver_struct_list[1].minimumSize =
qMax(left, center_min.
height(),
right);
2672 ver_struct_list[1].expansive = have_central;
2676 ver_struct_list[1].pos = center_rect.
top();
2677 ver_struct_list[1].
size = center_rect.
height();
2680 ver_struct_list[2].init();
2681 ver_struct_list[2].stretch = 0;
2682 ver_struct_list[2].sizeHint = bottom_hint.
height();
2683 ver_struct_list[2].minimumSize = bottom_min.
height();
2684 ver_struct_list[2].maximumSize = bottom_max.
height();
2685 ver_struct_list[2].expansive =
false;
2690 for (
int i = 0; i < 3; ++i) {
2691 ver_struct_list[i].sizeHint
2696 if (_hor_struct_list != 0) {
2698 hor_struct_list.
resize(3);
2701 hor_struct_list[0].init();
2702 hor_struct_list[0].stretch = 0;
2703 hor_struct_list[0].sizeHint = left_hint.
width();
2704 hor_struct_list[0].minimumSize = left_min.
width();
2705 hor_struct_list[0].maximumSize = left_max.
width();
2706 hor_struct_list[0].expansive =
false;
2712 hor_struct_list[1].init();
2713 hor_struct_list[1].stretch = center_hint.
width();
2724 int top = (tl_significant && tr_significant) ? top_hint.
width() : 0;
2725 int bottom = (bl_significant && br_significant) ? bottom_hint.
width() : 0;
2726 hor_struct_list[1].sizeHint =
qMax(top, center_hint.
width(), bottom);
2728 top = (tl_significant && tr_significant) ? top_min.
width() : 0;
2729 bottom = (bl_significant && br_significant) ? bottom_min.
width() : 0;
2730 hor_struct_list[1].minimumSize =
qMax(top, center_min.
width(), bottom);
2733 hor_struct_list[1].expansive = have_central;
2734 hor_struct_list[1].
empty = !have_central;
2735 hor_struct_list[1].pos = center_rect.
left();
2736 hor_struct_list[1].
size = center_rect.
width();
2739 hor_struct_list[2].init();
2740 hor_struct_list[2].stretch = 0;
2741 hor_struct_list[2].sizeHint = right_hint.
width();
2742 hor_struct_list[2].minimumSize = right_min.
width();
2743 hor_struct_list[2].maximumSize = right_max.
width();
2744 hor_struct_list[2].expansive =
false;
2749 for (
int i = 0; i < 3; ++i) {
2750 hor_struct_list[i].sizeHint
2764 if (hor_struct_list != 0) {
2772 if (ver_struct_list != 0) {
2784 if (hor_struct_list != 0) {
2792 if (ver_struct_list != 0) {
2804 if (hor_struct_list != 0) {
2808 if (ver_struct_list != 0) {
2824 if (hor_struct_list != 0) {
2828 if (ver_struct_list != 0) {
2842 if (hor_struct_list != 0) {
2846 if (ver_struct_list != 0) {
2856 getGrid(&ver_struct_list, &hor_struct_list);
2861 setGrid(&ver_struct_list, &hor_struct_list);
2893 int row1 = top.
width();
2895 int row3 = bottom.
width();
2896 int col1 = left.
height();
2898 int col3 = right.
height();
2901 row1 += left.
width();
2906 row1 += right.
width();
2911 row3 += left.
width();
2916 row3 += right.
width();
2920 return QSize(
qMax(row1, row2, row3),
qMax(col1, col2, col3));
2943 int row1 = top.
width();
2945 int row3 = bottom.
width();
2946 int col1 = left.
height();
2948 int col3 = right.
height();
2951 row1 += left.
width();
2956 row1 += right.
width();
2961 row3 += left.
width();
2966 row3 += right.
width();
2970 return QSize(
qMax(row1, row2, row3),
qMax(col1, col2, col3));
2985 if (placeHolder->
window) {
3010 info.
o = orientation;
3014 #ifndef QT_NO_TABBAR 3021 #ifndef QT_NO_TABBAR 3079 #ifndef QT_NO_TABBAR 3082 #endif //QT_NO_TABBAR 3087 const QPoint &mouse)
const 3125 if (separator.
count() > 1) {
3127 delta =
pick(info->
o, dest - origin);
3147 delta =
pick(o, dest - origin);
3160 #ifndef QT_NO_TABBAR 3181 #ifndef QT_MAC_USE_COCOA 3194 #endif //QT_NO_TABBAR 3237 #ifndef QT_NO_TABBAR 3271 if (index < 0 || index >= item_list.
count())
3279 #ifndef QT_NO_TABBAR 3286 int size = item.
size;
3288 int prev = info->
prev(index);
3289 int next = info->
next(index);
3305 result =
QRect(p, s);
3317 if (item.
size != -1)
3330 #endif // QT_NO_DOCKWIDGET void setDrawBase(bool drawTheBase)
T qobject_cast(QObject *object)
The QPainter class performs low-level painting on widgets and other paint devices.
Status status() const
Returns the status of the data stream.
QList< int > indexOf(QWidget *widget) const
DockOptions dockOptions
the docking behavior of QMainWindow
QSet< QTabBar * > usedTabBars() const
QLayoutItem * unplug(const QList< int > &path)
bool blockSignals(bool b)
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke...
QList< QDockAreaLayoutItem > item_list
static int separatorMoveHelper(QVector< QLayoutStruct > &list, int index, int delta, int sep)
QRect adjusted(int x1, int y1, int x2, int y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
bool isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
void setHeight(int h)
Sets the height of the rectangle to the given height.
static int realMaxSize(const QDockAreaLayoutInfo &info)
QIntegerForSizeof< void * >::Unsigned quintptr
void deleteAllLayoutItems()
void setBottom(int pos)
Sets the bottom edge of the rectangle to the given y coordinate.
static int qMax(int i1, int i2, int i3)
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
QWidget * getSeparatorWidget()
void moveLeft(int pos)
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate...
QStyle::State state
the style flags that are used when drawing the control
void saveState(QDataStream &stream) const
void tab(int index, QLayoutItem *dockWidgetItem)
int count(const T &t) const
Returns the number of occurrences of value in the vector.
bool expansive(Qt::Orientation o) const
QVector< QWidget * > separatorWidgets
virtual bool isEmpty() const =0
Implemented in subclasses to return whether this item is empty, i.
void init(int stretchFactor=0, int minSize=0)
QVariant tabData(int index) const
Returns the data of the tab at position index, or a null variant if index is out of range...
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const =0
Returns the value of the given pixel metric.
QSize minimumSizeHint() const
QList< int > indexOfPlaceHolder(const QString &objectName) const
void moveRight(int pos)
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate...
virtual Qt::Orientations expandingDirections() const =0
Returns whether this layout item can make use of more space than sizeHint().
QSize expandedTo(const QSize &) const
Returns a size holding the maximum width and height of this size and the given otherSize.
int left() const
Returns the x-coordinate of the rectangle's left edge.
int width() const
Returns the width of the rectangle.
void insert(int i, const T &t)
Inserts value at index position i in the list.
void setCurrentIndex(int index)
void remove(const QList< int > &path)
static int grow(QLayoutStruct &ls, int delta)
long ASN1_INTEGER_get ASN1_INTEGER * a
void setStatus(Status status)
Sets the status of the data stream to the status given.
int count(const T &t) const
Returns the number of occurrences of value in the list.
The QTabBar class provides a tab bar, e.g.
QPlaceHolderItem * placeHolderItem
static int qMin(int i1, int i2, int i3)
int height() const
Returns the height of the rectangle.
virtual QSize minimumSize() const =0
Implemented in subclasses to return the minimum size of this item.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QString class provides a Unicode character string.
void addDockWidget(QInternal::DockPosition pos, QDockWidget *dockWidget, Qt::Orientation orientation)
QRect tabContentRect() const
bool empty() const
This function is provided for STL compatibility.
QSize sizeHint() const
em>Reimplemented Function
void removeTab(int index)
Removes the tab at position index.
void moveBottom(int pos)
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate...
static QInternal::DockPosition dockPosHelper(const QRect &rect, const QPoint &_pos, Qt::Orientation o, bool nestingEnabled, QDockAreaLayoutInfo::TabMode tabMode)
QRect separatorRect(int index) const
QSize boundedTo(const QSize &) const
Returns a size holding the minimum width and height of this size and the given otherSize.
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
void setTabText(int index, const QString &text)
Sets the text of the tab at position index to text.
quintptr currentTabId() const
void deleteAllLayoutItems()
void updateSeparatorWidgets() const
QList< int > findSeparator(const QPoint &pos) const
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
void resize(int size)
Sets the size of the vector to size.
QList< T > mid(int pos, int length=-1) const
Returns a list whose elements are copied from this list, starting at position pos.
QSize maximumSize() const
bool restoreState(QDataStream &stream, QList< QDockWidget *> &widgets, bool testing)
QRect itemRect(int index) const
QSet< QWidget * > usedSeparatorWidgets() const
bool expansive(Qt::Orientation o) const
QLayoutItem * centralWidgetItem
void updateSeparatorWidgets() const
void setCurrentTabId(quintptr id)
QMainWindowLayout * mainWindowLayout() const
int width() const
Returns the width.
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QRect gapRect(const QList< int > &path) const
The QLayoutItem class provides an abstract item that a QLayout manipulates.
static quintptr tabId(const QDockAreaLayoutItem &item)
static bool isEmpty(const char *str)
QLayoutItem * takeAt(int *x, int index)
static int shrink(QLayoutStruct &ls, int delta)
void setTabToolTip(int index, const QString &tip)
Sets the tool tip of the tab at position index to tip.
void setCurrentTab(QWidget *widget)
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
The QStyleOption class stores the parameters used by QStyle functions.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
void setTop(int pos)
Sets the top edge of the rectangle to the given y coordinate.
void getGrid(QVector< QLayoutStruct > *ver_struct_list, QVector< QLayoutStruct > *hor_struct_list)
int insertTab(int index, const QString &text)
Inserts a new tab with text text at position index.
QSet< QWidget * > usedSeparatorWidgets() const
void prepend(const T &t)
Inserts value at the beginning of the list.
QSize size() const
Returns the size of the rectangle.
const T & at(int i) const
Returns the item at index position i in the list.
void adjust(int x1, int y1, int x2, int y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
void setRight(int pos)
Sets the right edge of the rectangle to the given x coordinate.
void setShape(Shape shape)
void append(const T &t)
Inserts value at the end of the vector.
virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=0) const =0
Draws the given primitive element with the provided painter using the style options specified by opti...
QDockAreaLayoutInfo * info(const QList< int > &path)
Q_CORE_EXPORT void qWarning(const char *,...)
const_iterator insert(const T &value)
bool contains(const QPoint &p) const
Returns true if the region contains the point p; otherwise returns false.
void setTabBarShape(int shape)
bool updateTabBar() const
QRegion separatorRegion() const
The QRegion class specifies a clip region for a painter.
QLayoutItem * takeAt(int *x, int index)
static Qt::DockWidgetArea toDockWidgetArea(QInternal::DockPosition pos)
static void paintSep(QPainter *p, QWidget *w, const QRect &r, Qt::Orientation o, bool mouse_over)
QLayoutItem * itemAt(int *x, int index) const
void clear()
Removes all items from the list.
QList< int > indexOf(QWidget *dockWidget) const
bool restoreDockWidget(QDockWidget *dockWidget)
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
QSize maximumSize() const
void saveState(QDataStream &stream) const
const T & at(int i) const
Returns the item at index position i in the vector.
QDockAreaLayoutInfo * info(const QList< int > &path)
Q_CORE_EXPORT QTextStream & center(QTextStream &s)
static QDesktopWidget * desktop()
Returns the desktop widget (also called the root window).
void qGeomCalc(QVector< QLayoutStruct > &chain, int start, int count, int pos, int space, int spacer)
QSize tabBarMinimumSize() const
T & first()
Returns a reference to the first item in the list.
QPalette palette
the palette that should be used when painting the control
void setTabData(int index, const QVariant &data)
Sets the data of the tab at position index to data.
QLayoutItem * unplug(const QList< int > &path)
bool insertGap(const QList< int > &path, QLayoutItem *dockWidgetItem)
QDockAreaLayoutInfo docks[4]
int top() const
Returns the y-coordinate of the rectangle's top edge.
void keepSize(QDockWidget *w)
QVector< QWidget * > separatorWidgets
int right() const
Returns the x-coordinate of the rectangle's right edge.
bool restoreState(QDataStream &stream, const QList< QDockWidget *> &widgets, bool testing=false)
void tabifyDockWidget(QDockWidget *first, QDockWidget *second)
QList< int > findSeparator(const QPoint &pos) const
bool hasFixedSize() const
int count
the number of tabs in the tab bar
static int realMinSize(const QDockAreaLayoutInfo &info)
QString tabText(int index) const
Returns the text of the tab at position index, or an empty string if index is out of range...
void setLeft(int pos)
Sets the left edge of the rectangle to the given x coordinate.
QRect separatorRect(int index) const
int y() const
Returns the y-coordinate of the rectangle's top edge.
static QRect constrainedRect(QRect rect, const QRect &desktop)
virtual QSize sizeHint() const =0
Implemented in subclasses to return the preferred size of this item.
void paintSeparators(QPainter *p, QWidget *widget, const QRegion &clip, const QPoint &mouse) const
static QRect dockedGeometry(QWidget *widget)
int separatorMove(const QList< int > &separator, const QPoint &origin, const QPoint &dest)
QDockAreaLayoutItem(QLayoutItem *_widgetItem=0)
int x() const
Returns the x-coordinate of the rectangle's left edge.
bool hasFixedSize(Qt::Orientation o) const
virtual QSize maximumSize() const =0
Implemented in subclasses to return the maximum size of this item.
The QPoint class defines a point in the plane using integer precision.
T & last()
Returns a reference to the last item in the list.
QDockAreaLayoutInfo * subinfo
The QMainWindow class provides a main application window.
int size() const
Returns the number of items in the list.
QDockAreaLayoutItem & item(const QList< int > &path)
void splitDockWidget(QDockWidget *after, QDockWidget *dockWidget, Qt::Orientation orientation)
void setWidth(int w)
Sets the width of the rectangle to the given width.
int & rheight()
Returns a reference to the height.
QString objectName() const
int separatorMove(int index, int delta)
int height() const
Returns the height.
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
QLayoutItem * itemAt(int *x, int index) const
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
QSize minimumSize() const
T qvariant_cast(const QVariant &)
T takeAt(int i)
Removes the item at index position i and returns it.
QDockAreaLayoutItem & operator=(const QDockAreaLayoutItem &other)
QDockAreaLayout(QMainWindow *win)
QList< int > indexOfPlaceHolder(const QString &objectName) const
int y() const
Returns the y coordinate of this point.
void setGrid(QVector< QLayoutStruct > *ver_struct_list, QVector< QLayoutStruct > *hor_struct_list)
QList< int > gapIndex(const QPoint &pos) const
virtual QWidget * widget()
If this item is a QWidget, it is returned as a QWidget; otherwise 0 is returned.
QWidgetAnimator widgetAnimator
bool isNull() const
Returns true if both the width and height is 0; otherwise returns false.
QMainWindowLayout * qt_mainwindow_layout(const QMainWindow *window)
void paintSeparators(QPainter *p, QWidget *widget, const QRegion &clip, const QPoint &mouse) const
The QSize class defines the size of a two-dimensional object using integer point precision.
The QDataStream class provides serialization of binary data to a QIODevice.
int x() const
Returns the x coordinate of this point.
bool insertGap(const QList< int > &path, QLayoutItem *dockWidgetItem)
void moveTop(int pos)
Moves the rectangle vertically, leaving the rectangle's top edge at the given y coordinate.
QSize tabBarSizeHint() const
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
QLayoutItem * plug(const QList< int > &path)
static const int QLAYOUTSIZE_MAX
QDockAreaLayoutItem & item(const QList< int > &path)
void remove(const QList< int > &path)
QRect itemRect(const QList< int > &path) const
#define qPrintable(string)
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
void split(int index, Qt::Orientation orientation, QLayoutItem *dockWidgetItem)
bool qt_mac_is_macdrawer(const QWidget *w)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QRegion separatorRegion() const
int size() const
Returns the number of items in the vector.
QRect rect
the area that should be used for various calculations and painting
QInternal::DockPosition dockPos
QLayoutItem * plug(const QList< int > &path)
QSet< QTabBar * > usedTabBars() const
Qt::DockWidgetArea corners[4]
int currentIndex
the index of the tab bar's visible tab
int & rwidth()
Returns a reference to the width.
QList< int > gapIndex(const QPoint &pos, bool nestingEnabled, TabMode tabMode) const
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
QSize minimumSize() const
QSize minimumSize() const
void removeAt(int i)
Removes the item at index position i.