mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 11:26:11 +00:00
Orientation with flag
This commit is contained in:
parent
77710e2035
commit
3ad8f7fa89
@ -853,7 +853,7 @@ bool MainWindow::open(QString fileName, GLArea *gla)
|
||||
mvcont = new MultiViewer_Container(mdiarea);
|
||||
int id = mvcont->getNextViewerId();
|
||||
gla=new GLArea(mdiarea,¤tGlobalParams,id, &(mvcont->meshDoc)); //SAREBBE MEGLIO METTERE DA SUBITO CHE E'FIGLIO DI MVC MA DEVI MODIFICARE IL COSTRUTTORE DI GLAREA
|
||||
mvcont->addView(gla, true);
|
||||
mvcont->addView(gla, Qt::Horizontal);
|
||||
addDockWidget(Qt::RightDockWidgetArea,mvcont->layerDialog);
|
||||
mvcont->connectToLayerDialog(gla);
|
||||
newGla =true;
|
||||
@ -1146,9 +1146,9 @@ void MainWindow::setSplit(QAction *qa)
|
||||
int id = mvc->getNextViewerId();
|
||||
GLArea *glwClone=new GLArea(mdiarea,¤tGlobalParams,id, &(mvc->meshDoc));
|
||||
if(qa->text() == tr("&Horizontally"))
|
||||
mvc->addView(glwClone, false);
|
||||
mvc->addView(glwClone, Qt::Vertical);
|
||||
else
|
||||
mvc->addView(glwClone, true);
|
||||
mvc->addView(glwClone, Qt::Horizontal);
|
||||
|
||||
updateMenus();
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ int MultiViewer_Container::getNextViewerId(){
|
||||
return idCounter++;
|
||||
}
|
||||
|
||||
void MultiViewer_Container::addView(Viewer* viewer, bool horiz){
|
||||
void MultiViewer_Container::addView(Viewer* viewer,Qt::Orientation orient){//bool horiz){
|
||||
//The Viewers are organized like in a BSP tree.
|
||||
// Every new viewer are added within an Horizontal splitter. Its orientation could change according to next insertions.
|
||||
// HSplit
|
||||
@ -82,9 +82,8 @@ void MultiViewer_Container::addView(Viewer* viewer, bool horiz){
|
||||
// |
|
||||
// View2
|
||||
if(parentSplitter->count()==1){
|
||||
if(horiz)
|
||||
parentSplitter->setOrientation(Qt::Horizontal);
|
||||
else parentSplitter->setOrientation(Qt::Vertical);
|
||||
|
||||
parentSplitter->setOrientation(orient);
|
||||
|
||||
QSplitter* newSplitter = new QSplitter(Qt::Horizontal);
|
||||
|
||||
@ -122,9 +121,7 @@ void MultiViewer_Container::addView(Viewer* viewer, bool horiz){
|
||||
// View3
|
||||
else{
|
||||
QSplitter* newSplitter;
|
||||
if(horiz)
|
||||
newSplitter = new QSplitter(Qt::Horizontal);
|
||||
else newSplitter = new QSplitter(Qt::Vertical);
|
||||
newSplitter = new QSplitter(orient);
|
||||
|
||||
QList<int> sizes2 = parentSplitter->sizes();
|
||||
parentSplitter->insertWidget(0, newSplitter);
|
||||
|
||||
@ -49,7 +49,7 @@ public:
|
||||
~MultiViewer_Container();
|
||||
|
||||
/// load an image in the painter widget, the imageNumber is the index of imageList that has the image wanted (0-base index!)
|
||||
void addView(Viewer* viewer, bool horiz);
|
||||
void addView(Viewer* viewer, Qt::Orientation);//bool horiz);
|
||||
void removeView(int);
|
||||
/// update all the visual widgets at one time (glw, imageVis, tree, imageMag)
|
||||
void updateAll();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user