![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2007 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: newEntityDialog.h,v $ $Revision: 1.2 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00012 #ifndef DTNEWENTITYDIALOG_H_ 00013 #define DTNEWENTITYDIALOG_H_ 00014 00015 #include <QtGui/QDialog> 00016 #include <vrfExtProtocol/objType.h> 00017 #include <QtGui/QValidator> 00018 00019 class DtBehaviorUi; 00020 class QComboBox; 00021 class QLineEdit; 00022 00023 #include "entityEditorImpl/entityEditorImplDefines.h" 00024 00025 class DT_DLL_entityeditorimpl DtNameValidator : public QValidator 00026 { 00027 public: 00028 DtNameValidator(QObject* parent); 00029 virtual ~DtNameValidator(); 00030 00031 virtual State validate(QString &, int &) const; 00032 }; 00033 00034 class DT_DLL_entityeditorimpl DtNewEntityDialog : public QDialog 00035 { 00036 Q_OBJECT 00037 00038 public: 00039 DtNewEntityDialog(QWidget* parent, const Qt::WindowFlags& f = 0); 00040 00041 virtual bool init(DtBehaviorUi*, const QString& defaultCategory = ""); 00042 00043 virtual QString parameterType() const; 00044 virtual DtObjectType objectType() const; 00045 00046 virtual QString name() const; 00047 00048 static DtNewEntityDialog* create(QWidget* p = NULL); 00049 00050 protected: 00051 virtual void accept(); 00052 00053 protected: 00054 QComboBox* myCategories; 00055 QLineEdit* myName; 00056 DtBehaviorUi* myBehaviorUi; 00057 DtNameValidator myNameValidator; 00058 }; 00059 00060 #endif