| #pragma once |
| |
| #ifndef FUNCTIONVIEWER_H |
| #define FUNCTIONVIEWER_H |
| |
| |
| #include "tcommon.h" |
| |
| |
| #include "toonz/tframehandle.h" |
| |
| |
| #include "toonzqt/treemodel.h" |
| |
| |
| #include <QSplitter> |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TOONZQT_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| |
| |
| |
| |
| class TParam; |
| class TDoubleParam; |
| class TXsheetHandle; |
| class TObjectHandle; |
| class TFxHandle; |
| class TColumnHandle; |
| class TStageObject; |
| class TSceneHandle; |
| |
| class FrameNavigator; |
| class FunctionTreeView; |
| class FunctionPanel; |
| class FunctionSheet; |
| class FunctionKeyframeNavigator; |
| class FunctionSegmentViewer; |
| class FunctionToolbar; |
| class FunctionSelection; |
| |
| class QStackedWidget; |
| class QAction; |
| class QScrollArea; |
| class QSplitter; |
| |
| namespace DVGui { |
| class ValueField; |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI FunctionViewer final : public QSplitter { |
| Q_OBJECT |
| |
| public: |
| enum IoType { eSaveCurve, eLoadCurve, eExportCurve }; |
| |
| public: |
| #if QT_VERSION >= 0x050500 |
| FunctionViewer(QWidget *parent = 0, Qt::WindowFlags flags = 0); |
| #else |
| FunctionViewer(QWidget *parent = 0, Qt::WFlags flags = 0); |
| #endif |
| ~FunctionViewer(); |
| |
| void setXsheetHandle(TXsheetHandle *xshHandle); |
| |
| void setFrameHandle(TFrameHandle *frameHandle); |
| |
| |
| void setObjectHandle(TObjectHandle *objectHandle); |
| |
| |
| void setFxHandle(TFxHandle *fxHandle); |
| |
| void setColumnHandle(TColumnHandle *columnHandle); |
| |
| |
| |
| FunctionSelection *getSelection() const { return m_selection; } |
| |
| void openContextMenu(TreeModel::Item *item, const QPoint &globalPos); |
| |
| void addParameter(TParam *parameter, |
| const TFilePath &folder = TFilePath()); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| void setFocusColumnsOrGraph(); |
| void clearFocusColumnsAndGraph(); |
| bool columnsOrGraphHasFocus(); |
| void setSceneHandle(TSceneHandle *sceneHandle); |
| |
| signals: |
| |
| void curveChanged(); |
| void curveIo(int type, TDoubleParam *curve, const std::string &name); |
| void editObject(); |
| |
| public slots: |
| |
| void refreshModel(); |
| void rebuildModel(); |
| void onFrameSwitched(); |
| void toggleMode(); |
| void onValueFieldChanged(); |
| void onXsheetChanged(); |
| void onStageObjectSwitched(); |
| void onStageObjectChanged(bool isDragging = false); |
| void onFxSwitched(); |
| |
| void onCurveChanged(bool isDragging); |
| void onCurveSelected(TDoubleParam *); |
| void onSelectionChanged(); |
| |
| void doSwitchCurrentObject(TStageObject *obj); |
| void doSwitchCurrentFx(TFx *fx); |
| |
| |
| bool isExpressionPageActive(); |
| |
| private: |
| |
| |
| TXsheetHandle *m_xshHandle; |
| TFrameHandle *m_frameHandle; |
| TObjectHandle *m_objectHandle; |
| TFxHandle *m_fxHandle; |
| TColumnHandle *m_columnHandle; |
| TSceneHandle *m_sceneHandle; |
| |
| TFrameHandle |
| m_localFrame; |
| |
| |
| |
| FunctionTreeView *m_treeView; |
| FunctionToolbar *m_toolbar; |
| FunctionPanel *m_functionGraph; |
| FunctionSheet *m_numericalColumns; |
| FunctionSegmentViewer *m_segmentViewer; |
| |
| |
| |
| TDoubleParam *m_curve; |
| FunctionSelection *m_selection; |
| |
| private: |
| void showEvent(QShowEvent *) override; |
| void hideEvent(QHideEvent *) override; |
| |
| public: |
| void emitCurveChanged() { |
| emit curveChanged(); |
| } |
| void emitIoCurve(int type, TDoubleParam *curve, const std::string &name) { |
| emit curveIo(type, curve, name); |
| } |
| |
| private slots: |
| |
| void propagateExternalSetFrame(); |
| |
| }; |
| |
| #endif // FUNCTIONEDITORVIEWER_H |