Commit c55ff611 authored by Bryant's avatar Bryant

Renamed slot in ChartPlot to match connect() calls elsewhere.

parent ec823285
...@@ -53,7 +53,7 @@ ChartPlot::ChartPlot(QWidget *parent): ...@@ -53,7 +53,7 @@ ChartPlot::ChartPlot(QWidget *parent):
} }
// Now that all objects have been initialized, color everything. // Now that all objects have been initialized, color everything.
applyColorScheme(MainWindow::instance()->getStyle()); styleChanged(MainWindow::instance()->getStyle());
} }
ChartPlot::~ChartPlot() ChartPlot::~ChartPlot()
...@@ -87,7 +87,7 @@ void ChartPlot::shuffleColors() ...@@ -87,7 +87,7 @@ void ChartPlot::shuffleColors()
} }
} }
void ChartPlot::applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE style) void ChartPlot::styleChanged(MainWindow::QGC_MAINWINDOW_STYLE style)
{ {
// Generate a new color list for curves and recolor them. // Generate a new color list for curves and recolor them.
for (int i = 0; i < numColors; ++i) for (int i = 0; i < numColors; ++i)
......
...@@ -25,7 +25,7 @@ public: ...@@ -25,7 +25,7 @@ public:
public slots: public slots:
/** @brief Generate coloring for this plot canvas based on current window theme */ /** @brief Generate coloring for this plot canvas based on current window theme */
void applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE style); void styleChanged(MainWindow::QGC_MAINWINDOW_STYLE style);
protected: protected:
const static int numColors = 20; const static int numColors = 20;
......
...@@ -144,7 +144,7 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent ...@@ -144,7 +144,7 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent
// And make sure we're listening for future style changes // And make sure we're listening for future style changes
connect(MainWindow::instance(), SIGNAL(styleChanged(MainWindow::QGC_MAINWINDOW_STYLE)), connect(MainWindow::instance(), SIGNAL(styleChanged(MainWindow::QGC_MAINWINDOW_STYLE)),
this, SLOT(applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE))); this, SLOT(styleChanged(MainWindow::QGC_MAINWINDOW_STYLE)));
connect(MainWindow::instance(), SIGNAL(styleChanged()), this, SLOT(recolor())); connect(MainWindow::instance(), SIGNAL(styleChanged()), this, SLOT(recolor()));
updateTimer->setInterval(updateInterval); updateTimer->setInterval(updateInterval);
...@@ -777,7 +777,7 @@ void LinechartWidget::removeCurve(QString curve) ...@@ -777,7 +777,7 @@ void LinechartWidget::removeCurve(QString curve)
void LinechartWidget::recolor() void LinechartWidget::recolor()
{ {
activePlot->applyColorScheme(MainWindow::instance()->getStyle()); activePlot->styleChanged(MainWindow::instance()->getStyle());
foreach (QString key, colorIcons.keys()) foreach (QString key, colorIcons.keys())
{ {
QWidget* colorIcon = colorIcons.value(key, 0); QWidget* colorIcon = colorIcons.value(key, 0);
......
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