Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as one that does not. Moving it to Base opens possibilities to integrate it better with the rest of FreeCAD.
This commit is contained in:
@@ -1468,7 +1468,7 @@ std::vector<DrawViewDimension*> TechDrawGui::makeObliqueChainDimension(std::vect
|
||||
edge->m_format.setStyle(1);
|
||||
edge->m_format.setLineNumber(1);
|
||||
edge->m_format.setWidth(TechDraw::LineGroup::getDefaultWidth("Thin"));
|
||||
edge->m_format.setColor(App::Color(0.0f, 0.0f, 0.0f));
|
||||
edge->m_format.setColor(Base::Color(0.0f, 0.0f, 0.0f));
|
||||
}
|
||||
else
|
||||
carrierVertexes.push_back(oldVertex);
|
||||
@@ -1851,7 +1851,7 @@ std::vector<DrawViewDimension*> TechDrawGui::makeObliqueCoordDimension(std::vect
|
||||
edge->m_format.setStyle(1);
|
||||
edge->m_format.setLineNumber(1);
|
||||
edge->m_format.setWidth(TechDraw::LineGroup::getDefaultWidth("Thin"));
|
||||
edge->m_format.setColor(App::Color(0.0, 0.0, 0.0));
|
||||
edge->m_format.setColor(Base::Color(0.0, 0.0, 0.0));
|
||||
}
|
||||
else {
|
||||
carrierVertexes.push_back(oldVertex);
|
||||
|
||||
@@ -85,8 +85,8 @@ void _createThreadLines(const std::vector<std::string>& SubNames, TechDraw::Draw
|
||||
double factor);
|
||||
void _setLineAttributes(TechDraw::CosmeticEdge* cosEdge);
|
||||
void _setLineAttributes(TechDraw::CenterLine* cosEdge);
|
||||
void _setLineAttributes(TechDraw::CosmeticEdge* cosEdge, int style, float weight, App::Color color);
|
||||
void _setLineAttributes(TechDraw::CenterLine* cosEdge, int style, float weight, App::Color color);
|
||||
void _setLineAttributes(TechDraw::CosmeticEdge* cosEdge, int style, float weight, Base::Color color);
|
||||
void _setLineAttributes(TechDraw::CenterLine* cosEdge, int style, float weight, Base::Color color);
|
||||
double _getAngle(Base::Vector3d center, Base::Vector3d point);
|
||||
std::vector<Base::Vector3d> _getVertexPoints(const std::vector<std::string>& SubNames,
|
||||
TechDraw::DrawViewPart* objFeat);
|
||||
@@ -1527,7 +1527,7 @@ void execExtendShortenLine(Gui::Command* cmd, bool extend)
|
||||
std::string uniTag = baseGeo->getCosmeticTag();
|
||||
int oldStyle = 1;
|
||||
float oldWeight = 1.0;
|
||||
App::Color oldColor;
|
||||
Base::Color oldColor;
|
||||
std::vector<std::string> toDelete;
|
||||
toDelete.push_back(uniTag);
|
||||
if (baseGeo->source() == SourceType::COSMETICEDGE) {
|
||||
@@ -1868,7 +1868,7 @@ void CmdTechDrawExtensionAreaAnnotation::activated(int iMsg)
|
||||
viewProvider->Fontsize.setValue(2.0);
|
||||
viewProvider->LineWidth.setValue(TechDraw::LineGroup::getDefaultWidth("Graphic"));
|
||||
viewProvider->LineVisible.setValue(false);
|
||||
viewProvider->Color.setValue(App::Color(1.0, 0.0, 0.0));
|
||||
viewProvider->Color.setValue(Base::Color(1.0, 0.0, 0.0));
|
||||
}
|
||||
Gui::Command::commitCommand();
|
||||
objFeat->touch(true);
|
||||
@@ -2202,7 +2202,7 @@ void _setLineAttributes(TechDraw::CenterLine* cosEdge)
|
||||
cosEdge->m_format.setLineNumber(_getActiveLineAttributes().getLineNumber());
|
||||
}
|
||||
|
||||
void _setLineAttributes(TechDraw::CosmeticEdge* cosEdge, int style, float weight, App::Color color)
|
||||
void _setLineAttributes(TechDraw::CosmeticEdge* cosEdge, int style, float weight, Base::Color color)
|
||||
{
|
||||
// set line attributes of a cosmetic edge
|
||||
cosEdge->m_format.setStyle(style);
|
||||
@@ -2212,7 +2212,7 @@ void _setLineAttributes(TechDraw::CosmeticEdge* cosEdge, int style, float weight
|
||||
cosEdge->m_format.setLineNumber(LineGenerator::fromQtStyle((Qt::PenStyle)style));
|
||||
}
|
||||
|
||||
void _setLineAttributes(TechDraw::CenterLine* cosEdge, int style, float weight, App::Color color)
|
||||
void _setLineAttributes(TechDraw::CenterLine* cosEdge, int style, float weight, Base::Color color)
|
||||
{
|
||||
// set line attributes of a centerline
|
||||
cosEdge->m_format.setStyle(style);
|
||||
|
||||
@@ -66,60 +66,60 @@ int PreferencesGui::dimFontSizePX()
|
||||
|
||||
QColor PreferencesGui::normalQColor()
|
||||
{
|
||||
App::Color fcColor = Preferences::normalColor();
|
||||
Base::Color fcColor = Preferences::normalColor();
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
QColor PreferencesGui::selectQColor()
|
||||
{
|
||||
App::Color fcColor = Preferences::selectColor();
|
||||
Base::Color fcColor = Preferences::selectColor();
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
QColor PreferencesGui::preselectQColor()
|
||||
{
|
||||
App::Color fcColor = Preferences::preselectColor();
|
||||
Base::Color fcColor = Preferences::preselectColor();
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
App::Color PreferencesGui::sectionLineColor()
|
||||
Base::Color PreferencesGui::sectionLineColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Decorations")->GetUnsigned("SectionColor", 0x000000FF));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
QColor PreferencesGui::sectionLineQColor()
|
||||
{
|
||||
//if the App::Color version has already lightened the color, we don't want to do it again
|
||||
App::Color fcColor;
|
||||
//if the Base::Color version has already lightened the color, we don't want to do it again
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Decorations")->GetUnsigned("SectionColor", 0x000000FF));
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
App::Color PreferencesGui::breaklineColor()
|
||||
Base::Color PreferencesGui::breaklineColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Decorations")->GetUnsigned("BreaklineColor", 0x000000FF));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
QColor PreferencesGui::breaklineQColor()
|
||||
{
|
||||
//if the App::Color version has already lightened the color, we don't want to do it again
|
||||
App::Color fcColor;
|
||||
//if the Base::Color version has already lightened the color, we don't want to do it again
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Decorations")->GetUnsigned("BreaklineColor", 0x000000FF));
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
App::Color PreferencesGui::centerColor()
|
||||
Base::Color PreferencesGui::centerColor()
|
||||
{
|
||||
return App::Color((uint32_t) Preferences::getPreferenceGroup("Decorations")->GetUnsigned("CenterColor", 0x000000FF));
|
||||
return Base::Color((uint32_t) Preferences::getPreferenceGroup("Decorations")->GetUnsigned("CenterColor", 0x000000FF));
|
||||
}
|
||||
|
||||
QColor PreferencesGui::centerQColor()
|
||||
{
|
||||
App::Color fcColor = App::Color((uint32_t) Preferences::getPreferenceGroup("Decorations")->GetUnsigned("CenterColor", 0x000000FF));
|
||||
Base::Color fcColor = Base::Color((uint32_t) Preferences::getPreferenceGroup("Decorations")->GetUnsigned("CenterColor", 0x000000FF));
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
@@ -128,30 +128,30 @@ QColor PreferencesGui::vertexQColor()
|
||||
return Preferences::vertexColor().asValue<QColor>();
|
||||
}
|
||||
|
||||
App::Color PreferencesGui::dimColor()
|
||||
Base::Color PreferencesGui::dimColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Dimensions")->GetUnsigned("Color", 0x000000FF)); //#000000 black
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
QColor PreferencesGui::dimQColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Dimensions")->GetUnsigned("Color", 0x000000FF)); //#000000 black
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
App::Color PreferencesGui::leaderColor()
|
||||
Base::Color PreferencesGui::leaderColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("LeaderLine")->GetUnsigned("Color", 0x000000FF)); //#000000 black
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
QColor PreferencesGui::leaderQColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("LeaderLine")->GetUnsigned("Color", 0x000000FF)); //#000000 black
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
@@ -189,16 +189,16 @@ QString PreferencesGui::weldingDirectory()
|
||||
return qSymbolDir;
|
||||
}
|
||||
|
||||
App::Color PreferencesGui::gridColor()
|
||||
Base::Color PreferencesGui::gridColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("gridColor", 0x000000FF)); //#000000 black
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
QColor PreferencesGui::gridQColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("gridColor", 0x000000FF)); //#000000 black
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
@@ -219,9 +219,9 @@ bool PreferencesGui::multiSelection()
|
||||
return greedy || Preferences::getPreferenceGroup("General")->GetBool("multiSelection", false);
|
||||
}
|
||||
|
||||
App::Color PreferencesGui::pageColor()
|
||||
Base::Color PreferencesGui::pageColor()
|
||||
{
|
||||
App::Color result;
|
||||
Base::Color result;
|
||||
result.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("PageColor", 0xFFFFFFFF)); //#FFFFFFFF white
|
||||
return result;
|
||||
}
|
||||
@@ -292,7 +292,7 @@ double PreferencesGui::templateClickBoxSize()
|
||||
|
||||
QColor PreferencesGui::templateClickBoxColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("TemplateUnderlineColor", 0x0000FFFF)); //#0000FF blue
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
class QColor;
|
||||
class QString;
|
||||
|
||||
namespace App
|
||||
namespace Base
|
||||
{
|
||||
class Color;
|
||||
}
|
||||
@@ -54,18 +54,18 @@ static int dimFontSizePX();
|
||||
static QColor normalQColor();
|
||||
static QColor selectQColor();
|
||||
static QColor preselectQColor();
|
||||
static App::Color sectionLineColor();
|
||||
static Base::Color sectionLineColor();
|
||||
static QColor sectionLineQColor();
|
||||
static App::Color centerColor();
|
||||
static Base::Color centerColor();
|
||||
static QColor centerQColor();
|
||||
static QColor vertexQColor();
|
||||
static App::Color leaderColor();
|
||||
static Base::Color leaderColor();
|
||||
static QColor leaderQColor();
|
||||
static App::Color dimColor();
|
||||
static Base::Color dimColor();
|
||||
static QColor dimQColor();
|
||||
static App::Color pageColor();
|
||||
static Base::Color pageColor();
|
||||
static QColor pageQColor();
|
||||
static App::Color breaklineColor();
|
||||
static Base::Color breaklineColor();
|
||||
static QColor breaklineQColor();
|
||||
|
||||
static int dimArrowStyle();
|
||||
@@ -76,7 +76,7 @@ static double edgeFuzz();
|
||||
static QString weldingDirectory();
|
||||
|
||||
static bool showGrid();
|
||||
static App::Color gridColor();
|
||||
static Base::Color gridColor();
|
||||
static QColor gridQColor();
|
||||
static double gridSpacing();
|
||||
static bool multiSelection();
|
||||
|
||||
@@ -88,7 +88,7 @@ void QGIEdge::setPrettyNormal() {
|
||||
|
||||
QColor QGIEdge::getHiddenColor()
|
||||
{
|
||||
App::Color fcColor = App::Color((uint32_t) Preferences::getPreferenceGroup("Colors")->GetUnsigned("HiddenColor", 0x000000FF));
|
||||
Base::Color fcColor = Base::Color((uint32_t) Preferences::getPreferenceGroup("Colors")->GetUnsigned("HiddenColor", 0x000000FF));
|
||||
return PreferencesGui::getAccessibleQColor(fcColor.asValue<QColor>());
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ QGIFace::QGIFace(int index) :
|
||||
getParameters();
|
||||
|
||||
// set up style & colour defaults
|
||||
m_colDefFill = App::Color(static_cast<uint32_t>(Preferences::getPreferenceGroup("Colors")->GetUnsigned("FaceColor", COLWHITE)))
|
||||
m_colDefFill = Base::Color(static_cast<uint32_t>(Preferences::getPreferenceGroup("Colors")->GetUnsigned("FaceColor", COLWHITE)))
|
||||
.asValue<QColor>();
|
||||
m_colDefFill.setAlpha(Preferences::getPreferenceGroup("Colors")->GetBool("ClearFace", false) ? ALPHALOW : ALPHAHIGH);
|
||||
|
||||
@@ -453,7 +453,7 @@ void QGIFace::buildPixHatch()
|
||||
}
|
||||
|
||||
|
||||
void QGIFace::setHatchColor(App::Color color)
|
||||
void QGIFace::setHatchColor(Base::Color color)
|
||||
{
|
||||
m_svgCol = color.asHexString();
|
||||
m_geomColor = color.asValue<QColor>();
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
void setFillMode(fillMode mode);
|
||||
|
||||
//general hatch parms & methods
|
||||
void setHatchColor(App::Color color);
|
||||
void setHatchColor(Base::Color color);
|
||||
void setHatchScale(double scale);
|
||||
|
||||
//svg fill parms & methods
|
||||
|
||||
@@ -315,7 +315,7 @@ QPen QGIRichAnno::rectPen() const
|
||||
|
||||
double rectWeight = Rez::guiX(vp->LineWidth.getValue());
|
||||
Qt::PenStyle rectStyle = static_cast<Qt::PenStyle>(vp->LineStyle.getValue());
|
||||
App::Color temp = vp->LineColor.getValue();
|
||||
Base::Color temp = vp->LineColor.getValue();
|
||||
QColor rectColor = temp.asValue<QColor>();
|
||||
|
||||
QPen pen = QPen(rectStyle);
|
||||
|
||||
@@ -280,7 +280,7 @@ bool QGITile::getAltWeld() const
|
||||
//TODO: this is Pen, not Brush. sb Brush to colour background
|
||||
QColor QGITile::getTileColor() const
|
||||
{
|
||||
App::Color fcColor = App::Color((uint32_t) Preferences::getPreferenceGroup("Colors")->GetUnsigned("TileColor", 0x00000000));
|
||||
Base::Color fcColor = Base::Color((uint32_t) Preferences::getPreferenceGroup("Colors")->GetUnsigned("TileColor", 0x00000000));
|
||||
return PreferencesGui::getAccessibleQColor( fcColor.asValue<QColor>());
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ void QGIViewAnnotation::drawAnnotation()
|
||||
ss << "font-weight:normal; font-style:normal; ";
|
||||
}
|
||||
ss << "line-height:" << viewAnno->LineSpace.getValue() << "%; ";
|
||||
App::Color c = viewAnno->TextColor.getValue();
|
||||
Base::Color c = viewAnno->TextColor.getValue();
|
||||
c = TechDraw::Preferences::getAccessibleColor(c);
|
||||
ss << "color:" << c.asHexString() << "; ";
|
||||
ss << "}\n</style>\n</head>\n<body>\n<p>";
|
||||
|
||||
@@ -948,7 +948,7 @@ QColor QGIViewBalloon::prefNormalColor()
|
||||
if (vp) {
|
||||
vpBalloon = dynamic_cast<ViewProviderBalloon*>(vp);
|
||||
if (vpBalloon) {
|
||||
App::Color fcColor = Preferences::getAccessibleColor(vpBalloon->Color.getValue());
|
||||
Base::Color fcColor = Preferences::getAccessibleColor(vpBalloon->Color.getValue());
|
||||
setNormalColor(fcColor.asValue<QColor>());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2788,7 +2788,7 @@ QColor QGIViewDimension::prefNormalColor()
|
||||
if (vp) {
|
||||
vpDim = dynamic_cast<ViewProviderDimension*>(vp);
|
||||
if (vpDim) {
|
||||
App::Color fcColor = vpDim->Color.getValue();
|
||||
Base::Color fcColor = vpDim->Color.getValue();
|
||||
fcColor = Preferences::getAccessibleColor(fcColor);
|
||||
setNormalColor(fcColor.asValue<QColor>());
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ void QGIViewPart::drawAllEdges()
|
||||
// geometry edge - apply format if applicable
|
||||
TechDraw::GeomFormat* gf = dvp->getGeomFormatBySelection(iEdge);
|
||||
if (gf) {
|
||||
App::Color color = Preferences::getAccessibleColor(gf->m_format.getColor());
|
||||
Base::Color color = Preferences::getAccessibleColor(gf->m_format.getColor());
|
||||
item->setNormalColor(color.asValue<QColor>());
|
||||
int lineNumber = gf->m_format.getLineNumber();
|
||||
int qtStyle = gf->m_format.getStyle();
|
||||
@@ -542,7 +542,7 @@ bool QGIViewPart::formatGeomFromCosmetic(std::string cTag, QGIEdge* item)
|
||||
auto partFeat(dynamic_cast<TechDraw::DrawViewPart*>(getViewObject()));
|
||||
TechDraw::CosmeticEdge* ce = partFeat ? partFeat->getCosmeticEdge(cTag) : nullptr;
|
||||
if (ce) {
|
||||
App::Color color = Preferences::getAccessibleColor(ce->m_format.getColor());
|
||||
Base::Color color = Preferences::getAccessibleColor(ce->m_format.getColor());
|
||||
item->setNormalColor(color.asValue<QColor>());
|
||||
item->setLinePen(m_dashedLineGenerator->getBestPen(ce->m_format.getLineNumber(),
|
||||
(Qt::PenStyle)ce->m_format.getStyle(),
|
||||
@@ -561,7 +561,7 @@ bool QGIViewPart::formatGeomFromCenterLine(std::string cTag, QGIEdge* item)
|
||||
auto partFeat(dynamic_cast<TechDraw::DrawViewPart*>(getViewObject()));
|
||||
TechDraw::CenterLine* cl = partFeat ? partFeat->getCenterLine(cTag) : nullptr;
|
||||
if (cl) {
|
||||
App::Color color = Preferences::getAccessibleColor(cl->m_format.getColor());
|
||||
Base::Color color = Preferences::getAccessibleColor(cl->m_format.getColor());
|
||||
item->setNormalColor(color.asValue<QColor>());
|
||||
item->setLinePen(m_dashedLineGenerator->getBestPen(cl->m_format.getLineNumber(),
|
||||
(Qt::PenStyle)cl->m_format.getStyle(),
|
||||
@@ -722,7 +722,7 @@ void QGIViewPart::drawSectionLine(TechDraw::DrawViewSection* viewSection, bool b
|
||||
QGISectionLine* sectionLine = new QGISectionLine();
|
||||
addToGroup(sectionLine);
|
||||
sectionLine->setSymbol(const_cast<char*>(viewSection->SectionSymbol.getValue()));
|
||||
App::Color color = Preferences::getAccessibleColor(vp->SectionLineColor.getValue());
|
||||
Base::Color color = Preferences::getAccessibleColor(vp->SectionLineColor.getValue());
|
||||
sectionLine->setSectionColor(color.asValue<QColor>());
|
||||
sectionLine->setPathMode(false);
|
||||
|
||||
@@ -817,7 +817,7 @@ void QGIViewPart::drawComplexSectionLine(TechDraw::DrawViewSection* viewSection,
|
||||
QGISectionLine* sectionLine = new QGISectionLine();
|
||||
addToGroup(sectionLine);
|
||||
sectionLine->setSymbol(const_cast<char*>(viewSection->SectionSymbol.getValue()));
|
||||
App::Color color = Preferences::getAccessibleColor(vp->SectionLineColor.getValue());
|
||||
Base::Color color = Preferences::getAccessibleColor(vp->SectionLineColor.getValue());
|
||||
sectionLine->setSectionColor(color.asValue<QColor>());
|
||||
sectionLine->setPathMode(true);
|
||||
sectionLine->setPath(wirePath);
|
||||
@@ -956,7 +956,7 @@ void QGIViewPart::drawHighlight(TechDraw::DrawViewDetail* viewDetail, bool b)
|
||||
scene()->addItem(highlight);
|
||||
highlight->setReference(viewDetail->Reference.getValue());
|
||||
|
||||
App::Color color = Preferences::getAccessibleColor(vp->HighlightLineColor.getValue());
|
||||
Base::Color color = Preferences::getAccessibleColor(vp->HighlightLineColor.getValue());
|
||||
highlight->setColor(color.asValue<QColor>());
|
||||
highlight->setFeatureName(viewDetail->getNameInDocument());
|
||||
highlight->setInteractive(true);
|
||||
@@ -1063,7 +1063,7 @@ void QGIViewPart::drawBreakLines()
|
||||
breakLine->setWidth(Rez::guiX(vp->HiddenWidth.getValue()));
|
||||
breakLine->setBreakType(breakType);
|
||||
breakLine->setZValue(ZVALUE::SECTIONLINE);
|
||||
App::Color color = prefBreaklineColor();
|
||||
Base::Color color = prefBreaklineColor();
|
||||
breakLine->setBreakColor(color.asValue<QColor>());
|
||||
breakLine->setRotation(-dbv->Rotation.getValue());
|
||||
breakLine->draw();
|
||||
@@ -1197,7 +1197,7 @@ bool QGIViewPart::prefPrintCenters()
|
||||
return printCenters;
|
||||
}
|
||||
|
||||
App::Color QGIViewPart::prefBreaklineColor()
|
||||
Base::Color QGIViewPart::prefBreaklineColor()
|
||||
{
|
||||
return Preferences::getAccessibleColor(PreferencesGui::breaklineColor());
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ protected:
|
||||
void removeDecorations();
|
||||
bool prefFaceEdges();
|
||||
bool prefPrintCenters();
|
||||
App::Color prefBreaklineColor();
|
||||
Base::Color prefBreaklineColor();
|
||||
|
||||
bool formatGeomFromCosmetic(std::string cTag, QGIEdge* item);
|
||||
bool formatGeomFromCenterLine(std::string cTag, QGIEdge* item);
|
||||
|
||||
@@ -1256,7 +1256,7 @@ TechDraw::DrawPage* QGSPage::getDrawPage() { return m_vpPage->getDrawPage(); }
|
||||
|
||||
QColor QGSPage::getBackgroundColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("Background", 0x70707000));
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ void QGTracker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
|
||||
QColor QGTracker::getTrackerColor()
|
||||
{
|
||||
App::Color trackColor = App::Color((uint32_t) Preferences::getPreferenceGroup("Tracker")->GetUnsigned("TrackerColor", 0xFF000000));
|
||||
Base::Color trackColor = Base::Color((uint32_t) Preferences::getPreferenceGroup("Tracker")->GetUnsigned("TrackerColor", 0xFF000000));
|
||||
return PreferencesGui::getAccessibleQColor(trackColor.asValue<QColor>());
|
||||
}
|
||||
|
||||
|
||||
@@ -553,7 +553,7 @@ TechDraw::DrawPage* QGVPage::getDrawPage() { return m_vpPage->getDrawPage(); }
|
||||
|
||||
QColor QGVPage::getBackgroundColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Colors")->GetUnsigned("Background", 0x70707000));
|
||||
return fcColor.asValue<QColor>();
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ void TaskBalloon::onTextChanged()
|
||||
|
||||
void TaskBalloon::onColorChanged()
|
||||
{
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->textColor->color());
|
||||
m_balloonVP->Color.setValue(ac);
|
||||
recomputeFeature();
|
||||
|
||||
@@ -317,7 +317,7 @@ void TaskCenterLine::onColorChanged()
|
||||
return;
|
||||
}
|
||||
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->cpLineColor->color());
|
||||
m_cl->m_format.getColor().setValue<QColor>(ui->cpLineColor->color());
|
||||
m_partFeat->recomputeFeature();
|
||||
@@ -430,7 +430,7 @@ void TaskCenterLine::createCenterLine()
|
||||
cl->setExtend(extendBy);
|
||||
cl->setRotate(rotate);
|
||||
cl->m_flip2Line = false;
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->cpLineColor->color());
|
||||
cl->m_format.setColor(ac);
|
||||
cl->m_format.setWidth(ui->dsbWeight->value().getValue());
|
||||
|
||||
@@ -322,7 +322,7 @@ void TaskDimension::onColorChanged()
|
||||
if (m_dimensionVP.expired()) {
|
||||
return;
|
||||
}
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->dimensionColor->color());
|
||||
m_dimensionVP->Color.setValue(ac);
|
||||
recomputeFeature();
|
||||
|
||||
@@ -76,12 +76,12 @@ private:
|
||||
std::string m_name;
|
||||
double m_scale;
|
||||
double m_weight;
|
||||
App::Color m_color;
|
||||
Base::Color m_color;
|
||||
std::string m_origFile;
|
||||
std::string m_origName;
|
||||
double m_origScale;
|
||||
double m_origWeight;
|
||||
App::Color m_origColor;
|
||||
Base::Color m_origColor;
|
||||
double m_rotation;
|
||||
double m_origRotation;
|
||||
Base::Vector3d m_offset;
|
||||
|
||||
@@ -218,7 +218,7 @@ void TaskHatch::createHatch()
|
||||
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(doc)->getViewProvider(m_hatch);
|
||||
m_vp = dynamic_cast<TechDrawGui::ViewProviderHatch*>(vp);
|
||||
if (m_vp) {
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->ccColor->color());
|
||||
m_vp->HatchColor.setValue(ac);
|
||||
m_vp->HatchScale.setValue(ui->sbScale->value().getValue());
|
||||
@@ -244,7 +244,7 @@ void TaskHatch::updateHatch()
|
||||
FeatName.c_str(),
|
||||
filespec.c_str());
|
||||
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->ccColor->color());
|
||||
m_vp->HatchColor.setValue(ac);
|
||||
m_vp->HatchScale.setValue(ui->sbScale->value().getValue());
|
||||
|
||||
@@ -84,13 +84,13 @@ private:
|
||||
std::vector<std::string> m_subs;
|
||||
std::string m_file;
|
||||
double m_scale;
|
||||
App::Color m_color;
|
||||
Base::Color m_color;
|
||||
double m_rotation;
|
||||
Base::Vector3d m_offset;
|
||||
|
||||
std::string m_saveFile;
|
||||
double m_saveScale;
|
||||
App::Color m_saveColor;
|
||||
Base::Color m_saveColor;
|
||||
std::vector<std::string> m_saveSubs;
|
||||
double m_saveRotation;
|
||||
Base::Vector3d m_saveOffset;
|
||||
|
||||
@@ -313,7 +313,7 @@ void TaskLeaderLine::onEndSymbolChanged()
|
||||
|
||||
void TaskLeaderLine::onColorChanged()
|
||||
{
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->cpLineColor->color());
|
||||
m_lineVP->Color.setValue(ac);
|
||||
recomputeFeature();
|
||||
@@ -395,7 +395,7 @@ void TaskLeaderLine::createLeaderFeature(std::vector<Base::Vector3d> sceneDeltas
|
||||
Gui::ViewProvider* vp = QGIView::getViewProvider(m_lineFeat);
|
||||
auto leadVP = dynamic_cast<ViewProviderLeader*>(vp);
|
||||
if (leadVP) {
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->cpLineColor->color());
|
||||
leadVP->Color.setValue(ac);
|
||||
leadVP->LineWidth.setValue(ui->dsbWeight->rawValue());
|
||||
@@ -433,7 +433,7 @@ void TaskLeaderLine::updateLeaderFeature()
|
||||
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Edit Leader"));
|
||||
//waypoints & x, y are updated by QGILeaderLine (for edits only!)
|
||||
commonFeatureUpdate();
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->cpLineColor->color());
|
||||
m_lineVP->Color.setValue(ac);
|
||||
m_lineVP->LineWidth.setValue(ui->dsbWeight->rawValue());
|
||||
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
std::vector<std::string> m_createdFormatTags;
|
||||
|
||||
int m_style;
|
||||
App::Color m_color;
|
||||
Base::Color m_color;
|
||||
double m_weight;
|
||||
bool m_visible;
|
||||
bool m_apply;
|
||||
|
||||
@@ -269,7 +269,7 @@ double TaskRichAnno::prefWeight() const
|
||||
return TechDraw::LineGroup::getDefaultWidth("Graphic");
|
||||
}
|
||||
|
||||
App::Color TaskRichAnno::prefLineColor()
|
||||
Base::Color TaskRichAnno::prefLineColor()
|
||||
{
|
||||
return PreferencesGui::leaderColor();
|
||||
}
|
||||
@@ -319,7 +319,7 @@ void TaskRichAnno::createAnnoFeature()
|
||||
Gui::ViewProvider* vp = QGIView::getViewProvider(m_annoFeat);
|
||||
auto annoVP = dynamic_cast<ViewProviderRichAnno*>(vp);
|
||||
if (annoVP) {
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->cpFrameColor->color());
|
||||
annoVP->LineColor.setValue(ac);
|
||||
annoVP->LineWidth.setValue(ui->dsbWidth->rawValue());
|
||||
@@ -350,7 +350,7 @@ void TaskRichAnno::updateAnnoFeature()
|
||||
// Base::Console().Message("TRA::updateAnnoFeature()\n");
|
||||
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Edit Anno"));
|
||||
commonFeatureUpdate();
|
||||
App::Color ac;
|
||||
Base::Color ac;
|
||||
ac.setValue<QColor>(ui->cpFrameColor->color());
|
||||
m_annoVP->LineColor.setValue(ac);
|
||||
m_annoVP->LineWidth.setValue(ui->dsbWidth->rawValue());
|
||||
|
||||
@@ -87,7 +87,7 @@ protected:
|
||||
void enableTextUi(bool enable);
|
||||
void enableVPUi(bool enable);
|
||||
double prefWeight() const;
|
||||
App::Color prefLineColor();
|
||||
Base::Color prefLineColor();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onSaveAndExit(QString);
|
||||
|
||||
@@ -165,7 +165,7 @@ bool TaskSelectLineAttributes::accept()
|
||||
}
|
||||
|
||||
QColor qTemp = ui->cbColor->color();
|
||||
App::Color temp;
|
||||
Base::Color temp;
|
||||
temp.set(qTemp.redF(), qTemp.greenF(), qTemp.blueF(), 1.0 - qTemp.alphaF());
|
||||
LineFormat::getCurrentLineFormat().setColor(temp);
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ class Ui_TaskSelectLineAttributes;
|
||||
// float getWidthValue();
|
||||
// void setColor(int);
|
||||
// int getColor() const {return color;}
|
||||
// App::Color getColorValue();
|
||||
// Base::Color getColorValue();
|
||||
|
||||
// }; // class lineAttributes
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ TechDraw::DrawViewDimension* ViewProviderDimension::getViewObject() const
|
||||
return dynamic_cast<TechDraw::DrawViewDimension*>(pcObject);
|
||||
}
|
||||
|
||||
App::Color ViewProviderDimension::prefColor() const
|
||||
Base::Color ViewProviderDimension::prefColor() const
|
||||
{
|
||||
return PreferencesGui::dimColor();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
|
||||
TechDraw::DrawViewDimension* getViewObject() const override;
|
||||
|
||||
App::Color prefColor() const;
|
||||
Base::Color prefColor() const;
|
||||
std::string prefFont() const;
|
||||
double prefFontSize() const;
|
||||
double prefArrowSize() const;
|
||||
|
||||
@@ -157,7 +157,7 @@ double ViewProviderLeader::getDefLineWeight()
|
||||
return TechDraw::LineGroup::getDefaultWidth("Thin");
|
||||
}
|
||||
|
||||
App::Color ViewProviderLeader::getDefLineColor()
|
||||
Base::Color ViewProviderLeader::getDefLineColor()
|
||||
{
|
||||
return PreferencesGui::leaderColor();
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
protected:
|
||||
double getDefLineWeight();
|
||||
App::Color getDefLineColor();
|
||||
Base::Color getDefLineColor();
|
||||
void handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property * prop) override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -121,7 +121,7 @@ TechDraw::DrawRichAnno* ViewProviderRichAnno::getFeature() const
|
||||
return dynamic_cast<TechDraw::DrawRichAnno*>(pcObject);
|
||||
}
|
||||
|
||||
App::Color ViewProviderRichAnno::getDefLineColor()
|
||||
Base::Color ViewProviderRichAnno::getDefLineColor()
|
||||
{
|
||||
return PreferencesGui::leaderColor();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
App::Color getDefLineColor();
|
||||
Base::Color getDefLineColor();
|
||||
std::string getDefFont();
|
||||
double getDefFontSize();
|
||||
double getDefLineWeight();
|
||||
|
||||
@@ -386,14 +386,14 @@ bool ViewProviderViewPart::canDelete(App::DocumentObject *obj) const
|
||||
return true;
|
||||
}
|
||||
|
||||
App::Color ViewProviderViewPart::prefSectionColor()
|
||||
Base::Color ViewProviderViewPart::prefSectionColor()
|
||||
{
|
||||
return PreferencesGui::sectionLineColor();
|
||||
}
|
||||
|
||||
App::Color ViewProviderViewPart::prefHighlightColor()
|
||||
Base::Color ViewProviderViewPart::prefHighlightColor()
|
||||
{
|
||||
App::Color fcColor;
|
||||
Base::Color fcColor;
|
||||
fcColor.setPackedValue(Preferences::getPreferenceGroup("Decorations")->GetUnsigned("HighlightColor", 0x00000000));
|
||||
return fcColor;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ public:
|
||||
bool doubleClicked(void) override;
|
||||
void onChanged(const App::Property *prop) override;
|
||||
void handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property * prop) override;
|
||||
App::Color prefSectionColor(void);
|
||||
App::Color prefHighlightColor(void);
|
||||
Base::Color prefSectionColor(void);
|
||||
Base::Color prefHighlightColor(void);
|
||||
int prefHighlightStyle(void);
|
||||
|
||||
std::vector<App::DocumentObject*> claimChildren(void) const override;
|
||||
|
||||
@@ -152,7 +152,7 @@ bool ViewProviderViewSection::doubleClicked()
|
||||
|
||||
void ViewProviderViewSection::getParameters()
|
||||
{
|
||||
App::Color cutColor = App::Color((uint32_t) Preferences::getPreferenceGroup("Colors")->GetUnsigned("CutSurfaceColor", 0xD3D3D3FF));
|
||||
Base::Color cutColor = Base::Color((uint32_t) Preferences::getPreferenceGroup("Colors")->GetUnsigned("CutSurfaceColor", 0xD3D3D3FF));
|
||||
CutSurfaceColor.setValue(cutColor);
|
||||
|
||||
double lineWeight = Preferences::getPreferenceGroup("PAT")->GetFloat("GeomWeight", 0.1);
|
||||
|
||||
Reference in New Issue
Block a user