| #pragma once |
| |
| #ifndef FRAMENVIGATOR_H |
| #define FRAMENVIGATOR_H |
| |
| |
| #include "tcommon.h" |
| |
| |
| #include "toonzqt/intfield.h" |
| |
| |
| #include <QWidget> |
| #include <QToolBar> |
| |
| #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 TFrameHandle; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI FrameNavigator final : public QToolBar { |
| Q_OBJECT |
| |
| TFrameHandle *m_frameHandle; |
| |
| int m_frame; |
| DVGui::IntLineEdit *m_lineEdit; |
| |
| public: |
| FrameNavigator(QWidget *parent = 0); |
| ~FrameNavigator() {} |
| |
| int getFrame() const { return m_frame; } |
| |
| void setFrameHandle(TFrameHandle *); |
| |
| |
| |
| bool anyWidgetHasFocus(); |
| signals: |
| |
| void frameSwitched(); |
| |
| public slots: |
| |
| void setFrame( |
| int frame, |
| bool notifyFrameHandler); |
| |
| void prevFrame() { |
| setFrame(m_frame - 1, true); |
| } |
| void nextFrame() { setFrame(m_frame + 1, true); } |
| |
| protected: |
| void showEvent(QShowEvent *) override; |
| void hideEvent(QHideEvent *) override; |
| |
| void updateFrame(int frame); |
| |
| |
| protected slots: |
| |
| |
| |
| |
| |
| void onEditingFinished(); |
| |
| void onFrameSwitched(); |
| }; |
| |
| #endif |