Commit 5d2deb41 authored by Kitware Robot's avatar Kitware Robot Committed by Ben Boeckel
Browse files

clang-format: apply updated clang-format settings

parent 1615e9e3
......@@ -9,7 +9,6 @@
//=========================================================================
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/function.hpp>
#include <boost/functional.hpp>
#include <boost/mpl/placeholders.hpp>
......
......@@ -112,7 +112,8 @@ int main(int argc, char* argv[])
smtk::operation::Operation::Result createBackgroundDomainOpResult =
createBackgroundDomainOp->operate();
if (createBackgroundDomainOpResult->findInt("outcome")->value() !=
if (
createBackgroundDomainOpResult->findInt("outcome")->value() !=
static_cast<int>(smtk::operation::Operation::Outcome::SUCCEEDED))
{
std::cerr << "\"create uniform grid\" operator failed\n";
......
......@@ -50,8 +50,8 @@ protected:
QVariant data(const QModelIndex& index_, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex& index_, const QVariant& value, int role) override;
QVariant headerData(
int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole)
const override;
Qt::ItemFlags flags(const QModelIndex& index_) const override;
......
......@@ -51,7 +51,8 @@ void AttDefDataModel::populate(smtk::attribute::ResourcePtr resource)
// -----------------------------------------------------------------------------
void AttDefDataModel::appendRecursively(
smtk::attribute::DefinitionPtr parentDef, QTreeWidgetItem* parentItem)
smtk::attribute::DefinitionPtr parentDef,
QTreeWidgetItem* parentItem)
{
DefinitionPtrVec defsConcrete;
this->Resource->derivedDefinitions(parentDef, defsConcrete);
......@@ -134,7 +135,8 @@ void AttDefDataModel::remove(const QModelIndex& attDefIndex)
// -----------------------------------------------------------------------------
QModelIndex AttDefDataModel::findElementByData(
QTreeWidgetItem* parent, const smtk::attribute::DefinitionPtr& dataMatch)
QTreeWidgetItem* parent,
const smtk::attribute::DefinitionPtr& dataMatch)
{
const int count = parent->childCount();
for (int i = 0; i < count; i++)
......
......@@ -84,7 +84,8 @@ protected:
* new smtk::attribute::Definition (to update the model).
*/
QModelIndex findElementByData(
QTreeWidgetItem* element, const smtk::attribute::DefinitionPtr& dataMatch);
QTreeWidgetItem* element,
const smtk::attribute::DefinitionPtr& dataMatch);
private:
AttDefDataModel(const AttDefDataModel&) = delete;
......
......@@ -33,14 +33,26 @@ AttDefInformation::AttDefInformation(QWidget* parent)
connect(this->Ui->pbAddItemDef, SIGNAL(clicked()), this, SLOT(onAddItemDef()));
connect(this->Ui->pbDeleteItemDef, SIGNAL(clicked()), this, SLOT(onRemoveItemDef()));
connect(this->Ui->tvInheritedItems, SIGNAL(doubleClicked(const QModelIndex&)), this,
connect(
this->Ui->tvInheritedItems,
SIGNAL(doubleClicked(const QModelIndex&)),
this,
SLOT(showInheritedItemDetails(const QModelIndex&)));
connect(this->Ui->tvInheritedItems, SIGNAL(showDialog(const QModelIndex&)), this,
connect(
this->Ui->tvInheritedItems,
SIGNAL(showDialog(const QModelIndex&)),
this,
SLOT(showInheritedItemDetails(const QModelIndex&)));
connect(this->Ui->tvOwnedItems, SIGNAL(doubleClicked(const QModelIndex&)), this,
connect(
this->Ui->tvOwnedItems,
SIGNAL(doubleClicked(const QModelIndex&)),
this,
SLOT(showOwnedItemDetails(const QModelIndex&)));
connect(this->Ui->tvOwnedItems, SIGNAL(showDialog(const QModelIndex&)), this,
connect(
this->Ui->tvOwnedItems,
SIGNAL(showDialog(const QModelIndex&)),
this,
SLOT(showOwnedItemDetails(const QModelIndex&)));
this->Ui->tvInheritedItems->setExpandsOnDoubleClick(false);
......@@ -52,7 +64,8 @@ AttDefInformation::~AttDefInformation() = default;
// -----------------------------------------------------------------------------
void AttDefInformation::onAttDefChanged(
const QModelIndex& currentDef, const QModelIndex& previousDef)
const QModelIndex& currentDef,
const QModelIndex& previousDef)
{
Q_UNUSED(previousDef);
this->updateAttDefData(currentDef);
......
......@@ -22,12 +22,18 @@ AttributeBrowser::AttributeBrowser(QWidget* parent)
this->Ui->setupUi(this);
connect(this->Ui->pbAddDefinition, SIGNAL(clicked()), this, SLOT(onAddDefinition()));
connect(this->Ui->viewDefinitions, SIGNAL(showDialog(const QModelIndex&)), this,
connect(
this->Ui->viewDefinitions,
SIGNAL(showDialog(const QModelIndex&)),
this,
SLOT(onAddDefinition()));
connect(this->Ui->pbDelDefinition, SIGNAL(clicked()), this, SLOT(onDeleteDefinition()));
connect(this->Ui->leSearch, SIGNAL(textChanged(const QString&)), this,
connect(
this->Ui->leSearch,
SIGNAL(textChanged(const QString&)),
this,
SLOT(onSearchAttDef(const QString&)));
}
......@@ -44,9 +50,7 @@ void AttributeBrowser::populate(smtk::attribute::ResourcePtr resource)
}
//------------------------------------------------------------------------------
void AttributeBrowser::clear()
{
}
void AttributeBrowser::clear() {}
//------------------------------------------------------------------------------
void AttributeBrowser::populateDefinitions(smtk::attribute::ResourcePtr resource)
......@@ -60,7 +64,10 @@ void AttributeBrowser::populateDefinitions(smtk::attribute::ResourcePtr resource
QItemSelectionModel* sm = this->Ui->viewDefinitions->selectionModel();
connect(sm, SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), this,
connect(
sm,
SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)),
this,
SLOT(onAttDefSelectionChanged(const QModelIndex&, const QModelIndex&)));
const QModelIndex defaultIndex = this->AttDefModel->getDefaultIndex();
......@@ -69,7 +76,8 @@ void AttributeBrowser::populateDefinitions(smtk::attribute::ResourcePtr resource
//------------------------------------------------------------------------------
void AttributeBrowser::onAttDefSelectionChanged(
const QModelIndex& current, const QModelIndex& previous)
const QModelIndex& current,
const QModelIndex& previous)
{
// Disable deletion if other definitions derive from current
this->Ui->pbDelDefinition->setEnabled(!this->AttDefModel->hasDerivedTypes(current));
......
......@@ -21,7 +21,7 @@
* ///TODO Implement the rest of the virtual interface of QTreeWidgetItem
* to customize how data is set and queried from.
*/
template <typename T>
template<typename T>
class DataModelElement : public QTreeWidgetItem
{
public:
......@@ -46,17 +46,17 @@ private:
T m_data;
};
template <typename T>
template<typename T>
DataModelElement<T>::DataModelElement(QTreeWidgetItem* parent)
: QTreeWidgetItem(parent){};
template <typename T>
template<typename T>
void DataModelElement<T>::setReferencedData(const T& data)
{
m_data = data;
};
template <typename T>
template<typename T>
const T& DataModelElement<T>::getReferencedDataConst() const
{
return m_data;
......
......@@ -24,7 +24,10 @@ HandlerGroup::~HandlerGroup() = default;
bool HandlerGroup::initialize_impl(QWidget* parent)
{
this->Ui->setupUi(parent);
QObject::connect(this->Ui->cbCommonLabel, SIGNAL(toggled(bool)), this->Ui->leCommonLabel,
QObject::connect(
this->Ui->cbCommonLabel,
SIGNAL(toggled(bool)),
this->Ui->leCommonLabel,
SLOT(setEnabled(bool)));
if (this->ItemDef)
......
......@@ -27,7 +27,10 @@ HandlerValue::~HandlerValue() = default;
bool HandlerValue::initialize_impl(QWidget* parent)
{
this->Ui->setupUi(parent);
QObject::connect(this->Ui->cbCommonLabel, SIGNAL(toggled(bool)), this->Ui->leCommonLabel,
QObject::connect(
this->Ui->cbCommonLabel,
SIGNAL(toggled(bool)),
this->Ui->leCommonLabel,
SLOT(setEnabled(bool)));
if (this->ItemDef)
......
......@@ -21,7 +21,10 @@ InputDialog::InputDialog(QWidget* parent)
this->Ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
connect(this->Ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(this->Ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this,
connect(
this->Ui->buttonBox,
SIGNAL(clicked(QAbstractButton*)),
this,
SLOT(acceptOnApply(QAbstractButton*)));
}
......
......@@ -45,7 +45,9 @@ void ItemDefDataModel::appendBranchToRoot(smtk::attribute::DefinitionPtr def)
{
ItemDefElement* item = new ItemDefElement(this->RootItem);
item->setData(0, Qt::DisplayRole, QString::fromStdString(itemDef->name()));
item->setData(1, Qt::DisplayRole,
item->setData(
1,
Qt::DisplayRole,
QString::fromStdString(smtk::attribute::Item::type2String(itemDef->type())));
item->setData(2, Qt::DisplayRole, attDefType);
item->setReferencedData(itemDef);
......@@ -58,8 +60,10 @@ void ItemDefDataModel::appendBranchToRoot(smtk::attribute::DefinitionPtr def)
}
// ------------------------------------------------------------------------
void ItemDefDataModel::appendRecursively(smtk::attribute::ItemDefinitionPtr parentItemDef,
QTreeWidgetItem* parentItem, const QString& attDefType)
void ItemDefDataModel::appendRecursively(
smtk::attribute::ItemDefinitionPtr parentItemDef,
QTreeWidgetItem* parentItem,
const QString& attDefType)
{
const GroupDef* group = static_cast<const GroupDef*>(parentItemDef.get());
const size_t numItems = group->numberOfItemDefinitions();
......@@ -68,7 +72,9 @@ void ItemDefDataModel::appendRecursively(smtk::attribute::ItemDefinitionPtr pare
ItemDefPtr itemDef = group->itemDefinition(static_cast<int>(i));
ItemDefElement* item = new ItemDefElement(parentItem);
item->setData(0, Qt::DisplayRole, QString::fromStdString(itemDef->name()));
item->setData(1, Qt::DisplayRole,
item->setData(
1,
Qt::DisplayRole,
QString::fromStdString(smtk::attribute::Item::type2String(itemDef->type())));
item->setData(2, Qt::DisplayRole, attDefType);
item->setReferencedData(itemDef);
......@@ -109,7 +115,9 @@ void ItemDefDataModel::insert(const Container& props)
ItemDefElement* elem = new ItemDefElement();
elem->setData(0, Qt::DisplayRole, QString::fromStdString(itemDef->name()));
elem->setData(1, Qt::DisplayRole,
elem->setData(
1,
Qt::DisplayRole,
QString::fromStdString(smtk::attribute::Item::type2String(itemDef->type())));
elem->setData(2, Qt::DisplayRole, QString::fromStdString(props.Definition->type()));
elem->setReferencedData(itemDef);
......
......@@ -84,8 +84,10 @@ protected:
* Append all ItemDefinition types in an AttDef recursively to populate the
* tree.
*/
void appendRecursively(smtk::attribute::ItemDefinitionPtr parentItemDef,
QTreeWidgetItem* parentItem, const QString& attDefType);
void appendRecursively(
smtk::attribute::ItemDefinitionPtr parentItemDef,
QTreeWidgetItem* parentItem,
const QString& attDefType);
/**
* Update the attribute collection. This ensures the attribute::collection instance is
......
......@@ -58,7 +58,8 @@ void ItemDefDialog::setItemDef(smtk::attribute::ItemDefinitionPtr def)
// ------------------------------------------------------------------------
void ItemDefDialog::setValidationInstances(
smtk::attribute::ItemDefinitionPtr itemDef, smtk::attribute::DefinitionPtr def)
smtk::attribute::ItemDefinitionPtr itemDef,
smtk::attribute::DefinitionPtr def)
{
if (itemDef && itemDef->type() == smtk::attribute::Item::GroupType)
{
......
......@@ -52,7 +52,8 @@ public:
* validated when defining a new ItemDefinition.
*/
void setValidationInstances(
smtk::attribute::ItemDefinitionPtr itemDef, smtk::attribute::DefinitionPtr attDef);
smtk::attribute::ItemDefinitionPtr itemDef,
smtk::attribute::DefinitionPtr attDef);
/**
* Apply changes and return the edited or newly created ItemDef.
......
......@@ -26,7 +26,7 @@ namespace extension
{
class qtUIManager;
}
}
} // namespace smtk
namespace Ui
{
......
......@@ -71,13 +71,22 @@ void TemplateEditorMain::initialize()
}
connect(this->AttDefInfo, SIGNAL(resourceChanged(bool)), this, SLOT(updateTitle(bool)));
connect(this->AttDefInfo, SIGNAL(resourceChanged(bool)), this->AttDefBrowser,
connect(
this->AttDefInfo,
SIGNAL(resourceChanged(bool)),
this->AttDefBrowser,
SLOT(emitAttDefChanged()));
connect(this->AttDefBrowser, SIGNAL(resourceChanged(bool)), this, SLOT(updateTitle(bool)));
connect(this->AttDefBrowser, SIGNAL(attDefChanged(const QModelIndex&, const QModelIndex&)),
this->AttDefInfo, SLOT(onAttDefChanged(const QModelIndex&, const QModelIndex&)));
connect(this->AttDefBrowser, SIGNAL(attDefChanged(const QModelIndex&, const QModelIndex&)),
this->AttPreviewPanel, SLOT(updateCurrentView(const QModelIndex&, const QModelIndex&)));
connect(
this->AttDefBrowser,
SIGNAL(attDefChanged(const QModelIndex&, const QModelIndex&)),
this->AttDefInfo,
SLOT(onAttDefChanged(const QModelIndex&, const QModelIndex&)));
connect(
this->AttDefBrowser,
SIGNAL(attDefChanged(const QModelIndex&, const QModelIndex&)),
this->AttPreviewPanel,
SLOT(updateCurrentView(const QModelIndex&, const QModelIndex&)));
this->AttDefBrowser->populate(this->AttributeResource);
......
......@@ -46,16 +46,18 @@ int main(int argc, char* argv[])
char* filename = argv[2];
auto rsrcMgr = smtk::resource::Manager::create();
auto operMgr = smtk::operation::Manager::create();
auto polygonRegistry = smtk::plugin::Registry<smtk::session::polygon::Registrar,
smtk::resource::Manager, smtk::operation::Manager>(rsrcMgr, operMgr);
auto polygonRegistry = smtk::plugin::Registry<
smtk::session::polygon::Registrar,
smtk::resource::Manager,
smtk::operation::Manager>(rsrcMgr, operMgr);
auto rdr = operMgr->create<smtk::operation::ReadResource>();
if (rdr)
{
rdr->parameters()->findFile("filename")->setValue(filename);
auto result = rdr->operate();
if (result->findInt("outcome")->value() ==
int(smtk::operation::Operation::Outcome::SUCCEEDED))
if (
result->findInt("outcome")->value() == int(smtk::operation::Operation::Outcome::SUCCEEDED))
{
auto rsrc = result->findResource("resource")->value();
rsrcMgr->add(rsrc);
......
......@@ -196,13 +196,13 @@ def setup(app):
defaultpath = os.path.abspath('.')
app.add_config_value('findfigure_paths',
{
'*': (defaultpath,)
'*': (defaultpath,)
}, 'env')
app.add_config_value('findfigure_types',
{
'html': ('.svg', '.png', '.jpeg', '.jpg', '.tiff', '.tif', '.gif'),
'epub': ('.svg', '.png', '.jpeg', '.jpg', '.tiff', '.tif', '.gif'),
'latex': ('.pdf', '.png', '.jpeg', '.jpg', '.tiff', '.tif')
'html': ('.svg', '.png', '.jpeg', '.jpg', '.tiff', '.tif', '.gif'),
'epub': ('.svg', '.png', '.jpeg', '.jpg', '.tiff', '.tif', '.gif'),
'latex': ('.pdf', '.png', '.jpeg', '.jpg', '.tiff', '.tif')
}, 'env')
app.add_directive('findimage', FindImageDirective)
app.add_directive('findfigure', FindFigureDirective)
......
......@@ -71,14 +71,18 @@ protected:
// This is required of every session:
virtual SessionInfoBits transcribeInternal(
const smtk::model::EntityRef& entity, SessionInfoBits requestedInfo);
const smtk::model::EntityRef& entity,
SessionInfoBits requestedInfo);
vtkSmartPointer<vtkUnstructuredGrid> Model;
// ... };
// -- 1 --
void addRelations(smtk::model::EntityRef& entityref, std::vector<EntityHandle>& rels,
SessionInfoBits requestedInfo, int depth);
void addRelations(
smtk::model::EntityRef& entityref,
std::vector<EntityHandle>& rels,
SessionInfoBits requestedInfo,
int depth);
bool addTessellation(const smtk::model::EntityRef&, const EntityHandle&);
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment