Ejemplo n.º 1
0
void CleanupSettingsPane::showEvent(QShowEvent *se) {
  QFrame::showEvent(se);

  if (!m_attached) {
    m_attached = true;
    // Should ensure that swatch is off...
    CleanupSettingsModel *model = CleanupSettingsModel::instance();

    model->attach(CleanupSettingsModel::LISTENER);

    bool ret = true;
    ret      = ret && connect(model, SIGNAL(imageSwitched()), this,
                         SLOT(onImageSwitched()));
    ret = ret && connect(model, SIGNAL(modelChanged(bool)), this,
                         SLOT(updateGui(bool)));
    ret = ret && connect(model, SIGNAL(clnLoaded()), this, SLOT(onClnLoaded()));
    assert(ret);

    m_cameraWidget->setCurrentLevel(
        TApp::instance()->getCurrentLevel()->getLevel());

    updateGui(false);
    onImageSwitched();
    onClnLoaded();
  }
Ejemplo n.º 2
0
void PreviewToggleCommand::enable() {
  // Cleanup Preview and Camera Test are exclusive. In case, disable the latter.
  // NOTE: This is done *before* attaching, since attach may invoke a preview
  // rebuild.
  CameraTestCheck *tc = CameraTestCheck::instance();
  tc->setIsEnabled(false);

  // Attach to the model
  CleanupSettingsModel *model = CleanupSettingsModel::instance();

  model->attach(CleanupSettingsModel::LISTENER |
                CleanupSettingsModel::PREVIEWER);

  // Connect signals
  bool ret = true;
  ret      = ret && connect(model, SIGNAL(previewDataChanged()), this,
                       SLOT(onPreviewDataChanged()));
  ret = ret && connect(model, SIGNAL(modelChanged(bool)), this,
                       SLOT(onModelChanged(bool)));
  ret = ret && connect(&m_timer, SIGNAL(timeout()), this, SLOT(postProcess()));

  TPaletteHandle *ph =
      TApp::instance()->getPaletteController()->getCurrentCleanupPalette();
  ret =
      ret && connect(ph, SIGNAL(colorStyleChanged()), &m_timer, SLOT(start()));
  ret = ret && connect(ph, SIGNAL(paletteChanged()), &m_timer, SLOT(start()));
  assert(ret);

  onPreviewDataChanged();

  // in preview cleanup mode, tools are forbidden! Reverting to hand...
  TApp::instance()->getCurrentTool()->setTool(T_Hand);
}
Ejemplo n.º 3
0
void CameraTestToggleCommand::enable() {
  /*---既に現在のツールがCameraTestになっている場合はreturn---*/
  m_oldTool = TApp::instance()->getCurrentTool()->getTool();
  if (m_oldTool->getName().compare("T_CameraTest") == 0) {
    CameraTestCheck::instance()->setIsEnabled(true);
    disable();
    return;
  }

  // Cleanup Preview and Camera Test are exclusive. In case, disable the latter.
  // NOTE: This is done *before* attaching, since attach may invoke a preview
  // rebuild.
  CleanupPreviewCheck *pc = CleanupPreviewCheck::instance();
  pc->setIsEnabled(false);

  // Attach to the model
  CleanupSettingsModel *model = CleanupSettingsModel::instance();
  model->attach(
      CleanupSettingsModel::LISTENER | CleanupSettingsModel::CAMERATEST, false);

  // Connect signals
  bool ret = true;
  ret      = ret && connect(model, SIGNAL(previewDataChanged()), this,
                       SLOT(onPreviewDataChanged()));
  assert(ret);

  onPreviewDataChanged();

  TApp::instance()->getCurrentTool()->setTool("T_CameraTest");
}
Ejemplo n.º 4
0
void PreviewToggleCommand::disable() {
  CleanupSettingsModel *model = CleanupSettingsModel::instance();

  model->detach(CleanupSettingsModel::LISTENER |
                CleanupSettingsModel::PREVIEWER);

  bool ret = true;
  ret      = ret && disconnect(model, SIGNAL(previewDataChanged()), this,
                          SLOT(onPreviewDataChanged()));
  ret = ret && disconnect(model, SIGNAL(modelChanged(bool)), this,
                          SLOT(onModelChanged(bool)));
  ret =
      ret && disconnect(&m_timer, SIGNAL(timeout()), this, SLOT(postProcess()));

  // Cleanup palette changes all falls under post-processing stuff. And do not
  // involve the model.
  TPaletteHandle *ph =
      TApp::instance()->getPaletteController()->getCurrentCleanupPalette();
  ret = ret &&
        disconnect(ph, SIGNAL(colorStyleChanged()), &m_timer, SLOT(start()));
  ret =
      ret && disconnect(ph, SIGNAL(paletteChanged()), &m_timer, SLOT(start()));
  assert(ret);

  clean();

  TApp::instance()->getCurrentLevel()->notifyLevelChange();
}
Ejemplo n.º 5
0
void CleanupTab::onPathChange()
{
	CleanupSettingsModel *model = CleanupSettingsModel::instance();
	CleanupParameters *params = model->getCurrentParameters();

	m_path = params->m_path = TFilePath(m_pathField->getPath().toStdWString());

	model->commitChanges();
}
Ejemplo n.º 6
0
void ProcessingTab::onSharpnessChange(bool dragging = false)
{
	if (dragging)
		return;

	CleanupSettingsModel *model = CleanupSettingsModel::instance();

	model->getCurrentParameters()->m_sharpness = m_sharpness->getValue();
	model->commitChanges();
}
Ejemplo n.º 7
0
  void execute() {
    CleanupSettingsModel *model = CleanupSettingsModel::instance();
    CleanupParameters *params   = model->getCurrentParameters();

    params->m_transparencyCheckEnabled = !params->m_transparencyCheckEnabled;

    /*-- OpacityCheckのON/OFFでは、Dirtyフラグは変化させない --*/
    bool dirty = params->getDirtyFlag();
    model->commitChanges();
    params->setDirtyFlag(dirty);
  }
Ejemplo n.º 8
0
void CleanupTab::onGenericSettingsChange()
{
	CleanupSettingsModel *model = CleanupSettingsModel::instance();
	CleanupParameters *params = model->getCurrentParameters();

	params->m_autocenterType = m_autoCenter->isChecked() ? CleanupTypes::AUTOCENTER_FDG : CleanupTypes::AUTOCENTER_NONE;
	params->m_pegSide = (CleanupTypes::PEGS_SIDE)(m_pegHolesOm->currentIndex() + 1);
	params->setFdgByName(m_fieldGuideOm->currentText().toStdString());
	params->m_rotate = m_rotateOm->currentIndex() * 90;
	params->m_flipx = m_flipX->isChecked();
	params->m_flipy = m_flipY->isChecked();

	model->commitChanges();
}
Ejemplo n.º 9
0
void ProcessingTab::onGenericSettingsChange()
{
	CleanupSettingsModel *model = CleanupSettingsModel::instance();
	CleanupParameters *params = model->getCurrentParameters();

	params->m_lineProcessingMode = m_lineProcessing->currentIndex();
	params->m_noAntialias = (m_antialias->currentIndex() > 0);
	params->m_postAntialias = (m_antialias->currentIndex() == 2);
	params->m_despeckling = m_despeckling->getValue();
	params->m_aaValue = m_aaValue->getValue();
	params->m_autoAdjustMode = (CleanupTypes::AUTO_ADJ_MODE)m_autoadjustOm->currentIndex();

	if (params->m_lineProcessingMode == lpNone)
		params->m_transparencyCheckEnabled = false;

	model->commitChanges();
}
Ejemplo n.º 10
0
void CameraTestToggleCommand::disable() {
  CleanupSettingsModel *model = CleanupSettingsModel::instance();
  model->detach(CleanupSettingsModel::LISTENER |
                CleanupSettingsModel::CAMERATEST);

  bool ret = true;
  ret      = ret && disconnect(model, SIGNAL(previewDataChanged()), this,
                          SLOT(onPreviewDataChanged()));
  assert(ret);

  clean();

  TApp::instance()->getCurrentLevel()->notifyLevelChange();

  TApp::instance()->getCurrentTool()->setTool(
      QString::fromStdString(m_oldTool->getName()));
  m_oldTool = 0;
}
Ejemplo n.º 11
0
void CameraTab::updateImageInfo()
{
	CleanupSettingsModel *model = CleanupSettingsModel::instance();
	CleanupParameters *params = model->getCurrentParameters();

	TDimension outRes(0, 0);
	TPointD outDpi;

	params->getOutputImageInfo(outRes, outDpi.x, outDpi.y);
	setImageInfo(outRes.lx, outRes.ly, outDpi.x, outDpi.y);

	TXshSimpleLevel *sl;
	TFrameId fid;
	model->getCleanupFrame(sl, fid);

	ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();
	TFilePath outputPath(sl ? scene->decodeFilePath(model->getOutputPath(sl, params)) : TFilePath());

	setImageInfo(outputPath);
}
Ejemplo n.º 12
0
void CameraTestToggleCommand::onPreviewDataChanged() {
  CleanupSettingsModel *model = CleanupSettingsModel::instance();

  // Retrieve level under cleanup
  TXshSimpleLevel *sl;
  TFrameId fid;
  model->getCleanupFrame(sl, fid);

  // In case the level changes, release all previously previewed images
  if (m_sl.getPointer() != sl) clean();

  m_sl = sl;
  if (sl) {
    if (!(sl->getFrameStatus(fid) & TXshSimpleLevel::CleanupPreview)) {
      m_fids.push_back(fid);
      sl->setFrameStatus(
          fid, sl->getFrameStatus(fid) | TXshSimpleLevel::CleanupPreview);
    }

    postProcess();
  }
}
Ejemplo n.º 13
0
void CameraTestToggleCommand::postProcess() {
  TApp *app                   = TApp::instance();
  CleanupSettingsModel *model = CleanupSettingsModel::instance();

  TXshSimpleLevel *sl;
  TFrameId fid;
  model->getCleanupFrame(sl, fid);

  assert(sl);
  if (!sl) return;

  // Retrieve transformed image
  TRasterImageP transformed;
  {
    TRasterImageP original;
    model->getCameraTestData(original, transformed);
  }

  // Substitute current frame image with previewed one
  sl->setFrame(fid, transformed);

  TApp::instance()->getCurrentLevel()->notifyLevelChange();
}
Ejemplo n.º 14
0
void PreviewToggleCommand::postProcess() {
  TApp *app                   = TApp::instance();
  CleanupSettingsModel *model = CleanupSettingsModel::instance();

  TXshSimpleLevel *sl;
  TFrameId fid;
  model->getCleanupFrame(sl, fid);

  assert(sl);
  if (!sl) return;

  // Retrieve transformed image
  TRasterImageP transformed;
  {
    TRasterImageP original;
    TAffine transform;

    model->getPreviewData(original, transformed, transform);
    if (!transformed) return;
  }

  // Perform post-processing
  TRasterImageP preview(
      TCleanupper::instance()->processColors(transformed->getRaster()));

  TPointD dpi;
  transformed->getDpi(dpi.x, dpi.y);
  preview->setDpi(dpi.x, dpi.y);

  transformed = TRasterImageP();

  // Substitute current frame image with previewed one
  sl->setFrame(fid, preview);

  TApp::instance()->getCurrentLevel()->notifyLevelChange();
}
Ejemplo n.º 15
0
CleanupSettingsPane::CleanupSettingsPane(QWidget *parent)
    : QFrame(parent), m_attached(false) {
  // Rotate&Flip
  QFrame *rotFlipFrame = new QFrame(this);
  m_rotateOm           = new QComboBox(this);
  m_flipX              = new QCheckBox(tr("Horizontal"), this);
  m_flipY              = new QCheckBox(tr("Vertical"), this);
  // Camera
  QFrame *cameraFrame = new QFrame(this);
  m_cameraWidget      = new CleanupCameraSettingsWidget();
  // LineProcessing
  QFrame *lineProcFrame = new QFrame(this);
  m_antialias           = new QComboBox(this);
  m_sharpness           = new DoubleField(this);
  m_despeckling         = new IntField(this);
  m_aaValueLabel        = new QLabel(tr("MLAA Intensity:"));
  m_aaValue             = new IntField(this);
  m_lineProcessing      = new QComboBox(this);
  m_paletteViewer       = new CleanupPaletteViewer(this);
  m_pathField           = new CleanupSaveInField(this, QString(""));

  QPushButton *saveBtn  = new QPushButton(tr("Save"));
  QPushButton *loadBtn  = new QPushButton(tr("Load"));
  QPushButton *resetBtn = new QPushButton(tr("Reset"));

  // Rotate&Flip
  rotFlipFrame->setObjectName("CleanupSettingsFrame");
  QStringList rotate;
  rotate << "0"
         << "90"
         << "180"
         << "270";
  m_rotateOm->addItems(rotate);
  // Camera
  cameraFrame->setObjectName("CleanupSettingsFrame");
  m_cameraWidget->setCameraPresetListFile(ToonzFolder::getReslistPath(true));
  // LineProcessing
  lineProcFrame->setObjectName("CleanupSettingsFrame");
  QStringList items;
  items << tr("Standard") << tr("None") << tr("Morphological");
  m_antialias->addItems(items);

  items.clear();
  items << tr("Greyscale") << tr("Color");
  m_lineProcessing->addItems(items);

  m_sharpness->setValues(90, 0, 100);
  m_despeckling->setValues(2, 0, 20);
  m_aaValue->setValues(70, 0, 100);

  //  Model-related stuff
  CleanupSettingsModel *model = CleanupSettingsModel::instance();
  m_backupParams.assign(model->getCurrentParameters(), false);

  //----layout
  QVBoxLayout *mainLay = new QVBoxLayout();
  mainLay->setSpacing(2);
  mainLay->setMargin(5);
  {
    // Rotate&Flip
    QGridLayout *rotFlipLay = new QGridLayout();
    rotFlipLay->setMargin(5);
    rotFlipLay->setSpacing(3);
    {
      rotFlipLay->addWidget(new QLabel(tr("Rotate")), 0, 0,
                            Qt::AlignRight | Qt::AlignVCenter);
      rotFlipLay->addWidget(m_rotateOm, 0, 1, 1, 2);
      rotFlipLay->addWidget(new QLabel(tr("Flip")), 1, 0,
                            Qt::AlignRight | Qt::AlignVCenter);
      rotFlipLay->addWidget(m_flipX, 1, 1);
      rotFlipLay->addWidget(m_flipY, 1, 2);
    }
    rotFlipLay->setColumnStretch(0, 0);
    rotFlipLay->setColumnStretch(1, 0);
    rotFlipLay->setColumnStretch(2, 1);
    rotFlipFrame->setLayout(rotFlipLay);
    mainLay->addWidget(rotFlipFrame, 0);

    // Camera
    QVBoxLayout *cleanupCameraFrameLay = new QVBoxLayout();
    cleanupCameraFrameLay->setMargin(0);
    cleanupCameraFrameLay->setSpacing(0);
    { cleanupCameraFrameLay->addWidget(m_cameraWidget); }
    cameraFrame->setLayout(cleanupCameraFrameLay);
    mainLay->addWidget(cameraFrame, 0);

    // Cleanup Palette
    QGridLayout *lineProcLay = new QGridLayout();
    lineProcLay->setMargin(5);
    lineProcLay->setSpacing(3);
    {
      lineProcLay->addWidget(new QLabel(tr("Line Processing:")), 0, 0,
                             Qt::AlignRight | Qt::AlignVCenter);
      lineProcLay->addWidget(m_lineProcessing, 0, 1);
      lineProcLay->addWidget(new QLabel(tr("Antialias:")), 1, 0,
                             Qt::AlignRight | Qt::AlignVCenter);
      lineProcLay->addWidget(m_antialias, 1, 1);
      lineProcLay->addWidget(new QLabel(tr("Sharpness:")), 2, 0,
                             Qt::AlignRight | Qt::AlignVCenter);
      lineProcLay->addWidget(m_sharpness, 2, 1);
      lineProcLay->addWidget(new QLabel(tr("Despeckling:")), 3, 0,
                             Qt::AlignRight | Qt::AlignVCenter);
      lineProcLay->addWidget(m_despeckling, 3, 1);
      lineProcLay->addWidget(m_aaValueLabel, 4, 0,
                             Qt::AlignRight | Qt::AlignVCenter);
      lineProcLay->addWidget(m_aaValue, 4, 1);

      lineProcLay->addWidget(m_paletteViewer, 5, 0, 1, 2);
    }
    lineProcLay->setRowStretch(0, 0);
    lineProcLay->setRowStretch(1, 0);
    lineProcLay->setRowStretch(2, 0);
    lineProcLay->setRowStretch(3, 0);
    lineProcLay->setRowStretch(4, 0);
    lineProcLay->setRowStretch(5, 1);
    lineProcLay->setColumnStretch(0, 0);
    lineProcLay->setColumnStretch(1, 1);

    lineProcFrame->setLayout(lineProcLay);

    mainLay->addWidget(lineProcFrame, 100);

    // Bottom Parts
    QHBoxLayout *pathLay = new QHBoxLayout();
    pathLay->setMargin(0);
    pathLay->setSpacing(3);
    {
      pathLay->addWidget(new QLabel("Save In"), 0);
      pathLay->addWidget(m_pathField);
    }
    mainLay->addLayout(pathLay, 0);

    mainLay->addSpacing(5);

    QHBoxLayout *saveLoadLay = new QHBoxLayout();
    saveLoadLay->setMargin(0);
    saveLoadLay->setSpacing(1);
    {
      saveLoadLay->addWidget(saveBtn);
      saveLoadLay->addWidget(loadBtn);
      saveLoadLay->addWidget(resetBtn);
    }
    mainLay->addLayout(saveLoadLay, 0);
  }
  setLayout(mainLay);

  //-----signal-slot connections
  bool ret = true;
  ret      = ret && connect(m_rotateOm, SIGNAL(activated(int)),
                       SLOT(onGenericSettingsChange()));
  ret = ret && connect(m_flipX, SIGNAL(stateChanged(int)),
                       SLOT(onGenericSettingsChange()));
  ret = ret && connect(m_flipY, SIGNAL(stateChanged(int)),
                       SLOT(onGenericSettingsChange()));
  ret =
      ret && connect(m_pathField, SIGNAL(pathChanged()), SLOT(onPathChange()));
  ret = ret && connect(m_sharpness, SIGNAL(valueChanged(bool)),
                       SLOT(onSharpnessChange(bool)));
  ret = ret && connect(m_antialias, SIGNAL(activated(int)),
                       SLOT(onGenericSettingsChange()));
  ret = ret && connect(m_lineProcessing, SIGNAL(activated(int)),
                       SLOT(onGenericSettingsChange()));
  ret = ret && connect(m_despeckling, SIGNAL(valueChanged(bool)),
                       SLOT(onGenericSettingsChange()));
  ret = ret && connect(m_aaValue, SIGNAL(valueChanged(bool)),
                       SLOT(onGenericSettingsChange()));
  ret = ret &&
        connect(TApp::instance()->getCurrentLevel(),
                SIGNAL(xshLevelSwitched(TXshLevel *)), SLOT(onLevelSwitched()));
  ret = ret && connect(m_cameraWidget, SIGNAL(cleanupSettingsChanged()),
                       SLOT(onGenericSettingsChange()));

  ret =
      ret && connect(saveBtn, SIGNAL(pressed()), this, SLOT(onSaveSettings()));

  ret = ret && connect(loadBtn, SIGNAL(pressed()), model, SLOT(promptLoad()));
  ret = ret && connect(resetBtn, SIGNAL(pressed()), this,
                       SLOT(onRestoreSceneSettings()));

  assert(ret);
}
Ejemplo n.º 16
0
CleanupSettings::CleanupSettings(QWidget *parent)
	: QWidget(parent), m_attached(false)
{
	QVBoxLayout *vLayout = new QVBoxLayout(this);
	vLayout->setMargin(1); // NOTE: This works to show the 1-pix black border,
						   // because this is a QWidget (not QFrame) heir...
	setLayout(vLayout);

	//   Tabs Container
	// Used to deal with styled background and other stuff

	TabBarContainter *tabBarContainer = new TabBarContainter(this);
	QHBoxLayout *hLayout = new QHBoxLayout(tabBarContainer);

	hLayout->setMargin(0);
	hLayout->setAlignment(Qt::AlignLeft);
	hLayout->addSpacing(6);

	vLayout->addWidget(tabBarContainer);

	//  Tabs Bar

	DVGui::TabBar *tabBar = new DVGui::TabBar(this);
	hLayout->addWidget(tabBar);

	tabBar->addSimpleTab(tr("Cleanup"));
	tabBar->addSimpleTab(tr("Processing"));
	tabBar->addSimpleTab(tr("Camera"));
	tabBar->setDrawBase(false);

	//  Splitter

	QSplitter *split = new QSplitter(Qt::Vertical, this);
	split->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
	vLayout->addWidget(split);

	//  Stacked Widget

	QStackedWidget *stackedWidget = new QStackedWidget(split);
	stackedWidget->setMinimumWidth(300);
	//stackedWidget->setMinimumHeight(250);

	split->addWidget(stackedWidget);
	split->setStretchFactor(0, 1);

	//  Cleanup Tab

	QScrollArea *scrollArea = new QScrollArea(stackedWidget);
	stackedWidget->addWidget(scrollArea);

	scrollArea->setWidgetResizable(true);
	scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

	m_cleanupTab = new CleanupTab;
	scrollArea->setWidget(m_cleanupTab);

	//  Processing Tab

	scrollArea = new QScrollArea(stackedWidget);
	stackedWidget->addWidget(scrollArea);

	scrollArea->setWidgetResizable(true);
	scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

	m_processingTab = new ProcessingTab;
	scrollArea->setWidget(m_processingTab);

	//  Camera Tab

	scrollArea = new QScrollArea(stackedWidget);
	stackedWidget->addWidget(scrollArea);

	scrollArea->setWidgetResizable(true);
	scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

	m_cameraTab = new CameraTab;
	scrollArea->setWidget(m_cameraTab);

	m_cameraTab->setCameraPresetListFile(ToonzFolder::getReslistPath(true));

	//  Swatch

	m_swatch = new CleanupSwatch(split, 200, 150);
	split->addWidget(m_swatch);

	//  ToolBar

	QWidget *toolBarWidget = new QWidget(this);
	vLayout->addWidget(toolBarWidget);

	toolBarWidget->setFixedHeight(22);

	QHBoxLayout *toolBarLayout = new QHBoxLayout(toolBarWidget);
	toolBarWidget->setLayout(toolBarLayout);

	toolBarLayout->setMargin(0);
	toolBarLayout->setSpacing(0);

	QToolBar *leftToolBar = new QToolBar(toolBarWidget);
	toolBarLayout->addWidget(leftToolBar, 0, Qt::AlignLeft);

	leftToolBar->setFixedWidth(110);

	m_swatchAct = new QAction(createQIconOnOffPNG("preview", true), tr("Toggle Swatch Preview"), this);
	m_swatchAct->setCheckable(true);
	leftToolBar->addAction(m_swatchAct);
	leftToolBar->addSeparator();

	m_opacityAct = new QAction(createQIconOnOffPNG("opacitycheck", true), tr("Toggle Opacity Check"), this);
	m_opacityAct->setCheckable(true);
	leftToolBar->addAction(m_opacityAct);

	QToolBar *spacingToolBar1 = new QToolBar(toolBarWidget);
	toolBarLayout->addWidget(spacingToolBar1, 1);

	spacingToolBar1->setMinimumHeight(22);

	QToolBar *rightToolBar = new QToolBar(toolBarWidget);
	toolBarLayout->addWidget(rightToolBar, 0, Qt::AlignRight);

	rightToolBar->setFixedWidth(110);

	QAction *saveAct = new QAction(createQIconOnOffPNG("save", false), tr("Save Settings"), this);
	rightToolBar->addAction(saveAct);
	QAction *loadAct = new QAction(createQIconOnOffPNG("load", false), tr("Load Settings"), this);
	rightToolBar->addAction(loadAct);
	rightToolBar->addSeparator();
	QAction *resetAct = new QAction(createQIconOnOffPNG("resetsize", false), tr("Reset Settings"), this);
	rightToolBar->addAction(resetAct);

	//  Model-related stuff
	CleanupSettingsModel *model = CleanupSettingsModel::instance();
	m_backupParams.assign(model->getCurrentParameters(), false);

	//  Connections

	QAction *opacityCheckCmd = CommandManager::instance()->getAction(MI_OpacityCheck);
	assert(opacityCheckCmd);

	bool ret = true;
	ret = ret && connect(tabBar, SIGNAL(currentChanged(int)), stackedWidget, SLOT(setCurrentIndex(int)));
	ret = ret && connect(m_swatchAct, SIGNAL(toggled(bool)), SLOT(enableSwatch(bool)));
	ret = ret && connect(m_opacityAct, SIGNAL(triggered(bool)), opacityCheckCmd, SLOT(trigger()));
	ret = ret && connect(saveAct, SIGNAL(triggered()), model, SLOT(promptSave()));
	ret = ret && connect(loadAct, SIGNAL(triggered()), model, SLOT(promptLoad()));
	ret = ret && connect(resetAct, SIGNAL(triggered()), this, SLOT(onRestoreSceneSettings()));

	assert(ret);
}
Ejemplo n.º 17
0
void CameraTab::onGenericSettingsChange()
{
	CleanupSettingsModel *model = CleanupSettingsModel::instance();
	getFields(model->getCurrentParameters());
	model->commitChanges();
}