Mercurial > hg > svgui
changeset 539:566787389e59
* Add insertPane
author | Chris Cannam |
---|---|
date | Tue, 09 Jun 2009 15:26:25 +0000 |
parents | 3bf74851d93e |
children | 1092181784a3 |
files | view/PaneStack.cpp view/PaneStack.h |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/view/PaneStack.cpp Fri Jun 05 16:08:18 2009 +0000 +++ b/view/PaneStack.cpp Tue Jun 09 15:26:25 2009 +0000 @@ -62,6 +62,12 @@ Pane * PaneStack::addPane(bool suppressPropertyBox) { + return insertPane(getPaneCount(), suppressPropertyBox); +} + +Pane * +PaneStack::insertPane(int index, bool suppressPropertyBox) +{ QFrame *frame = new QFrame; QGridLayout *layout = new QGridLayout; @@ -129,7 +135,7 @@ m_panes.push_back(rec); frame->setLayout(layout); - m_splitter->addWidget(frame); + m_splitter->insertWidget(index, frame); connect(pane, SIGNAL(propertyContainerAdded(PropertyContainer *)), this, SLOT(propertyContainerAdded(PropertyContainer *)));
--- a/view/PaneStack.h Fri Jun 05 16:08:18 2009 +0000 +++ b/view/PaneStack.h Tue Jun 09 15:26:25 2009 +0000 @@ -1,4 +1,3 @@ - /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* @@ -41,6 +40,7 @@ PaneStack(QWidget *parent, ViewManager *viewManager); Pane *addPane(bool suppressPropertyBox = false); // I own the returned value + Pane *insertPane(int index, bool suppressPropertyBox = false); // I own the returned value void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers int getPaneCount() const; // Returns only count of visible panes