Commit b1404d05 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

some pre-merge cleanup

parent dd8e9771
......@@ -45,8 +45,5 @@ moc_*.cxx_parameters
# TBB library in ext/
ext/tbb
# alglib library in ext/
#ext/alglib
# SWIG wrapper code
*LUA_wrap.cxx
......@@ -84,5 +84,4 @@ namespace campvis {
if (_ignorePropertyUpdates == 0)
emit s_propertyChanged(property);
}
}
......@@ -30,9 +30,6 @@
#include "application/gui/properties/propertywidgetfactory.h"
#include "core/properties/floatingpointproperty.h"
#include "application/gui/qtcolortools.h"
namespace campvis {
/**
* Widget for a FloatProperty
......@@ -273,7 +270,7 @@ namespace campvis {
void onValueChanged(double value) { onValueChangedImpl(); };
};
// ================================================================================================
// ================================================================================================
class Vec4PropertyWidget : public VecPropertyWidget<4> {
Q_OBJECT
......@@ -290,8 +287,7 @@ namespace campvis {
void onValueChanged(double value) { onValueChangedImpl(); };
};
// ================================================================================================
// ================================================================================================
// explicitly instantiate template, so that it gets registered also over DLL boundaries.
template class PropertyWidgetRegistrar<Vec2PropertyWidget, typename VecPropertyWidgetTraits<2>::PropertyType, 5>;
......
......@@ -67,7 +67,7 @@ namespace campvis {
* FloatingPointProperty extends NumericProperty to control how many decimal places should be
* shown when displaying the property's value.
*
* \param T Base type of the property's value.
* \tparam T Base type of the property's value.
*/
template<typename T>
class FloatingPointProperty : public NumericProperty<T> {
......@@ -133,8 +133,6 @@ namespace campvis {
typedef FloatingPointProperty<tgt::vec3> Vec3Property;
typedef FloatingPointProperty<tgt::vec4> Vec4Property;
//typedef FloatingPointProperty<tgt::vec4> ColorProperty;
// = Template Implementation ======================================================================
template<typename T>
......
......@@ -256,7 +256,6 @@ namespace campvis {
LERROR("Could not find option with id '" + id + "'");
}
//TODO: Shouldn't this be index >= 0 ?
template<typename T>
void campvis::GenericOptionProperty<T>::selectByIndex(int index) {
tgtAssert(index >= 0 && index < _options.size(), "Index out of bounds.");
......@@ -277,7 +276,6 @@ namespace campvis {
template<typename T>
size_t campvis::GenericOptionProperty<T>::addOption(GenericOption<T> option) {
this->_options.push_back(option);
//setMaxValue(this->_options.size());
setMaxValue(static_cast<int>(this->_options.size()) - 1);
return this->_options.size();
}
......@@ -286,15 +284,15 @@ namespace campvis {
size_t campvis::GenericOptionProperty<T>::removeCurrent() {
int index = getValue();
if (index == 0) return 0;
if(index <= this->_options.size()-1)
if (index <= this->_options.size()-1)
this->_options.erase(this->_options.begin() + index);
selectByIndex(index <= static_cast<int>(this->_options.size())-1? index : static_cast<int>(this->_options.size())-1);
return index <= static_cast<int>(this->_options.size())-1? index : static_cast<int>(this->_options.size())-1;
selectByIndex((index <= static_cast<int>(this->_options.size()) - 1) ? index : static_cast<int>(this->_options.size()) - 1);
return (index <= static_cast<int>(this->_options.size()) - 1) ? index : (static_cast<int>(this->_options.size()) - 1);
}
template<typename T>
size_t campvis::GenericOptionProperty<T>::updateCurrent(GenericOption<T> copy) {
std::vector< GenericOption<T> >::iterator *it = this->_options[getValue()];
std::vector< GenericOption<T> >::iterator* it = this->_options[getValue()];
it->_id = copy._id;
it->_title = copy._title;
it->_value = copy._value;
......@@ -303,14 +301,14 @@ namespace campvis {
template<typename T>
size_t campvis::GenericOptionProperty<T>::updateCurrent(T& copy) {
GenericOption<T> *it = &this->_options[getValue()];
GenericOption<T>* it = &this->_options[getValue()];
it->_value = copy;
return this->_options.size();
}
template<typename T>
T& campvis::GenericOptionProperty<T>::getOptionReference(int index) {
return index == -1? _options[_value]._value : _options[index]._value;
return (index == -1) ? _options[_value]._value : _options[index]._value;
}
template<typename T>
......
......@@ -57,14 +57,13 @@ namespace campvis {
DevilImageReader::DevilImageReader(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
//, p_url("url", "Image URL", "", StringProperty::OPEN_FILENAME)
//, p_targetImageID("targetImageName", "Target Image ID", "DevilImageReader.output", DataNameProperty::WRITE)
, p_importType("ImportType", "Import Type", importOptions, 4)
, p_importSimilar("ImportSimilar", "Import All Similar Files", false)
, _shader(nullptr)
, _devilTextureReader(nullptr)
{
this->_ext.push_back(".jpg");
this->_ext.push_back(".png");
this->_ext.push_back(".tif");
this->p_targetImageID.setValue("DevilImageReader.output");
......
......@@ -75,8 +75,6 @@ namespace campvis {
/// \see AbstractProcessor::getProcessorState()
virtual ProcessorState getProcessorState() const { return AbstractProcessor::EXPERIMENTAL; };
//StringProperty p_url; ///< URL for file to read
//DataNameProperty p_targetImageID; ///< image ID for read image
GenericOptionProperty<std::string> p_importType;
BoolProperty p_importSimilar;
......
......@@ -659,9 +659,9 @@ namespace campvis {
name += StringUtils::toString(++_objectNameSuffix, 2, '0');
ContourObject obj(name);
obj._color.setValue(tgt::vec4(
(float)0.9 - 0.2 * (_objectNameSuffix%3) + 0.15 *(_objectNameSuffix/3),
(float)0.2 + 0.2 * (_objectNameSuffix%3) - 0.15 *(_objectNameSuffix/3),
(float)0.5 + 0.2 * (_objectNameSuffix%3) - 0.15 *(_objectNameSuffix/3), 1));
static_cast<float>(0.9 - 0.2 * (_objectNameSuffix%3) + 0.15 *(_objectNameSuffix/3)),
static_cast<float>(0.2 + 0.2 * (_objectNameSuffix%3) - 0.15 *(_objectNameSuffix/3)),
static_cast<float>(0.5 + 0.2 * (_objectNameSuffix%3) - 0.15 *(_objectNameSuffix/3)), 1));
p_objectList->addOption(GenericOption<ContourObject>(name, name, obj));
p_objectList->selectById(name);
}
......
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