* Added kiosk mode to MainWindow

* Added stretch widget to PropertyCollectionWidget
parent 3174812b
......@@ -196,6 +196,10 @@ namespace campvis {
++i;
}
else if (pipelinesToAdd[i] == "-k") {
// set kiosk mode
_mainWindow->enableKioskMode();
}
else {
DataContainer* dc = createAndAddDataContainer("DataContainer #" + StringUtils::toString(_dataContainers.size() + 1));
AbstractPipeline* p = PipelineFactory::getRef().createPipeline(pipelinesToAdd[i].toStdString(), dc);
......
......@@ -428,4 +428,13 @@ namespace campvis {
_workflowWidget->setWorkflow(w);
}
void MainWindow::enableKioskMode() {
ui.logViewerDock->hide();
ui.pipelineTreeDock->hide();
ui.pipelinePropertiesDock->hide();
ui.scriptingConsoleDock->hide();
ui.workflowDock->show();
}
}
......@@ -99,6 +99,12 @@ namespace campvis {
*/
void setWorkflow(AbstractWorkflow* w);
/**
* Enables the kiosk mode of the MainWindow.
* In kiosk mode, all docks but the main canvas and the workflow dock are hidden.
*/
void enableKioskMode();
protected:
/**
* Listens to resize events on _pipelinePropertiesWidget and resizes _pipelinePropertiesScrollArea accordingly
......@@ -160,7 +166,7 @@ namespace campvis {
/**
* Slot to be called by the application when its collection of DataContainers has changed.
*/
void onDataContainersChanged();
void onDataContainersChanged();
/**
* Setup Qt GUI stuff
......
......@@ -36,9 +36,10 @@
namespace campvis {
PropertyCollectionWidget::PropertyCollectionWidget(QWidget* parent /*= 0*/)
: QWidget(parent)
, _propCollection(0)
, _dataContainer(0)
, _layout(0)
, _propCollection(nullptr)
, _dataContainer(nullptr)
, _layout(nullptr)
, _strechWidget(nullptr)
{
setupWidget();
}
......@@ -70,6 +71,9 @@ namespace campvis {
_layout->setSpacing(8);
_layout->setMargin(0);
setLayout(_layout);
_strechWidget = new QWidget(this);
connect(this, SIGNAL(s_propertyVisibilityChanged(const AbstractProperty*)), this, SLOT(onWidgetVisibilityChanged(const AbstractProperty*)));
connect(this, SIGNAL(propertyAdded(AbstractProperty*)), this, SLOT(addProperty(AbstractProperty*)));
connect(this, SIGNAL(propertyRemoved(AbstractProperty*, QWidget*)), this, SLOT(removeProperty(AbstractProperty*, QWidget*)));
......@@ -124,6 +128,9 @@ namespace campvis {
_widgetMap.insert(std::make_pair(prop, propWidget));
_layout->addWidget(propWidget);
_layout->removeWidget(_strechWidget);
_layout->addWidget(_strechWidget, 1);
prop->s_visibilityChanged.connect(this, &PropertyCollectionWidget::onPropertyVisibilityChanged);
prop->s_visibilityChanged.emitSignal(prop);
}
......
......@@ -117,6 +117,7 @@ namespace campvis {
DataContainer* _dataContainer; ///< The DataContainer the properties shall work on
QVBoxLayout* _layout;
QWidget* _strechWidget;
std::map<AbstractProperty*, QWidget*> _widgetMap;
};
}
......
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