FilmGrainTool::FilmGrainTool(QObject* const parent)
    : EditorToolThreaded(parent),
      d(new Private)
{
    setObjectName("filmgrain");
    setToolName(i18n("Film Grain"));
    setToolIcon(SmallIcon("filmgrain"));
    setInitPreview(true);

    d->previewWidget = new ImageRegionWidget;
    setToolView(d->previewWidget);
    setPreviewModeMask(PreviewToolBar::AllPreviewModes);

    // -------------------------------------------------------------

    d->gboxSettings  = new EditorToolSettings;
    d->gboxSettings->setButtons(EditorToolSettings::Default|
                                EditorToolSettings::Ok|
                                EditorToolSettings::Cancel|
                                EditorToolSettings::Try);

    d->settingsView = new FilmGrainSettings(d->gboxSettings->plainPage());
    setToolSettings(d->gboxSettings);

    // -------------------------------------------------------------


    connect(d->settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotTimer()));
}
Exemple #2
0
ChannelMixer::ChannelMixer(QObject* parent)
    : BatchTool("ChannelMixer", ColorTool, parent)
{
    setToolTitle(i18n("Channel Mixer"));
    setToolDescription(i18n("A tool to mix color channel."));
    setToolIcon(KIcon(SmallIcon("channelmixer")));

    KVBox* vbox          = new KVBox;
    KHBox* hbox          = new KHBox(vbox);
    QLabel* channelLabel = new QLabel(hbox);
    channelLabel->setText(i18n("Channel:"));
    m_channelCB          = new KComboBox(hbox);
    m_channelCB->addItem(i18n("Red"),   QVariant(RedChannel));
    m_channelCB->addItem(i18n("Green"), QVariant(GreenChannel));
    m_channelCB->addItem(i18n("Blue"),  QVariant(BlueChannel));

    m_settingsView = new MixerSettings(vbox);
    QLabel* space  = new QLabel(vbox);
    vbox->setStretchFactor(space, 10);

    setSettingsWidget(vbox);

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    connect(m_channelCB, SIGNAL(activated(int)),
            this, SLOT(slotChannelChanged()));

    connect(m_settingsView, SIGNAL(signalMonochromeActived(bool)),
            this, SLOT(slotMonochromeActived(bool)));
}
Exemple #3
0
void LensAutoFix::registerSettingsWidget()
{
    const int spacing = QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);

    m_settingsWidget   = new QWidget;
    QLabel* const note = new QLabel(i18n("<b>Use Metadata</b> option will parse images' information at "
                                         "queue run-time to find relevant lens features."));
    note->setWordWrap(true);
    note->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);

    d->cameraSelector       = new LensFunCameraSelector();
    DLineWidget* const line = new DLineWidget(Qt::Horizontal);
    d->settingsView         = new LensFunSettings();
    d->cameraSelector->setPassiveMetadataUsage(true);
    d->cameraSelector->setEnabledUseMetadata(true);

    QGridLayout* const grid = new QGridLayout(m_settingsWidget);
    grid->addWidget(note,              0, 0, 1, 2);
    grid->addWidget(d->cameraSelector, 1, 0, 1, 2);
    grid->addWidget(line,              2, 0, 1, 2);
    grid->addWidget(d->settingsView,   3, 0, 1, 2);
    grid->setRowStretch(4, 10);
    grid->setContentsMargins(spacing, spacing, spacing, spacing);
    grid->setSpacing(spacing);

    connect(d->settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    connect(d->cameraSelector, SIGNAL(signalLensSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    BatchTool::registerSettingsWidget();
}
/** Save the dialog settings **/
void CConfigurationDialog::save() {
    m_acceleratorsPage->save();
    m_languagesPage->save();
    m_swordPage->save();
    m_displayPage->save();
    emit signalSettingsChanged( );
}
Exemple #5
0
void ClientWindow::on_settingsButton_clicked()
{
  ClientSettings clientSettings(m_SyncRules);
  connect(&clientSettings, SIGNAL(signalClearStats()), m_SyncSystem, SLOT(slotClearStatData()));
  if(clientSettings.exec() == QDialog::Accepted)
  {
    //Update the branches list
    fSettings.beginGroup(ClientSettings::branchesStr);
    QStringList branches = fSettings.childGroups();
    branchSelector->clear();
    branchSelector->addItems(branches);
    fSettings.endGroup();

    //if(m_SyncRules != clientSettings.m_cIgnoreRules)
    //{
    //  //copy the new rule set and save
    //  m_SyncRules = clientSettings.m_cIgnoreRules;
    //  m_SyncRules->saveXmlRules(defaultFile);
    //}
  }
  else
  {
    //reload the syncrules on cancel
    m_SyncRules->loadRules();
  }

  //Load and set currently selected branch
  QString currentSelectedBranch = fSettings.value("CurrentlySelectedBranch").toString();
  branchSelector->setCurrentIndex(branchSelector->findText(currentSelectedBranch));
  fSaveBranch = true;

  emit signalSettingsChanged();
}
DockWidget3DSettings::DockWidget3DSettings(QWidget *parent, GLWidget* ptr_gl) :
    QDockWidget(parent),ptr_glWidget(ptr_gl),
    ui(new Ui::DockWidget3DSettings)
{
    ui->setupUi(this);
    close();
    setContentsMargins(0,0,0,0);

    // Connect all the sliders and other widgets
    connect(ui->horizontalSliderDepthScale ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));
    connect(ui->horizontalSliderUVScale    ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));
    connect(ui->horizontalSliderUVXOffset  ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));
    connect(ui->horizontalSliderUVYOffset  ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));

    connect(ui->horizontalSliderSpecularI     ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));
    connect(ui->horizontalSliderDiffuseI      ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));
    connect(ui->horizontalSliderLightPower    ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));
    connect(ui->horizontalSliderLightRadius   ,SIGNAL(valueChanged(int)),this,SLOT(updateSettings(int)));

    connect(ui->comboBoxPerformanceNoRays     ,SIGNAL(activated(int)),this,SLOT(updateSettings(int)));
    connect(ui->comboBoxPerformanceNoTessSub  ,SIGNAL(activated(int)),this,SLOT(updateSettings(int)));
    connect(ui->checkBoxPerformanceCullFace   ,SIGNAL(clicked()),this,SLOT(updateSettings()));
    connect(ui->checkBoxPerformanceSimplePBR  ,SIGNAL(clicked()),this,SLOT(updateSettings()));
    connect(ui->checkBoxBloomEffect           ,SIGNAL(clicked()),this,SLOT(updateSettings()));
    connect(ui->checkBoxDOFEffect             ,SIGNAL(clicked()),this,SLOT(updateSettings()));
    connect(ui->checkBoxLensFlaresEffect      ,SIGNAL(clicked()),this,SLOT(updateSettings()));
    connect(ui->checkBoxShowTriangleEdges     ,SIGNAL(clicked()),this,SLOT(updateSettings()));

    connect(ui->comboBoxShadingModel          ,SIGNAL(activated(int)),    this,SLOT(selectShadingModel(int)));
    connect(ui->comboBoxShadingType           ,SIGNAL(activated(int)),    this,SLOT(updateSettings(int)));

    // loading 3d mesh signal and eviromental maps
    connect(ui->pushButtonLoadMesh            ,SIGNAL(released()),        ptr_glWidget,SLOT(loadMeshFromFile()));
    connect(ui->comboBoxChooseOBJModel        ,SIGNAL(activated(QString)),ptr_glWidget,SLOT(chooseMeshFile(QString)));
    connect(ui->comboBoxSkyBox                ,SIGNAL(activated(QString)),ptr_glWidget,SLOT(chooseSkyBox(QString)));


    // send current settings to glWidget
    connect(this,SIGNAL(signalSettingsChanged(Display3DSettings)),ptr_glWidget,SLOT(updatePerformanceSettings(Display3DSettings)));
    // ------------------------------------------------------- //
    //               Loading cub maps folders
    // ------------------------------------------------------- //
    qDebug() << "Loading cubemaps folders:";
    QDir currentDir(_find_data_dir(QString(RESOURCE_BASE) + "Core/2D/skyboxes"));
    currentDir.setFilter(QDir::Dirs);
    QStringList entries = currentDir.entryList();
    qDebug() << "Looking for enviromental maps in Core/2D/skyboxes:";
    for( QStringList::ConstIterator entry=entries.begin(); entry!=entries.end(); ++entry ){
        QString dirname=*entry;
        if(dirname != tr(".") && dirname != tr("..")){
            qDebug() << "Enviromental map:" << dirname;
            ui->comboBoxSkyBox->addItem(dirname);
        }
    }// end of for
    // setting cube map for glWidget
    ptr_glWidget->chooseSkyBox(ui->comboBoxSkyBox->currentText(),true);

}
Exemple #7
0
void Sharpen::registerSettingsWidget()
{
    m_settingsWidget = new QWidget;
    m_settingsView   = new SharpSettings(m_settingsWidget);

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    BatchTool::registerSettingsWidget();
}
Exemple #8
0
void Convert2TIFF::registerSettingsWidget()
{
    m_settings       = new TIFFSettings();
    m_settingsWidget = m_settings;

    connect(m_settings, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    BatchTool::registerSettingsWidget();
}
Exemple #9
0
void RedEyeCorrection::registerSettingsWidget()
{
    m_settingsWidget = new QWidget;
    m_settingsView   = new RedEyeCorrectionSettings(m_settingsWidget);

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    BatchTool::registerSettingsWidget();
}
Exemple #10
0
QWidget* Sharpen::createSettingsWidget()
{
    QWidget* box   = new QWidget;
    m_settingsView = new SharpSettings(box);

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    return box;
}
Exemple #11
0
void BWConvert::registerSettingsWidget()
{
    m_settingsWidget = new QWidget;
    m_settingsView   = new BWSepiaSettings(m_settingsWidget, &m_preview);
    m_settingsView->startPreviewFilters();

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    BatchTool::registerSettingsWidget();
}
Exemple #12
0
void FilmGrain::registerSettingsWidget()
{
    m_settingsWidget = new QWidget;
    m_settingsView   = new FilmGrainSettings(m_settingsWidget);
    m_settingsView->resetToDefault();

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    BatchTool::registerSettingsWidget();
}
Exemple #13
0
QWidget* BWConvert::createSettingsWidget()
{
    QWidget* box   = new QWidget;
    m_settingsView = new BWSepiaSettings(box, &m_preview);

    m_settingsView->startPreviewFilters();

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    return box;
}
Exemple #14
0
void ColorFX::registerSettingsWidget()
{
    m_settingsWidget = new QWidget;
    m_settingsView   = new ColorFXSettings(m_settingsWidget);
    m_settingsView->resetToDefault();

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));

    connect(m_settingsView, SIGNAL(signalLevelOrIterationChanged()),
            this, SLOT(slotSettingsChanged()));

    BatchTool::registerSettingsWidget();
}
Exemple #15
0
ColorBalance::ColorBalance(QObject* parent)
    : BatchTool("ColorBalance", ColorTool, parent)
{
    setToolTitle(i18n("Color Balance"));
    setToolDescription(i18n("A tool to adjust color balance."));
    setToolIcon(KIcon(SmallIcon("adjustrgb")));

    QWidget* box   = new QWidget;
    m_settingsView = new CBSettings(box);
    setSettingsWidget(box);

    connect(m_settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotSettingsChanged()));
}
Exemple #16
0
void MixerSettings::slotMonochromeActived(bool mono)
{
    d->mixerSettings.bMonochrome = mono;
    d->monochromeTips->setEnabled(mono);

    d->outChannelLabel->setEnabled(!mono);
    d->outChannelCB->setEnabled(!mono);
    int id = d->outChannelCB->findData(QVariant(RedChannel));
    d->outChannelCB->setCurrentIndex(id);
    slotOutChannelChanged();

    emit signalMonochromeActived(mono);
    emit signalSettingsChanged();
}
MatchPortionSelection::MatchPortionSelection(std::vector<cv::DMatch> , QWidget *parent):
	MatchSelection{parent}
{
	auto layout=util::make_unique<QVBoxLayout>();
	auto selector=util::make_unique<PortionSelector>();

	selector_=selector.get();

	connect(&(selector->signalSettingsChanged()),SIGNAL(signal()),this,SIGNAL(settingsChanged()));

	layout->addWidget(selector.release());

	setLayout(layout.release());
}
WhiteBalanceTool::WhiteBalanceTool(QObject* const parent)
    : EditorToolThreaded(parent), d(new Private)
{
    setObjectName("whitebalance");
    setToolName(i18n("White Balance"));
    setToolIcon(SmallIcon("whitebalance"));
    setInitPreview(true);

    // -------------------------------------------------------------

    d->previewWidget = new ImageRegionWidget;
    setToolView(d->previewWidget);
    setPreviewModeMask(PreviewToolBar::AllPreviewModes);

    // -------------------------------------------------------------

    d->gboxSettings = new EditorToolSettings;
    d->gboxSettings->setTools(EditorToolSettings::Histogram);
    d->gboxSettings->setHistogramType(LRGBC);
    d->gboxSettings->setButtons(EditorToolSettings::Default|
                                EditorToolSettings::Load|
                                EditorToolSettings::SaveAs|
                                EditorToolSettings::Ok|
                                EditorToolSettings::Cancel);

    // -------------------------------------------------------------

    d->settingsView = new WBSettings(d->gboxSettings->plainPage());
    setToolSettings(d->gboxSettings);

    // -------------------------------------------------------------

    connect(d->settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotTimer()));

    connect(d->settingsView, SIGNAL(signalAutoAdjustExposure()),
            this, SLOT(slotAutoAdjustExposure()));

    connect(d->settingsView, SIGNAL(signalPickerColorButtonActived()),
            this, SLOT(slotPickerColorButtonActived()));

    connect(d->previewWidget, SIGNAL(signalCapturedPointFromOriginal(Digikam::DColor,QPoint)),
            this, SLOT(slotColorSelectedFromOriginal(Digikam::DColor)));
