我有一个叫做网格的类。我想跟踪它的对象。所以当一个新的网格被创建时,我想要一个信号。我已经添加了
class mesh: public QObject
并将所有方法设为槽并向 c-tor meshCreated 添加一个信号。但从这里开始,我多年的痛苦开始了。无论如何,标题中的错误开始出现。即使我评论了所有行,即//
在代码中的每一行之前添加,它仍然说相同。我怎样才能解决这个问题?
实际代码
#ifndef mesh_H
#define mesh_H
#include <QObject>
#include "mvert.h"
#include "medge.h"
#include "mface.h"
#include <QList>
#include <QString>
#include <QDebug>
#include "glmaterial.h"
class mesh : public QObject
{
Q_OBJECT
public:
explicit mesh(QObject *parent = 0);
QString getName();
private:
QString Name;
GLMaterial material;
QList<MVert> VertList;
QList<MEdge> EdgeList;
QList<MFace> FaceList;
MVert Centroid;
QList<int> QFaces;
QList<int> TFaces;
public slots:
void setName(QString Name);
void ReadmeshData(QString meshsrc);
void displayVerts();
void displayEdges();
void displayFaces();
void addVert(MVert vert);
void addEdge(MEdge edge);
void addFace(MFace face);
void removeDoubles();
MVert generateCentroid();
//FIXUS
void sortQandT();
void reorderFaces();
void subDivFace(int index, int res);
void forcedTriangulate();
//FIXUS
bool isVertInEdge(MVert input, MEdge edg);
bool similarVerts(int i,int j);
QList<int> relatedFacesToVert(MVert input);
QList<int> relatedEdgesToVert(MVert input);
QList<int> relatedVertsToVert(MVert input);
QList<int> relatedFacesToEdge(MEdge input);
QList<int> relatedEdgesToEdge(MEdge input);
QList<int> relatedEdgesToFace(MFace input);
QList<int> relatedFacesToFace(MFace input);
QList<MVert> reducedVList();
QList<MVert> vlistInstance();
MVert midPointOfEdge(int i);
MVert centroidOfFace(int i);
mesh operator=(mesh input);
void GLdraw();
signals:
void meshCreated(mesh *mesh);
};