Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/kis_config.cc
Show First 20 Lines • Show All 277 Lines • ▼ Show 20 Line(s) | |||||
278 | { | 278 | { | ||
279 | m_cfg.writeEntry("newCursorStyle", (int)style); | 279 | m_cfg.writeEntry("newCursorStyle", (int)style); | ||
280 | } | 280 | } | ||
281 | 281 | | |||
282 | QColor KisConfig::getCursorMainColor(bool defaultValue) const | 282 | QColor KisConfig::getCursorMainColor(bool defaultValue) const | ||
283 | { | 283 | { | ||
284 | QColor col; | 284 | QColor col; | ||
285 | col.setRgbF(0.501961, 1.0, 0.501961); | 285 | col.setRgbF(0.501961, 1.0, 0.501961); | ||
286 | return (defaultValue ? col : m_cfg.readEntry("cursormaincolor", col)); | 286 | return (defaultValue ? col : m_cfg.readEntry("cursorMaincColor", col)); | ||
287 | } | 287 | } | ||
288 | 288 | | |||
289 | void KisConfig::setCursorMainColor(const QColor &v) const | 289 | void KisConfig::setCursorMainColor(const QColor &v) const | ||
290 | { | 290 | { | ||
291 | m_cfg.writeEntry("cursormaincolor", v); | 291 | m_cfg.writeEntry("cursorMaincColor", v); | ||
292 | } | 292 | } | ||
293 | 293 | | |||
294 | OutlineStyle KisConfig::newOutlineStyle(bool defaultValue) const | 294 | OutlineStyle KisConfig::newOutlineStyle(bool defaultValue) const | ||
295 | { | 295 | { | ||
296 | if (defaultValue) { | 296 | if (defaultValue) { | ||
297 | return OUTLINE_FULL; | 297 | return OUTLINE_FULL; | ||
298 | } | 298 | } | ||
299 | 299 | | |||
▲ Show 20 Lines • Show All 428 Lines • ▼ Show 20 Line(s) | 726 | { | |||
728 | return (defaultValue ? col : m_cfg.readEntry("gridsubdivisioncolor", col)); | 728 | return (defaultValue ? col : m_cfg.readEntry("gridsubdivisioncolor", col)); | ||
729 | } | 729 | } | ||
730 | 730 | | |||
731 | void KisConfig::setGridSubdivisionColor(const QColor & v) const | 731 | void KisConfig::setGridSubdivisionColor(const QColor & v) const | ||
732 | { | 732 | { | ||
733 | m_cfg.writeEntry("gridsubdivisioncolor", v); | 733 | m_cfg.writeEntry("gridsubdivisioncolor", v); | ||
734 | } | 734 | } | ||
735 | 735 | | |||
736 | QColor KisConfig::getOpenGLGridColor(bool defaultValue) const | 736 | QColor KisConfig::getPixelGridColor(bool defaultValue) const | ||
737 | { | 737 | { | ||
738 | QColor col(255, 255, 255); | 738 | QColor col(255, 255, 255); | ||
739 | return (defaultValue ? col : m_cfg.readEntry("openglgridcolor", col)); | 739 | return (defaultValue ? col : m_cfg.readEntry("pixelGridColor", col)); | ||
740 | } | 740 | } | ||
741 | 741 | | |||
742 | void KisConfig::setOpenGLGridColor(const QColor & v) const | 742 | void KisConfig::setPixelGridColor(const QColor & v) const | ||
743 | { | 743 | { | ||
744 | m_cfg.writeEntry("openglgridcolor", v); | 744 | m_cfg.writeEntry("pixelGridColor", v); | ||
745 | } | 745 | } | ||
746 | 746 | | |||
747 | qreal KisConfig::getOpenGLGridDrawingThreshold(bool defaultValue) const | 747 | qreal KisConfig::getPixelGridDrawingThreshold(bool defaultValue) const | ||
748 | { | 748 | { | ||
749 | qreal border = 8.0f; | 749 | qreal border = 8.0f; | ||
750 | return (defaultValue ? border : m_cfg.readEntry("griddrawingborder", border)); | 750 | return (defaultValue ? border : m_cfg.readEntry("pixelGridDrawingThreshold", border)); | ||
751 | } | 751 | } | ||
752 | 752 | | |||
753 | void KisConfig::setOpenGLGridDrawingThreshold(qreal v) const | 753 | void KisConfig::setPixelGridDrawingThreshold(qreal v) const | ||
754 | { | 754 | { | ||
755 | m_cfg.writeEntry("griddrawingborder", v); | 755 | m_cfg.writeEntry("pixelGridDrawingThreshold", v); | ||
756 | } | ||||
757 | | ||||
758 | bool KisConfig::pixelGridEnabled(bool defaultValue) const | ||||
759 | { | ||||
760 | bool enabled = true; | ||||
761 | return (defaultValue ? enabled : m_cfg.readEntry("pixelGridEnabled", enabled)); | ||||
762 | } | ||||
763 | | ||||
764 | void KisConfig::enablePixelGrid(bool v) const | ||||
765 | { | ||||
766 | m_cfg.writeEntry("pixelGridEnabled", v); | ||||
756 | } | 767 | } | ||
757 | 768 | | |||
758 | quint32 KisConfig::guidesLineStyle(bool defaultValue) const | 769 | quint32 KisConfig::guidesLineStyle(bool defaultValue) const | ||
759 | { | 770 | { | ||
760 | int v = m_cfg.readEntry("guidesLineStyle", 0); | 771 | int v = m_cfg.readEntry("guidesLineStyle", 0); | ||
761 | v = qBound(0, v, 2); | 772 | v = qBound(0, v, 2); | ||
762 | return (defaultValue ? 0 : v); | 773 | return (defaultValue ? 0 : v); | ||
763 | } | 774 | } | ||
▲ Show 20 Lines • Show All 1113 Lines • Show Last 20 Lines |