Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 89826
Collapse All | Expand All

(-)kipi-plugins/rawconverter.org/batchdialog.cpp (-37 / +35 lines)
Lines 155-171 Link Here
155
155
156
    // ---------------------------------------------------------------
156
    // ---------------------------------------------------------------
157
157
158
    hboxLayout = new QHBoxLayout(0,0,6,"layout1");
159
    gammaSpinBox_ = new CSpinBox(settingsBox);
160
    gammaSpinBox_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
161
162
    hboxLayout->addWidget(gammaSpinBox_);
163
    hboxLayout->addWidget(new QLabel(i18n("Gamma"), settingsBox));
164
    QToolTip::add(gammaSpinBox_,
165
                    i18n("Specify the gamma value"));
166
    settingsBoxLayout->addLayout(hboxLayout);
167
168
    // ---------------------------------------------------------------
169
158
170
    hboxLayout = new QHBoxLayout(0,0,6,"layout2");
159
    hboxLayout = new QHBoxLayout(0,0,6,"layout2");
171
    brightnessSpinBox_ = new CSpinBox(settingsBox);
160
    brightnessSpinBox_ = new CSpinBox(settingsBox);
Lines 208-229 Link Here
208
    saveButtonGroup_ = new QVButtonGroup(i18n("Save Format"),this);
197
    saveButtonGroup_ = new QVButtonGroup(i18n("Save Format"),this);
209
    saveButtonGroup_->setRadioButtonExclusive(true);
198
    saveButtonGroup_->setRadioButtonExclusive(true);
210
199
211
    QRadioButton *radioButton;
200
    jpegButton_ = new QRadioButton("JPEG",saveButtonGroup_);
212
    radioButton = new QRadioButton("JPEG",saveButtonGroup_);
201
    QToolTip::add(jpegButton_,
213
    QToolTip::add(radioButton,
214
                    i18n("Output the processed images in JPEG Format.\n"
202
                    i18n("Output the processed images in JPEG Format.\n"
215
                         "This is a lossy format, but will give\n"
203
                         "This is a lossy format, but will give\n"
216
                         "smaller-sized files"));
204
                         "smaller-sized files"));
217
    radioButton->setChecked(true);
205
    jpegButton_->setChecked(true);
218
206
219
    radioButton = new QRadioButton("TIFF",saveButtonGroup_);
207
    tiffButton_ = new QRadioButton("TIFF",saveButtonGroup_);
220
    QToolTip::add(radioButton,
208
    QToolTip::add(tiffButton_,
221
                    i18n("Output the processed images in TIFF Format.\n"
209
                    i18n("Output the processed images in TIFF Format.\n"
222
                         "This generates large files, without\n"
210
                         "This generates large files, without\n"
223
                         "losing quality"));
211
                         "losing quality"));
224
212
225
    radioButton = new QRadioButton("PPM",saveButtonGroup_);
213
    ppmButton_ = new QRadioButton("PPM",saveButtonGroup_);
226
    QToolTip::add(radioButton,
214
    QToolTip::add(ppmButton_,
227
                    i18n("Output the processed images in PPM Format.\n"
215
                    i18n("Output the processed images in PPM Format.\n"
228
                         "This generates the largest files, without\n"
216
                         "This generates the largest files, without\n"
229
                         "losing quality"));
217
                         "losing quality"));
Lines 236-244 Link Here
236
    conflictButtonGroup_ = new QVButtonGroup(i18n("If Target File Exists"),this);
224
    conflictButtonGroup_ = new QVButtonGroup(i18n("If Target File Exists"),this);
237
    conflictButtonGroup_->setRadioButtonExclusive(true);
225
    conflictButtonGroup_->setRadioButtonExclusive(true);
238
226
239
    radioButton = new QRadioButton(i18n("Overwrite"),conflictButtonGroup_);
227
    overwriteButton_ = new QRadioButton(i18n("Overwrite"),conflictButtonGroup_);
240
    radioButton->setChecked(true);
228
    overwriteButton_->setChecked(true);
241
    radioButton = new QRadioButton(i18n("Open file dialog"),conflictButtonGroup_);
229
    promptButton_ = new QRadioButton(i18n("Open file dialog"),conflictButtonGroup_);
242
230
243
    // ---------------------------------------------------------------
231
    // ---------------------------------------------------------------
