Commit fe891b58 authored by Dirk Wilden's avatar Dirk Wilden
Browse files

changed viewMode to viewerLayout to remove ambiguity

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6740 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ee039746
...@@ -117,7 +117,7 @@ void Core::applyOptions(){ ...@@ -117,7 +117,7 @@ void Core::applyOptions(){
} }
if ( OpenFlipper::Options::multiView() ) if ( OpenFlipper::Options::multiView() )
coreWidget_->setViewMode( OpenFlipper::Options::defaultViewerLayout() ); coreWidget_->setViewerLayout( OpenFlipper::Options::defaultViewerLayout() );
//set defaultBackgroundColor //set defaultBackgroundColor
QColor c = OpenFlipper::Options::defaultBackgroundColor() ; QColor c = OpenFlipper::Options::defaultBackgroundColor() ;
......
...@@ -385,29 +385,29 @@ CoreWidget( QVector<ViewMode*>& _viewModes, ...@@ -385,29 +385,29 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
connect( questionButton_,SIGNAL( clicked() ), this, SLOT( setQuestionMode() ) ); connect( questionButton_,SIGNAL( clicked() ), this, SLOT( setQuestionMode() ) );
viewerToolbar_->addWidget( questionButton_)->setText(tr("Question")); viewerToolbar_->addWidget( questionButton_)->setText(tr("Question"));
viewmodeBox_ = new QComboBox( viewerToolbar_ ); viewerLayoutBox_ = new QComboBox( viewerToolbar_ );
viewmodeBox_->setMinimumSize( 32, 16 ); viewerLayoutBox_->setMinimumSize( 32, 16 );
viewmodeBox_->setMaximumSize( 64, 32 ); viewerLayoutBox_->setMaximumSize( 64, 32 );
viewmodeBox_->setToolTip(tr("Switch <b>view mode</b>.")); viewerLayoutBox_->setToolTip(tr("Switch <b>viewer layout</b>."));
viewmodeBox_->setWhatsThis(tr( viewerLayoutBox_->setWhatsThis(tr(
"Switch <b>view mode</b>.<br>" "Switch <b>viewer layout</b>.<br>"
"Select the desired view mode. " "Select the desired viewer layout. "
"Possible modes are: " "Possible layouts are: "
"<ul> " "<ul> "
"<li>Single view mode</li>" "<li>Single viewer</li>"
"<li>Multi view mode (grid)</li>" "<li>Multiple viewers (grid)</li>"
"<li>Multi view mode (hsplit)</li>" "<li>Multiple viewers (hsplit)</li>"
"</ul>")); "</ul>"));
viewmodeBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"singleviewmode.png"), ""); viewerLayoutBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"singleviewmode.png"), "");
viewmodeBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"multiviewmode1.png"), ""); viewerLayoutBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"multiviewmode1.png"), "");
viewmodeBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"multiviewmode2.png"), ""); viewerLayoutBox_->addItem(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"multiviewmode2.png"), "");
viewmodeBox_->setIconSize(QSize(22,22)); viewerLayoutBox_->setIconSize(QSize(22,22));
connect( viewmodeBox_,SIGNAL( activated(int) ), this, SLOT( setViewMode(int) ) ); connect( viewerLayoutBox_,SIGNAL( activated(int) ), this, SLOT( setViewerLayout(int) ) );
viewerToolbar_->addWidget( viewmodeBox_ ); viewerToolbar_->addWidget( viewerLayoutBox_ );
viewerToolbar_->addSeparator(); viewerToolbar_->addSeparator();
...@@ -796,10 +796,9 @@ void CoreWidget::showOptionsWidget() { ...@@ -796,10 +796,9 @@ void CoreWidget::showOptionsWidget() {
} }
void CoreWidget::nextViewMode() { void CoreWidget::nextViewerLayout() {
if (OpenFlipper::Options::multiView()) { if (OpenFlipper::Options::multiView()) {
emit log(tr("Switch MultiView mode"));
switch (baseLayout_->mode()) { switch (baseLayout_->mode()) {
case QtMultiViewLayout::SingleView: case QtMultiViewLayout::SingleView:
...@@ -807,21 +806,21 @@ void CoreWidget::nextViewMode() { ...@@ -807,21 +806,21 @@ void CoreWidget::nextViewMode() {
baseLayout_->setMode(QtMultiViewLayout::Grid); baseLayout_->setMode(QtMultiViewLayout::Grid);
// Update combo box in the toolbar // Update combo box in the toolbar
viewmodeBox_->setCurrentIndex(1); viewerLayoutBox_->setCurrentIndex(1);
break; break;
case QtMultiViewLayout::Grid: case QtMultiViewLayout::Grid:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ()); baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::HSplit); baseLayout_->setMode(QtMultiViewLayout::HSplit);
// Update combo box in the toolbar // Update combo box in the toolbar
viewmodeBox_->setCurrentIndex(2); viewerLayoutBox_->setCurrentIndex(2);
break; break;
case QtMultiViewLayout::HSplit: case QtMultiViewLayout::HSplit:
baseLayout_->setPrimary (PluginFunctions::activeExaminer ()); baseLayout_->setPrimary (PluginFunctions::activeExaminer ());
baseLayout_->setMode(QtMultiViewLayout::SingleView); baseLayout_->setMode(QtMultiViewLayout::SingleView);
// Update combo box in the toolbar // Update combo box in the toolbar
viewmodeBox_->setCurrentIndex(0); viewerLayoutBox_->setCurrentIndex(0);
break; break;
} }
} }
...@@ -829,10 +828,9 @@ void CoreWidget::nextViewMode() { ...@@ -829,10 +828,9 @@ void CoreWidget::nextViewMode() {
void void
CoreWidget::setViewMode(int _idx) { CoreWidget::setViewerLayout(int _idx) {
if (OpenFlipper::Options::multiView()) { if (OpenFlipper::Options::multiView()) {
emit log(tr("Switch MultiView mode"));
switch (_idx) { switch (_idx) {
case 0: case 0:
...@@ -848,6 +846,8 @@ CoreWidget::setViewMode(int _idx) { ...@@ -848,6 +846,8 @@ CoreWidget::setViewMode(int _idx) {
baseLayout_->setMode(QtMultiViewLayout::HSplit); baseLayout_->setMode(QtMultiViewLayout::HSplit);
break; break;
} }
viewerLayoutBox_->setCurrentIndex(_idx);
} }
} }
......
...@@ -535,7 +535,7 @@ public: ...@@ -535,7 +535,7 @@ public:
QToolButton* pickButton_; QToolButton* pickButton_;
QToolButton* questionButton_; QToolButton* questionButton_;
QComboBox* viewmodeBox_; QComboBox* viewerLayoutBox_;
/** @} */ /** @} */
...@@ -549,12 +549,12 @@ public: ...@@ -549,12 +549,12 @@ public:
void slotUpdateGlobalDrawMenu(); void slotUpdateGlobalDrawMenu();
/// Change view mode that was selected in the combo box /// Change viewer layout that was selected in the combo box
void setViewMode(int _idx); void setViewerLayout(int _idx);
private slots: private slots:
/// Switches over to the next view mode /// Switches over to the next view mode
void nextViewMode(); void nextViewerLayout();
/// Called when the global drawMode is selected /// Called when the global drawMode is selected
void slotGlobalDrawMenu(QAction * _action); void slotGlobalDrawMenu(QAction * _action);
......
...@@ -596,7 +596,7 @@ void CoreWidget::coreKeyPressEvent (QKeyEvent* _e){ ...@@ -596,7 +596,7 @@ void CoreWidget::coreKeyPressEvent (QKeyEvent* _e){
break; break;
case Qt::Key_Space: case Qt::Key_Space:
nextViewMode(); nextViewerLayout();
break; break;
case Qt::Key_Shift : case Qt::Key_Shift :
......
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