comparison view/PaneStack.cpp @ 190:53835534a9d3

* Allow user to activate a pane by clicking on the tab for its currently active layer. Formerly nothing happened if you clicked on the tab that was already topmost in a given property stack, because the tab widget only emitted a signal if the current tab changed. We want this to switch focus back to the pane if another one has been active in the mean time. * Make the thumbwheels look a bit round.
author Chris Cannam
date Mon, 22 Jan 2007 15:42:00 +0000
parents 5b7472db612b
children 6969f21da18a
comparison
equal deleted inserted replaced
189:5b7472db612b 190:53835534a9d3
78 properties = new QFrame(); 78 properties = new QFrame();
79 } else { 79 } else {
80 properties = new PropertyStack(frame, pane); 80 properties = new PropertyStack(frame, pane);
81 connect(properties, SIGNAL(propertyContainerSelected(View *, PropertyContainer *)), 81 connect(properties, SIGNAL(propertyContainerSelected(View *, PropertyContainer *)),
82 this, SLOT(propertyContainerSelected(View *, PropertyContainer *))); 82 this, SLOT(propertyContainerSelected(View *, PropertyContainer *)));
83 connect(properties, SIGNAL(viewSelected(View *)),
84 this, SLOT(viewSelected(View *)));
83 connect(properties, SIGNAL(contextHelpChanged(const QString &)), 85 connect(properties, SIGNAL(contextHelpChanged(const QString &)),
84 this, SIGNAL(contextHelpChanged(const QString &))); 86 this, SIGNAL(contextHelpChanged(const QString &)));
85 } 87 }
86 if (m_layoutStyle == PropertyStackPerPaneLayout) { 88 if (m_layoutStyle == PropertyStackPerPaneLayout) {
87 layout->addWidget(properties); 89 layout->addWidget(properties);
379 if (layer) emit currentLayerChanged(m_currentPane, layer); 381 if (layer) emit currentLayerChanged(m_currentPane, layer);
380 else emit currentLayerChanged(m_currentPane, 0); 382 else emit currentLayerChanged(m_currentPane, 0);
381 } 383 }
382 384
383 void 385 void
386 PaneStack::viewSelected(View *v)
387 {
388 Pane *p = dynamic_cast<Pane *>(v);
389 if (p) setCurrentPane(p);
390 }
391
392 void
384 PaneStack::paneInteractedWith() 393 PaneStack::paneInteractedWith()
385 { 394 {
386 Pane *pane = dynamic_cast<Pane *>(sender()); 395 Pane *pane = dynamic_cast<Pane *>(sender());
387 if (!pane) return; 396 if (!pane) return;
388 setCurrentPane(pane); 397 setCurrentPane(pane);