Console: rename PascalCase named methods to camelCase
This commit is contained in:
@@ -94,7 +94,7 @@ PyMOD_INIT_FUNC(MatGui)
|
||||
|
||||
PyObject* matGuiModule = MatGui::initModule();
|
||||
|
||||
Base::Console().Log("Loading GUI of Material module... done\n");
|
||||
Base::Console().log("Loading GUI of Material module... done\n");
|
||||
|
||||
MatGui::Workbench ::init();
|
||||
auto manip = std::make_shared<MatGui::WorkbenchManipulator>();
|
||||
|
||||
@@ -58,7 +58,7 @@ Array2D::Array2D(const QString& propertyName,
|
||||
_property = material->getAppearanceProperty(propertyName);
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
_property = nullptr;
|
||||
}
|
||||
if (_property) {
|
||||
|
||||
@@ -54,7 +54,7 @@ Array3D::Array3D(const QString& propertyName,
|
||||
_property = material->getAppearanceProperty(propertyName);
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
_property = nullptr;
|
||||
}
|
||||
if (_property) {
|
||||
|
||||
@@ -391,7 +391,7 @@ QVariant Array3DModel::data(const QModelIndex& index, int role) const
|
||||
catch (const Materials::InvalidIndex&) {
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
Base::Console().Error("The error message is: %s\n", e.what());
|
||||
Base::Console().error("The error message is: %s\n", e.what());
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -442,7 +442,7 @@ bool Array3DModel::setData(const QModelIndex& index, const QVariant& value, int
|
||||
_value->setValue(index.row(), index.column(), value.value<Base::Quantity>());
|
||||
}
|
||||
catch (const Materials::InvalidIndex&) {
|
||||
Base::Console().Error("Array3DModel::setData - InvalidIndex");
|
||||
Base::Console().error("Array3DModel::setData - InvalidIndex");
|
||||
}
|
||||
|
||||
Q_EMIT dataChanged(index, index);
|
||||
|
||||
@@ -421,7 +421,7 @@ void DlgDisplayPropertiesImp::onChangeModeActivated(const QString& s)
|
||||
|
||||
void DlgDisplayPropertiesImp::onChangePlotActivated(const QString& s)
|
||||
{
|
||||
Base::Console().Log("Plot = %s\n", (const char*)s.toLatin1());
|
||||
Base::Console().log("Plot = %s\n", (const char*)s.toLatin1());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -205,7 +205,7 @@ void DlgInspectMaterial::update(std::vector<Gui::ViewProvider*>& views)
|
||||
|
||||
void DlgInspectMaterial::updateMaterialTree(const Materials::Material& material)
|
||||
{
|
||||
Base::Console().Log("Material '%s'\n", material.getName().toStdString().c_str());
|
||||
Base::Console().log("Material '%s'\n", material.getName().toStdString().c_str());
|
||||
|
||||
auto tree = ui->treeMaterials;
|
||||
auto model = qobject_cast<QStandardItemModel*>(tree->model());
|
||||
|
||||
@@ -122,7 +122,7 @@ ImageEdit::ImageEdit(const QString& propertyName,
|
||||
_property = material->getAppearanceProperty(propertyName);
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
_property = nullptr;
|
||||
}
|
||||
if (_property) {
|
||||
@@ -141,7 +141,7 @@ ImageEdit::ImageEdit(const QString& propertyName,
|
||||
}
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("No value loaded\n");
|
||||
Base::Console().log("No value loaded\n");
|
||||
showPixmap();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,14 +57,14 @@ ListEdit::ListEdit(const QString& propertyName,
|
||||
_property = material->getAppearanceProperty(propertyName);
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
_property = nullptr;
|
||||
}
|
||||
if (_property) {
|
||||
_value = _property->getList();
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("No value loaded\n");
|
||||
Base::Console().log("No value loaded\n");
|
||||
}
|
||||
|
||||
setupListView();
|
||||
|
||||
@@ -151,7 +151,7 @@ void MaterialDelegate::setValue(QAbstractItemModel* model,
|
||||
catch (const Base::ValueError& e) {
|
||||
// Units mismatch
|
||||
auto quantity = value.value<Base::Quantity>();
|
||||
Base::Console().Log("Units mismatch '%s' = '%s', "
|
||||
Base::Console().log("Units mismatch '%s' = '%s', "
|
||||
"setting to default property units '%s'\n",
|
||||
propertyName.toStdString().c_str(),
|
||||
quantity.getUserString().c_str(),
|
||||
|
||||
@@ -274,7 +274,7 @@ void MaterialTreeWidget::updateMaterial(const QString& uuid)
|
||||
material = std::make_shared<Materials::Material>(*getMaterialManager().getMaterial(uuid));
|
||||
}
|
||||
catch (Materials::MaterialNotFound const&) {
|
||||
Base::Console().Log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
|
||||
Base::Console().log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
|
||||
}
|
||||
|
||||
m_materialDisplay = material->getName();
|
||||
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
}
|
||||
void setIncludeEmptyLibraries(bool value)
|
||||
{
|
||||
Base::Console().Log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
|
||||
Base::Console().log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
|
||||
_filterOptions.setIncludeEmptyLibraries(value);
|
||||
}
|
||||
|
||||
@@ -287,4 +287,4 @@ protected:
|
||||
|
||||
} // namespace MatGui
|
||||
|
||||
#endif // MATGUI_MATERIALTREEWIDGET_H
|
||||
#endif // MATGUI_MATERIALTREEWIDGET_H
|
||||
|
||||
@@ -394,7 +394,7 @@ void MaterialsEditor::onPhysicalAdd(bool checked)
|
||||
updateMaterial();
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("No model selected\n");
|
||||
Base::Console().log("No model selected\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ void MaterialsEditor::onAppearanceAdd(bool checked)
|
||||
updateMaterial();
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("No model selected\n");
|
||||
Base::Console().log("No model selected\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ void MaterialsEditor::saveMaterial()
|
||||
void MaterialsEditor::accept()
|
||||
{
|
||||
if (_material->isOldFormat()) {
|
||||
Base::Console().Log("*** Old Format File ***\n");
|
||||
Base::Console().log("*** Old Format File ***\n");
|
||||
oldFormatError();
|
||||
|
||||
return;
|
||||
@@ -914,7 +914,7 @@ bool MaterialsEditor::updateTexturePreview() const
|
||||
try {
|
||||
auto property = _material->getAppearanceProperty(QStringLiteral("TextureImage"));
|
||||
if (!property->isNull()) {
|
||||
// Base::Console().Log("Has 'TextureImage'\n");
|
||||
// Base::Console().log("Has 'TextureImage'\n");
|
||||
auto propertyValue = property->getString();
|
||||
if (!propertyValue.isEmpty()) {
|
||||
QByteArray by = QByteArray::fromBase64(propertyValue.toUtf8());
|
||||
@@ -931,10 +931,10 @@ bool MaterialsEditor::updateTexturePreview() const
|
||||
try {
|
||||
auto property = _material->getAppearanceProperty(QStringLiteral("TexturePath"));
|
||||
if (!property->isNull()) {
|
||||
// Base::Console().Log("Has 'TexturePath'\n");
|
||||
// Base::Console().log("Has 'TexturePath'\n");
|
||||
auto filePath = property->getString();
|
||||
if (!image.load(filePath)) {
|
||||
Base::Console().Log("Unable to load image '%s'\n",
|
||||
Base::Console().log("Unable to load image '%s'\n",
|
||||
filePath.toStdString().c_str());
|
||||
// return; // ???
|
||||
}
|
||||
@@ -950,7 +950,7 @@ bool MaterialsEditor::updateTexturePreview() const
|
||||
auto property = _material->getAppearanceProperty(QStringLiteral("TextureScaling"));
|
||||
if (!property->isNull()) {
|
||||
// scaling = property->getFloat();
|
||||
// Base::Console().Log("Has 'TextureScaling' = %g\n", scaling);
|
||||
// Base::Console().log("Has 'TextureScaling' = %g\n", scaling);
|
||||
}
|
||||
}
|
||||
catch (const Materials::PropertyNotFound&) {
|
||||
@@ -1262,7 +1262,7 @@ void MaterialsEditor::onSelectMaterial(const QItemSelection& selected,
|
||||
_material = std::make_shared<Materials::Material>(*getMaterialManager().getMaterial(uuid));
|
||||
}
|
||||
catch (Materials::ModelNotFound const&) {
|
||||
Base::Console().Log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
|
||||
Base::Console().log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
|
||||
_material = std::make_shared<Materials::Material>();
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ private:
|
||||
}
|
||||
void setIncludeEmptyLibraries(bool value)
|
||||
{
|
||||
Base::Console().Log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
|
||||
Base::Console().log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
|
||||
_filterOptions.setIncludeEmptyLibraries(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,14 +54,14 @@ TextEdit::TextEdit(const QString& propertyName,
|
||||
_property = material->getAppearanceProperty(propertyName);
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
|
||||
_property = nullptr;
|
||||
}
|
||||
if (_property) {
|
||||
_value = _property->getString();
|
||||
}
|
||||
else {
|
||||
Base::Console().Log("No value loaded\n");
|
||||
Base::Console().log("No value loaded\n");
|
||||
_value = QString();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user