mirror of
https://github.com/ra3xdh/qucs_s
synced 2025-03-28 21:13:26 +00:00
Add getter / setter for schematic grid color
This commit is contained in:
parent
bcd45d7c67
commit
6a1ad91454
@ -600,7 +600,7 @@ void QucsSettingsDialog::slotApply()
|
||||
for (int tab = 0; tab < App->DocumentTab->count(); tab++) {
|
||||
QWidget* widget = App->DocumentTab->widget(tab);
|
||||
if (!QucsApp::isTextDocument(widget)) {
|
||||
static_cast<Schematic*>(widget)->GridColor = _settings::Get().item<QColor>("GridColor");
|
||||
static_cast<Schematic*>(widget)->setGridColor(_settings::Get().item<QColor>("GridColor"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ void Schematic::drawGrid(QPainter* painter) {
|
||||
// A grid drawn with pen of 1.0 width reportedly looks good both
|
||||
// on standard and HiDPI displays.
|
||||
// See here for details https://github.com/ra3xdh/qucs_s/pull/524
|
||||
painter->setPen(QPen{ GridColor, 1.0 });
|
||||
painter->setPen(QPen{ a_GridColor, 1.0 });
|
||||
|
||||
{
|
||||
// Draw small cross at origin of coordinates
|
||||
|
@ -213,6 +213,8 @@ public:
|
||||
void setGridX(int value) { a_GridX = value; }
|
||||
int getGridY() const { return a_GridY; }
|
||||
void setGridY(int value) { a_GridY = value; }
|
||||
void setGridColor(const QColor& color) { a_GridColor = color; }
|
||||
QColor getGridColor() const { return a_GridColor; }
|
||||
bool getSymbolMode() const { return a_symbolMode; }
|
||||
void setSymbolMode(bool value) { a_symbolMode = value; }
|
||||
bool getIsSymbolOnly() const { return a_isSymbolOnly; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user