comparison main/MainWindow.cpp @ 205:0511f41a7ba7

* Add auto-alignment toggle to Document * Make MainWindowBase cope if there is no time ruler layer
author Chris Cannam
date Thu, 25 Oct 2007 11:32:54 +0000
parents 688604a2c038
children b4167bb2d2d4
comparison
equal deleted inserted replaced
204:688604a2c038 205:0511f41a7ba7
157 QFrame *frame = new QFrame; 157 QFrame *frame = new QFrame;
158 setCentralWidget(frame); 158 setCentralWidget(frame);
159 159
160 QGridLayout *layout = new QGridLayout; 160 QGridLayout *layout = new QGridLayout;
161 161
162 m_descriptionLabel = new QLabel; 162 m_descriptionLabel = new QLabel; //!!! hang on, this is declared in base class -- should be declared and initialised by same class
163 163
164 QScrollArea *scroll = new QScrollArea(frame); 164 QScrollArea *scroll = new QScrollArea(frame);
165 scroll->setWidgetResizable(true); 165 scroll->setWidgetResizable(true);
166 scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 166 scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
167 scroll->setFrameShape(QFrame::NoFrame); 167 scroll->setFrameShape(QFrame::NoFrame);
2761 Layer *newLayer = m_document->createLayer(LayerFactory::Slice); 2761 Layer *newLayer = m_document->createLayer(LayerFactory::Slice);
2762 // document->setModel(newLayer, ei->second->getModel()); 2762 // document->setModel(newLayer, ei->second->getModel());
2763 SliceableLayer *source = dynamic_cast<SliceableLayer *>(ei->second); 2763 SliceableLayer *source = dynamic_cast<SliceableLayer *>(ei->second);
2764 SliceLayer *dest = dynamic_cast<SliceLayer *>(newLayer); 2764 SliceLayer *dest = dynamic_cast<SliceLayer *>(newLayer);
2765 if (source && dest) { 2765 if (source && dest) {
2766 //!!!???
2766 dest->setSliceableModel(source->getSliceableModel()); 2767 dest->setSliceableModel(source->getSliceableModel());
2767 connect(source, SIGNAL(sliceableModelReplaced(const Model *, const Model *)), 2768 connect(source, SIGNAL(sliceableModelReplaced(const Model *, const Model *)),
2768 dest, SLOT(sliceableModelReplaced(const Model *, const Model *))); 2769 dest, SLOT(sliceableModelReplaced(const Model *, const Model *)));
2769 connect(m_document, SIGNAL(modelAboutToBeDeleted(Model *)), 2770 connect(m_document, SIGNAL(modelAboutToBeDeleted(Model *)),
2770 dest, SLOT(modelAboutToBeDeleted(Model *))); 2771 dest, SLOT(modelAboutToBeDeleted(Model *)));