Commit 8caa7ec5 authored by Ralf Habacker's avatar Ralf Habacker

Move Optionstate class member initialization to related OptionState class

This holds class and member access more together.
parent 8a394e4b
......@@ -460,6 +460,7 @@ set(umbrellobase_SRCS
assocrules.cpp
basictypes.cpp
birdview.cpp
codeviewerstate.cpp
cmdlineexportallviewsevent.cpp
diagramswindow.cpp
diagram_utils.cpp
......
/***************************************************************************
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* copyright (C) 2004-2017 *
* Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
***************************************************************************/
#include "codeviewerstate.h"
#include "umbrellosettings.h"
namespace Settings {
void CodeViewerState::load()
{
height = UmbrelloSettings::height();
width = UmbrelloSettings::width();
font = UmbrelloSettings::codeViewerFont();
showHiddenBlocks = UmbrelloSettings::showHiddenBlocks();
blocksAreHighlighted = UmbrelloSettings::blocksAreHighlighted();
selectedColor = UmbrelloSettings::selectedColor();
paperColor = UmbrelloSettings::paperColor();
fontColor = UmbrelloSettings::fontColor();
editBlockColor = UmbrelloSettings::editBlockColor();
umlObjectColor = UmbrelloSettings::umlObjectColor();
nonEditBlockColor = UmbrelloSettings::nonEditBlockColor();
hiddenColor = UmbrelloSettings::hiddenColor();
}
void CodeViewerState::save()
{
UmbrelloSettings::setHeight(height);
UmbrelloSettings::setWidth(width);
UmbrelloSettings::setCodeViewerFont(font);
UmbrelloSettings::setFontColor(fontColor);
UmbrelloSettings::setPaperColor(paperColor);
UmbrelloSettings::setSelectedColor(selectedColor);
UmbrelloSettings::setEditBlockColor(editBlockColor);
UmbrelloSettings::setNonEditBlockColor(nonEditBlockColor);
UmbrelloSettings::setUmlObjectColor(umlObjectColor);
UmbrelloSettings::setBlocksAreHighlighted(blocksAreHighlighted);
UmbrelloSettings::setShowHiddenBlocks(showHiddenBlocks);
UmbrelloSettings::setHiddenColor(hiddenColor);
}
}
......@@ -4,7 +4,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* copyright (C) 2004-2014 *
* copyright (C) 2004-2017 *
* Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
***************************************************************************/
......@@ -17,7 +17,11 @@
namespace Settings {
/// configurable params for the code viewer tool
struct CodeViewerState {
class CodeViewerState {
public:
void load();
void save();
int height;
int width;
bool showHiddenBlocks;
......
This diff is collapsed.
......@@ -49,6 +49,9 @@ public:
{
}
void load();
void save();
bool undo;
bool tabdiagrams;
bool newcodegen;
......@@ -73,6 +76,9 @@ public:
{
}
void load();
void save();
void saveToXMI1(QDomElement& element);
bool loadFromXMI1(QDomElement& element);
......@@ -104,6 +110,9 @@ public:
{
}
void load();
void save();
void saveToXMI1(QDomElement& element);
bool loadFromXMI1(QDomElement& element);
......@@ -145,6 +154,9 @@ public:
{
}
void load();
void save();
bool autoGenEmptyConstructors;
CodeGenerationPolicy::CommentStyle commentStyle;
Uml::Visibility::Enum defaultAssocFieldScope;
......@@ -243,6 +255,9 @@ public:
{
}
void load();
void save();
void saveToXMI1(QDomElement& element);
bool loadFromXMI1(QDomElement& element);
......@@ -258,6 +273,9 @@ public:
{
}
void load();
void save();
void saveToXMI1(QDomElement& element);
bool loadFromXMI1(QDomElement& element);
......@@ -270,6 +288,9 @@ class OptionState {
public:
OptionState();
void load();
void save();
void saveToXMI1(QDomElement& element);
bool loadFromXMI1(QDomElement& element);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment