Convert8to16::Convert8to16(QObject* const parent) : BatchTool(QLatin1String("Convert8to16"), ColorTool, parent) { setToolTitle(i18n("Convert to 16 bits")); setToolDescription(i18n("Convert color depth from 8 to 16 bits.")); setToolIconName(QLatin1String("depth8to16")); }
Sharpen::Sharpen(QObject* parent) : BatchTool("Sharpen", EnhanceTool, parent) { setToolTitle(i18n("Sharpen Image")); setToolDescription(i18n("A tool to sharpen images")); setToolIcon(KIcon(SmallIcon("sharpenimage"))); }
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))); }
LensAutoFix::LensAutoFix(QObject* const parent) : BatchTool(QLatin1String("LensAutoFix"), EnhanceTool, parent), d(new Private) { setToolTitle(i18n("Lens Auto-Correction")); setToolDescription(i18n("Fix automatically lens distortions")); setToolIconName(QLatin1String("lensautofix")); }
Sharpen::Sharpen(QObject* const parent) : BatchTool("Sharpen", EnhanceTool, parent) { m_settingsView = 0; setToolTitle(i18n("Sharpen Image")); setToolDescription(i18n("Sharpen images")); setToolIconName("sharpenimage"); }
BWConvert::BWConvert(QObject* const parent) : BatchTool(QLatin1String("BWConvert"), ColorTool, parent), m_settingsView(0) { setToolTitle(i18n("B&W Convert")); setToolDescription(i18n("Convert to black and white.")); setToolIconName(QLatin1String("bwtonal")); }
BWConvert::BWConvert(QObject* parent) : BatchTool("BWConvert", ColorTool, parent), m_settingsView(0) { setToolTitle(i18n("B&W Convert")); setToolDescription(i18n("A tool to convert to black and white.")); setToolIcon(KIcon(SmallIcon("bwtonal"))); }
FilmGrain::FilmGrain(QObject* parent) : BatchTool("FilmGrain", FiltersTool, parent) { m_settingsView = 0; setToolTitle(i18n("Film Grain")); setToolDescription(i18n("Add film grain")); setToolIconName("filmgrain"); }
Convert2TIFF::Convert2TIFF(QObject* const parent) : BatchTool(QLatin1String("Convert2TIFF"), ConvertTool, parent) { m_settings = 0; setToolTitle(i18n("Convert To TIFF")); setToolDescription(i18n("Convert images to TIFF format.")); setToolIconName(QLatin1String("image-tiff")); }
RedEyeCorrection::RedEyeCorrection(QObject* const parent) : BatchTool(QLatin1String("RedEyeCorrection"), EnhanceTool, parent), m_redEyeCFilter(0) { m_settingsView = 0; setToolTitle(i18n("RedEye-Correction")); setToolDescription(i18n("Automatically detect and correct RedEye effect.")); setToolIconName(QLatin1String("redeyes")); }
Border::Border(QObject* const parent) : BatchTool(QLatin1String("Border"), DecorateTool, parent) { m_settingsView = 0; setToolTitle(i18n("Add Border")); setToolDescription(i18n("Add a border around images")); setToolIconName(QLatin1String("bordertool")); }
ColorFX::ColorFX(QObject* const parent) : BatchTool("ColorFX", FiltersTool, parent) { m_settingsView = 0; setToolTitle(i18n("Color Effects")); setToolDescription(i18n("Apply color effects")); setToolIconName("colorfx"); }
AssignTemplate::AssignTemplate(QObject* parent) : BatchTool("AssignTemplate", MetadataTool, parent) { m_templateSelector = 0; m_templateViewer = 0; setToolTitle(i18n("Apply Metadata Template")); setToolDescription(i18n("Apply template metadata")); setToolIconName("application-xml"); }
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())); }
void QbsKJob::start() { m_job = m_createQbsJobFunction(); connect(m_job, &qbs::AbstractJob::finished, this, [this](bool success, qbs::AbstractJob *job) { if (!success) { setErrorText(job->error().toString()); setError(KJob::UserDefinedError); } else { setError(KJob::NoError); } emitResult(); }); connect(m_job, &qbs::AbstractJob::taskStarted, this, [this](const QString &description, int maximumProgressValue, qbs::AbstractJob */*job*/){ setToolTitle(description); setTitle(description); setObjectName(description); startOutput(); emit KJob::description(this, description); setTotalAmount(Files, maximumProgressValue); setProcessedAmount(Files, 0); }); connect(m_job, &qbs::AbstractJob::totalEffortChanged, this, [this](int totalEffort, qbs::AbstractJob */*job*/){ setTotalAmount(Files, totalEffort); }); connect(m_job, &qbs::AbstractJob::taskProgress, this, [this](int newProgressValue, qbs::AbstractJob */*job*/){ setProcessedAmount(Files, newProgressValue); }); if (qbs::BuildJob *buildJob = dynamic_cast<qbs::BuildJob *>(m_job)) { connect(buildJob, &qbs::BuildJob::reportCommandDescription, this, [this](const QString &/*highlight*/, const QString &message) { // TODO use highlight, possible values : compiling, linking model()->appendLine(message); }); connect(buildJob, &qbs::BuildJob::reportProcessResult, this, [this](const qbs::ProcessResult &result) { model()->appendLines(result.stdOut()); model()->appendLines(result.stdErr()); }); } }
AutoCorrection::AutoCorrection(QObject* parent) : BatchTool("AutoCorrection", ColorTool, parent) { setToolTitle(i18n("Color Auto-correction")); setToolDescription(i18n("A tool to automatically correct image colors.")); setToolIcon(KIcon(SmallIcon("autocorrection"))); KVBox* vbox = new KVBox; QLabel* label = new QLabel(vbox); m_comboBox = new KComboBox(vbox); m_comboBox->insertItem(AutoLevelsCorrection, i18n("Auto Levels")); m_comboBox->insertItem(NormalizeCorrection, i18n("Normalize")); m_comboBox->insertItem(EqualizeCorrection, i18n("Equalize")); m_comboBox->insertItem(StretchContrastCorrection, i18n("Stretch Contrast")); m_comboBox->insertItem(AutoExposureCorrection, i18n("Auto Exposure")); label->setText(i18n("Filter:")); QLabel* space = new QLabel(vbox); vbox->setStretchFactor(space, 10); setSettingsWidget(vbox); connect(m_comboBox, SIGNAL(activated(int)), this, SLOT(slotSettingsChanged())); }