/*
    connect(d->previewWidget, SIGNAL(spotPositionChangedFromTarget(Digikam::DColor,QPoint)),
            this, SLOT(slotColorSelectedFromTarget(Digikam::DColor)));
*/
}
/** Called if any button was clicked*/
void CConfigurationDialog::slotButtonClicked(QAbstractButton* button)
{
	if (button == static_cast<QAbstractButton*>(m_bbox->button(QDialogButtonBox::Cancel)))
	{
		close();
		return;
	}

//	m_acceleratorsPage->save();
	m_languagesPage->save();
	m_swordPage->save();
	m_displayPage->save();
	emit signalSettingsChanged( );

	if (button == static_cast<QAbstractButton*>(m_bbox->button(QDialogButtonBox::Ok)))
		close();
}
Exemple #20
0
void MixerSettings::slotResetCurrentChannel()
{
    switch (d->currentChannel)
    {
        case GreenChannel:
        {
            d->mixerSettings.greenRedGain   = 0.0;
            d->mixerSettings.greenGreenGain = 1.0;
            d->mixerSettings.greenBlueGain  = 0.0;
            break;
        }

        case BlueChannel:
        {
            d->mixerSettings.blueRedGain   = 0.0;
            d->mixerSettings.blueGreenGain = 0.0;
            d->mixerSettings.blueBlueGain  = 1.0;
            break;
        }

        default:                        // Red or monochrome.
        {
            if (d->monochrome->isChecked())
            {
                d->mixerSettings.blackRedGain   = 1.0;
                d->mixerSettings.blackGreenGain = 0.0;
                d->mixerSettings.blackBlueGain  = 0.0;
            }
            else
            {
                d->mixerSettings.redRedGain   = 1.0;
                d->mixerSettings.redGreenGain = 0.0;
                d->mixerSettings.redBlueGain  = 0.0;
            }

            break;
        }
    }

    updateSettingsWidgets();
    emit signalSettingsChanged();
}
Exemple #21
0
void MixerSettings::slotGainsChanged()
{
    switch (d->currentChannel)
    {
        case GreenChannel:
        {
            d->mixerSettings.greenRedGain   = d->redGain->value()   / 100.0;
            d->mixerSettings.greenGreenGain = d->greenGain->value() / 100.0;
            d->mixerSettings.greenBlueGain  = d->blueGain->value()  / 100.0;
            break;
        }

        case BlueChannel:
        {
            d->mixerSettings.blueRedGain   = d->redGain->value()   / 100.0;
            d->mixerSettings.blueGreenGain = d->greenGain->value() / 100.0;
            d->mixerSettings.blueBlueGain  = d->blueGain->value()  / 100.0;
            break;
        }

        default:                         // Red or monochrome.
        {
            if (d->monochrome->isChecked())
            {
                d->mixerSettings.blackRedGain   = d->redGain->value()   / 100.0;
                d->mixerSettings.blackGreenGain = d->greenGain->value() / 100.0;
                d->mixerSettings.blackBlueGain  = d->blueGain->value()  / 100.0;
            }
            else
            {
                d->mixerSettings.redRedGain   = d->redGain->value()   / 100.0;
                d->mixerSettings.redGreenGain = d->greenGain->value() / 100.0;
                d->mixerSettings.redBlueGain  = d->blueGain->value()  / 100.0;
            }

            break;
        }
    }

    updateTotalPercents();
    emit signalSettingsChanged();
}
Exemple #22
0
BCGTool::BCGTool(QObject* const parent)
    : EditorToolThreaded(parent),
      d(new Private)
{
    setObjectName("bcgadjust");
    setToolName(i18n("Brightness / Contrast / Gamma"));
    setToolVersion(1);
    setToolIcon(SmallIcon("contrast"));
    setToolHelp("bcgadjusttool.anchor");
    setToolCategory(FilterAction::ReproducibleFilter);
    setInitPreview(true);

    d->previewWidget = new ImageRegionWidget;
    setToolView(d->previewWidget);
    setPreviewModeMask(PreviewToolBar::AllPreviewModes);

    // -------------------------------------------------------------

    d->gboxSettings = new EditorToolSettings;
    d->gboxSettings->setTools(EditorToolSettings::Histogram);
    d->gboxSettings->setHistogramType(LRGBC);
    d->gboxSettings->setButtons(EditorToolSettings::Default|
                                EditorToolSettings::Ok|
                                EditorToolSettings::Cancel);
//                              EditorToolSettings::Try);

    // -------------------------------------------------------------

    d->settingsView = new BCGSettings(d->gboxSettings->plainPage());
    setToolSettings(d->gboxSettings);

    // -------------------------------------------------------------

    connect(d->settingsView, SIGNAL(signalSettingsChanged()),
            this, SLOT(slotTimer()));
}
void DockWidget3DSettings::updateSettings(int){

    settings.bUseCullFace       = ui->checkBoxPerformanceCullFace   ->isChecked();
    settings.bUseSimplePBR      = ui->checkBoxPerformanceSimplePBR  ->isChecked();
    settings.noPBRRays          = ui->comboBoxPerformanceNoRays     ->currentText().toInt();
    settings.noTessSubdivision  = ui->comboBoxPerformanceNoTessSub  ->currentText().toInt();
    settings.bBloomEffect       = ui->checkBoxBloomEffect           ->isChecked();
    settings.bDofEffect         = ui->checkBoxDOFEffect             ->isChecked();
    settings.bShowTriangleEdges = ui->checkBoxShowTriangleEdges     ->isChecked();
    settings.bLensFlares        = ui->checkBoxLensFlaresEffect      ->isChecked();

    settings.depthScale  = ui->horizontalSliderDepthScale->value()/50.0;
    settings.uvScale     = ui->horizontalSliderUVScale->value()/10.0;


    ui->doubleSpinBoxDepthScale  ->setValue(ui->horizontalSliderDepthScale->value()/100.0);
    ui->doubleSpinBoxUVScale     ->setValue(ui->horizontalSliderUVScale   ->value()/10.0);
    ui->doubleSpinBoxUVXOffset   ->setValue(ui->horizontalSliderUVXOffset ->value()/100.0);
    ui->doubleSpinBoxUVYOffset   ->setValue(ui->horizontalSliderUVYOffset ->value()/100.0);

    ui->doubleSpinBoxLightPower ->setValue(ui->horizontalSliderLightPower  ->value()/100.0);
    ui->doubleSpinBoxLightRadius->setValue(ui->horizontalSliderLightRadius->value()/100.0);

    settings.lightPower  = ui->doubleSpinBoxLightPower->value();
    settings.lightRadius = ui->doubleSpinBoxLightRadius->value();
    settings.uvOffset = QVector2D(ui->doubleSpinBoxUVXOffset->value(),ui->doubleSpinBoxUVYOffset->value());

    ui->doubleSpinBoxSpecularI->setValue(ui->horizontalSliderSpecularI->value()/50.0);
    ui->doubleSpinBoxDiffuseI ->setValue(ui->horizontalSliderDiffuseI ->value()/50.0);
    settings.specularIntensity = ui->doubleSpinBoxSpecularI->value();
    settings.diffuseIntensity  = ui->doubleSpinBoxDiffuseI ->value();

    settings.shadingType  = (ShadingType)  ui->comboBoxShadingType->currentIndex();
    settings.shadingModel = (ShadingModel) ui->comboBoxShadingModel->currentIndex();
    emit signalSettingsChanged(settings);
}
Exemple #24
0
void IccProfilesSettings::slotProfileChanged()
{
    d->favoriteProfiles.insert(d->profilesBox->currentProfile().filePath(), new bool(true));
    emit signalSettingsChanged();
}
Exemple #25
0
void QueueMgrWindow::setupConnections()
{
    // -- Assigned tools list connections -----------------------------------

    connect(d->assignedList, SIGNAL(signalToolSelected(BatchToolSet)),
            d->toolSettings, SLOT(slotToolSelected(BatchToolSet)));

    connect(d->assignedList, SIGNAL(signalAssignedToolsChanged(AssignedBatchTools)),
            d->queuePool, SLOT(slotAssignedToolsChanged(AssignedBatchTools)));

    connect(d->toolSettings, SIGNAL(signalSettingsChanged(BatchToolSet)),
            d->assignedList, SLOT(slotSettingsChanged(BatchToolSet)));

    connect(d->assignedList, SIGNAL(signalAssignedToolsChanged(AssignedBatchTools)),
            this, SLOT(slotAssignedToolsChanged(AssignedBatchTools)));

    connect(d->toolsView, SIGNAL(signalAssignTools(QMap<int,QString>)),
            d->assignedList, SLOT(slotAssignTools(QMap<int,QString>)));

    // -- Queued Items list connections -------------------------------------

    connect(d->queuePool, SIGNAL(signalQueueSelected(int,QueueSettings,AssignedBatchTools)),
            d->queueSettingsView, SLOT(slotQueueSelected(int,QueueSettings,AssignedBatchTools)));

    connect(d->queuePool, SIGNAL(signalQueueSelected(int,QueueSettings,AssignedBatchTools)),
            d->assignedList, SLOT(slotQueueSelected(int,QueueSettings,AssignedBatchTools)));

    connect(d->queueSettingsView, SIGNAL(signalSettingsChanged(QueueSettings)),
            d->queuePool, SLOT(slotSettingsChanged(QueueSettings)));

    connect(d->queueSettingsView, SIGNAL(signalSettingsChanged(QueueSettings)),
            this, SLOT(slotQueueContentsChanged()));

    connect(d->queuePool, SIGNAL(signalQueueSelected(int,QueueSettings,AssignedBatchTools)),
            this, SLOT(slotQueueContentsChanged()));

    connect(d->queuePool, SIGNAL(signalQueuePoolChanged()),
            this, SLOT(slotQueueContentsChanged()));

    connect(d->queuePool, SIGNAL(signalQueueContentsChanged()),
            this, SLOT(slotQueueContentsChanged()));

    connect(d->queuePool, SIGNAL(signalItemSelectionChanged()),
            this, SLOT(slotItemSelectionChanged()));

    // -- Multithreaded interface connections -------------------------------

    connect(d->thread, SIGNAL(signalStarting(Digikam::ActionData)),
            this, SLOT(slotAction(Digikam::ActionData)));

    connect(d->thread, SIGNAL(signalFinished(Digikam::ActionData)),
            this, SLOT(slotAction(Digikam::ActionData)));

    connect(d->thread, SIGNAL(signalQueueProcessed()),
            this, SLOT(slotQueueProcessed()));

    // -- GUI connections ---------------------------------------------------

    connect(d->toolsView, SIGNAL(signalHistoryEntryClicked(int,qlonglong)),
            this, SLOT(slotHistoryEntryClicked(int,qlonglong)));

    connect(d->toolsView, SIGNAL(signalAssignQueueSettings(QString)),
            this, SLOT(slotAssignQueueSettings(QString)));
}
Exemple #26
0
void MixerSettings::slotLuminosityChanged(bool lum)
{
    d->mixerSettings.bPreserveLum = lum;
    emit signalSettingsChanged();
}
Exemple #27
0
ClientWindow::ClientWindow(const QString& branch, bool initialupdate, bool shutdown) : 
	QWidget( NULL ),
  fSaveBranch(false),
  fShutdown(shutdown),
  fInitialUpdate(initialupdate),
  fMainIcon(":/qs.png"),
  fSyncIcon(":/qssync.png"),
  fDisconnectIcon(":/qsdis.png"),
  fNodeWatchingIcon(":/qsnw.png"),
  m_SyncRules(new SyncRules),
  fFilesTableDialog(NULL)
{
  setupUi( this );


  QSettings settings;

  //Load window size and position
  settings.beginGroup("MainWindow");
  QSize minAppSize(210, 190);
  resize(settings.value("size", minAppSize).toSize());

  //get the stored position, and sanity check it a bit
  QPoint cPoint = settings.value("pos", QPoint(200, 200)).toPoint();
  QPoint sanePosition(std::min(std::max(cPoint.x(), 0), std::max(0, QApplication::desktop()->width() - minAppSize.width())),
                      std::min(std::max(cPoint.y(), 0), std::max(0, QApplication::desktop()->height() - minAppSize.height())));
  move(sanePosition);

  bool bCopiedOpen = settings.value("copiedopen", false).toBool();
  settings.endGroup();

  //Load currently configured branches
  settings.beginGroup(ClientSettings::branchesStr);
  QStringList branches = settings.childGroups();
  branchSelector->addItems(branches);
  settings.endGroup();

  //Load and set currently selected branch
  QString currentSelectedBranch;
  if(branch.isEmpty())
    currentSelectedBranch = settings.value("CurrentlySelectedBranch").toString();
  else
    currentSelectedBranch = branch;

  int index = branchSelector->findText(currentSelectedBranch);
  if(index >= 0)
  {
    qDebug() << "[ClientWindow.Init] setting index to " << index << " for " << currentSelectedBranch;
    branchSelector->setCurrentIndex(index);
  }
  else
  {
    QApplication::exit(1);
  }
  fSaveBranch = true;

  fFilesTableDialog = new CopiedFilesDialog_c;
  connect(this, SIGNAL(closing()), fFilesTableDialog, SLOT(saveWindowPos()));
  if(bCopiedOpen)
    on_toolCopy_clicked();

  slotSyncStateChanged(SyncSystem::e_Unconnected);

  connect(&fSystemTrayIcon, SIGNAL(activated( QSystemTrayIcon::ActivationReason )), SLOT(slotSystemTrayIconActivated()));
  fSystemTrayIcon.show();

  m_SyncRules->loadRules();

  m_SyncSystem = new SyncSystem(m_SyncRules);
  m_SyncThread = new QThread(this);

  connect(m_SyncThread, &QThread::started, m_SyncSystem, &SyncSystem::started);
  connect(m_SyncThread, &QThread::finished, m_SyncSystem, &SyncSystem::finished);
  connect(m_SyncSystem, SIGNAL(signalDirsScanned(int,int,int)), this, SLOT(slotDirsScanned(int,int,int)));
  connect(m_SyncSystem, SIGNAL(signalFilesScanned(int,int)), this, SLOT(slotFilesScanned(int,int)));
  connect(m_SyncSystem, SIGNAL(signalFileStats(int,int)), this, SLOT(slotFileStats(int,int)));
  connect(m_SyncSystem, SIGNAL(signalFilesCopied(int,int,int)), this, SLOT(slotFilesCopied(int,int,int)));
  connect(m_SyncSystem, SIGNAL(signalFilesDeleted(int)), this, SLOT(slotFilesDeleted(int)));
  connect(m_SyncSystem, SIGNAL(signalStateChanged(int)), this, SLOT(slotSyncStateChanged(int)));
  connect(m_SyncSystem, SIGNAL(signalVersionMismatch()), this, SLOT(slotVersionMismatch()));
  connect(m_SyncSystem, SIGNAL(signalUnknownPacket()), this, SLOT(slotUnknownPacket()));
  connect(m_SyncSystem, SIGNAL(signalFileAction(QString, QDateTime, bool)), this, SLOT(slotFileAction(QString, QDateTime, bool)));
  connect(m_SyncSystem, SIGNAL(signalFileStatus(QString, QDateTime, bool)), this, SLOT(slotFileStatus(QString, QDateTime, bool)));
  connect(this, SIGNAL(signalStartSync()), m_SyncSystem, SLOT(slotStartSync()));
  connect(this, SIGNAL(signalStopSync()), m_SyncSystem, SLOT(slotStopSync()));
  connect(this, SIGNAL(signalSettingsChanged()), m_SyncSystem, SLOT(slotSettingsChanged()));
  //Move the syncsystem into its own thread so the signals we send to it is executed in the threads own context
  m_SyncSystem->moveToThread(m_SyncThread);

  m_SyncThread->start();

}