Brief description of class still missing. More...
#include <PropertyProxy.h>
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) |
| PropertyWidget * | currentTabWidget () 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 () |
Brief description of class still missing.
Full description of class still missing
| 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();
}
}
| void QGpGuiTools::PropertyProxy::addCategory | ( | uint | category, |
| QString | caption, | ||
| QIcon | icon | ||
| ) |
References QGpGuiTools::PropertyEditor::addCategory(), QGpGuiTools::PropertyEditor::instance(), QGpGuiTools::PropertyCategory::setCaption(), QGpGuiTools::PropertyCategory::setIcon(), QGpGuiTools::PropertyCategory::setTag(), QGpGuiTools::ExpandTabWidget::setTitlePrefix(), and w.
Referenced by SciFigs::ImageWidget::addProperties(), SciFigs::TextEdit::addProperties(), SciFigs::AxisWindow::addProperties(), SciFigs::ColorPaletteWidget::addProperties(), SciFigs::LegendWidget::addProperties(), SciFigs::GraphicSheet::addProperties(), SciFigs::GraphContent::addProperties(), and SciFigs::GraphicObject::addProperties().
{
_currentCategory=new PropertyCategory;
_currentCategory->setTag(category);
_currentCategory->setCaption(caption);
_currentCategory->setIcon(icon);
_categories.insert(category, _currentCategory);
if(isActive()) {
ExpandTabWidget * w=new ExpandTabWidget;
w->setTitlePrefix(caption + "::" );
PropertyEditor::instance()->addCategory(icon, caption, w);
}
}
| void QGpGuiTools::PropertyProxy::addReference | ( | PropertyItem * | item | ) |
References QGpGuiTools::PropertyTab::addReference().
Referenced by GeopsyGui::PickLayer::addProperties(), SciFigs::GridPlot::addProperties(), SciFigs::XYValuePlot::addProperties(), SciFigs::XYValueLines::addProperties(), SciFigs::ImageWidget::addProperties(), SciFigs::NameLineLayer::addProperties(), GeopsyGui::ChronogramLayer::addProperties(), NAModelsPlot::addProperties(), SciFigs::TextEdit::addProperties(), SciFigs::XUniqueYColorLines::addProperties(), SciFigs::XYPlot::addProperties(), SciFigs::ColorPaletteWidget::addProperties(), SciFigs::XYColorLines::addProperties(), SciFigs::LegendWidget::addProperties(), SciFigs::LiveGridLayer::addProperties(), SciFigs::ImageLayer::addProperties(), SciFigs::GraphicSheet::addProperties(), SciFigs::LineLayer::addProperties(), SciFigs::GraphContent::addProperties(), SciFigs::GraphicObject::addProperties(), GeopsyGui::SignalLayer::addProperties(), and SciFigs::Axis::addProperties().
{
if(_currentTab) _currentTab->addReference(item);
}
| void QGpGuiTools::PropertyProxy::addTab | ( | uint | tab, |
| QString | title, | ||
| PropertyWidget * | w, | ||
| PropertyItem * | item | ||
| ) |
References QGpGuiTools::PropertyEditor::addTab(), QGpGuiTools::PropertyCategory::addTab(), QGpGuiTools::PropertyCategory::caption(), QGpGuiTools::PropertyEditor::instance(), QGpGuiTools::PropertyWidget::setId(), and title().
Referenced by GeopsyGui::PickLayer::addProperties(), SciFigs::GridPlot::addProperties(), SciFigs::XYValuePlot::addProperties(), SciFigs::XYValueLines::addProperties(), SciFigs::ImageWidget::addProperties(), SciFigs::NameLineLayer::addProperties(), GeopsyGui::ChronogramLayer::addProperties(), NAModelsPlot::addProperties(), SciFigs::TextEdit::addProperties(), SciFigs::XUniqueYColorLines::addProperties(), SciFigs::XYPlot::addProperties(), SciFigs::ColorPaletteWidget::addProperties(), SciFigs::XYColorLines::addProperties(), SciFigs::LegendWidget::addProperties(), SciFigs::LiveGridLayer::addProperties(), SciFigs::ImageLayer::addProperties(), SciFigs::GraphicSheet::addProperties(), SciFigs::LineLayer::addProperties(), SciFigs::GraphContent::addProperties(), SciFigs::GraphicObject::addProperties(), GeopsyGui::SignalLayer::addProperties(), and SciFigs::Axis::addProperties().
| void QGpGuiTools::PropertyProxy::blockUpdates | ( | bool | b | ) |
References restoreStates(), and setValues().
Referenced by SciFigs::GraphicSheet::selectAll().
{
if(_blockUpdates) {
if(!b) {
_blockUpdates=b;
setValues();
restoreStates();
}
} else {
_blockUpdates=b;
}
}
References QGpGuiTools::PropertyTab::widget().
Referenced by SciFigs::GridMaxFollower::addProperties(), SciFigs::NameLineLayer::addProperties(), GeopsyGui::ChronogramLayer::addProperties(), SciFigs::ImageLayer::addProperties(), SciFigs::LineLayer::addProperties(), SciFigs::GraphContent::addProperties(), GeopsyGui::SignalLayer::addProperties(), SciFigs::Axis::addProperties(), SciFigs::NameLineLayer::removeProperties(), SciFigs::ImageLayer::removeProperties(), SciFigs::LineLayer::removeProperties(), SciFigs::GraphContent::removeProperties(), SciFigs::LineLayer::resetLineProperties(), and SciFigs::GraphicObject::updateGeometryProperties().
{
return _currentTab ? _currentTab->widget() : 0;
}
| bool QGpGuiTools::PropertyProxy::hasReference | ( | ) | const |
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);
}
| int QGpGuiTools::PropertyProxy::referenceCount | ( | ) | const |
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::PropertyEditor::instance(), and QGpGuiTools::PropertyEditor::restoreStates().
Referenced by SciFigs::GraphContent::addProperties(), blockUpdates(), SciFigs::GraphicSheet::selectObjects(), SciFigs::GraphicObject::showProperties(), and SciFigs::GraphicSheet::showProperties().
{
if(_blockUpdates) return;
if(isActive()) {
PropertyEditor::instance()->restoreStates();
}
}
References QGpGuiTools::PropertyEditor::instance(), and QGpGuiTools::PropertyEditor::saveStates().
Referenced by SciFigs::GraphContent::addProperties(), SciFigs::GraphicSheet::selectAll(), SciFigs::GraphicSheet::selectObjects(), SciFigs::GraphicObject::showProperties(), SciFigs::GraphicSheet::showProperties(), and SciFigs::GraphicSheet::~GraphicSheet().
{
if(_blockUpdates) return;
if(isActive()) {
PropertyEditor::instance()->saveStates();
}
}
| bool QGpGuiTools::PropertyProxy::setCurrentCategory | ( | uint | category | ) |
Referenced by SciFigs::ImageWidget::addProperties(), SciFigs::TextEdit::addProperties(), SciFigs::AxisWindow::addProperties(), SciFigs::ColorPaletteWidget::addProperties(), SciFigs::LegendWidget::addProperties(), SciFigs::GraphicSheet::addProperties(), SciFigs::GraphContent::addProperties(), SciFigs::GraphicObject::addProperties(), SciFigs::GraphContent::removeLayer(), SciFigs::ImageWidget::removeProperties(), SciFigs::TextEdit::removeProperties(), SciFigs::AxisWindow::removeProperties(), SciFigs::ColorPaletteWidget::removeProperties(), SciFigs::LegendWidget::removeProperties(), SciFigs::GraphicSheet::removeProperties(), SciFigs::GraphContent::removeProperties(), SciFigs::GraphicObject::removeProperties(), and SciFigs::GraphicObject::updateGeometryProperties().
{
QHash<uint, PropertyCategory *>::iterator it=_categories.find(category);
if(it!=_categories.end()) {
_currentCategory=it.value();
return true;
} else {
_currentCategory=0;
return false;
}
}
| bool QGpGuiTools::PropertyProxy::setCurrentTab | ( | uint | tab | ) |
References QGpGuiTools::PropertyCategory::find().
Referenced by GeopsyGui::PickLayer::addProperties(), SciFigs::GridPlot::addProperties(), SciFigs::XYValuePlot::addProperties(), SciFigs::XYValueLines::addProperties(), SciFigs::ImageWidget::addProperties(), SciFigs::NameLineLayer::addProperties(), GeopsyGui::ChronogramLayer::addProperties(), NAModelsPlot::addProperties(), SciFigs::TextEdit::addProperties(), SciFigs::XUniqueYColorLines::addProperties(), SciFigs::XYPlot::addProperties(), SciFigs::ColorPaletteWidget::addProperties(), SciFigs::XYColorLines::addProperties(), SciFigs::LegendWidget::addProperties(), SciFigs::LiveGridLayer::addProperties(), SciFigs::ImageLayer::addProperties(), SciFigs::GraphicSheet::addProperties(), SciFigs::LineLayer::addProperties(), SciFigs::GraphContent::addProperties(), SciFigs::GraphicObject::addProperties(), GeopsyGui::SignalLayer::addProperties(), SciFigs::Axis::addProperties(), SciFigs::NameLineLayer::removeProperties(), SciFigs::ImageLayer::removeProperties(), SciFigs::LineLayer::removeProperties(), SciFigs::GraphContent::removeProperties(), SciFigs::LineLayer::resetLineProperties(), and SciFigs::GraphicObject::updateGeometryProperties().
{
if(_currentCategory) {
_currentTab=_currentCategory->find(tab);
return _currentTab;
} else return false;
}
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] |
Referenced by QGpGuiTools::PropertyContext::setPropertyTitle().
{_title=t;}
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;}
| uint QGpGuiTools::PropertyProxy::uniqueId | ( | ) | [static] |
{
return _lastUniqueId++;
}