Back to index

salome-paravis  6.5.0
Public Member Functions | Protected Attributes
MyViewOptions Class Reference

options container for pages of my view options More...

#include <MyViewOptions.h>

List of all members.

Public Member Functions

 MyViewOptions (QWidget *parent=0)
virtual ~MyViewOptions ()
void setView (pqView *view)
virtual void setPage (const QString &page)
virtual QStringList getPageList ()
virtual void applyChanges ()
virtual void resetChanges ()
virtual bool isApplyUsed () const

Protected Attributes

QPointer< MyViewView
pqColorChooserButton * ColorChooser

Detailed Description

options container for pages of my view options

Definition at line 44 of file MyViewOptions.h.


Constructor & Destructor Documentation

MyViewOptions::MyViewOptions ( QWidget *  parent = 0)

Definition at line 40 of file MyViewOptions.cxx.

  : pqOptionsContainer(widgetParent)
{
  QHBoxLayout* l = new QHBoxLayout(this);
  this->ColorChooser = new pqColorChooserButton(this);
  l->addWidget(this->ColorChooser);
  QObject::connect(this->ColorChooser, SIGNAL(chosenColorChanged(QColor)), 
                   this, SIGNAL(changesAvailable()));
}

Definition at line 50 of file MyViewOptions.cxx.

{
}

Member Function Documentation

void MyViewOptions::applyChanges ( ) [virtual]

Definition at line 79 of file MyViewOptions.cxx.

{
  if(!this->View)
    {
    return;
    }

  this->View->setBackground(this->ColorChooser->chosenColor());
}
QStringList MyViewOptions::getPageList ( ) [virtual]

Definition at line 58 of file MyViewOptions.cxx.

{
  QStringList ret;
  ret << "My View";
  return ret;
}
virtual bool MyViewOptions::isApplyUsed ( ) const [inline, virtual]

Definition at line 66 of file MyViewOptions.h.

{ return true; }
void MyViewOptions::resetChanges ( ) [virtual]

Definition at line 89 of file MyViewOptions.cxx.

{
}
void MyViewOptions::setPage ( const QString &  page) [virtual]

Definition at line 54 of file MyViewOptions.cxx.

{
}
void MyViewOptions::setView ( pqView *  view)

Definition at line 65 of file MyViewOptions.cxx.

{
  this->View = qobject_cast<MyView*>(view);
  if(this->View)
    {
    this->ColorChooser->setChosenColor(this->View->background());
    this->ColorChooser->setEnabled(true);
    }
  else
    {
    this->ColorChooser->setEnabled(false);
    }
}

Member Data Documentation

pqColorChooserButton* MyViewOptions::ColorChooser [protected]

Definition at line 70 of file MyViewOptions.h.

QPointer<MyView> MyViewOptions::View [protected]

Definition at line 69 of file MyViewOptions.h.


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