Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit 375e51e0 authored by schultezub's avatar schultezub
Browse files

minor fixes

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@320 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent f8cddf01
......@@ -31,7 +31,6 @@
#include "tgt/assert.h"
#include "core/datastructures/abstractdata.h"
#include "core/datastructures/datacontainer.h"
#include "core/datastructures/datahandle.h"
#include "application/gui/datacontainertreewidget.h"
namespace TUMVis {
......@@ -53,7 +52,6 @@ namespace TUMVis {
if (_dataContainer != 0) {
_dataContainer->s_dataAdded.disconnect(this);
}
delete _selectedDataHandle;
}
void DataContainerInspectorWidget::setDataContainer(DataContainer* dataContainer) {
......@@ -83,15 +81,13 @@ namespace TUMVis {
// Yak, this is so ugly - another reason why GUI programming sucks...
QVariant item = index.data(Qt::UserRole);
delete _selectedDataHandle;
_selectedDataHandle = new DataHandle(*static_cast<DataHandle*>(item.value<void*>()));
_selectedDataHandle = DataHandle(*static_cast<DataHandle*>(item.value<void*>()));
QModelIndex idxName = index.sibling(index.row(), 0);
_selectedDataHandleName = idxName.data(Qt::DisplayRole).toString();
}
else {
delete _selectedDataHandle;
_selectedDataHandle = 0;
_selectedDataHandle = DataHandle(0);
_selectedDataHandleName = "";
}
......@@ -132,16 +128,16 @@ namespace TUMVis {
_dctWidget, SIGNAL(clicked(const QModelIndex&)),
this, SLOT(onDCTWidgetItemClicked(const QModelIndex&)));
connect(
this, SIGNAL(dataContainerChanged(const QString&, const DataHandle*)),
_dctWidget->getTreeModel(), SLOT(onDataContainerChanged(const QString&, const DataHandle*)));
this, SIGNAL(dataContainerChanged(const QString&, const DataHandle&)),
_dctWidget->getTreeModel(), SLOT(onDataContainerChanged(const QString&, const DataHandle&)));
}
void DataContainerInspectorWidget::updateInfoWidget() {
if (_selectedDataHandle != 0) {
_lblTimestamp->setText("Timestamp: " + QString::number(_selectedDataHandle->getTimestamp()));
if (_selectedDataHandle.getData() != 0) {
_lblTimestamp->setText("Timestamp: " + QString::number(_selectedDataHandle.getTimestamp()));
_lblName->setText("Name: " + _selectedDataHandleName);
_lblLocalMemoryFootprint->setText("Local Memory Footprint: " + humanizeBytes(_selectedDataHandle->getData()->getLocalMemoryFootprint()));
_lblVideoMemoryFootprint->setText("Video Memory Footprint: " + humanizeBytes(_selectedDataHandle->getData()->getVideoMemoryFootprint()));
_lblLocalMemoryFootprint->setText("Local Memory Footprint: " + humanizeBytes(_selectedDataHandle.getData()->getLocalMemoryFootprint()));
_lblVideoMemoryFootprint->setText("Video Memory Footprint: " + humanizeBytes(_selectedDataHandle.getData()->getVideoMemoryFootprint()));
}
else {
_lblTimestamp->setText("Timestamp: ");
......
......@@ -34,6 +34,7 @@
#include "tgt/qt/qtcontextmanager.h"
#include "tgt/qt/qtthreadedcanvas.h"
#include "core/datastructures/datahandle.h"
#include "core/tools/opengljobprocessor.h"
#include <QLabel>
......@@ -52,7 +53,6 @@ namespace TUMVis {
class AbstractPipeline;
class DataContainer;
class DataContainerTreeWidget;
class DataHandle;
class DataContainerInspectorWidget : public QWidget, public sigslot::has_slots<> {
Q_OBJECT;
......@@ -115,7 +115,7 @@ namespace TUMVis {
QString humanizeBytes(size_t numBytes) const;
DataContainer* _dataContainer; ///< The DataContainer this widget is inspecting
const DataHandle* _selectedDataHandle; ///< The currently selected DataHandle
DataHandle _selectedDataHandle; ///< The currently selected DataHandle
QString _selectedDataHandleName; ///< The name of the currently selected DataHandle
DataContainerTreeWidget* _dctWidget; ///< The TreeWidget showing the DataHandles in _dataContainer
......
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