mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-19 19:14:42 +00:00
- removed useless dynamic_cast
This commit is contained in:
parent
13dabacfd2
commit
cd27292094
@ -43,7 +43,7 @@ GLArea::GLArea(MultiViewer_Container *mvcont, RichParameterSet *current)
|
||||
: QGLWidget(),interrbutshow(false)
|
||||
{
|
||||
this->setParent(mvcont);
|
||||
|
||||
parentmultiview = mvcont;
|
||||
this->updateCustomSettingValues(*current);
|
||||
animMode=AnimNone;
|
||||
iRenderer=0; //Shader support
|
||||
|
||||
@ -39,9 +39,9 @@
|
||||
|
||||
#include "../common/interfaces.h"
|
||||
#include "glarea_setting.h"
|
||||
#include "multiViewer_Container.h"
|
||||
#include "snapshotsetting.h"
|
||||
#include "rendermodeactions.h"
|
||||
#include "multiViewer_Container.h"
|
||||
|
||||
#define SSHOT_BYTES_PER_PIXEL 4
|
||||
|
||||
@ -50,6 +50,7 @@ enum LightingModel{LDOUBLE,LFANCY};
|
||||
|
||||
class MeshModel;
|
||||
class MainWindow;
|
||||
|
||||
class GLArea : public QGLWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -63,6 +64,7 @@ public:
|
||||
|
||||
private:
|
||||
int id; //the very important unique id of each subwindow.
|
||||
MultiViewer_Container* parentmultiview;
|
||||
|
||||
public:
|
||||
int getId() {return id;}
|
||||
@ -72,15 +74,7 @@ public:
|
||||
//MultiViewer_Container *mvc()
|
||||
MultiViewer_Container * mvc()
|
||||
{
|
||||
QObject * curParent = this->parent();
|
||||
while(dynamic_cast<MultiViewer_Container *>(curParent) == 0)
|
||||
{
|
||||
if (curParent != NULL)
|
||||
curParent = curParent->parent();
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
return dynamic_cast<MultiViewer_Container *>(curParent);
|
||||
return parentmultiview;
|
||||
}
|
||||
|
||||
MainWindow *mw();
|
||||
|
||||
@ -63,16 +63,12 @@ void SplitterHandle::mousePressEvent ( QMouseEvent * e )
|
||||
MultiViewer_Container::MultiViewer_Container(QWidget *parent)
|
||||
: Splitter(parent)
|
||||
{
|
||||
setChildrenCollapsible(false);
|
||||
setChildrenCollapsible(false);
|
||||
|
||||
currentId=-1;
|
||||
currentId=-1;
|
||||
|
||||
}
|
||||
|
||||
MultiViewer_Container::~MultiViewer_Container()
|
||||
{
|
||||
}
|
||||
|
||||
int MultiViewer_Container::getNextViewerId(){
|
||||
int newId=-1;
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ class Splitter : public QSplitter
|
||||
public:
|
||||
Splitter ( QWidget * parent);
|
||||
Splitter(Qt::Orientation orientation, QWidget *parent = 0);
|
||||
~Splitter() {}
|
||||
|
||||
MultiViewer_Container *getRootContainer();
|
||||
|
||||
@ -55,6 +56,7 @@ class SplitterHandle : public QSplitterHandle
|
||||
|
||||
public:
|
||||
SplitterHandle(Qt::Orientation orientation, QSplitter *parent);
|
||||
~SplitterHandle() {}
|
||||
|
||||
protected:
|
||||
void mousePressEvent ( QMouseEvent * e );
|
||||
@ -67,9 +69,8 @@ class MultiViewer_Container : public Splitter
|
||||
typedef vcg::Shot<double> Shot;
|
||||
|
||||
public:
|
||||
MultiViewer_Container(QWidget *parent);
|
||||
|
||||
~MultiViewer_Container();
|
||||
MultiViewer_Container(QWidget *parent);
|
||||
~MultiViewer_Container() {}
|
||||
|
||||
void addView(GLArea* viewer, Qt::Orientation);
|
||||
void removeView(int);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user