コード例 #1
0
ファイル: timelinewidget.cpp プロジェクト: bsmr-opengl/voreen
void TimelineWidget::rebuildAnimation(Animation* animation) {
    animation_ = animation;
    animation_->addObserver(this);
    for(size_t i= 0; i < processorTimelineWidgets_.size(); ++i ) {
        if(processorTimelineWidgets_.at(i)->getAnimatedProcessor() != 0) {
            processorTimelineWidgets_.at(i)->hide();
            processorTimelineWidgets_.at(i)->setEnabled(false);
            processorTimelineWidgets_.at(i)->setFixedHeight(0);
            processorTimelineWidgets_.at(i)->deleteLater();
        }
    }
    for(size_t i= 0; i < processorTimelineWidgets_.size(); i++ ) {
        processorTimelineWidgets_.pop_back();
    }
    processorTimelineWidgets_.clear();
    populateProcessors();

    overviewTimeline_->setStandardRenderport();
    overviewTimeline_->reset();
    emit setAnimationEditorDuration(static_cast<int>(animation_->getDuration() * 30.0f));
    emit(resizeSignal(scrollArea_->width()));
    if (!animation_->isEmpty()) {
        emit showActiveTimelines();
        overviewTimeline_->renderPreviews();
    }

}
コード例 #2
0
ファイル: viewclient.cpp プロジェクト: js08k/vworld
ViewClient::ViewClient(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::ViewClient)
{
    ui->setupUi(this);

    Scene *scene = new Scene( this );
    connect( this, SIGNAL(resizeSignal()), scene, SLOT(resize()) );

    ClearContainer *design = new ClearContainer( scene );
    design->setMaximumWidth( 60 );
}
コード例 #3
0
void MiniViewContainer::setView(QGraphicsView * view)
{
	QGraphicsView * oldView = m_miniView->view();
	if (oldView == view) return;

	if (oldView != NULL) {
		disconnect(oldView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateFrame()));
		disconnect(oldView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateFrame()));
		disconnect(oldView->scene(), SIGNAL(sceneRectChanged(QRectF)), this, SLOT(updateFrame()));
		disconnect(oldView, SIGNAL(resizeSignal()), this, SLOT(updateFrame()));
		disconnect(m_frame, SIGNAL(scrollChangeSignal(double, double)), oldView, SLOT(navigatorScrollChange(double, double)));
	}
コード例 #4
0
ファイル: viewclient.cpp プロジェクト: js08k/vworld
void ViewClient::resizeEvent(QResizeEvent *event)
{
    QWidget::resizeEvent( event );
    emit resizeSignal();
}
コード例 #5
0
	if (oldView != NULL) {
		disconnect(oldView->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateFrame()));
		disconnect(oldView->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateFrame()));
		disconnect(oldView->scene(), SIGNAL(sceneRectChanged(QRectF)), this, SLOT(updateFrame()));
		disconnect(oldView, SIGNAL(resizeSignal()), this, SLOT(updateFrame()));
		disconnect(m_frame, SIGNAL(scrollChangeSignal(double, double)), oldView, SLOT(navigatorScrollChange(double, double)));
	}

	m_miniView->setView(view);
	updateFrame();

	bool succeeded = connect(view->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateFrame()));
	succeeded = connect(view->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateFrame()));
	succeeded = connect(view->scene(), SIGNAL(sceneRectChanged(QRectF)), this, SLOT(updateFrame()));
	succeeded = connect(view, SIGNAL(resizeSignal()), this, SLOT(updateFrame()));
	succeeded = connect(m_frame, SIGNAL(scrollChangeSignal(double, double)), view, SLOT(navigatorScrollChange(double, double)));

	forceResize();
}

void MiniViewContainer::forceResize() {
	// force a resize on a view change because otherwise some size or sceneRect isn't updated and the navigator is off
	m_miniView->resize(this->size() / 2.0);
	m_miniView->resize(this->size());
}

void MiniViewContainer::resizeEvent ( QResizeEvent * event )
{
	QWidget::resizeEvent(event);
	m_miniView->resize(this->size());
コード例 #6
0
ファイル: timelinewidget.cpp プロジェクト: bsmr-opengl/voreen
void TimelineWidget::resizeEvent(QResizeEvent* event) {
    emit(resizeSignal(scrollArea_->width()));
    QWidget::resizeEvent(event);
}