All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions | Static Public Member Functions
QGpGuiTools::PropertyProxy Class Reference

Brief description of class still missing. More...

#include <PropertyProxy.h>

List of all members.

Public Member Functions

void addCategory (uint category, QString caption, QIcon icon)
void addReference (PropertyItem *item)
void addTab (uint tab, QString title, PropertyWidget *w, PropertyItem *item)
void blockUpdates (bool b)
PropertyWidgetcurrentTabWidget () const
bool hasReference () const
 PropertyProxy (QObject *parent=0)
void raiseEditor ()
int referenceCount () const
void removeTab (uint tab, PropertyItem *item)
void restoreStates ()
void saveStates ()
bool setCurrentCategory (uint category)
bool setCurrentTab (uint tab)
void setCurrentTabValues ()
void setEditor ()
void setTitle (QString t)
void setValues ()
QString title () const
 ~PropertyProxy ()

Static Public Member Functions

static uint uniqueId ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

QGpGuiTools::PropertyProxy::PropertyProxy ( QObject *  parent = 0)

Description of constructor still missing

    : QObject(parent)
{
  _currentCategory=0;
  _currentTab=0;
  _blockUpdates=false;
}

Description of destructor still missing

References QGpGuiTools::PropertyEditor::instance(), QGpGuiTools::PropertyEditor::saveStates(), and QGpGuiTools::PropertyEditor::takeWidgets().

{
  if(isActive()) { // Remove all remaining docked widgets
    PropertyEditor::instance()->saveStates();
    PropertyEditor::instance()->takeWidgets();
    PropertyEditor::instance()->hide();
  }
  for(QHash<uint, PropertyCategory *>::iterator it=_categories.begin(); it!=_categories.end(); it++) {
    delete it.value();
  }
}

Member Function Documentation

void QGpGuiTools::PropertyProxy::addCategory ( uint  category,
QString  caption,
QIcon  icon 
)
void QGpGuiTools::PropertyProxy::addTab ( uint  tab,
QString  title,
PropertyWidget w,
PropertyItem item 
)

References restoreStates(), and setValues().

Referenced by SciFigs::GraphicSheet::selectAll().

{
  if(_blockUpdates) {
    if(!b) {
      _blockUpdates=b;
      setValues();
      restoreStates();
    }
  } else {
    _blockUpdates=b;
  }
}

Returns true if current tab has references.

References QGpGuiTools::PropertyTab::hasReference().

{
  if(_currentTab) {
    return _currentTab->hasReference();
  } else {
    return false;
  }
}

References QGpGuiTools::PropertyEditor::instance(), and QGpGuiTools::PropertyEditor::setProxy().

Referenced by QGpGuiTools::PropertyContext::raiseEditor().

{
  PropertyEditor * editor=PropertyEditor::instance();
  if(!editor) {
    editor=new PropertyEditor;
    editor->setObjectName("propertyEditor");
  }
  editor->setUpdatesEnabled(false);
  editor->setProxy(this);
  editor->show();
  editor->raise();
  editor->setUpdatesEnabled(true);
}

Returns the number of references to the current tab

References QGpGuiTools::PropertyTab::referenceCount().

{
  if(_currentTab) {
    return _currentTab->referenceCount();
  } else {
    return 0;
  }
}
void QGpGuiTools::PropertyProxy::removeTab ( uint  tab,
PropertyItem item 
)

References QGpGuiTools::PropertyCategory::caption(), QGpGuiTools::PropertyEditor::instance(), QGpGuiTools::PropertyCategory::isEmpty(), QGpGuiTools::PropertyEditor::removeCategory(), QGpGuiTools::PropertyCategory::removeTab(), QGpGuiTools::PropertyCategory::tag(), w, and QGpGuiTools::PropertyEditor::widget().

Referenced by GeopsyGui::PickLayer::removeProperties(), SciFigs::GridPlot::removeProperties(), SciFigs::XYValuePlot::removeProperties(), SciFigs::XYValueLines::removeProperties(), SciFigs::ImageWidget::removeProperties(), SciFigs::NameLineLayer::removeProperties(), GeopsyGui::ChronogramLayer::removeProperties(), NAModelsPlot::removeProperties(), SciFigs::TextEdit::removeProperties(), SciFigs::XUniqueYColorLines::removeProperties(), SciFigs::XYPlot::removeProperties(), SciFigs::ColorPaletteWidget::removeProperties(), SciFigs::XYColorLines::removeProperties(), SciFigs::LegendWidget::removeProperties(), SciFigs::LiveGridLayer::removeProperties(), SciFigs::ImageLayer::removeProperties(), SciFigs::GraphicSheet::removeProperties(), SciFigs::LineLayer::removeProperties(), SciFigs::GraphContent::removeProperties(), SciFigs::GraphicObject::removeProperties(), GeopsyGui::SignalLayer::removeProperties(), and SciFigs::Axis::removeProperties().

{
  if(_currentCategory) {
    ExpandTabWidget * w;
    if(isActive()) {
      w=static_cast<ExpandTabWidget *>(PropertyEditor::instance()->widget(_currentCategory->caption()) );
    } else {
      w=0;
    }
    _currentCategory->removeTab(tab, item, w);
    if(_currentCategory->isEmpty()) {
      _categories.remove(_currentCategory->tag());
      if(isActive()) PropertyEditor::instance()->removeCategory(_currentCategory->caption());
      delete _currentCategory;
      _currentCategory=0;
    }
  }
}

References QGpGuiTools::PropertyCategory::setValues().

Referenced by SciFigs::GraphicObject::updateGeometryProperties().

{
  if(_blockUpdates) return;
  _currentCategory->setValues();
}

References QGpGuiTools::PropertyEditor::addCategory(), QGpGuiTools::PropertyEditor::instance(), QGpGuiTools::ExpandTabWidget::setTitlePrefix(), and w.

Referenced by QGpGuiTools::PropertyEditor::setProxy().

{
  for(QHash<uint, PropertyCategory *>::iterator it=_categories.begin(); it!=_categories.end(); it++) {
    ExpandTabWidget * w=new ExpandTabWidget;
    it.value()->setEditor(w);
    w->setTitlePrefix(it.value()->caption() + "::" );
    PropertyEditor::instance()->addCategory(it.value()->icon(), it.value()->caption(), w);
  }
}
void QGpGuiTools::PropertyProxy::setTitle ( QString  t) [inline]

Set widget controls from object current values.

Referenced by SciFigs::GraphContent::addProperties(), blockUpdates(), SciFigs::GraphicSheet::selectObjects(), SciFigs::GraphicObject::showProperties(), and SciFigs::GraphicSheet::showProperties().

{
  if(_blockUpdates) return;
  for(QHash<uint, PropertyCategory *>::iterator it=_categories.begin(); it!=_categories.end(); it++) {
    it.value()->setValues();
  }
}
QString QGpGuiTools::PropertyProxy::title ( ) const [inline]

Referenced by addTab(), and QGpGuiTools::PropertyEditor::setProxy().

{return _title;}
{
  return _lastUniqueId++;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines