Commit 4ee97c0c authored by Bob Obara's avatar Bob Obara

ENH: Creating extension namespace

Moved all qt classes into new namespace
parent d0e7fd8e
Pipeline #14741 passed with stage
......@@ -49,6 +49,7 @@
namespace Ui { class qtAttributeAssociation; }
using namespace smtk::attribute;
using namespace smtk::extension;
using smtk::model::EntityRef;
using smtk::model::EntityRefs;
using smtk::model::Group;
......
......@@ -30,7 +30,7 @@ class QListWidget;
namespace smtk
{
namespace attribute
namespace extension
{
class qtBaseView;
class SMTKQTEXT_EXPORT qtAssociationWidget : public QWidget
......
......@@ -48,6 +48,7 @@
#include <stdlib.h> // for atexit()
using namespace smtk::attribute;
using namespace smtk::extension;
qtAttributeItemWidgetFactory* qtAttribute::s_factory = NULL;
......@@ -67,7 +68,7 @@ public:
}
smtk::attribute::WeakAttributePtr m_attribute;
QPointer<QWidget> m_parentWidget;
QList<smtk::attribute::qtItem*> m_items;
QList<smtk::extension::qtItem*> m_items;
QPointer<qtBaseView> m_view;
};
......
......@@ -23,7 +23,7 @@ class qtAttributeInternals;
class QWidget;
namespace smtk {
namespace attribute {
namespace extension {
class qtAttributeItemWidgetFactory;
class qtBaseView;
......
......@@ -46,6 +46,7 @@
#include <iostream>
#include <set>
using namespace smtk::attribute;
using namespace smtk::extension;
//----------------------------------------------------------------------------
class qtAttributeDisplayInternals
......@@ -78,14 +79,14 @@ public:
QPointer<QComboBox> PropDefsCombo;
QPointer<QComboBox> SelectPropCombo;
QPointer<smtk::attribute::qtUIManager> UIManager;
QPointer<smtk::extension::qtUIManager> UIManager;
QPointer<QStandardItemModel> PropComboModel;
};
//----------------------------------------------------------------------------
qtAttributeDisplay::
qtAttributeDisplay(QWidget* p, smtk::attribute::qtUIManager* uiman) : QWidget(p)
qtAttributeDisplay(QWidget* p, smtk::extension::qtUIManager* uiman) : QWidget(p)
{
this->Internals = new qtAttributeDisplayInternals;
this->Internals->UIManager = uiman;
......
......@@ -26,7 +26,7 @@ class qtAttributeDisplayInternals;
namespace smtk
{
namespace attribute
namespace extension
{
class qtUIManager;
......@@ -36,7 +36,7 @@ namespace smtk
Q_OBJECT
public:
qtAttributeDisplay(QWidget* p, smtk::attribute::qtUIManager* uiman);
qtAttributeDisplay(QWidget* p, smtk::extension::qtUIManager* uiman);
virtual ~qtAttributeDisplay();
public slots:
......
......@@ -27,6 +27,7 @@
#include "smtk/attribute/ValueItem.h"
#include "smtk/attribute/VoidItem.h"
using namespace smtk::extension;
using namespace smtk::attribute;
/**\brief Create a widget that illustrates an item referencing another attribute.
......
......@@ -16,7 +16,7 @@
#include <QWidget>
namespace smtk {
namespace attribute {
namespace extension {
class qtItem;
class qtBaseView;
......@@ -41,17 +41,17 @@ class SMTKQTEXT_EXPORT qtAttributeItemWidgetFactory
public:
virtual ~qtAttributeItemWidgetFactory() { }
virtual qtItem* createRefItemWidget(RefItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createValueItemWidget(ValueItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createDirectoryItemWidget(DirectoryItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createFileItemWidget(FileItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createGroupItemWidget(GroupItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createVoidItemWidget(VoidItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createModelEntityItemWidget(ModelEntityItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createMeshSelectionItemWidget(MeshSelectionItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createRefItemWidget(attribute::RefItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createValueItemWidget(attribute::ValueItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createDirectoryItemWidget(attribute::DirectoryItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createFileItemWidget(attribute::FileItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createGroupItemWidget(attribute::GroupItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createVoidItemWidget(attribute::VoidItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createModelEntityItemWidget(attribute::ModelEntityItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
virtual qtItem* createMeshSelectionItemWidget(attribute::MeshSelectionItemPtr item, QWidget* p, qtBaseView* bview, Qt::Orientation orient);
};
} // namespace attribute
} // namespace extension
} // namespace smtk
#endif // __smtk_extension_qt_qtAttributeItemWidgetFactory_h
......@@ -32,6 +32,7 @@
#include <QGridLayout>
using namespace smtk::attribute;
using namespace smtk::extension;
inline void init_Att_Names_and_NEW(QList<QString>& attNames,
const RefItemDefinition *itemDef)
......@@ -224,7 +225,7 @@ void qtAttributeRefItem::onLaunchAttributeView()
attViewDlg.setWindowTitle(attDef->label().empty() ?
attDef->type().c_str() : attDef->label().c_str());
QVBoxLayout* layout = new QVBoxLayout(&attViewDlg);
smtk::attribute::ViewInfo vinfo(newAttView, &attViewDlg, this->baseView()->uiManager());
smtk::extension::ViewInfo vinfo(newAttView, &attViewDlg, this->baseView()->uiManager());
qtAttributeView attView(vinfo);
//layout->addWidget(attView.widget())
QDialogButtonBox* buttonBox=new QDialogButtonBox( &attViewDlg );
......
......@@ -23,7 +23,7 @@ class qtAttributeRefItemInternals;
namespace smtk
{
namespace attribute
namespace extension
{
class qtBaseView;
class qtAttribute;
......
......@@ -57,6 +57,7 @@
#include <iostream>
#include <set>
using namespace smtk::attribute;
using namespace smtk::extension;
//----------------------------------------------------------------------------
class qtAttributeViewInternals
......
......@@ -29,7 +29,7 @@ class QTableWidget;
namespace smtk
{
namespace attribute
namespace extension
{
class SMTKQTEXT_EXPORT qtAttributeView : public qtBaseView
{
......
......@@ -28,7 +28,7 @@
#include <QToolButton>
#include <QWidget>
using namespace smtk::attribute;
using namespace smtk::extension;
//----------------------------------------------------------------------------
class qtBaseViewInternals
......@@ -107,7 +107,7 @@ void qtBaseView::getDefinitions(
QList<smtk::attribute::DefinitionPtr>& defs)
{
std::vector<smtk::attribute::DefinitionPtr> newdefs;
System *attSystem = attDef->system();
attribute::System *attSystem = attDef->system();
attSystem->findAllDerivedDefinitions(attDef, true, newdefs);
if(!attDef->isAbstract() && !defs.contains(attDef))
{
......@@ -260,7 +260,7 @@ void qtBaseView::makeTopLevel()
}
this->Internals->clearWidgets();
const System* attSys = this->uiManager()->attSystem();
const attribute::System* attSys = this->uiManager()->attSystem();
bool flag;
// Do we need to provide advance level filtering? - this is on by default
......
......@@ -25,7 +25,7 @@ class QScrollArea;
namespace smtk
{
namespace attribute
namespace extension
{
class qtUIManager;
class qtItem;
......
......@@ -25,13 +25,16 @@
#include <QMouseEvent>
using namespace smtk::attribute;
using namespace smtk::extension;
qtCheckableComboItemDelegate::qtCheckableComboItemDelegate(QWidget* owner) :
QStyledItemDelegate(owner)
{
}
void qtCheckableComboItemDelegate::paint(QPainter * painter_, const QStyleOptionViewItem & option_, const QModelIndex & index_) const
void qtCheckableComboItemDelegate::paint(QPainter * painter_,
const QStyleOptionViewItem & option_,
const QModelIndex & index_) const
{
QStyleOptionViewItem & refToNonConstOption = const_cast<QStyleOptionViewItem &>(option_);
refToNonConstOption.showDecorationSelected = false;
......
......@@ -21,7 +21,7 @@
class QStandardItem;
namespace smtk {
namespace attribute {
namespace extension {
//A sublcass of QTextEdit to give initial sizehint
class SMTKQTEXT_EXPORT qtCheckableComboItemDelegate : public QStyledItemDelegate
......@@ -72,7 +72,7 @@ class SMTKQTEXT_EXPORT qtCheckItemComboBox : public QComboBox
smtk::attribute::WeakItemPtr m_ModelEntityItem;
};
} // namespace attribute
} // namespace extension
} // namespace smtk
#endif // __smtk_qt_qtCheckItemComboBox_h
......@@ -24,7 +24,7 @@
#include "smtk/extension/qt/qtBaseView.h"
#include "smtk/extension/qt/qtUIManager.h"
using namespace smtk::attribute;
using namespace smtk::extension;
//----------------------------------------------------------------------------
class qtDiscreteValueEditorInternals
......@@ -45,7 +45,7 @@ public:
QPointer<QWidget> ParentWidget;
smtk::attribute::WeakItemPtr DataObject;
QList<smtk::attribute::qtItem*> ChildItems;
QList<smtk::extension::qtItem*> ChildItems;
QPointer<qtBaseView> BaseView;
QPointer<QLayout> ChildrenLayout;
int hintChildWidth;
......@@ -91,7 +91,7 @@ void qtDiscreteValueEditor::createWidget()
wlayout->setMargin(0);
// this->Widget = new QFrame(this->Internals->ParentWidget);
smtk::attribute::ValueItemPtr item =smtk::dynamic_pointer_cast<ValueItem>(
smtk::attribute::ValueItemPtr item =smtk::dynamic_pointer_cast<attribute::ValueItem>(
this->Internals->DataObject.lock());
if(!item || !item->isDiscrete())
{
......@@ -104,8 +104,8 @@ void qtDiscreteValueEditor::createWidget()
return;
}
const ValueItemDefinition *itemDef =
dynamic_cast<const ValueItemDefinition*>(item->definition().get());
const attribute::ValueItemDefinition *itemDef =
dynamic_cast<const attribute::ValueItemDefinition*>(item->definition().get());
QList<QString> discreteVals;
QString tooltip;
for (size_t i = 0; i < itemDef->numberOfDiscreteValues(); i++)
......@@ -137,7 +137,7 @@ void qtDiscreteValueEditor::createWidget()
//----------------------------------------------------------------------------
void qtDiscreteValueEditor::updateItemData()
{
smtk::attribute::ValueItemPtr item =smtk::dynamic_pointer_cast<ValueItem>(
smtk::attribute::ValueItemPtr item =smtk::dynamic_pointer_cast<attribute::ValueItem>(
this->Internals->DataObject.lock());
if(!item || !item->isDiscrete())
{
......@@ -154,8 +154,8 @@ void qtDiscreteValueEditor::updateItemData()
{
return;
}
const ValueItemDefinition *itemDef =
dynamic_cast<const ValueItemDefinition*>(item->definition().get());
const attribute::ValueItemDefinition *itemDef =
dynamic_cast<const attribute::ValueItemDefinition*>(item->definition().get());
int setIndex = -1, elementIdx = this->Internals->ElementIndex;
if (item->isSet(elementIdx))
......@@ -184,11 +184,11 @@ void qtDiscreteValueEditor::onInputValueChanged()
int curIdx = comboBox->currentIndex();
int elementIdx =this->Internals->ElementIndex;
smtk::attribute::ValueItemPtr item =smtk::dynamic_pointer_cast<ValueItem>(
smtk::attribute::ValueItemPtr item =smtk::dynamic_pointer_cast<attribute::ValueItem>(
this->Internals->DataObject.lock());
bool refresh = false;
const ValueItemDefinition *itemDef =
dynamic_cast<const ValueItemDefinition*>(item->definition().get());
const attribute::ValueItemDefinition *itemDef =
dynamic_cast<const attribute::ValueItemDefinition*>(item->definition().get());
if(itemDef->isDiscreteIndexValid(curIdx) && item->isSet(elementIdx) &&
item->discreteIndex(elementIdx) == curIdx)
{
......
......@@ -22,7 +22,7 @@ class qtDiscreteValueEditorInternals;
namespace smtk
{
namespace attribute
namespace extension
{
class SMTKQTEXT_EXPORT qtDiscreteValueEditor : public QWidget
{
......
......@@ -17,7 +17,7 @@
#include <QMouseEvent>
namespace smtk {
namespace model {
namespace extension {
QEntityItemDelegate::QEntityItemDelegate(QWidget* owner) :
QStyledItemDelegate(owner), m_swatchSize(16),
......@@ -190,7 +190,7 @@ QWidget* QEntityItemDelegate::createEditor(
{
(void)option;
(void)idx;
smtk::model::QEntityItemEditor* editor = new QEntityItemEditor(owner);
smtk::extension::QEntityItemEditor* editor = new QEntityItemEditor(owner);
QObject::connect(
editor, SIGNAL(editingFinished()),
this, SLOT(commitAndCloseEditor()));
......@@ -201,8 +201,8 @@ void QEntityItemDelegate::setEditorData(
QWidget* editor,
const QModelIndex& idx) const
{
smtk::model::QEntityItemEditor* entityEditor =
qobject_cast<smtk::model::QEntityItemEditor*>(editor);
smtk::extension::QEntityItemEditor* entityEditor =
qobject_cast<smtk::extension::QEntityItemEditor*>(editor);
if (entityEditor)
{
entityEditor->setTitle(idx.data(QEntityItemModel::TitleTextRole).toString());
......@@ -215,8 +215,8 @@ void QEntityItemDelegate::setModelData(
QAbstractItemModel* model,
const QModelIndex &idx) const
{
smtk::model::QEntityItemEditor* entityEditor =
qobject_cast<smtk::model::QEntityItemEditor*>(editor);
smtk::extension::QEntityItemEditor* entityEditor =
qobject_cast<smtk::extension::QEntityItemEditor*>(editor);
if (entityEditor)
{
// TODO: editor should also allow adjusting entity type?
......@@ -227,8 +227,8 @@ void QEntityItemDelegate::setModelData(
void QEntityItemDelegate::commitAndCloseEditor()
{
smtk::model::QEntityItemEditor* entityEditor =
qobject_cast<smtk::model::QEntityItemEditor*>(sender());
smtk::extension::QEntityItemEditor* entityEditor =
qobject_cast<smtk::extension::QEntityItemEditor*>(sender());
emit commitData(entityEditor);
emit closeEditor(entityEditor);
}
......
......@@ -16,7 +16,7 @@
#include <QStyledItemDelegate>
namespace smtk {
namespace model {
namespace extension {
/**\brief Present the contents of an smtk::model::Manager instance via QEntityItemModel.
*
......@@ -92,7 +92,7 @@ protected:
int m_subtitleFontWeight;
};
} // namespace model
} // namespace extension
} // namespace smtk
#endif // __smtk_qt_QEntityItemDelegate_h
......@@ -13,7 +13,7 @@
#include <QtGui/QHBoxLayout>
namespace smtk {
namespace model {
namespace extension {
QEntityItemEditor::QEntityItemEditor(QWidget* super)
: QWidget(super)
......
......@@ -17,7 +17,7 @@
class QLineEdit;
namespace smtk {
namespace model {
namespace extension {
/**\brief Allow user edits to an smtk::model::Manager instance via QEntityItemModel.
*
......
......@@ -61,8 +61,10 @@ inline void cleanupIconResource()
}
// -----------------------------------------------------------------------------
using namespace smtk::model;
namespace smtk {
namespace model {
namespace extension {
/// Private storage for QEntityItemModel.
class QEntityItemModel::Internal
......@@ -672,7 +674,7 @@ void QEntityItemModel::rebuildSubphrases(const QModelIndex& qidx)
/*
inline QModelIndex _internal_getPhraseIndex(
smtk::model::QEntityItemModel* qmodel,
smtk::extension::QEntityItemModel* qmodel,
const smtk::model::EntityRef& entRef,
const QModelIndex& top, bool recursive = false)
{
......@@ -694,7 +696,7 @@ inline QModelIndex _internal_getPhraseIndex(
*/
inline QModelIndex _internal_getPhraseIndex(
smtk::model::QEntityItemModel* qmodel,
smtk::extension::QEntityItemModel* qmodel,
const DescriptivePhrasePtr& phrase,
const QModelIndex& top, bool recursive = false)
{
......@@ -1283,5 +1285,5 @@ void QEntityItemModel::updateObserver()
}
}
} // namespace model
} // namespace extension
} // namespace smtk
......@@ -20,7 +20,7 @@
#include <map>
namespace smtk {
namespace model {
namespace extension {
/**\brief Adapt an smtk::model::Manager instance into a hierarchical Qt model.
*
......@@ -74,7 +74,7 @@ public:
Qt::ItemFlags flags(const QModelIndex& index) const;
void setRoot(DescriptivePhrasePtr root)
void setRoot(model::DescriptivePhrasePtr root)
{
this->m_root = root;
this->updateObserver();
......@@ -89,7 +89,7 @@ public:
static QIcon lookupIconForEntityFlags(smtk::model::BitFlags flags);
DescriptivePhrasePtr getItem(const QModelIndex& idx) const;
model::DescriptivePhrasePtr getItem(const QModelIndex& idx) const;
template<typename T, typename C>
bool foreach_phrase(T& visitor, C& collector, const QModelIndex& top = QModelIndex(), bool onlyBuilt = true);
......@@ -108,9 +108,9 @@ public:
*/
virtual void updateWithOperatorResult(
const QModelIndex& sessIdx,
const OperatorResult& result);
virtual void newSessionOperatorResult(
const smtk::model::SessionRef& sref, const OperatorResult& result);
const model::OperatorResult& result);
virtual void newSessionOperatorResult(const smtk::model::SessionRef& sref,
const model::OperatorResult& result);
signals:
void phraseTitleChanged(const QModelIndex&);
......@@ -125,28 +125,26 @@ protected:
void updateObserver();
// create child indices for new subphrases \a cDphrs under parent phrase \a pDphr index
virtual void addChildPhrases(
const DescriptivePhrasePtr& pDphr, const std::vector< std::pair<DescriptivePhrasePtr, int> >& cDphrs,
virtual void addChildPhrases(const model::DescriptivePhrasePtr& pDphr,
const std::vector< std::pair<model::DescriptivePhrasePtr, int> >& cDphrs,
const QModelIndex& topIndex, bool descend = true);
// remove child indices for subphrases \a cDphrs from parent phrase \a pDphr index
virtual void removeChildPhrases(
const DescriptivePhrasePtr& pDphr, const std::vector< std::pair<DescriptivePhrasePtr, int> >& cDphrs,
virtual void removeChildPhrases(const model::DescriptivePhrasePtr& pDphr,
const std::vector< std::pair<model::DescriptivePhrasePtr, int> >& cDphrs,
const QModelIndex& topIndex);
virtual void updateChildPhrases(
const DescriptivePhrasePtr& phrase, const QModelIndex& topIndex, bool emitEvenNoChanges = true);
virtual void findDirectParentPhrasesForAdd(
const DescriptivePhrasePtr& parntDp,
const smtk::attribute::ModelEntityItemPtr& newEnts,
std::map<DescriptivePhrasePtr,
std::vector< std::pair<DescriptivePhrasePtr, int> > >& changedPhrases);
virtual void findDirectParentPhrasesForRemove(
const DescriptivePhrasePtr& parntDp,
const smtk::attribute::ModelEntityItemPtr& remEnts,
std::map<DescriptivePhrasePtr,
std::vector< std::pair<DescriptivePhrasePtr, int> > >& changedPhrases);
virtual void updateChildPhrases(const model::DescriptivePhrasePtr& phrase, const QModelIndex& topIndex,
bool emitEvenNoChanges = true);
virtual void findDirectParentPhrasesForAdd(const model::DescriptivePhrasePtr& parntDp,
const smtk::attribute::ModelEntityItemPtr& newEnts,
std::map<model::DescriptivePhrasePtr,
std::vector< std::pair<model::DescriptivePhrasePtr, int> > >& changedPhrases);
virtual void findDirectParentPhrasesForRemove(const model::DescriptivePhrasePtr& parntDp,
const smtk::attribute::ModelEntityItemPtr& remEnts,
std::map<model::DescriptivePhrasePtr,
std::vector< std::pair<model::DescriptivePhrasePtr, int> > >& changedPhrases);
virtual void updateMeshPhrases (const smtk::common::UUIDs& relatedCollections,
const DescriptivePhrasePtr& startDp,
const model::DescriptivePhrasePtr& startDp,
const QModelIndex& topIndex,
smtk::mesh::ManagerPtr meshMgr);
};
......@@ -160,7 +158,7 @@ bool QEntityItemModel::foreach_phrase(T& visitor, C& collector, const QModelInde
// visit parent, then children if we aren't told to terminate:
if (!visitor(this, top, collector))
{
DescriptivePhrasePtr phrase = this->getItem(top);
model::DescriptivePhrasePtr phrase = this->getItem(top);
// Do not descend if top's corresponding phrase would have to invoke
// the subphrase generator to obtain the list of children... some models
// are cyclic graphs. In these cases, only descend if "onlyBuilt" is false.
......@@ -183,7 +181,7 @@ bool QEntityItemModel::foreach_phrase(T& visitor, C& collector, const QModelInde
// visit parent, then children if we aren't told to terminate:
if (!visitor(this, top, collector))
{
DescriptivePhrasePtr phrase = this->getItem(top);
model::DescriptivePhrasePtr phrase = this->getItem(top);
// Do not descend if top's corresponding phrase would have to invoke
// the subphrase generator to obtain the list of children... some models
// are cyclic graphs. In these cases, only descend if "onlyBuilt" is false.
......
......@@ -30,7 +30,7 @@
#include <QGridLayout>
#include <QComboBox>
using namespace smtk::attribute;
using namespace smtk::extension;
//----------------------------------------------------------------------------
class qtFileItemInternals
......@@ -134,8 +134,8 @@ void qtFileItem::enableFileBrowser(bool state)
//----------------------------------------------------------------------------
void qtFileItem::updateItemData()
{
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<FileItem>(this->getObject());
smtk::attribute::DirectoryItemPtr dItem =dynamic_pointer_cast<DirectoryItem>(this->getObject());
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<attribute::FileItem>(this->getObject());
smtk::attribute::DirectoryItemPtr dItem =dynamic_pointer_cast<attribute::DirectoryItem>(this->getObject());
if(!fItem && !dItem)
{
return;
......@@ -191,7 +191,7 @@ void qtFileItem::updateItemData()
}
// Add label
smtk::attribute::ItemPtr item = dynamic_pointer_cast<Item>(this->getObject());
smtk::attribute::ItemPtr item = dynamic_pointer_cast<attribute::Item>(this->getObject());
QString labelText;
if(!item->label().empty())
{
......@@ -242,8 +242,8 @@ void qtFileItem::updateItemData()
//----------------------------------------------------------------------------
QWidget* qtFileItem::createFileBrowseWidget(int elementIdx)
{
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<FileItem>(this->getObject());
smtk::attribute::DirectoryItemPtr dItem =dynamic_pointer_cast<DirectoryItem>(this->getObject());
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<attribute::FileItem>(this->getObject());
smtk::attribute::DirectoryItemPtr dItem =dynamic_pointer_cast<attribute::DirectoryItem>(this->getObject());
QWidget* fileTextWidget = NULL;
QComboBox* fileCombo = NULL;
......@@ -254,7 +254,7 @@ QWidget* qtFileItem::createFileBrowseWidget(int elementIdx)
if (fItem)
{
const smtk::attribute::FileItemDefinition *fDef =
dynamic_cast<const FileItemDefinition*>(fItem->definition().get());
dynamic_cast<const attribute::FileItemDefinition*>(fItem->definition().get());
if (fDef->hasDefault())
defaultText = fDef->defaultValue().c_str();
// For open Files, we use a combobox to show the recent file list
......@@ -366,8 +366,8 @@ void qtFileItem::onInputValueChanged()
return;
}
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<FileItem>(this->getObject());
smtk::attribute::DirectoryItemPtr dItem =dynamic_pointer_cast<DirectoryItem>(this->getObject());
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<attribute::FileItem>(this->getObject());
smtk::attribute::DirectoryItemPtr dItem =dynamic_pointer_cast<attribute::DirectoryItem>(this->getObject());
int elementIdx = editBox->property("ElementIndex").toInt();
if((fItem && fItem->isSet(elementIdx) && fItem->value(elementIdx) == editBox->text().toStdString()) ||
......@@ -465,7 +465,7 @@ void qtFileItem::updateFileComboList()
this->Internals->fileCombo->blockSignals(true);
QString currentFile = this->Internals->fileCombo->currentText();
this->Internals->fileCombo->clear();
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<FileItem>(this->getObject());
smtk::attribute::FileItemPtr fItem =dynamic_pointer_cast<attribute::FileItem>(this->getObject());
std::vector<std::string>::const_iterator it;
for(it = fItem->recentValues().begin();
it != fItem->recentValues().end(); ++it)
......
......@@ -36,7 +36,7 @@ class qtFileItemInternals;
namespace smtk
{
namespace attribute
namespace extension
{
class SMTKQTEXT_EXPORT qtFileItem : public qtItem
{
......
......@@ -29,7 +29,7 @@
#include <QCoreApplication>
#include <QHeaderView>
using namespace smtk::attribute;
using namespace smtk::extension;
//----------------------------------------------------------------------------
class qtGroupItemInternals
......@@ -68,7 +68,7 @@ void qtGroupItem::setLabelVisible(bool visible)
{
return;
}
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<GroupItem>(this->getObject());
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<attribute::GroupItem>(this->getObject());
if(!item || !item->numberOfGroups())
{
return;
......@@ -87,7 +87,7 @@ void qtGroupItem::createWidget()
return;
}
this->clearChildItems();
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<GroupItem>(this->getObject());
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<attribute::GroupItem>(this->getObject());
if(!item || (!item->numberOfGroups() && !item->isExtensible()))
{
return;
......@@ -144,7 +144,7 @@ void qtGroupItem::setEnabledState(bool checked)
//----------------------------------------------------------------------------
void qtGroupItem::updateItemData()
{
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<GroupItem>(this->getObject());
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<attribute::GroupItem>(this->getObject());
if(!item || (!item->numberOfGroups() && !item->isExtensible()))
{
return;
......@@ -213,7 +213,8 @@ void qtGroupItem::updateItemData()
//----------------------------------------------------------------------------
void qtGroupItem::onAddSubGroup()
{
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<GroupItem>(this->getObject());
smtk::attribute::GroupItemPtr item =
dynamic_pointer_cast<attribute::GroupItem>(this->getObject());
if(!item || (!item->numberOfGroups() && !item->isExtensible()))
{
return;
......@@ -236,7 +237,8 @@ void qtGroupItem::onAddSubGroup()
//----------------------------------------------------------------------------
void qtGroupItem::addSubGroup(int i)
{
smtk::attribute::GroupItemPtr item =dynamic_pointer_cast<GroupItem>(this->getObject());
smtk::attribute::GroupItemPtr item =
dynamic_pointer_cast<attribute::GroupItem>(this->getObject());
if(!item || (!item->numberOfGroups() && !item->isExtensible()))
{
return;
......@@ -258,7 +260,7 @@ void qtGroupItem::addSubGroup(int i)
static_cast<int>(j))->definition();
//smtk::attribute::ItemDefinitionPtr childDef(