equal
deleted
inserted
replaced
116 } |
116 } |
117 } |
117 } |
118 |
118 |
119 void extendSize(Qt::Orientation o, int extent) |
119 void extendSize(Qt::Orientation o, int extent) |
120 { |
120 { |
121 int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : size) + extent); |
121 int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : pick(o, sizeHint())) + extent); |
122 int sizeh = pick(o, sizeHint()); |
122 int sizeh = pick(o, sizeHint()); |
123 if (newSize == sizeh) { |
123 if (newSize == sizeh) { |
124 preferredSize = -1; |
124 preferredSize = -1; |
125 size = sizeh; |
125 size = sizeh; |
126 } else { |
126 } else { |
153 }; |
153 }; |
154 |
154 |
155 class QToolBarAreaLayoutInfo |
155 class QToolBarAreaLayoutInfo |
156 { |
156 { |
157 public: |
157 public: |
158 enum { EmptyDockAreaSize = 80 }; // when a dock area is empty, how "wide" is it? |
|
159 |
|
160 QToolBarAreaLayoutInfo(QInternal::DockPosition pos = QInternal::TopDock); |
158 QToolBarAreaLayoutInfo(QInternal::DockPosition pos = QInternal::TopDock); |
161 |
159 |
162 QList<QToolBarAreaLayoutLine> lines; |
160 QList<QToolBarAreaLayoutLine> lines; |
163 |
161 |
164 QSize sizeHint() const; |
162 QSize sizeHint() const; |
171 void removeToolBar(QToolBar *toolBar); |
169 void removeToolBar(QToolBar *toolBar); |
172 void insertToolBarBreak(QToolBar *before); |
170 void insertToolBarBreak(QToolBar *before); |
173 void removeToolBarBreak(QToolBar *before); |
171 void removeToolBarBreak(QToolBar *before); |
174 void moveToolBar(QToolBar *toolbar, int pos); |
172 void moveToolBar(QToolBar *toolbar, int pos); |
175 |
173 |
176 QList<int> gapIndex(const QPoint &pos) const; |
174 QList<int> gapIndex(const QPoint &pos, int *maxDistance) const; |
177 bool insertGap(const QList<int> &path, QLayoutItem *item); |
175 bool insertGap(const QList<int> &path, QLayoutItem *item); |
178 void clear(); |
176 void clear(); |
179 QRect itemRect(const QList<int> &path) const; |
177 QRect itemRect(const QList<int> &path) const; |
180 QRect appendLineDropRect() const; |
178 int distance(const QPoint &pos) const; |
181 |
179 |
182 QRect rect; |
180 QRect rect; |
183 Qt::Orientation o; |
181 Qt::Orientation o; |
184 QInternal::DockPosition dockPos; |
182 QInternal::DockPosition dockPos; |
185 bool dirty; |
183 bool dirty; |