File indexing completed on 2025-02-23 04:09:02
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef __KIS_SNAP_CONFIG_H 0008 #define __KIS_SNAP_CONFIG_H 0009 0010 0011 class KisSnapConfig 0012 { 0013 public: 0014 KisSnapConfig(bool loadValues = true); 0015 ~KisSnapConfig(); 0016 0017 bool orthogonal() const { 0018 return m_orthogonal; 0019 } 0020 void setOrthogonal(bool value) { 0021 m_orthogonal = value; 0022 } 0023 0024 bool node() const { 0025 return m_node; 0026 } 0027 void setNode(bool value) { 0028 m_node = value; 0029 } 0030 0031 bool extension() const { 0032 return m_extension; 0033 } 0034 void setExtension(bool value) { 0035 m_extension = value; 0036 } 0037 0038 bool intersection() const { 0039 return m_intersection; 0040 } 0041 void setIntersection(bool value) { 0042 m_intersection = value; 0043 } 0044 0045 bool boundingBox() const { 0046 return m_boundingBox; 0047 } 0048 void setBoundingBox(bool value) { 0049 m_boundingBox = value; 0050 } 0051 0052 bool imageBounds() const { 0053 return m_imageBounds; 0054 } 0055 void setImageBounds(bool value) { 0056 m_imageBounds = value; 0057 } 0058 0059 bool imageCenter() const { 0060 return m_imageCenter; 0061 } 0062 void setImageCenter(bool value) { 0063 m_imageCenter = value; 0064 } 0065 0066 bool toPixel() const { 0067 return m_toPixel; 0068 } 0069 void setToPixel(bool value) { 0070 m_toPixel = value; 0071 } 0072 0073 void saveStaticData() const; 0074 void loadStaticData(); 0075 0076 private: 0077 bool m_orthogonal; 0078 bool m_node; 0079 bool m_extension; 0080 bool m_intersection; 0081 bool m_boundingBox; 0082 bool m_imageBounds; 0083 bool m_imageCenter; 0084 bool m_toPixel; 0085 }; 0086 0087 #endif /* __KIS_SNAP_CONFIG_H */