1 /**
2  * This file is a part of Luminance HDR package.
3  * ----------------------------------------------------------------------
4  * Copyright (C) 2006,2007 Giuseppe Rota
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * ----------------------------------------------------------------------
20  *
21  * @author Giuseppe Rota <grota@users.sourceforge.net>
22  */
23 
24 #ifndef OPTIONS_IMPL_H
25 #define OPTIONS_IMPL_H
26 
27 #include <QDialog>
28 #include <QLineEdit>
29 #include <QMap>
30 #include <QSignalMapper>
31 
32 #include "LibpfsAdditions/formathelper.h"
33 
34 namespace Ui {
35 class PreferencesDialog;
36 }
37 
38 class PreferencesDialog : public QDialog {
39     Q_OBJECT
40 
41    private:
42     QScopedPointer<Ui::PreferencesDialog> m_Ui;
43 
44    public:
45     PreferencesDialog(QWidget *parent, int tab = 0);
46     ~PreferencesDialog();
47 
48    private:
49     void from_options_to_gui();
50 
51     QColor infnancolor, negcolor;
52     QMap<QString, int> fromIso639ToGuiIndex;
53     QMap<int, QString> fromGuiIndexToIso639;
54     QSignalMapper *toolButtonMapper;
55     pfsadditions::FormatHelper m_formatHelper;
56 
57    protected:
58     virtual void changeEvent(QEvent *event);
59 
60    private Q_SLOTS:
61     void on_okButton_clicked();
62     void on_cancelButton_clicked();
63     void on_chooseCachePathButton_clicked();
64     void enterWhatsThis();
65 
66     void on_user_qual_comboBox_currentIndexChanged(int);
67     void on_med_passes_spinBox_valueChanged(int);
68     void on_wb_method_comboBox_currentIndexChanged(int);
69     void on_TK_spinBox_valueChanged(int);
70     void on_highlights_comboBox_currentIndexChanged(int);
71     void on_level_spinBox_valueChanged(int);
72     void on_user_black_spinBox_valueChanged(int);
73     void on_user_sat_spinBox_valueChanged(int);
74     void on_threshold_spinBox_valueChanged(int);
75     void on_use_black_CB_stateChanged(int);
76     void on_use_sat_CB_stateChanged(int);
77     void on_use_noise_CB_stateChanged(int);
78     void on_use_chroma_CB_stateChanged(int);
79     void on_brightness_horizontalSlider_valueChanged(int);
80     void on_brightness_doubleSpinBox_valueChanged(double);
81     void on_red_horizontalSlider_valueChanged(int);
82     void on_red_doubleSpinBox_valueChanged(double);
83     void on_blue_horizontalSlider_valueChanged(int);
84     void on_blue_doubleSpinBox_valueChanged(double);
85     void on_green_horizontalSlider_valueChanged(int);
86     void on_green_doubleSpinBox_valueChanged(double);
87 
88     void on_user_qual_toolButton_clicked();
89     void on_med_passes_toolButton_clicked();
90     void on_wb_method_toolButton_clicked();
91     void on_TK_toolButton_clicked();
92     void on_highlights_toolButton_clicked();
93     void on_level_toolButton_clicked();
94     void on_brightness_toolButton_clicked();
95     void on_user_black_toolButton_clicked();
96     void on_user_sat_toolButton_clicked();
97     void on_threshold_toolButton_clicked();
98     void on_red_toolButton_clicked();
99     void on_blue_toolButton_clicked();
100     void on_green_toolButton_clicked();
101 
102     void on_exportFileButton_clicked();
103 
104     void on_camera_toolButton_clicked();
105     void on_monitor_toolButton_clicked();
106     void on_printer_toolButton_clicked();
107 
108     void toolButton_clicked(int);
109 
110     void openColorProfile(QLineEdit *lineEdit);
111 
112     void on_themeChanged();
113 };
114 #endif
115