Commit 5e1ab4b9 authored by Hossain Mahmud's avatar Hossain Mahmud
Browse files

GUI beautification: DataContainerInspectorWidget; Save and load next to each...

GUI beautification: DataContainerInspectorWidget; Save and load next to each other, hide save if no devil module, disable save btn if no item selected
parent 35bc218b
......@@ -167,11 +167,25 @@ namespace campvis {
_lblBounds = new QLabel(tr("World Bounds:"), _infoWidget);
QWidget* btnWidget = new QWidget(this);
QGridLayout* gridLayout = new QGridLayout();
_btnSaveToFile = new QPushButton(tr("Save to File"), _infoWidget);
gridLayout->addWidget(_btnSaveToFile, 0, 0);
_btnSaveToFile, SIGNAL(clicked()),
this, SLOT(onBtnSaveToFileClicked()));
_btnLoadFile = new QPushButton(tr("Load File"), _infoWidget);
gridLayout->addWidget(_btnLoadFile, 0, 1);
_canvas = new DataContainerInspectorCanvas(_infoWidget);
_canvas->setMinimumSize(QSize(100, 100));
......@@ -193,9 +207,6 @@ namespace campvis {
this, SIGNAL(dataContainerChanged(const QString&, QtDataHandle)),
_dctWidget->getTreeModel(), SLOT(onDataContainerChanged(const QString&, QtDataHandle)));
_btnSaveToFile, SIGNAL(clicked()),
this, SLOT(onBtnSaveToFileClicked()));
_btnLoadFile, SIGNAL(clicked()),
this, SLOT(onBtnLoadFileClicked()));
......@@ -362,6 +373,18 @@ namespace campvis {
void DataContainerInspectorWidget::onDCTWidgetSelectionModelSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected) {
// get the selection from the tree widget
const QModelIndexList& indices = _dctWidget->selectionModel()->selectedRows();
// iterate through the indices of the selection
for (QModelIndexList::const_iterator index = indices.begin(); index != indices.end(); ++index) {
if (index->isValid()) {
void DataContainerInspectorWidget::onBtnSaveToFileClicked() {
......@@ -185,6 +185,7 @@ namespace campvis {
QHBoxLayout* _mainLayout; ///< Layout for this widget
QWidget* _infoWidget; ///< Widget showing the information about the selected QtDataHandle
QVBoxLayout* _infoWidgetLayout; ///< Layout for the _infoWidget
//QGridLayout* _infoWidgetLayout; ///< Layout for the _infoWidget
QLabel* _lblName;
QLabel* _lblLocalMemoryFootprint;
Supports Markdown
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