| #pragma once |
| |
| #ifndef FUNCTIONTOOLBAR_INCLUDED |
| #define FUNCTIONTOOLBAR_INCLUDED |
| |
| |
| #include "tdoubleparam.h" |
| |
| |
| #include "toonzqt/lineedit.h" |
| |
| |
| #include <QToolBar> |
| #include <QAction> |
| |
| #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 TDoubleParam; |
| class TFrameHandle; |
| |
| namespace DVGui { |
| class MeasuredDoubleLineEdit; |
| } |
| |
| class FrameNavigator; |
| class FunctionKeyframeNavigator; |
| class FunctionSelection; |
| |
| |
| |
| namespace DVGui { |
| class ToolBar : public QToolBar { |
| public: |
| ToolBar(QWidget *parent = 0) : QToolBar(parent) { |
| setFixedHeight(22); |
| setIconSize(QSize(23, 17)); |
| } |
| }; |
| } |
| |
| |
| |
| |
| |
| class FunctionToolbar final : public DVGui::ToolBar, public TParamObserver { |
| Q_OBJECT |
| |
| QToolBar *m_valueToolbar, *m_keyframeToolbar; |
| |
| DVGui::MeasuredDoubleLineEdit *m_valueFld; |
| FrameNavigator *m_frameNavigator; |
| FunctionKeyframeNavigator *m_keyframeNavigator; |
| DVGui::LineEdit *m_stepFld; |
| |
| TDoubleParam *m_curve; |
| TFrameHandle *m_frameHandle; |
| |
| FunctionSelection *m_selection; |
| |
| |
| QAction |
| *m_valueFldAction; |
| QAction *m_keyframeNavigatorAction; |
| |
| |
| public: |
| FunctionToolbar(QWidget *parent = 0); |
| ~FunctionToolbar(); |
| |
| void setSelection(FunctionSelection *); |
| void setFrameHandle(TFrameHandle *frameHandle); |
| |
| void onChange(const TParamChange &) override; |
| |
| bool anyWidgetHasFocus(); |
| |
| signals: |
| |
| void numericalColumnToggled(); |
| |
| public slots: |
| |
| void setCurve(TDoubleParam *curve); |
| void setFrame(double frame); |
| |
| private slots: |
| |
| void onValueFieldChanged(); |
| void onFrameSwitched(); |
| void onNavFrameSwitched(); |
| void onSelectionChanged(); |
| }; |
| |
| #endif |