This repository has been archived on 2020-09-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
libs/qglengine/widgets/primitiveeditor.h
Бычков Андрей bc33d99703 qglengine: direct primitive editor
git-svn-id: svn://db.shs.com.ru/libs@687 a8b55f48-bf90-11e4-a774-851b48703e85
2019-12-12 16:13:16 +00:00

51 lines
875 B
C++

#ifndef PRIMITIVEEDITOR_H
#define PRIMITIVEEDITOR_H
#include <QWidget>
#include "qglview.h"
namespace Ui {
class PrimitiveEditor;
}
class PrimitiveEditor : public QWidget {
Q_OBJECT
public:
enum PrimitiveType {
Plane,
Cube,
Ellipsoid,
Disc,
Cone,
Cylinder,
Torus
};
Q_ENUMS(PrimitiveType)
explicit PrimitiveEditor(QWidget *parent = nullptr);
~PrimitiveEditor();
void assignQGLView(QGLView * v);
protected:
Mesh * createMesh(QVariantList & params);
void showEditors();
Ui::PrimitiveEditor *ui;
QGLView * view;
QMap<PrimitiveType, QList<QWidget *> > editors;
QList<QWidget *> all_editors;
bool can_replace;
private slots:
void selectionChanged();
void replaceMesh();
void on_buttonAdd_clicked();
void on_comboPrimitives_currentIndexChanged(int index);
};
#endif // PRIMITIVEEDITOR_H