244
232
Lines 286-292 Link Here
286
274
287
    KHelpMenu* helpMenu = new KHelpMenu(this, about, false);
275
    KHelpMenu* helpMenu = new KHelpMenu(this, about, false);
288
    helpMenu->menu()->removeItemAt(0);
276
    helpMenu->menu()->removeItemAt(0);
289
    helpMenu->menu()->insertItem(i18n("RAW Images Batch Converter Handbook"), this, SLOT(slotHelp()), 0, -1, 0);
277
    helpMenu->menu()->insertItem(i18n("RAW Images Batch Converter Handbook"),
278
                                 this, SLOT(slotHelp()), 0, -1, 0);
290
    helpButton_->setPopup( helpMenu->menu() );
279
    helpButton_->setPopup( helpMenu->menu() );
291
280
292
    // ---------------------------------------------------------------
281
    // ---------------------------------------------------------------
Lines 356-363 Link Here
356
{
345
{
357
    QString ext;
346
    QString ext;
358
347
359
    QButton *btn = saveButtonGroup_->selected();
348
    if (saveButtonGroup_->selected() == jpegButton_)
360
    if (btn) ext = btn->text().lower();
349
        ext  = "JPEG";
350
    else if (saveButtonGroup_->selected() == tiffButton_)
351
        ext  = "TIFF";
352
    else
353
        ext  = "PPM";
361
354
362
    KURL::List urlList;
355
    KURL::List urlList;
363
356
Lines 393-399 Link Here
393
386
394
    config->setGroup("RawConverter Settings");
387
    config->setGroup("RawConverter Settings");
395
388
396
    gammaSpinBox_->setValue(config->readNumEntry("Gamma", 8));
397
    brightnessSpinBox_->setValue(config->readNumEntry("Brightness",10));
389
    brightnessSpinBox_->setValue(config->readNumEntry("Brightness",10));
398
390
399
    redSpinBox_->setValue(config->readNumEntry("Red Scale",10));
391
    redSpinBox_->setValue(config->readNumEntry("Red Scale",10));
Lines 412-418 Link Here
412
404
413
    config->setGroup("RawConverter Settings");
405
    config->setGroup("RawConverter Settings");
414
406
415
    config->writeEntry("Gamma", gammaSpinBox_->value());
416
    config->writeEntry("Brightness", brightnessSpinBox_->value());
407
    config->writeEntry("Brightness", brightnessSpinBox_->value());
417
408
418
    config->writeEntry("Red Scale", redSpinBox_->value());
409
    config->writeEntry("Red Scale", redSpinBox_->value());
Lines 431-439 Link Here
431
422
432
void BatchDialog::slotSaveFormatChanged()
423
void BatchDialog::slotSaveFormatChanged()
433
{
424
{
434
    QString ext = saveButtonGroup_->selected()->text().lower();
425
    QString ext;
435
    if (ext.isEmpty()) return;
436
426
427
    if (saveButtonGroup_->selected() == jpegButton_)
428
        ext  = "JPEG";
429
    else if (saveButtonGroup_->selected() == tiffButton_)
430
        ext  = "TIFF";
431
    else
432
        ext  = "PPM";
433
    
437
    QListViewItemIterator it( listView_ );
434
    QListViewItemIterator it( listView_ );
438
    while ( it.current() ) {
435
    while ( it.current() ) {
439
        CListViewItem *item = (CListViewItem*) it.current();
436
        CListViewItem *item = (CListViewItem*) it.current();
Lines 470-480 Link Here
470
    Settings& s      = controller_->settings;
467
    Settings& s      = controller_->settings;
471
    s.cameraWB       = cameraWBCheckBox_->isChecked();
468
    s.cameraWB       = cameraWBCheckBox_->isChecked();
472
    s.fourColorRGB   = fourColorCheckBox_->isChecked();
469
    s.fourColorRGB   = fourColorCheckBox_->isChecked();
473
    s.gamma          = gammaSpinBox_->value()/10.0;
474
    s.brightness     = brightnessSpinBox_->value()/10.0;
470
    s.brightness     = brightnessSpinBox_->value()/10.0;
475
    s.redMultiplier  = redSpinBox_->value()/10.0;
471
    s.redMultiplier  = redSpinBox_->value()/10.0;
476
    s.blueMultiplier = blueSpinBox_->value()/10.0;
472
    s.blueMultiplier = blueSpinBox_->value()/10.0;
477
    s.outputFormat   = saveButtonGroup_->selected()->text();
473
    if (saveButtonGroup_->selected() == jpegButton_)
474
        s.outputFormat  = "JPEG";
475
    else if (saveButtonGroup_->selected() == tiffButton_)
476
        s.outputFormat  = "TIFF";
477
    else
478
        s.outputFormat  = "PPM";
478
479
479
    processOne();
480
    processOne();
480
}
481
}
Lines 509-515 Link Here
509
    conflictButtonGroup_->setEnabled(!busy);
510
    conflictButtonGroup_->setEnabled(!busy);
510
    cameraWBCheckBox_->setEnabled(!busy);
511
    cameraWBCheckBox_->setEnabled(!busy);
511
    fourColorCheckBox_->setEnabled(!busy);
512
    fourColorCheckBox_->setEnabled(!busy);
512
    gammaSpinBox_->setEnabled(!busy);
513
    brightnessSpinBox_->setEnabled(!busy);
513
    brightnessSpinBox_->setEnabled(!busy);
514
    redSpinBox_->setEnabled(!busy);
514
    redSpinBox_->setEnabled(!busy);
515
    blueSpinBox_->setEnabled(!busy);
515
    blueSpinBox_->setEnabled(!busy);
Lines 577-591 Link Here
577
    QString destFile(rawItem->directory + QString("/") +
577
    QString destFile(rawItem->directory + QString("/") +
578
                     rawItem->dest);
578
                     rawItem->dest);
579
579
580
    if (conflictButtonGroup_->selected()->text() != i18n("Overwrite"))
580
    if (conflictButtonGroup_->selected() != overwriteButton_)
581
    {
581
    {
582
        struct stat statBuf;
582
        struct stat statBuf;
583
        if (::stat(QFile::encodeName(destFile), &statBuf) == 0) {
583
        if (::stat(QFile::encodeName(destFile), &statBuf) == 0) {
584
            QString filter("*.");
585
            filter += saveButtonGroup_->selected()->text().lower();
586
            destFile = KFileDialog::
584
            destFile = KFileDialog::
587
                       getSaveFileName(rawItem->directory,
585
                       getSaveFileName(rawItem->directory, QString(),
588
                                       filter, this,
586
                                       this,
589
                                       i18n("Save Raw Image converted "
587
                                       i18n("Save Raw Image converted "
590
                                            "from '%1' as").arg(rawItem->src));
588
                                            "from '%1' as").arg(rawItem->src));
591
        }
589
        }
(-)kipi-plugins/rawconverter.org/batchdialog.h (-1 / +8 lines)
Lines 31-36 Link Here
31
class QListViewItem;
31
class QListViewItem;
32
class QCheckBox;
32
class QCheckBox;
33
class QPushButton;
33
class QPushButton;
34
class QRadioButton;
34
class QVButtonGroup;
35
class QVButtonGroup;
35
class QLabel;
36
class QLabel;
36
class QPixmap;
37
class QPixmap;
Lines 80-86 Link Here
80
    KListView*     listView_;
81
    KListView*     listView_;
81
    QCheckBox*     cameraWBCheckBox_;
82
    QCheckBox*     cameraWBCheckBox_;
82
    QCheckBox*     fourColorCheckBox_;
83
    QCheckBox*     fourColorCheckBox_;
83
    CSpinBox*      gammaSpinBox_;
84
    CSpinBox*      brightnessSpinBox_;
84
    CSpinBox*      brightnessSpinBox_;
85
    CSpinBox*      redSpinBox_;
85
    CSpinBox*      redSpinBox_;
86
    CSpinBox*      blueSpinBox_;
86
    CSpinBox*      blueSpinBox_;
Lines 95-100 Link Here
95
    QPushButton*   closeButton_;
95
    QPushButton*   closeButton_;
96
    QPushButton*   abortButton_;
96
    QPushButton*   abortButton_;
97
97
98
    QRadioButton*  jpegButton_;
99
    QRadioButton*  tiffButton_;
100
    QRadioButton*  ppmButton_;
101
102
    QRadioButton*  overwriteButton_;
103
    QRadioButton*  promptButton_;
104
    
98
    QDict<RawItem>         itemDict_;
105
    QDict<RawItem>         itemDict_;
99
    ProcessController     *controller_;
106
    ProcessController     *controller_;
100
    bool                   busy_;
107
    bool                   busy_;
(-)kipi-plugins/rawconverter.org/dcrawprocess.cpp (-13 / +8 lines)
Lines 47-53 Link Here
47
    bool        quick;
47
    bool        quick;
48
    std::string red;
48
    std::string red;
49
    std::string blue;
49
    std::string blue;
50
    std::string gamma;
51
    std::string brightness;
50
    std::string brightness;
52
    bool        jpeg;
51
    bool        jpeg;
53
    bool        tiff;
52
    bool        tiff;
Lines 121-130 Link Here
121
                argl[index++] = "-d";
120
                argl[index++] = "-d";
122
            
121
            
123
            if (dcParams.quick)
122
            if (dcParams.quick)
124
                argl[index++] = "-q";
123
                argl[index++] = "-h";
125
124
126
            argl[index++] = "-g";
127
            argl[index++] = dcParams.gamma.c_str();
128
            argl[index++] = "-b";
125
            argl[index++] = "-b";
129
            argl[index++] = dcParams.brightness.c_str();
126
            argl[index++] = dcParams.brightness.c_str();
130
            argl[index++] = "-r";
127
            argl[index++] = "-r";
Lines 136-143 Link Here
136
        argl[index++]  = dcParams.inFile.c_str();
133
        argl[index++]  = dcParams.inFile.c_str();
137
        argl[index] = 0;
134
        argl[index] = 0;
138
135
139
136
        if (execvp("dcraw", (char* const*) argl) == -1) {
140
         if (execvp("dcraw", (char* const*) argl) == -1) {
141
            std::cerr << "Failed to start dcraw process" << std::endl;
137
            std::cerr << "Failed to start dcraw process" << std::endl;
142
            exit(EXIT_FAILURE);
138
            exit(EXIT_FAILURE);
143
        }
139
        }
Lines 165-171 Link Here
165
    dcParams.cameraWB  = false;
161
    dcParams.cameraWB  = false;
166
    dcParams.documentMode = false;
162
    dcParams.documentMode = false;
167
    dcParams.quick = false;
163
    dcParams.quick = false;
168
    dcParams.gamma = "0.8";
169
    dcParams.brightness = "1.0";
164
    dcParams.brightness = "1.0";
170
    dcParams.red  = "1.0";
165
    dcParams.red  = "1.0";
171
    dcParams.blue = "1.0";
166
    dcParams.blue = "1.0";
Lines 176-182 Link Here
176
171
177
    int c;
172
    int c;
178
173
179
    while ((c = getopt(argc, argv, "ifwdqg:b:r:l:o:F:Q:D:")) != -1) {
174
    while ((c = getopt(argc, argv, "ifwdhg:b:r:l:o:F:Q:D:")) != -1) {
180
        switch (c) {
175
        switch (c) {
181
176
182
        case 'i': {
177
        case 'i': {
Lines 199-213 Link Here
199
            break;
194
            break;
200
        }
195
        }
201
196
202
        case 'q': {
197
        case 'h': {
203
            dcParams.quick = true;
198
            dcParams.quick = true;
204
            break;
199
            break;
205
        }
200
        }
206
201
207
        case 'g': {
208
            dcParams.gamma = optarg;
209
            break;
210
        }
211
    
202
    
212
        case 'b': {
203
        case 'b': {
213
            dcParams.brightness = optarg;
204
            dcParams.brightness = optarg;
Lines 236-242 Link Here
236
            else if (format == "TIFF")
227
            else if (format == "TIFF")
237
                dcParams.tiff = true;
228
                dcParams.tiff = true;
238
            else if (format != "PPM")
229
            else if (format != "PPM")
230
            {
231
                std::cerr << "Exiting: wrong format: " << format << std::endl;
239
                printUsage();
232
                printUsage();
233
            }
240
            break;
234
            break;
241
        }
235
        }
242
236
Lines 251-256 Link Here
251
        }
245
        }
252
            
246
            
253
        default: {
247
        default: {
248
            std::cerr << "Exiting: Unknown option: " << c  << std::endl;
254
            printUsage();
249
            printUsage();
255
            break;
250
            break;
256
        }
251
        }
(-)kipi-plugins/rawconverter.org/kipiplugin_rawconverter.desktop (+5 lines)
Lines 4-11 Link Here
4
Name[da]=RAW-konvertering
4
Name[da]=RAW-konvertering
5
Name[et]=Toorpiltide teisendaja
5
Name[et]=Toorpiltide teisendaja
6
Name[it]=ConvertitoreGrezzo
6
Name[it]=ConvertitoreGrezzo
7
Name[nb]=RAW-konvertering
7
Name[nl]=Ruw-conversie
8
Name[nl]=Ruw-conversie
8
Name[pt]=ConversorEmBruto
9
Name[pt]=ConversorEmBruto
10
Name[pt_BR]=Conversor Em Bruto
9
Name[sv]=Konvertering av obehandlade bilder
11
Name[sv]=Konvertering av obehandlade bilder
10
Name[ta]=முதல் மாற்றி
12
Name[ta]=முதல் மாற்றி
11
Name[tr]=RawDönüştürücü
13
Name[tr]=RawDönüştürücü
Lines 13-24 Link Here
13
Comment=KIPI Raw Image Converter
15
Comment=KIPI Raw Image Converter
14
Comment[da]=KIPI RAW-billedekonvertering
16
Comment[da]=KIPI RAW-billedekonvertering
15
Comment[de]=Ein KIPI Plugin um RAW Bilder zu konvertieren
17
Comment[de]=Ein KIPI Plugin um RAW Bilder zu konvertieren
18
Comment[es]=Un conversor de imágenes en bruto de KIPI
16
Comment[et]=KIPI toorpiltide teisendaja
19
Comment[et]=KIPI toorpiltide teisendaja
17
Comment[fr]=Module externe Kipi pour convertir des fichiers RAW
20
Comment[fr]=Module externe Kipi pour convertir des fichiers RAW
18
Comment[it]=Convertitore di immagini grezze di KIPI
21
Comment[it]=Convertitore di immagini grezze di KIPI
19
Comment[mt]=KIPI Konvertitur Ta' L-Istampi
22
Comment[mt]=KIPI Konvertitur Ta' L-Istampi
23
Comment[nb]=KIPI RAW bildekonvertering
20
Comment[nl]=Kipi-plugin voor het converteren van ruwe afbeeldingen
24
Comment[nl]=Kipi-plugin voor het converteren van ruwe afbeeldingen
21
Comment[pt]=Um Conversor de Imagens em Bruto do KIPI
25
Comment[pt]=Um Conversor de Imagens em Bruto do KIPI
26
Comment[pt_BR]=Um Conversor de Imagens em Bruto do KIPI
22
Comment[sv]=KIPI-insticksprogram: Konvertering av obehandlade bilder
27
Comment[sv]=KIPI-insticksprogram: Konvertering av obehandlade bilder
23
Comment[ta]=கிபி முதல் பிம்ப மாற்றி
28
Comment[ta]=கிபி முதல் பிம்ப மாற்றி
24
Comment[tr]=KIPI Raw Resim Dönüştürücü
29
Comment[tr]=KIPI Raw Resim Dönüştürücü
(-)kipi-plugins/rawconverter.org/processcontroller.cpp (-5 / +15 lines)
Lines 22-27 Link Here
22
#include <qprocess.h>
22
#include <qprocess.h>
23
#include <qtimer.h>
23
#include <qtimer.h>
24
#include <qfile.h>
24
#include <qfile.h>
25
#include <kdebug.h>
25
26
26
extern "C"
27
extern "C"
27
{
28
{
Lines 40-45 Link Here
40
    dcProcess_ = new QProcess(this);
41
    dcProcess_ = new QProcess(this);
41
    connect(dcProcess_, SIGNAL(processExited()),
42
    connect(dcProcess_, SIGNAL(processExited()),
42
            SLOT(slotProcessFinished()));
43
            SLOT(slotProcessFinished()));
44
    connect(dcProcess_, SIGNAL(readyReadStderr()),
45
            SLOT(slotProcessStdErr()));
43
46
44
    currTime_ = QString::number(::time(0));
47
    currTime_ = QString::number(::time(0));
45
48
Lines 85-92 Link Here
85
        dcProcess_->addArgument("-w");
88
        dcProcess_->addArgument("-w");
86
    if (settings.fourColorRGB)
89
    if (settings.fourColorRGB)
87
        dcProcess_->addArgument("-f");
90
        dcProcess_->addArgument("-f");
88
    dcProcess_->addArgument("-g");
89
    dcProcess_->addArgument(QString::number(settings.gamma));
90
    dcProcess_->addArgument("-b");
91
    dcProcess_->addArgument("-b");
91
    dcProcess_->addArgument(QString::number(settings.brightness));
92
    dcProcess_->addArgument(QString::number(settings.brightness));
92
    dcProcess_->addArgument("-r");
93
    dcProcess_->addArgument("-r");
Lines 119-125 Link Here
119
    dcProcess_->clearArguments();
120
    dcProcess_->clearArguments();
120
121
121
    dcProcess_->addArgument("kipidcrawclient");
122
    dcProcess_->addArgument("kipidcrawclient");
122
    dcProcess_->addArgument("-q");
123
    dcProcess_->addArgument("-h");
123
    dcProcess_->addArgument("-o");
124
    dcProcess_->addArgument("-o");
124
    dcProcess_->addArgument(tmpFile_);
125
    dcProcess_->addArgument(tmpFile_);
125
126
Lines 127-140 Link Here
127
        dcProcess_->addArgument("-w");
128
        dcProcess_->addArgument("-w");
128
    if (settings.fourColorRGB)
129
    if (settings.fourColorRGB)
129
        dcProcess_->addArgument("-f");
130
        dcProcess_->addArgument("-f");
130
    dcProcess_->addArgument("-g");
131
    dcProcess_->addArgument(QString::number(settings.gamma));
132
    dcProcess_->addArgument("-b");
131
    dcProcess_->addArgument("-b");
133
    dcProcess_->addArgument(QString::number(settings.brightness));
132
    dcProcess_->addArgument(QString::number(settings.brightness));
134
    dcProcess_->addArgument("-r");
133
    dcProcess_->addArgument("-r");
135
    dcProcess_->addArgument(QString::number(settings.redMultiplier));
134
    dcProcess_->addArgument(QString::number(settings.redMultiplier));
136
    dcProcess_->addArgument("-l");
135
    dcProcess_->addArgument("-l");
137
    dcProcess_->addArgument(QString::number(settings.blueMultiplier));
136
    dcProcess_->addArgument(QString::number(settings.blueMultiplier));
137
    dcProcess_->addArgument("-F");
138
    dcProcess_->addArgument(settings.outputFormat);
138
    dcProcess_->addArgument(fileCurrent_);
139
    dcProcess_->addArgument(fileCurrent_);
139
    dcProcess_->start();
140
    dcProcess_->start();
140
141
Lines 216-221 Link Here
216
    }
217
    }
217
}
218
}
218
219
220
void ProcessController::slotProcessStdErr()
221
{
222
    QByteArray ba = dcProcess_->readStderr();
223
    if (!ba.isEmpty())
224
    {
225
        kdWarning() << "ProcessController: stderr: " << ba << endl;
226
    }
227
}
228
219
} // NameSpace KIPIRawConverterPlugin
229
} // NameSpace KIPIRawConverterPlugin
220
230
221
#include "processcontroller.moc"
231
#include "processcontroller.moc"
(-)kipi-plugins/rawconverter.org/processcontroller.h (-1 / +1 lines)
Lines 34-40 Link Here
34
{
34
{
35
    bool    cameraWB;
35
    bool    cameraWB;
36
    bool    fourColorRGB;
36
    bool    fourColorRGB;
37
    float   gamma;
38
    float   brightness;
37
    float   brightness;
39
    float   redMultiplier;
38
    float   redMultiplier;
40
    float   blueMultiplier;
39
    float   blueMultiplier;
Lines 94-99 Link Here
94
private slots:
93
private slots:
95
94
96
    void slotProcessFinished();
95
    void slotProcessFinished();
96
    void slotProcessStdErr();
97
};
97
};
98
98
99
} // NameSpace KIPIRawConverterPlugin
99
} // NameSpace KIPIRawConverterPlugin
(-)kipi-plugins/rawconverter.org/singledialog.cpp (-28 / +15 lines)
Lines 151-167 Link Here
151
151
152
    QHBoxLayout *hboxLayout;
152
    QHBoxLayout *hboxLayout;
153
153
154
    // ---------------------------------------------------------------
155
156
    hboxLayout = new QHBoxLayout(0,0,6,"layout1");
157
    gammaSpinBox_ = new CSpinBox(settingsBox);
158
    gammaSpinBox_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
159
160
    hboxLayout->addWidget(gammaSpinBox_);
161
    hboxLayout->addWidget(new QLabel(i18n("Gamma"), settingsBox));
162
    QToolTip::add(gammaSpinBox_,
163
                  i18n("Specify the gamma value"));
164
    settingsBoxLayout->addLayout(hboxLayout);
165
154
166
    // ---------------------------------------------------------------
155
    // ---------------------------------------------------------------
167
156
Lines 206-227 Link Here
206
    saveButtonGroup_ = new QVButtonGroup(i18n("Save Format"),this);
195
    saveButtonGroup_ = new QVButtonGroup(i18n("Save Format"),this);
207
    saveButtonGroup_->setRadioButtonExclusive(true);
196
    saveButtonGroup_->setRadioButtonExclusive(true);
208
197
209
    QRadioButton *radioButton;
198
    jpegButton_ = new QRadioButton("JPEG",saveButtonGroup_);
210
    radioButton = new QRadioButton("JPEG",saveButtonGroup_);
199
    QToolTip::add(jpegButton_,
211
    QToolTip::add(radioButton,
212
                  i18n("Output the processed image in JPEG Format.\n"
200
                  i18n("Output the processed image in JPEG Format.\n"
213
                       "This is a lossy format, but will give\n"
201
                       "This is a lossy format, but will give\n"
214
                       "smaller-sized files"));
202
                       "smaller-sized files"));
215
    radioButton->setChecked(true);
203
    jpegButton_->setChecked(true);
216
204
217
    radioButton = new QRadioButton("TIFF",saveButtonGroup_);
205
    tiffButton_ = new QRadioButton("TIFF",saveButtonGroup_);
218
    QToolTip::add(radioButton,
206
    QToolTip::add(tiffButton_,
219
                  i18n("Output the processed image in TIFF Format.\n"
207
                  i18n("Output the processed image in TIFF Format.\n"
220
                       "This generates larges, without\n"
208
                       "This generates larges, without\n"
221
                       "losing quality"));
209
                       "losing quality"));
222
210
223
    radioButton = new QRadioButton("PPM",saveButtonGroup_);
211
    ppmButton_ = new QRadioButton("PPM",saveButtonGroup_);
224
    QToolTip::add(radioButton,
212
    QToolTip::add(ppmButton_,
225
                  i18n("Output the processed image in PPM Format.\n"
213
                  i18n("Output the processed image in PPM Format.\n"
226
                       "This generates the largest files, without\n"
214
                       "This generates the largest files, without\n"
227
                       "losing quality"));
215
                       "losing quality"));
Lines 372-378 Link Here
372
360
373
    config->setGroup("RawConverter Settings");
361
    config->setGroup("RawConverter Settings");
374
362
375
    gammaSpinBox_->setValue(config->readNumEntry("Gamma", 8));
376
    brightnessSpinBox_->setValue(config->readNumEntry("Brightness",10));
363
    brightnessSpinBox_->setValue(config->readNumEntry("Brightness",10));
377
364
378
    redSpinBox_->setValue(config->readNumEntry("Red Scale",10));
365
    redSpinBox_->setValue(config->readNumEntry("Red Scale",10));
Lines 390-396 Link Here
390
377
391
    config->setGroup("RawConverter Settings");
378
    config->setGroup("RawConverter Settings");
392
379
393
    config->writeEntry("Gamma", gammaSpinBox_->value());
394
    config->writeEntry("Brightness", brightnessSpinBox_->value());
380
    config->writeEntry("Brightness", brightnessSpinBox_->value());
395
381
396
    config->writeEntry("Red Scale", redSpinBox_->value());
382
    config->writeEntry("Red Scale", redSpinBox_->value());
Lines 416-426 Link Here
416
    Settings& s      = controller_->settings;
402
    Settings& s      = controller_->settings;
417
    s.cameraWB       = cameraWBCheckBox_->isChecked();
403
    s.cameraWB       = cameraWBCheckBox_->isChecked();
418
    s.fourColorRGB   = fourColorCheckBox_->isChecked();
404
    s.fourColorRGB   = fourColorCheckBox_->isChecked();
419
    s.gamma          = gammaSpinBox_->value()/10.0;
420
    s.brightness     = brightnessSpinBox_->value()/10.0;
405
    s.brightness     = brightnessSpinBox_->value()/10.0;
421
    s.redMultiplier  = redSpinBox_->value()/10.0;
406
    s.redMultiplier  = redSpinBox_->value()/10.0;
422
    s.blueMultiplier = blueSpinBox_->value()/10.0;
407
    s.blueMultiplier = blueSpinBox_->value()/10.0;
423
    s.outputFormat   = saveButtonGroup_->selected()->text();
408
    s.outputFormat   = "PPM";
424
409
425
    controller_->preview(inputFile_);
410
    controller_->preview(inputFile_);
426
}
411
}
Lines 430-440 Link Here
430
    Settings& s      = controller_->settings;
