14 #ifndef __MUDBOXSDK_WIDGETS_H__
15 #define __MUDBOXSDK_WIDGETS_H__
21 #include <QtCore/QObject>
22 #include <QtCore/QFileInfo>
23 #include <QtCore/QMap>
24 #include <QtCore/QSignalMapper>
25 #include <QtGui/QWidget>
26 #include <QtGui/QLabel>
27 #include <QtGui/QLineEdit>
28 #include <QtGui/QCheckBox>
29 #include <QtGui/QPushButton>
30 #include <QtGui/QSlider>
31 #include <QtGui/QMouseEvent>
32 #include <QtGui/QSpinBox>
33 #include <QtGui/QComboBox>
34 #include <QtGui/QGroupBox>
35 #include <QtGui/QFrame>
36 #include <QtGui/QToolButton>
37 #include <QtGui/QHBoxLayout>
38 #include <QtGui/QGridLayout>
39 #include <QtGui/QButtonGroup>
40 #include <QtGui/QTabBar>
41 #include <QtGui/QDialog>
42 #include <QtCore/QTimer>
53 #define MAX_CURVE_POINTS 64
80 void popupClosed(
int);
104 void SetImage(
const QString &sFileName );
108 void UpdateImage(
void );
117 QSize sizeHint(
void )
const;
132 bool Validate(
void );
135 virtual void MoveContent(
int iStart,
int iEnd,
bool bVisibleValue );
136 virtual void ChangeWidth(
int iWidth,
bool bVisibleValue );
153 void OnChange(
void );
169 void OnChange(
void );
185 void OnChange(
void );
186 void OnEditFinished(
void );
193 void MoveValue(
int iStart,
int iEnd );
197 unsigned int m_iWidth;
220 void OnChange(
int iState );
235 void OnColorChanged(
const QColor&);
255 setValue( (
int)(1000*(pA->
Value()-pA->
Min())/(pA->
Max()-pA->
Min())) );
259 Slider(
QWidget *pParent ) :
QSlider( pParent ) { m_pOwner = 0; };
263 bool m_bLock, m_bSliderLock;
282 m_iDigitCount = iDigitCount;
285 QString textFromValue (
int v )
const
288 while ( s.
length() < m_iDigitCount )
305 void OnChange(
int );
324 void OnActivate(
int );
325 void OnFinished(
int );
343 void OnActivate(
int );
358 void OnBrowse(
void );
386 void OnAction(
void );
394 bool m_bNullStringInserted;
398 public slots:
void OnChange(
int );
413 void OnChange(
int iState );
433 void OnChange(
void );
453 void OnChange(
void );
460 CPBox(
int iIndex,
QWidget *pParent = 0,
const char *sName = 0 );
466 QSize sizeHint(
void )
const;
475 void SelectCP(
CPBox *pCP );
476 void DeleteCP(
void );
477 void AddCP(
float x,
float y );
478 void Init(
void *pCurve = 0 );
479 void SetFixedSize(
int w,
int h);
481 void NurbsValueChanged();
489 void nurbsValueChanged();
490 void CurveReadyToBeApplied();
493 QSize sizeHint(
void )
const;
500 void keyReleaseEvent (
QKeyEvent *pEvent );
501 int CanvasToScreenX(
float f );
502 int CanvasToScreenY(
float f );
503 float ScreenToCanvasX(
int i );
504 float ScreenToCanvasY(
int i );
511 void ComputeDeleteCoordinates();
512 bool IsPointNear(
const QPoint& pos);
513 int IndexOfClosestPoint(
const QPoint& post);
515 bool m_bIsDragging, m_bReadOnly, m_bIsPointAddable, m_bIsPointDeletable;
516 int m_iSnapDistance, m_iNumBoxes, m_iDeleteIndex;
517 float m_fGridSizeX, m_fGridSizeY, m_fStep;
518 QCursor m_addCursor, m_deleteCursor;
519 QRect m_CurveDisplayBoundary, m_DeleteDisplayBoundary;
547 bool bInAdjustColor =
false
565 void OnChange(
void );
571 void OnEnlarge(
void);
574 void StartUpdateCountdown(
void);
579 void OnColorCorrectionClosing(
void);
583 void ParentEditorInColorCorrectionClosing(
void);
587 bool m_bIsUpdatingTargets, m_bUsedInAdjustColor;
606 void CurveSelected(
int iIndex );
614 void changeEvent (
QEvent *pEvent );
629 void UpdateImage(
void );
630 bool LoadImage(
const QString &imgFileName);
656 void OnChange(
void );
657 void OnRotate(
void );
678 void OnChange(
int );
681 void ShowMirrorAxis(
int );
692 void SetHelpID(
const QString & sID );
QVector< QLineEdit * > m_aEditBox
This attribute represents a float value which has a minimum and a maximum value.
A widget used to display and alter the value for a bool collection attribute.
void Init(void *pCurve=0)
MirrorComboBox(QWidget *parent=0, const char *name=0)
Constructor (the same as QComboBox)
Qt::MouseButton button() const
A widget used to display and alter the value for an image attribute.
A widget which is used to display and alter the value for a texture attribu.
const ClassDesc * m_pType
A widget which is used to display and alter the value for a bool attribute.
This is the base class for most classes in the Mudbox SDK.
QPushButton m_cBrowseButton
NodeEventType
Possible event types when Node::OnNodeEvent is called.
bool EditorInAdjustColor() const
Returns whether this widget is being used in the Adjust Color dialog.
A fake attribute used to watch an attribute in your class which is not a member.
This attribute is a collection of bools.
A widget which is used to display and alter some values for a bool attribute.
This dialog allows an AttributeCurveEditor to be resizable in order to manipulate its curve more easi...
QVector< QSlider * > m_aSlider
This is a generic attribute which can be used instead of the standard built in types.
This structure represents and describes a class.
A widget used to display and alter the value for a filename attribute.
A widget which used to display and alter the value for a float range attribute.
MirrorComboBox is a QComboBox that emits a signal when it loses keyboard focus.
A widget used to display and alter the value for a four dimensional vector attribute.
This class represents an event receiver/triggerer point.
const type & Value(void) const
Returns the value of the attribute.
A widget used to display and alter the value for a pointer attribute.
~MirrorComboBox()
Destructor.
void SetMin(float fValue)
void ReplaceNurbsInEditor(NURBSCurve *pCurve)
Call this in order to override the NURBSCurve being used in this widget with another one...
Similar to AttributeInstance but it provides a button on the interface where the user can bro...
A widget which is used to display and alter the value for a bool attribute.
int int int int int int h
GLuint const GLchar * name
Class: ConvolutionKernel.
This is an abstract base structure for all attributes.
QVector< QLabel * > m_aLabel
A widget used to display and alter the value for an enum attribute.
CurveEditor * m_pCurveEditor
static QString number(int, int base=10)
GLubyte GLubyte GLubyte GLubyte w
This attribute is very similar to the aint type but on the user interface it will be displayed as a c...
void focusOutEvent(QFocusEvent *)
This QWidget method is overridden here to emit the "departed" signal.
An attribute widget for displaying and interacting with multiple curve editors.
This class can be used instead of standard pointers, when the pointer target class is derived from th...
void SetMax(float fValue)