Back to index

salome-paravis  6.5.0
Public Member Functions | Private Types | Private Member Functions
pqSetModeStarter Class Reference

#include <pqSetModeStarter.h>

List of all members.

Public Member Functions

 pqSetModeStarter (QObject *p=0)
 ~pqSetModeStarter ()
void onStartup ()
void shutdown ()

Private Types

typedef QObject Superclass

Private Member Functions

void setStandardMode ()
 pqSetModeStarter (const pqSetModeStarter &)
void operator= (const pqSetModeStarter &)

Detailed Description

Definition at line 25 of file pqSetModeStarter.h.


Member Typedef Documentation

typedef QObject pqSetModeStarter::Superclass [private]

Definition at line 28 of file pqSetModeStarter.h.


Constructor & Destructor Documentation

pqSetModeStarter::pqSetModeStarter ( QObject *  p = 0)

Definition at line 30 of file pqSetModeStarter.cxx.

  : QObject(p)
{
}

Definition at line 36 of file pqSetModeStarter.cxx.

{
}

Member Function Documentation

Definition at line 42 of file pqSetModeStarter.cxx.

{
  this->setStandardMode();
}

Here is the call graph for this function:

void pqSetModeStarter::operator= ( const pqSetModeStarter ) [private]

Definition at line 48 of file pqSetModeStarter.cxx.

{
  pqSettings* settings = pqApplicationCore::instance()->settings();
  settings->beginGroup("renderModule");
  if (!settings->contains("InteractorStyle/CameraManipulators")) {
    // Set Post-Pro-like settings
    QStringList strs;
    pqRenderView::ManipulatorType manips[9];
    const pqRenderView::ManipulatorType* default3DManips = pqRenderView::getDefaultManipulatorTypes();

    // Copy default settings, make changes for Ctrl+MB and MB modes
    for(int i=0; i<9; i++)
      {
       manips[i] = default3DManips[i];

       // Ctrl+MB
       if (manips[i].Shift == 0 && manips[i].Control == 1) {
         if (manips[i].Mouse == 1)
           manips[i].Name = QByteArray("Zoom");
         else  if (manips[i].Mouse == 2)
           manips[i].Name = QByteArray("Pan");
         else  if (manips[i].Mouse == 3)
           manips[i].Name = QByteArray("Rotate");
       }

       // MB only
       if (manips[i].Shift == 0 && manips[i].Control == 0) {
         if (manips[i].Mouse == 1)
           manips[i].Name = QByteArray("Rotate");
         else  if (manips[i].Mouse == 2)
           manips[i].Name = QByteArray("Pan");
         else  if (manips[i].Mouse == 3)
           manips[i].Name = QByteArray("Zoom");
       }
      }

    // Save settings
    for(int i=0; i<9; i++)
      {
       strs << QString("Manipulator%1Mouse%2Shift%3Control%4Name%5")
         .arg(i+1)
         .arg(manips[i].Mouse)
         .arg(manips[i].Shift)
         .arg(manips[i].Control)
         .arg(QString(manips[i].Name));
      }
      
    settings->setValue("InteractorStyle/CameraManipulators", strs);
  }
  settings->endGroup();

  // Loop through render views and apply the settings
  QList<pqRenderViewBase*> views =
    pqApplicationCore::instance()->getServerManagerModel()->
    findItems<pqRenderViewBase*>();

  foreach(pqRenderViewBase* view, views) {
    view->restoreSettings(true);
  }
}

Here is the caller graph for this function:

void pqSetModeStarter::shutdown ( ) [inline]

Definition at line 37 of file pqSetModeStarter.h.

{}

The documentation for this class was generated from the following files: