diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-24 16:03:28 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-24 16:04:43 (GMT) |
commit | 117b9bb3d576d9974b3d05174d1fccf98e47cb22 (patch) | |
tree | 47e8fd427dfc17e2709f898e16d873450e2ca4b6 /src/gui/widgets/qdockarealayout_p.h | |
parent | 962d3938380dde01e2bd4915c51c95f47fafa0ec (diff) | |
download | Qt-117b9bb3d576d9974b3d05174d1fccf98e47cb22.zip Qt-117b9bb3d576d9974b3d05174d1fccf98e47cb22.tar.gz Qt-117b9bb3d576d9974b3d05174d1fccf98e47cb22.tar.bz2 |
QDockWidget/Toolbars refactor to avoid list copies
This also helps understanding the code better.
Diffstat (limited to 'src/gui/widgets/qdockarealayout_p.h')
-rw-r--r-- | src/gui/widgets/qdockarealayout_p.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/widgets/qdockarealayout_p.h b/src/gui/widgets/qdockarealayout_p.h index 771aa52..543a201 100644 --- a/src/gui/widgets/qdockarealayout_p.h +++ b/src/gui/widgets/qdockarealayout_p.h @@ -136,18 +136,18 @@ public: QSize sizeHint() const; QSize size() const; - bool insertGap(QList<int> path, QLayoutItem *dockWidgetItem); - QLayoutItem *plug(QList<int> path); - QLayoutItem *unplug(QList<int> path); + bool insertGap(const QList<int> &path, QLayoutItem *dockWidgetItem); + QLayoutItem *plug(const QList<int> &path); + QLayoutItem *unplug(const QList<int> &path); enum TabMode { NoTabs, AllowTabs, ForceTabs }; QList<int> gapIndex(const QPoint &pos, bool nestingEnabled, TabMode tabMode) const; - void remove(QList<int> path); + void remove(const QList<int> &path); void unnest(int index); void split(int index, Qt::Orientation orientation, QLayoutItem *dockWidgetItem); void tab(int index, QLayoutItem *dockWidgetItem); - QDockAreaLayoutItem &item(QList<int> path); - QDockAreaLayoutInfo *info(QList<int> path); + QDockAreaLayoutItem &item(const QList<int> &path); + QDockAreaLayoutInfo *info(const QList<int> &path); QDockAreaLayoutInfo *info(QWidget *widget); enum { // sentinel values used to validate state data @@ -162,9 +162,9 @@ public: bool expansive(Qt::Orientation o) const; int changeSize(int index, int size, bool below); QRect itemRect(int index) const; - QRect itemRect(QList<int> path) const; + QRect itemRect(const QList<int> &path) const; QRect separatorRect(int index) const; - QRect separatorRect(QList<int> path) const; + QRect separatorRect(const QList<int> &path) const; void clear(); bool isEmpty() const; @@ -246,18 +246,18 @@ public: QList<int> gapIndex(const QPoint &pos) const; QList<int> findSeparator(const QPoint &pos) const; - QDockAreaLayoutItem &item(QList<int> path); - QDockAreaLayoutInfo *info(QList<int> path); - const QDockAreaLayoutInfo *info(QList<int> path) const; + QDockAreaLayoutItem &item(const QList<int> &path); + QDockAreaLayoutInfo *info(const QList<int> &path); + const QDockAreaLayoutInfo *info(const QList<int> &path) const; QDockAreaLayoutInfo *info(QWidget *widget); - QRect itemRect(QList<int> path) const; + QRect itemRect(const QList<int> &path) const; QRect separatorRect(int index) const; - QRect separatorRect(QList<int> path) const; + QRect separatorRect(const QList<int> &path) const; - bool insertGap(QList<int> path, QLayoutItem *dockWidgetItem); - QLayoutItem *plug(QList<int> path); - QLayoutItem *unplug(QList<int> path); - void remove(QList<int> path); + bool insertGap(const QList<int> &path, QLayoutItem *dockWidgetItem); + QLayoutItem *plug(const QList<int> &path); + QLayoutItem *unplug(const QList<int> &path); + void remove(const QList<int> &path); void fitLayout(); @@ -277,7 +277,7 @@ public: void paintSeparators(QPainter *p, QWidget *widget, const QRegion &clip, const QPoint &mouse) const; QRegion separatorRegion() const; - int separatorMove(QList<int> separator, const QPoint &origin, const QPoint &dest); + int separatorMove(const QList<int> &separator, const QPoint &origin, const QPoint &dest); void updateSeparatorWidgets() const; QLayoutItem *itemAt(int *x, int index) const; @@ -289,7 +289,7 @@ public: void setGrid(QVector<QLayoutStruct> *ver_struct_list, QVector<QLayoutStruct> *hor_struct_list); - QRect gapRect(QList<int> path) const; + QRect gapRect(const QList<int> &path) const; void keepSize(QDockWidget *w); |