Commit 5205aab9 authored by Denis Khachko's avatar Denis Khachko Committed by Victor Yacovlev

Draw settings

parent e1629d6e
......@@ -73,17 +73,17 @@
"settings": {
"BackColor": {
"type": "color",
"default": "#FFFFFF",
"default": "#99FF99",
"title": {"ascii": "Background color", "ru_RU": "Цвет фона"}
},
"LineColor": {
"type": "color",
"default": "#C8C800",
"default": "#669966",
"title": {"ascii": "Grid color", "ru_RU": "Цвет сетки"}
},
"AxisColor": {
"type": "color",
"default": "#C8C800",
"default": "#999900",
"title": {"ascii": "Axis color", "ru_RU": "Цвет осей"}
},
"AxisWidth": {
......@@ -98,7 +98,7 @@
},
"LineWidth": {
"type": "int",
"default": "1",
"default": "4",
"title": {"ascii": "Line width", "ru_RU": "Толщина линий"}
}
......
......@@ -782,7 +782,7 @@ void DrawModule::createGui()
netStepX=1;
netStepY=1;
autoNet=true;
netColor=QColor("999999");
netColor=QColor("#669966");
penIsDrawing=false;
CurScene=new DrawScene(CurView);
navigator=new DrawNavigator(CurView);
......@@ -829,7 +829,7 @@ void DrawModule::createGui()
CurView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
CurView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
QBrush curBackground=QBrush(QColor(DrawSettings()->value("Draw/BackColor","lightgreen").toString()));
QBrush curBackground=QBrush(QColor(DrawSettings()->value("Draw/BackColor","#99FF99").toString()));
CurScene->setBackgroundBrush (curBackground);
Color Black;
......@@ -965,10 +965,10 @@ void DrawModule::showNavigator(bool state)
// Updates setting on module load, workspace change or appliyng settings dialog.
// If @param keys is empty -- should reload all settings, otherwise load only setting specified by @param keys
// TODO implement me
QBrush curBackground=QBrush(QColor(settings->value("BackColor","lightgreen").toString()));
QBrush curBackground=QBrush(QColor(settings->value("BackColor","#99FF99").toString()));
CurScene->setBackgroundBrush (curBackground);
netColor=QColor(settings->value("LineColor","gray").toString());
netColor=QColor(settings->value("LineColor","#669966").toString());
drawNet();
Q_UNUSED(keys);
}
......@@ -1044,7 +1044,7 @@ void DrawModule::showNavigator(bool state)
mPen->setPos(x, -y);
if(penIsDrawing)
{
CurScene->addDrawLine(QLineF(start,mPen->pos()), QColor(penColor.r, penColor.g, penColor.b, penColor.a),mySettings()->value("LineWidth",1).toFloat());
CurScene->addDrawLine(QLineF(start,mPen->pos()), QColor(penColor.r, penColor.g, penColor.b, penColor.a),mySettings()->value("LineWidth",4).toFloat());
}
CurView->resetCachedContent();
CurView->update();
......@@ -1061,7 +1061,7 @@ void DrawModule::showNavigator(bool state)
mPen->moveBy(dX, -dY);
if(penIsDrawing)
{
CurScene->addDrawLine(QLineF(start,mPen->pos()), QColor(penColor.r, penColor.g, penColor.b, penColor.a),mySettings()->value("LineWidth",1).toFloat());
CurScene->addDrawLine(QLineF(start,mPen->pos()), QColor(penColor.r, penColor.g, penColor.b, penColor.a),mySettings()->value("LineWidth",4).toFloat());
}
CurView->update();
if(animate)redrawPicture();
......
......@@ -187,7 +187,7 @@ public /* methods */:
static ExtensionSystem::SettingsPtr DrawSettings();
QColor axisColor()
{
return QColor(DrawSettings()->value("AxisColor","blue").toString());
return QColor(DrawSettings()->value("AxisColor","#999900").toString());
}
void redrawPicture()
{
......
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