#ifndef qtForms_h
#define qtForms_h
#include <QtWidgets/QDialog>
#include <QtCore/QPointer>
#include <maya/MPxCommand.h>
#include <ui_cubeForm.h>
class QComboBox;
class CubeCreator : public QDialog, private Ui::CubeForm
{
Q_OBJECT
public:
CubeCreator(QWidget* parent = 0);
signals:
void dialogDismissed();
void objectCreated(const QString& objectName);
private slots:
void accept();
void fieldChanged(const QString& newValue);
void sliderChanged(int newValue);
private:
double fCurValue;
};
class SphereCreator : public QWidget
{
Q_OBJECT
public:
SphereCreator(QWidget* parent = 0);
signals:
void dialogDismissed();
void objectCreated(const QString& objectName);
private slots:
void accept();
void fieldChanged(const QString& newValue);
void sliderChanged(int newValue);
private:
QDialogButtonBox* fButtonBox;
double fCurValue;
QLineEdit* fField;
QPointer<QWidget> fForm;
QSlider* fSlider;
};
class ObjectTypeDialog : public QDialog
{
Q_OBJECT
public:
ObjectTypeDialog(QWidget* parent = 0);
virtual ~ObjectTypeDialog();
public slots:
void displayObjectDialog(const QString& item);
void resetSelector();
private:
QPointer<QObject> fCurrentDialog;
QLineEdit* fMostRecentField;
QComboBox* fSelectObjList;
float fOffset;
};
{
public:
static void cleanup();
static void* creator() { return new qtFormsCmd(); }
static QPointer<ObjectTypeDialog> objectCreator;
};
#endif