#include <widgets.h>
An attribute widget for displaying and interacting with multiple curve editors.
See the CurveEditor class for more information about how the curve editor works. In addition to the basic functionality provided by the curve editor class, this widget allows for multiple curve editors to be linked together and updated by each other. It also has an additional option for "Snap" which allows the dragging of curve points along the grid lines of the curve editor. There is also a "Store" button which allows the user to store the curve in other Mudbox tools such as sculpt, falloff etc. Lastly, this widget includes an enlarge icon beside the curve editor which displays the same curve in a larger dialog and allows it to be resized to convenient editing.
Public Slots | |
void | OnChange (void) |
This method is called when the NURBSCurve in the curve editor changes. More... | |
void | Update (void) |
Updates the widget values from the attribute. More... | |
void | OnEnlarge (void) |
This method is is called when the user clicks on the enlarge icon on the widget. More... | |
void | StartUpdateCountdown (void) |
This method starts the timer on which the widget will calls its update method. More... | |
void | OnColorCorrectionClosing (void) |
This method sends out a signal which tells all the EnlargedCurveEditor widgets which are editing this widget's attribute to close. More... | |
Public Slots inherited from QWidget | |
void | setEnabled (bool) |
void | setDisabled (bool) |
void | setWindowModified (bool) |
void | setWindowTitle (const QString &) |
void | setStyleSheet (const QString &styleSheet) |
void | setFocus () |
void | update () |
void | repaint () |
virtual void | setVisible (bool visible) |
void | setHidden (bool hidden) |
void | show () |
void | hide () |
QT_MOC_COMPAT void | setShown (bool shown) |
void | showMinimized () |
void | showMaximized () |
void | showFullScreen () |
void | showNormal () |
bool | close () |
void | raise () |
void | lower () |
Public Slots inherited from QObject | |
void | deleteLater () |
Signals | |
void | ParentEditorInColorCorrectionClosing (void) |
This signal causes all other EnlargedCurveEditor widgets editing this widget's attribute to close. More... | |
Signals inherited from QWidget | |
void | customContextMenuRequested (const QPoint &pos) |
Signals inherited from QObject | |
void | destroyed (QObject *=0) |
Public Member Functions | |
AttributeCurveEditor (QWidget *pParent, int iWidth, acurveptr *pAttribute, bool bSnapAndStore, bool bInAdjustColor=false) | |
Constructor. More... | |
bool | EditorInAdjustColor () const |
Returns whether this widget is being used in the Adjust Color dialog. More... | |
void | ReplaceNurbsInEditor (NURBSCurve *pCurve) |
Call this in order to override the NURBSCurve being used in this widget with another one. More... | |
Public Member Functions inherited from AttributeWidget | |
AttributeWidget (QWidget *pParent, int iWidth, Attribute *pAttribute) | |
~AttributeWidget (void) | |
bool | Validate (void) |
virtual void | Update (void) |
virtual void | MoveValue (int, int) |
virtual void | MoveContent (int iStart, int iEnd, bool bVisibleValue) |
virtual void | ChangeWidth (int iWidth, bool bVisibleValue) |
Attribute * | GetAttribute (void) const |
Node * | GetNode (void) const |
Public Member Functions inherited from QWidget | |
QWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
~QWidget () | |
int | devType () const |
WId | winId () const |
void | createWinId () |
WId | internalWinId () const |
WId | effectiveWinId () const |
QStyle * | style () const |
void | setStyle (QStyle *) |
bool | isTopLevel () const |
bool | isWindow () const |
bool | isModal () const |
Qt::WindowModality | windowModality () const |
void | setWindowModality (Qt::WindowModality windowModality) |
bool | isEnabled () const |
bool | isEnabledTo (QWidget *) const |
bool | isEnabledToTLW () const |
QRect | frameGeometry () const |
const QRect & | geometry () const |
QRect | normalGeometry () const |
int | x () const |
int | y () const |
QPoint | pos () const |
QSize | frameSize () const |
QSize | size () const |
int | width () const |
int | height () const |
QRect | rect () const |
QRect | childrenRect () const |
QRegion | childrenRegion () const |
QSize | minimumSize () const |
QSize | maximumSize () const |
int | minimumWidth () const |
int | minimumHeight () const |
int | maximumWidth () const |
int | maximumHeight () const |
void | setMinimumSize (const QSize &) |
void | setMinimumSize (int minw, int minh) |
void | setMaximumSize (const QSize &) |
void | setMaximumSize (int maxw, int maxh) |
void | setMinimumWidth (int minw) |
void | setMinimumHeight (int minh) |
void | setMaximumWidth (int maxw) |
void | setMaximumHeight (int maxh) |
QSize | sizeIncrement () const |
void | setSizeIncrement (const QSize &) |
void | setSizeIncrement (int w, int h) |
QSize | baseSize () const |
void | setBaseSize (const QSize &) |
void | setBaseSize (int basew, int baseh) |
void | setFixedSize (const QSize &) |
void | setFixedSize (int w, int h) |
void | setFixedWidth (int w) |
void | setFixedHeight (int h) |
QPoint | mapToGlobal (const QPoint &) const |
QPoint | mapFromGlobal (const QPoint &) const |
QPoint | mapToParent (const QPoint &) const |
QPoint | mapFromParent (const QPoint &) const |
QPoint | mapTo (QWidget *, const QPoint &) const |
QPoint | mapFrom (QWidget *, const QPoint &) const |
QWidget * | window () const |
QWidget * | nativeParentWidget () const |
QWidget * | topLevelWidget () const |
const QPalette & | palette () const |
void | setPalette (const QPalette &) |
void | setBackgroundRole (QPalette::ColorRole) |
QPalette::ColorRole | backgroundRole () const |
void | setForegroundRole (QPalette::ColorRole) |
QPalette::ColorRole | foregroundRole () const |
const QFont & | font () const |
void | setFont (const QFont &) |
QFontMetrics | fontMetrics () const |
QFontInfo | fontInfo () const |
QCursor | cursor () const |
void | setCursor (const QCursor &) |
void | unsetCursor () |
void | setMouseTracking (bool enable) |
bool | hasMouseTracking () const |
bool | underMouse () const |
void | setMask (const QBitmap &) |
void | setMask (const QRegion &) |
QRegion | mask () const |
void | clearMask () |
void | render (QPaintDevice *target, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren)) |
void | render (QPainter *painter, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren)) |
QGraphicsEffect * | graphicsEffect () const |
void | setGraphicsEffect (QGraphicsEffect *effect) |
void | grabGesture (Qt::GestureType type, Qt::GestureFlags flags=Qt::GestureFlags()) |
void | ungrabGesture (Qt::GestureType type) |
QString | styleSheet () const |
QString | windowTitle () const |
void | setWindowIcon (const QIcon &icon) |
QIcon | windowIcon () const |
void | setWindowIconText (const QString &) |
QString | windowIconText () const |
void | setWindowRole (const QString &) |
QString | windowRole () const |
void | setWindowFilePath (const QString &filePath) |
QString | windowFilePath () const |
void | setWindowOpacity (qreal level) |
qreal | windowOpacity () const |
bool | isWindowModified () const |
void | setToolTip (const QString &) |
QString | toolTip () const |
void | setStatusTip (const QString &) |
QString | statusTip () const |
void | setWhatsThis (const QString &) |
QString | whatsThis () const |
QString | accessibleName () const |
void | setAccessibleName (const QString &name) |
QString | accessibleDescription () const |
void | setAccessibleDescription (const QString &description) |
void | setLayoutDirection (Qt::LayoutDirection direction) |
Qt::LayoutDirection | layoutDirection () const |
void | unsetLayoutDirection () |
void | setLocale (const QLocale &locale) |
QLocale | locale () const |
void | unsetLocale () |
bool | isRightToLeft () const |
bool | isLeftToRight () const |
bool | isActiveWindow () const |
void | activateWindow () |
void | clearFocus () |
void | setFocus (Qt::FocusReason reason) |
Qt::FocusPolicy | focusPolicy () const |
void | setFocusPolicy (Qt::FocusPolicy policy) |
bool | hasFocus () const |
void | setFocusProxy (QWidget *) |
QWidget * | focusProxy () const |
Qt::ContextMenuPolicy | contextMenuPolicy () const |
void | setContextMenuPolicy (Qt::ContextMenuPolicy policy) |
void | grabMouse () |
void | grabMouse (const QCursor &) |
void | releaseMouse () |
void | grabKeyboard () |
void | releaseKeyboard () |
int | grabShortcut (const QKeySequence &key, Qt::ShortcutContext context=Qt::WindowShortcut) |
void | releaseShortcut (int id) |
void | setShortcutEnabled (int id, bool enable=true) |
void | setShortcutAutoRepeat (int id, bool enable=true) |
bool | updatesEnabled () const |
void | setUpdatesEnabled (bool enable) |
QGraphicsProxyWidget * | graphicsProxyWidget () const |
void | update (int x, int y, int w, int h) |
void | update (const QRect &) |
void | update (const QRegion &) |
void | repaint (int x, int y, int w, int h) |
void | repaint (const QRect &) |
void | repaint (const QRegion &) |
void | stackUnder (QWidget *) |
void | move (int x, int y) |
void | move (const QPoint &) |
void | resize (int w, int h) |
void | resize (const QSize &) |
void | setGeometry (int x, int y, int w, int h) |
void | setGeometry (const QRect &) |
QByteArray | saveGeometry () const |
bool | restoreGeometry (const QByteArray &geometry) |
void | adjustSize () |
bool | isVisible () const |
bool | isVisibleTo (QWidget *) const |
bool | isHidden () const |
bool | isMinimized () const |
bool | isMaximized () const |
bool | isFullScreen () const |
Qt::WindowStates | windowState () const |
void | setWindowState (Qt::WindowStates state) |
void | overrideWindowState (Qt::WindowStates state) |
virtual QSize | minimumSizeHint () const |
QSizePolicy | sizePolicy () const |
void | setSizePolicy (QSizePolicy) |
void | setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical) |
virtual int | heightForWidth (int) const |
QRegion | visibleRegion () const |
void | setContentsMargins (int left, int top, int right, int bottom) |
void | setContentsMargins (const QMargins &margins) |
void | getContentsMargins (int *left, int *top, int *right, int *bottom) const |
QMargins | contentsMargins () const |
QRect | contentsRect () const |
QLayout * | layout () const |
void | setLayout (QLayout *) |
void | updateGeometry () |
void | setParent (QWidget *parent) |
void | setParent (QWidget *parent, Qt::WindowFlags f) |
void | scroll (int dx, int dy) |
void | scroll (int dx, int dy, const QRect &) |
QWidget * | focusWidget () const |
QWidget * | nextInFocusChain () const |
QWidget * | previousInFocusChain () const |
bool | acceptDrops () const |
void | setAcceptDrops (bool on) |
void | addAction (QAction *action) |
void | addActions (QList< QAction * > actions) |
void | insertAction (QAction *before, QAction *action) |
void | insertActions (QAction *before, QList< QAction * > actions) |
void | removeAction (QAction *action) |
QList< QAction * > | actions () const |
QWidget * | parentWidget () const |
void | setWindowFlags (Qt::WindowFlags type) |
Qt::WindowFlags | windowFlags () const |
void | overrideWindowFlags (Qt::WindowFlags type) |
Qt::WindowType | windowType () const |
QWidget * | childAt (int x, int y) const |
QWidget * | childAt (const QPoint &p) const |
const QX11Info & | x11Info () const |
Qt::HANDLE | x11PictureHandle () const |
Qt::HANDLE | handle () const |
void | setAttribute (Qt::WidgetAttribute, bool on=true) |
bool | testAttribute (Qt::WidgetAttribute) const |
QPaintEngine * | paintEngine () const |
void | ensurePolished () const |
QInputContext * | inputContext () |
void | setInputContext (QInputContext *) |
bool | isAncestorOf (const QWidget *child) const |
bool | autoFillBackground () const |
void | setAutoFillBackground (bool enabled) |
void | setWindowSurface (QWindowSurface *surface) |
QWindowSurface * | windowSurface () const |
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery) const |
Qt::InputMethodHints | inputMethodHints () const |
void | setInputMethodHints (Qt::InputMethodHints hints) |
Public Member Functions inherited from QObject | |
Q_INVOKABLE | QObject (QObject *parent=0) |
virtual | ~QObject () |
QString | objectName () const |
void | setObjectName (const QString &name) |
bool | isWidgetType () const |
bool | signalsBlocked () const |
bool | blockSignals (bool b) |
QThread * | thread () const |
void | moveToThread (QThread *thread) |
int | startTimer (int interval) |
void | killTimer (int id) |
template<typename T > | |
T | findChild (const QString &aName=QString()) const |
template<typename T > | |
QList< T > | findChildren (const QString &aName=QString()) const |
template<typename T > | |
QList< T > | findChildren (const QRegExp &re) const |
const QObjectList & | children () const |
void | setParent (QObject *) |
void | installEventFilter (QObject *) |
void | removeEventFilter (QObject *) |
bool | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0) |
bool | disconnect (const QObject *receiver, const char *member=0) |
void | dumpObjectTree () |
void | dumpObjectInfo () |
bool | setProperty (const char *name, const QVariant &value) |
QVariant | property (const char *name) const |
QList< QByteArray > | dynamicPropertyNames () const |
void | setUserData (uint id, QObjectUserData *data) |
QObjectUserData * | userData (uint id) const |
QObject * | parent () const |
bool | inherits (const char *classname) const |
Public Member Functions inherited from QPaintDevice | |
virtual | ~QPaintDevice () |
bool | paintingActive () const |
int | width () const |
int | height () const |
int | widthMM () const |
int | heightMM () const |
int | logicalDpiX () const |
int | logicalDpiY () const |
int | physicalDpiX () const |
int | physicalDpiY () const |
int | colorCount () const |
int | depth () const |
Public Member Functions inherited from Node | |
Node (const QString &sStringID="", const QString &sDisplayName="") | |
Standard constructor. More... | |
virtual | ~Node (void) |
virtual void | Initialize (void) |
void | LoadTemplate (const QString &sFileName="", bool bStartEvent=false) |
Use an external XML file to initialize the attributes. More... | |
void | SaveTemplate (const QString &sFileName="", bool bSaveOnlyVisible=false) |
Save current attributes as an XML template. More... | |
unsigned int | Version (void) const |
Returns the current version of the node. This number increases when the content of the node changed (when ContentChanged() called). More... | |
void | SetVersion (unsigned int iVersion) |
Sets the current version number for the node. More... | |
unsigned int | ReferenceCount (void) const |
Returns the number of pointers referencing this node. More... | |
Attribute * | ReferencePointer (unsigned int iIndex) const |
Returns the address of an attribute which refers to this node. The type of the attribute is always aptr. More... | |
Node * | ReferenceNode (unsigned int iIndex) const |
Returns the address of a node referencing this node. More... | |
virtual QString | Name (const ClassDesc *pClass=0) const |
Deprecated. More... | |
virtual void | SetName (const QString &sName) |
Deprecated. More... | |
virtual QString | StringID (const ClassDesc *pClass=0) const |
Returns the string id of the node. More... | |
virtual void | SetStringID (const QString &sStringID) |
Sets the string id of the node. More... | |
virtual QString | DisplayName (void) const |
Returns the display name of the node. More... | |
virtual void | SetDisplayName (const QString &sDisplayName) |
Sets the display name of the node. More... | |
virtual QString | HelpID (void) const |
Returns the help entry id of the node. Can be overwritten in derived classes. More... | |
virtual void | SetHelpID (const QString &sHelpID) |
Sets the help entry id of the node. More... | |
void | Annex (Node *pSource, const QString &sCategory="") |
Relink all the attributes of the source node to this one. More... | |
virtual void | Serialize (Stream &s) |
Serializes the node. More... | |
bool | IsKindOf (const ClassDesc *pClass) const |
Returns true if this node is derived from the pClass class. More... | |
void | ContentChanged (void) const |
This function must be called if the content of the node is changed. More... | |
virtual void | CheckValidity (DiagnosticLevel iLevel=dgnLevel2) const |
Checks the validity of this node. More... | |
virtual void | CopyTo (Node *pNode) const |
virtual Node * | Duplicate (void) const |
virtual void | OnEvent (const EventGate &cEvent) |
This function is called when a generic event occurs. See EventGate class. More... | |
void | RequestDeferredEvent (Attribute &cAttribute) |
Request for a deferred event, which will occur only in the main loop. More... | |
unsigned int | AttributeCount (void) const |
Returns the number of attributes owned by the node. More... | |
Attribute * | AttributeByIndex (int iIndex) const |
Returns a specified attribute (or 0 if iIndex is greater than the number of attributes). More... | |
Attribute * | AttributeByName (const QString &sName) const |
Returns a specified attribute by its name. Returns 0 if the attribute not found. More... | |
Attribute * | AttributeByID (const QString &sID) const |
Returns a specified attribute by its ID. Returns 0 if the attribute not found. More... | |
void | SetAttributeValue (const QString &sAttributeID, const QString &sNewValue) |
Set the value of an attribute from a string. More... | |
QString | AttributeValue (const QString &sAttributeID) const |
Returns the current value of an attribute as a string. More... | |
void | LogAttributes (void) const |
Write all attributes into the log file. More... | |
virtual QWidget * | CreatePropertiesWindow (QWidget *pParent) |
Create a window which displays the attributes of the node. Can be overriden to provide a custom interface. More... | |
Attribute * | AddAttribute (Attribute::AttributeType type, const QString &id) |
Allows SDK users to add attributes at runtime. More... | |
Node * | Next (void) const |
Returns the next node in the chain. Used to enumerate the current nodes. See also First(). More... | |
int | ID (void) const |
Returns an ID for the node. The ID is unique in the whole application life. More... | |
bool | SetID (int iID) |
Set ID for the node. More... | |
Protected Attributes | |
QPushButton * | m_pStoreF |
CurveEditor * | m_pCurveEditor |
Protected Attributes inherited from AttributeWidget | |
QLabel | m_cLabel |
QHBoxLayout | m_cMainLayout |
QHBoxLayout * | m_pValueLayout |
QHBoxLayout * | m_pValueStretchLayout |
QWidget | m_cValue |
float | m_fLabelWidth |
int | m_iHeight |
bool | m_bLeftAlignedName |
Protected Attributes inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Protected Attributes inherited from QPaintDevice | |
ushort | painters |
AttributeCurveEditor | ( | QWidget * | pParent, |
int | iWidth, | ||
acurveptr * | pAttribute, | ||
bool | bSnapAndStore, | ||
bool | bInAdjustColor = false |
||
) |
Constructor.
[in] | pParent | The parent widget which will hold this attribute widget. |
[in] | iWidth | The desired width of the widget. |
[in] | pAttribute | The attribute curve pointer which this widget is attached to. |
[in] | bSnapAndStore | True if the Snap and Store widgets should be displayed. |
[in] | bInAdjustColor | True if the attribute widget is being used in the Adjust Color Dialog. |
Reimplemented from QObject.
|
inline |
|
inline |
Call this in order to override the NURBSCurve being used in this widget with another one.
This is useful for cases such as buttons which can reset the NURBSCurve currently used in the widget. You must call the NurbsValueChanged function on the CurveEditor used in this widget afterwards. For example, this would be a typical call sequence, where pA is a pointer to an AttributeCurveEditor: NURBSCurve p = new NURBSCurve(3); pACE->ReplaceNurbsInEditor(p); CurveEditor pCurveEditor = static_cast<CurveEditor*>(pAW->findChild<QFrame *>); pCurveEditor->NurbsValueChanged();
Definition at line 561 of file widgets.h.
This method is called when the NURBSCurve in the curve editor changes.
This method is is called when the user clicks on the enlarge icon on the widget.
This method starts the timer on which the widget will calls its update method.
This method sends out a signal which tells all the EnlargedCurveEditor widgets which are editing this widget's attribute to close.
This is only called when this widget is used in the AdjustColorDialog.
This signal causes all other EnlargedCurveEditor widgets editing this widget's attribute to close.
|
protected |
|
protected |