Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit 675a3482 authored by Jakob Weiss's avatar Jakob Weiss

Feature: Processor instance names

Instance names to (re-)name processor instances individually for UI and discrimination of different instances

# Conflicts:
#	core/pipeline/abstractprocessor.h
parent a1a66467
......@@ -133,7 +133,7 @@ namespace campvis {
switch (role) {
case Qt::DisplayRole:
if (column == COLUMN_NAME)
return QVariant(QString::fromStdString(_processor->getName()));
return QVariant(QString::fromStdString(_processor->getInstanceName()));
else
return QVariant();
case Qt::CheckStateRole:
......
......@@ -48,6 +48,7 @@ namespace campvis {
}
void AbstractProcessor::init() {
_instanceName = this->getName();
initAllProperties();
}
......@@ -134,7 +135,6 @@ namespace campvis {
_clockExecutionTime = value;
}
void AbstractProcessor::process(DataContainer& data) {
if (hasInvalidShader()) {
updateShader();
......
......@@ -148,7 +148,29 @@ namespace campvis {
* \return The current processor state in terms of stability.
*/
virtual ProcessorState getProcessorState() const = 0;
/**
* Gets the name of the instance, to be used to disambiguate several instances of the same
* processor.
* \return _instanceName
*/
std::string getInstanceName() const {
return _instanceName;
};
/**
* Sets the name of the instance.
*/
void setInstanceName(const std::string& name) {
_instanceName = name;
s_instanceNameChanged.emitSignal();
}
/**
* Signals when the instance name has changed. Useful for updating the GUI
*/
sigslot::signal0 s_instanceNameChanged;
/**
* Registers \a prop as property with the provided invalidation level. Registered properties
* can be accessed from the outside, e.g. via getProperty(), and will automatically invalidate
......@@ -380,6 +402,8 @@ namespace campvis {
tbb::atomic<int> _level; ///< current invalidation level
tbb::concurrent_queue<int> _queuedInvalidations;
std::string _instanceName; ///< instance name displayed in the GUI
static const std::string loggerCat_;
};
......
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