Advertisement
FatalCatharsis

CentralPane.h

Apr 13th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef CENTRALPANE_H
  2. #define CENTRALPANE_H
  3.  
  4. #include <QVBoxLayout>
  5. #include <iostream>
  6. #include "PlotWidget.h"
  7. #include "TimeLine.h"
  8. #include "AnimationWidget.h"
  9. #include "common.h"
  10.  
  11. class CentralPane :
  12.     public QWidget
  13. {
  14.     Q_OBJECT
  15.  
  16. public:
  17.     CentralPane(std::vector<std::pair<Point, vanim::comp> >& points,
  18.                 QWidget * parent = 0);
  19.  
  20.     QSize minimumSizeHint() const;
  21.  
  22.     QSize sizeHint() const;
  23.  
  24.     void resizeEvent(QResizeEvent *);
  25.  
  26. signals:
  27.     void SelectionChanged();
  28.  
  29.     void setSelection(int);
  30.  
  31.     void editModeChanged(EDITOR_MODE);
  32.  
  33. public slots:
  34.     void setEditMode(EDITOR_MODE mode)
  35.     {
  36.         m_PlotWindow->setEditMode(mode);
  37.     }
  38.  
  39.     void setKeyFrameEditMode(KEYFRAME_MODE mode)
  40.     {
  41.         m_PlotWindow->setKeyFrameMode(mode);
  42.         m_Timeline->setKeyFrameMode(mode);
  43.     }
  44.  
  45.     void play(float d)
  46.     {
  47.         m_Timeline->play(d);
  48.     }
  49.  
  50. private slots:
  51.     void propSelectChanged()
  52.     {
  53.         emit SelectionChanged();
  54.     }
  55.  
  56.     void propSetSelection(int index)
  57.     {
  58.         emit setSelection(index);
  59.     }
  60.  
  61.     void propEditModeChanged(EDITOR_MODE mode)
  62.     {
  63.         emit propEditModeChanged(mode);
  64.     }
  65.  
  66. private:
  67.     QVBoxLayout * m_Layout;
  68.     PlotWindow * m_PlotWindow;
  69.     PlotWidget * m_PlotWidget;
  70.     TimeLine * m_Timeline;
  71.  
  72.     std::vector<std::pair<Point, vanim::comp> >& m_Points;
  73.     int m_Selection;
  74. };
  75.  
  76. #endif // CENTRALPANE_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement