reimplemented zooming controls
This commit is contained in:
@@ -39,6 +39,14 @@ void PanelWidget::SetBorderVisible(bool enabled)
|
||||
update();
|
||||
}
|
||||
|
||||
void PanelWidget::ZoomIn()
|
||||
{
|
||||
}
|
||||
|
||||
void PanelWidget::ZoomOut()
|
||||
{
|
||||
}
|
||||
|
||||
void PanelWidget::SetTitle(const QString &t)
|
||||
{
|
||||
title_ = t;
|
||||
|
||||
@@ -46,6 +46,22 @@ public:
|
||||
* @param enabled
|
||||
*/
|
||||
void SetBorderVisible(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Called whenever this panel is focused and user uses "Zoom In" (either in menus or as a keyboard shortcut)
|
||||
*
|
||||
* This function is up to the Panel's interpretation of what the user intends to zoom into. Default behavior is a
|
||||
* no-op.
|
||||
*/
|
||||
virtual void ZoomIn();
|
||||
|
||||
/**
|
||||
* @brief Called whenever this panel is focused and user uses "Zoom Out" (either in menus or as a keyboard shortcut)
|
||||
*
|
||||
* This function is up to the Panel's interpretation of what the user intends to zoom out of. Default behavior is a
|
||||
* no-op.
|
||||
*/
|
||||
virtual void ZoomOut();
|
||||
protected:
|
||||
/**
|
||||
* @brief Set panel's title
|
||||
|
||||
@@ -98,7 +98,11 @@ void TimelineView::SetScale(const double &scale)
|
||||
QMapIterator<Block*, TimelineViewRect*> iterator(clip_items_);
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
iterator.value()->SetScale(scale_);
|
||||
iterator.next();
|
||||
|
||||
if (iterator.value() != nullptr) {
|
||||
iterator.value()->SetScale(scale_);
|
||||
}
|
||||
}
|
||||
|
||||
playhead_line_->SetScale(scale_);
|
||||
|
||||
@@ -69,7 +69,12 @@ void TimeRuler::SetTextVisible(bool e)
|
||||
update();
|
||||
}
|
||||
|
||||
void TimeRuler::SetScale(double d)
|
||||
const double &TimeRuler::scale()
|
||||
{
|
||||
return scale_;
|
||||
}
|
||||
|
||||
void TimeRuler::SetScale(const double &d)
|
||||
{
|
||||
scale_ = d;
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@ public:
|
||||
|
||||
void SetTextVisible(bool e);
|
||||
|
||||
void SetScale(double d);
|
||||
const double& scale();
|
||||
void SetScale(const double& d);
|
||||
|
||||
void SetTimebase(const rational& r);
|
||||
|
||||
|
||||
@@ -67,6 +67,16 @@ void ViewerWidget::SetTimebase(const rational &r)
|
||||
controls_->SetTimebase(r);
|
||||
}
|
||||
|
||||
const double &ViewerWidget::scale()
|
||||
{
|
||||
return ruler_->scale();
|
||||
}
|
||||
|
||||
void ViewerWidget::SetScale(const double &scale_)
|
||||
{
|
||||
ruler_->SetScale(scale_);
|
||||
}
|
||||
|
||||
void ViewerWidget::SetTexture(GLuint tex)
|
||||
{
|
||||
gl_widget_->SetTexture(tex);
|
||||
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
|
||||
void SetTimebase(const rational& r);
|
||||
|
||||
const double& scale();
|
||||
|
||||
void SetScale(const double& scale_);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @brief Set the texture to draw and draw it
|
||||
|
||||
Reference in New Issue
Block a user