1 /*
2  *  Copyright (c) 2016 Dmitry Kazakov <dimula73@gmail.com>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef __KIS_SNAP_CONFIG_H
20 #define __KIS_SNAP_CONFIG_H
21 
22 
23 class KisSnapConfig
24 {
25 public:
26     KisSnapConfig(bool loadValues = true);
27     ~KisSnapConfig();
28 
orthogonal()29     bool orthogonal() const {
30         return m_orthogonal;
31     }
setOrthogonal(bool value)32     void setOrthogonal(bool value) {
33         m_orthogonal = value;
34     }
35 
node()36     bool node() const {
37         return m_node;
38     }
setNode(bool value)39     void setNode(bool value) {
40         m_node = value;
41     }
42 
extension()43     bool extension() const {
44         return m_extension;
45     }
setExtension(bool value)46     void setExtension(bool value) {
47         m_extension = value;
48     }
49 
intersection()50     bool intersection() const {
51         return m_intersection;
52     }
setIntersection(bool value)53     void setIntersection(bool value) {
54         m_intersection = value;
55     }
56 
boundingBox()57     bool boundingBox() const {
58         return m_boundingBox;
59     }
setBoundingBox(bool value)60     void setBoundingBox(bool value) {
61         m_boundingBox = value;
62     }
63 
imageBounds()64     bool imageBounds() const {
65         return m_imageBounds;
66     }
setImageBounds(bool value)67     void setImageBounds(bool value) {
68         m_imageBounds = value;
69     }
70 
imageCenter()71     bool imageCenter() const {
72         return m_imageCenter;
73     }
setImageCenter(bool value)74     void setImageCenter(bool value) {
75         m_imageCenter = value;
76     }
77 
toPixel()78     bool toPixel() const {
79         return m_toPixel;
80     }
setToPixel(bool value)81     void setToPixel(bool value) {
82         m_toPixel = value;
83     }
84 
85     void saveStaticData() const;
86     void loadStaticData();
87 
88 private:
89     bool m_orthogonal;
90     bool m_node;
91     bool m_extension;
92     bool m_intersection;
93     bool m_boundingBox;
94     bool m_imageBounds;
95     bool m_imageCenter;
96     bool m_toPixel;
97 };
98 
99 #endif /* __KIS_SNAP_CONFIG_H */
100