[TD]Centralize preference getters

This commit is contained in:
wandererfan
2020-04-12 20:44:08 -04:00
committed by WandererFan
parent a6cfe5c47f
commit a3029fec74
61 changed files with 881 additions and 501 deletions

View File

@@ -45,6 +45,7 @@
#include "DrawGuiUtil.h"
#include "QGICMark.h"
#include "QGIView.h"
#include "PreferencesGui.h"
#include "QGCustomText.h"
using namespace TechDrawGui;
@@ -186,29 +187,17 @@ void QGCustomText::paint ( QPainter * painter, const QStyleOptionGraphicsItem *
QColor QGCustomText::getNormalColor() //preference!
{
// Base::Console().Message("QGCT::getNormalColor() - pref\n");
QColor result;
Base::Reference<ParameterGrp> hGrp = getParmGroup();
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("NormalColor", 0x00000000));
result = fcColor.asValue<QColor>();
return result;
return PreferencesGui::normalQColor();
}
QColor QGCustomText::getPreColor()
{
Base::Reference<ParameterGrp> hGrp = getParmGroup();
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("PreSelectColor", 0xFFFF0000));
return fcColor.asValue<QColor>();
return PreferencesGui::preselectQColor();
}
QColor QGCustomText::getSelectColor()
{
Base::Reference<ParameterGrp> hGrp = getParmGroup();
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("SelectColor", 0x00FF0000));
return fcColor.asValue<QColor>();
return PreferencesGui::selectQColor();
}
Base::Reference<ParameterGrp> QGCustomText::getParmGroup()