415
    Settings& s      = controller_->settings;
431
    s.cameraWB       = cameraWBCheckBox_->isChecked();
416
    s.cameraWB       = cameraWBCheckBox_->isChecked();
432
    s.fourColorRGB   = fourColorCheckBox_->isChecked();
417
    s.fourColorRGB   = fourColorCheckBox_->isChecked();
433
    s.gamma          = gammaSpinBox_->value()/10.0;
434
    s.brightness     = brightnessSpinBox_->value()/10.0;
418
    s.brightness     = brightnessSpinBox_->value()/10.0;
435
    s.redMultiplier  = redSpinBox_->value()/10.0;
419
    s.redMultiplier  = redSpinBox_->value()/10.0;
436
    s.blueMultiplier = blueSpinBox_->value()/10.0;
420
    s.blueMultiplier = blueSpinBox_->value()/10.0;
437
    s.outputFormat   = saveButtonGroup_->selected()->text();
421
    if (saveButtonGroup_->selected() == jpegButton_)
422
        s.outputFormat  = "JPEG";
423
    else if (saveButtonGroup_->selected() == tiffButton_)
424
        s.outputFormat  = "TIFF";
425
    else
426
        s.outputFormat  = "PPM";
438
427
439
    controller_->process(inputFile_);
428
    controller_->process(inputFile_);
