Commit ae2ff16e authored by Jan Möbius's avatar Jan Möbius

Multi View updates to Core widget

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4299 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8ad14281
......@@ -133,21 +133,19 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
stackedWidget_->addWidget(examinerWidget);
examiner_widget_ = examinerWidget;
} else {
// Create collector widget which holds all viewers
tmp = new QWidget(stackedWidget_);
// Create master examiner widget
examiner_widget_ = new ACG::QtWidgets::QtExaminerViewer(tmp,
"Examiner Widget",
statusBar_ ,
&format,
0,
ACG::QtWidgets::QtExaminerViewer::Nothing);
examiner_widgets_.push_back(examiner_widget_);
ACG::QtWidgets::QtExaminerViewer* examinerWidget = new ACG::QtWidgets::QtExaminerViewer(tmp,
"Examiner Widget",
statusBar_ ,
&format,
0,
ACG::QtWidgets::QtExaminerViewer::Nothing);
examiner_widgets_.push_back(examinerWidget);
// Create all other examiners using the same gl context as the others
......@@ -156,7 +154,7 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
"Examiner Widget",
statusBar_ ,
&format,
examiner_widget_,
examinerWidget,
ACG::QtWidgets::QtExaminerViewer::Nothing);
examiner_widgets_.push_back(newWidget);
}
......@@ -186,18 +184,15 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
// ======================================================================
// Setup dragging for examiner widget
// ======================================================================
examiner_widget_->setExternalDrag(true);
connect( examiner_widget_, SIGNAL(startDragEvent( QMouseEvent*)),
this, SLOT(startDrag(QMouseEvent* )));
connect( examiner_widget_, SIGNAL(dragEnterEvent( QDragEnterEvent*)),
this, SLOT(dragEnterEvent(QDragEnterEvent* )));
connect( examiner_widget_, SIGNAL(dropEvent( QDropEvent*)),
this, SLOT(dropEvent(QDropEvent* )));
if ( OpenFlipper::Options::multiView() ) {
// TODO: Check drag and drop for multiview
std::cerr << "Todo : Check drag and drop for multiview" << std::endl;
for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
examiner_widgets_[i]->setExternalDrag(true);
connect( examiner_widgets_[i], SIGNAL(startDragEvent( QMouseEvent*)),
this, SLOT(startDrag(QMouseEvent* )));
connect( examiner_widgets_[i], SIGNAL(dragEnterEvent( QDragEnterEvent*)),
this, SLOT(dragEnterEvent(QDragEnterEvent* )));
connect( examiner_widgets_[i], SIGNAL(dropEvent( QDropEvent*)),
this, SLOT(dropEvent(QDropEvent* )));
}
......@@ -220,8 +215,6 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
for ( unsigned int i = 1 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
examiner_widgets_[i]->removeToolBar();
examiner_widgets_[i]->removeToolBar();
examiner_widgets_[i]->removeToolBar();
}
addToolBar(Qt::TopToolBarArea,viewerToolbar_);
......
......@@ -337,9 +337,6 @@ public:
/// Examiner Widget
std::vector< ACG::QtWidgets::QtExaminerViewer* > examiner_widgets_;
/// temporary pointer pointing to first element of above vector for porting to multi view mode
ACG::QtWidgets::QtExaminerViewer* examiner_widget_;
///Spliter between toplevel objects and the textedit at the bottom
QSplitter* splitter_;
......@@ -429,6 +426,12 @@ public:
/// Copy view from the last active examiner
void slotCopyView( );
/// Create a snapshot of the last active examiner
void slotSnapshot();
/// Set the snapShot name for all examiners
void slotSnapshotName();
private :
/** Update the contextmenu for the given position inside an examiner widget
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment