1 #pragma once 2 3 #ifndef TIMESTRETCHPOPUP_H 4 #define TIMESTRETCHPOPUP_H 5 6 #include "tgeometry.h" 7 8 #include "toonzqt/dvdialog.h" 9 #include "toonzqt/intfield.h" 10 11 // forward declaration 12 class QPushButton; 13 class QLabel; 14 class QComboBox; 15 class TSelection; 16 17 //============================================================================= 18 // TimeStretchPopup 19 //----------------------------------------------------------------------------- 20 21 class TimeStretchPopup final : public DVGui::Dialog { 22 Q_OBJECT 23 24 QPushButton *m_okBtn; 25 QPushButton *m_cancelBtn; 26 27 QComboBox *m_stretchType; 28 DVGui::IntLineEdit *m_newRangeFld; 29 QLabel *m_oldRange; 30 31 public: 32 enum STRETCH_TYPE { eRegion = 0, eFrameRange = 1, eWholeXsheet = 2 }; 33 34 private: 35 STRETCH_TYPE m_currentStretchType; 36 37 public: 38 TimeStretchPopup(); 39 40 protected: 41 void showEvent(QShowEvent *) override; 42 void hideEvent(QHideEvent *) override; 43 44 protected slots: 45 void setCurrentStretchType(int index); 46 void stretch(); 47 void updateValues(); 48 void updateValues(TSelection *selection); updateValues(TSelection * selection,TSelection * newSelection)49 void updateValues(TSelection *selection, TSelection *newSelection) { 50 updateValues(newSelection); 51 } 52 }; 53 54 #endif // TIMESTRETCHPOPUP_H 55