Commit 0746dabf authored by Jan Möbius's avatar Jan Möbius

Introduced double viewer layout

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12361 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 61a3e30c
......@@ -989,9 +989,12 @@ void Core::multiViewMode( int _mode ) {
PluginFunctions::setActiveExaminer(0);
break;
case 1:
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::Grid);
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::DoubleView);
break;
case 2:
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::Grid);
break;
case 3:
coreWidget_->baseLayout_->setMode (QtMultiViewLayout::HSplit);
break;
......@@ -1411,7 +1414,7 @@ void Core::setDescriptions(){
emit setSlotDescription("showToolbox(bool)", tr("Show or hide toolbox"), QStringList(tr("Show or hide the toolbox")), QStringList());
emit setSlotDescription("showStatusBar(bool)", tr("Show or hide status bar"), QStringList(tr("Show or hide the status bar")), QStringList());
emit setSlotDescription("multiViewMode(int)", tr("Switch MultiView Mode"),
QStringList(tr("Mode")), QStringList(tr("0: One Viewer\n 1: Grid \n 2: Horizontal split")));
QStringList(tr("Mode")), QStringList(tr("0: One Viewer\n1: Double Viewer\n2: Grid \n3: Horizontal split ")));
emit setSlotDescription("restrictFrameRate(bool)", tr("Restrict FrameRate to MaxFrameRate"),
QStringList(tr("enabled")), QStringList(tr("restriction switch")));
......
......@@ -455,11 +455,13 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
"Possible layouts are: "
"<ul> "
"<li>Single viewer</li>"
"<li>Double viewer</li>"
"<li>Multiple viewers (grid)</li>"
"<li>Multiple viewers (hsplit)</li>"
"</ul>"));
viewerLayoutBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"singleviewmode.png"), "");
viewerLayoutBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"doubleviewmode.png"), "");
viewerLayoutBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"multiviewmode1.png"), "");
viewerLayoutBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"multiviewmode2.png"), "");
......@@ -884,17 +886,24 @@ void CoreWidget::nextViewerLayout() {
switch (baseLayout_->mode()) {
case QtMultiViewLayout::SingleView:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::Grid);
baseLayout_->setMode(QtMultiViewLayout::DoubleView);
// Update combo box in the toolbar
viewerLayoutBox_->setCurrentIndex(1);
break;
case QtMultiViewLayout::DoubleView:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::Grid);
// Update combo box in the toolbar
viewerLayoutBox_->setCurrentIndex(2);
break;
case QtMultiViewLayout::Grid:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::HSplit);
// Update combo box in the toolbar
viewerLayoutBox_->setCurrentIndex(2);
viewerLayoutBox_->setCurrentIndex(3);
break;
case QtMultiViewLayout::HSplit:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
......@@ -915,17 +924,21 @@ CoreWidget::setViewerLayout(int _idx) {
switch (_idx) {
case 0:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::SingleView);
break;
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::SingleView);
break;
case 1:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::Grid);
break;
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::DoubleView);
break;
case 2:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::HSplit);
break;
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::Grid);
break;
case 3:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::HSplit);
break;
}
viewerLayoutBox_->setCurrentIndex(_idx);
......
......@@ -519,9 +519,9 @@ void CoreWidget::viewerSnapshotDialog() {
QImage finalImage;
examiner_widgets_[PluginFunctions::activeExaminer()]->snapshot(finalImage,
dialog.snapWidth->value(), dialog.snapHeight->value(),
dialog.transparent->isChecked(), dialog.hideCoordsys->isChecked(),
dialog.multisampling->isChecked() ? dialog.num_samples->value() : 1);
dialog.snapWidth->value(), dialog.snapHeight->value(),
dialog.transparent->isChecked(), dialog.hideCoordsys->isChecked(),
dialog.multisampling->isChecked() ? dialog.num_samples->value() : 1);
finalImage.save(newName);
......
This diff is collapsed.
......@@ -82,6 +82,16 @@ class DLLEXPORT QtMultiViewLayout : public QGraphicsLayout
SingleView,
/*
* #############
* # # #
* # # #
* # 1 # 2 #
* # # #
* # # #
* #############
*/
DoubleView,
/*
* #############
* # 1 # 2 #
* # # #
* #############
......
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