~ubuntu-branches/ubuntu/natty/qtpfsgui/natty

« back to all changes in this revision

Viewing changes to src/Common/options.h

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-01-06 04:39:36 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080106043936-a9u9g7yih3w16ru5
Tags: 1.9.0-1
* New upstream release.
* Replace “COPYING” with “LICENSE” in the NOT_NEEDED variable of
  debian/rules, following upstream's renaming.
* Update debian/links accordingly.
* Delete the matching TODO item since there's no longer needed to have a
  patched (with HTML tags) license file to get a correct display in the
  “License agreement” tab.
* Update the gcc4.3 patch (drop the hunk touching src/Libpfs/pfs.cpp):
   - 20_gcc4.3_includes.
* Add a link from /usr/share/qtpfsgui/html to the HTML documentation
  under /usr/share/doc/qtpfsgui/html since the former is used at runtime
  to display the manual.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * This file is a part of Qtpfsgui 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_H
 
25
#define OPTIONS_H
 
26
 
 
27
#include <QString>
 
28
#include <QStringList>
 
29
 
 
30
struct qtpfsgui_opts {
 
31
        //options for RAW import functionality, thanks to dcraw
 
32
        QStringList dcraw_options;
 
33
        //color used to draw the NAN/INF or the negative colors
 
34
        unsigned int naninfcolor, negcolor;
 
35
        //if true, we save a logluv tiff (if false a uncompressed 32 bit tiff)
 
36
        bool saveLogLuvTiff;
 
37
        //path to save temporary cached pfs files.
 
38
        QString tempfilespath;
 
39
        //number of threads to use (where threaded execution is enabled).
 
40
        int num_threads;
 
41
        //Image format used to save LDRs in batch mode.
 
42
        QString batch_ldr_format;
 
43
};
 
44
 
 
45
class QtPfsGuiOptions {
 
46
        public:
 
47
        static void loadOptions (qtpfsgui_opts *dest);
 
48
};
 
49
 
 
50
enum tmoperator {ashikhmin,drago,durand,fattal,pattanaik,reinhard02,reinhard05,mantiuk};
 
51
struct tonemapping_options {
 
52
        int xsize;
 
53
        float pregamma;
 
54
        enum tmoperator tmoperator;
 
55
        union {
 
56
                struct {
 
57
                        bool  simple;
 
58
                        bool  eq2; //false means eq4
 
59
                        float lct;
 
60
                } ashikhminoptions;
 
61
                struct{
 
62
                        float bias;
 
63
                } dragooptions;
 
64
                struct {
 
65
                        float spatial;
 
66
                        float range;
 
67
                        float base;
 
68
                } durandoptions;
 
69
                struct {
 
70
                        float alpha;
 
71
                        float beta;
 
72
                        float color;
 
73
                        float noiseredux;
 
74
                        bool  newfattal;
 
75
                } fattaloptions;
 
76
                struct {
 
77
                        bool  autolum;
 
78
                        bool  local;
 
79
                        float cone;
 
80
                        float rod;
 
81
                        float multiplier;
 
82
                } pattanaikoptions;
 
83
                struct {
 
84
                        bool  scales;
 
85
                        float key;
 
86
                        float phi;
 
87
                        int   range;
 
88
                        int   lower;
 
89
                        int   upper;
 
90
                } reinhard02options;
 
91
                struct {
 
92
                        float brightness;
 
93
                        float chromaticAdaptation;
 
94
                        float lightAdaptation;
 
95
                } reinhard05options;
 
96
                struct {
 
97
                        float contrastfactor;
 
98
                        float saturationfactor;
 
99
                        bool  contrastequalization;
 
100
                } mantiukoptions;
 
101
        } operator_options;
 
102
};
 
103
 
 
104
class TMOptionsOperations {
 
105
public:
 
106
        TMOptionsOperations(tonemapping_options* opts);
 
107
        static tonemapping_options* parseFile(QString file);
 
108
        static tonemapping_options* getDefaultTMOptions();
 
109
        QString getPostfix();
 
110
        QString getCaption();
 
111
        QString getExifComment();
 
112
private:
 
113
        tonemapping_options* opts;
 
114
};
 
115
 
 
116
#endif