440
}
429
}
Lines 497-507 Link Here
497
void SingleDialog::slotProcessed(const QString&, const QString& tmpFile_)
486
void SingleDialog::slotProcessed(const QString&, const QString& tmpFile_)
498
{
487
{
499
    previewWidget_->load(tmpFile_);
488
    previewWidget_->load(tmpFile_);
500
    QString filter("*.");
501
    filter += saveButtonGroup_->selected()->text().lower();
502
    QString saveFile =
489
    QString saveFile =
503
        KFileDialog::getSaveFileName(QFileInfo(inputFile_).dirPath(true),
490
        KFileDialog::getSaveFileName(QFileInfo(inputFile_).dirPath(true),
504
                                     filter, this);
491
                                     QString(), this);
505
492
506
    if (saveFile.isEmpty()) return;
493
    if (saveFile.isEmpty()) return;
507
494
(-)kipi-plugins/rawconverter.org/singledialog.h (-1 / +5 lines)
Lines 29-34 Link Here
29
class QCheckBox;
29
class QCheckBox;
30
class QPushButton;
30
class QPushButton;
31
class QVButtonGroup;
31
class QVButtonGroup;
32
class QRadioButton;
32
class QCloseEvent;
33
class QCloseEvent;
33
34
34
namespace KIPIRawConverterPlugin
35
namespace KIPIRawConverterPlugin
Lines 61-67 Link Here
61
    QCheckBox*     cameraWBCheckBox_;
62
    QCheckBox*     cameraWBCheckBox_;
62
    QCheckBox*     fourColorCheckBox_;
63
    QCheckBox*     fourColorCheckBox_;
63
    
64
    
64
    CSpinBox*      gammaSpinBox_;
65
    CSpinBox*      brightnessSpinBox_;
65
    CSpinBox*      brightnessSpinBox_;
66
    CSpinBox*      redSpinBox_;
66
    CSpinBox*      redSpinBox_;
67
    CSpinBox*      blueSpinBox_;
67
    CSpinBox*      blueSpinBox_;
Lines 71-76 Link Here
71
    QPushButton*   processButton_;
71
    QPushButton*   processButton_;
72
    QPushButton*   closeButton_;
72
    QPushButton*   closeButton_;
73
    QPushButton*   abortButton_;
73
    QPushButton*   abortButton_;
74
75
    QRadioButton*  jpegButton_;
76
    QRadioButton*  tiffButton_;
77
    QRadioButton*  ppmButton_;
74
    
78
    
75
    QVButtonGroup* saveButtonGroup_;
79
    QVButtonGroup* saveButtonGroup_;
76
80

Return to bug 89826