comparison view/PaneStack.cpp @ 539:566787389e59

* Add insertPane
author Chris Cannam
date Tue, 09 Jun 2009 15:26:25 +0000
parents e4e0ae491a48
children f4960f8ce798
comparison
equal deleted inserted replaced
538:3bf74851d93e 539:566787389e59
60 } 60 }
61 61
62 Pane * 62 Pane *
63 PaneStack::addPane(bool suppressPropertyBox) 63 PaneStack::addPane(bool suppressPropertyBox)
64 { 64 {
65 return insertPane(getPaneCount(), suppressPropertyBox);
66 }
67
68 Pane *
69 PaneStack::insertPane(int index, bool suppressPropertyBox)
70 {
65 QFrame *frame = new QFrame; 71 QFrame *frame = new QFrame;
66 72
67 QGridLayout *layout = new QGridLayout; 73 QGridLayout *layout = new QGridLayout;
68 layout->setMargin(0); 74 layout->setMargin(0);
69 layout->setSpacing(2); 75 layout->setSpacing(2);
127 rec.frame = frame; 133 rec.frame = frame;
128 rec.layout = layout; 134 rec.layout = layout;
129 m_panes.push_back(rec); 135 m_panes.push_back(rec);
130 136
131 frame->setLayout(layout); 137 frame->setLayout(layout);
132 m_splitter->addWidget(frame); 138 m_splitter->insertWidget(index, frame);
133 139
134 connect(pane, SIGNAL(propertyContainerAdded(PropertyContainer *)), 140 connect(pane, SIGNAL(propertyContainerAdded(PropertyContainer *)),
135 this, SLOT(propertyContainerAdded(PropertyContainer *))); 141 this, SLOT(propertyContainerAdded(PropertyContainer *)));
136 connect(pane, SIGNAL(propertyContainerRemoved(PropertyContainer *)), 142 connect(pane, SIGNAL(propertyContainerRemoved(PropertyContainer *)),
137 this, SLOT(propertyContainerRemoved(PropertyContainer *))); 143 this, SLOT(propertyContainerRemoved(PropertyContainer *)));