diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-17 16:09:51 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-17 16:09:51 +0100 |
commit | a9236429e5691159f1ddc017b28ee0c060e0092d (patch) | |
tree | 73abfac910e8b801105190e74b8fe3251c4c44bf /main.cpp | |
parent | 2260996d93e723a55a72bf23447a8f77e98e1371 (diff) |
Added a options panel.
* Added screenshot action that saves two images: one of the main
view (plot + splat) and one of the bottom view (bar chart)
* Added methods/signals/slots to Scatterplot for handling glyph sizes
* Added methods/signals/slots to VoronoiSplat for handling the
alpha/beta parameters, which are now also no longer fixed
* Options panel:
- glyph sizes of both CPs and RPs
- splat opacity
- splat parameters (alpha & beta)
- color scale combo box currently does nothing
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
@@ -78,6 +78,8 @@ int main(int argc, char **argv) // cpIndices = relevanceSampling(X, cpSize); cpIndices = arma::randi<arma::uvec>(cpSize, arma::distr_param(0, n-1)); } + + arma::sort(cpIndices); } if (parser.isSet(cpFileOutputOption)) { const QString &cpFilename = parser.value(cpFileOutputOption); @@ -115,22 +117,22 @@ int main(int argc, char **argv) QQmlApplicationEngine engine(QUrl("qrc:///main_view.qml")); - ColorScale colorScale{ - QColor("#1f77b4"), - QColor("#ff7f0e"), - QColor("#2ca02c"), - QColor("#d62728"), - QColor("#9467bd"), - QColor("#8c564b"), - QColor("#e377c2"), - QColor("#17becf"), - QColor("#7f7f7f"), - }; - colorScale.setExtents(labels.min(), labels.max()); - - //ContinuousColorScale colorScale = ContinuousColorScale::builtin(ContinuousColorScale::RED_GRAY_BLUE); + //ColorScale colorScale{ + // QColor("#1f77b4"), + // QColor("#ff7f0e"), + // QColor("#2ca02c"), + // QColor("#d62728"), + // QColor("#9467bd"), + // QColor("#8c564b"), + // QColor("#e377c2"), + // QColor("#17becf"), + // QColor("#7f7f7f"), + //}; //colorScale.setExtents(labels.min(), labels.max()); + ContinuousColorScale colorScale = ContinuousColorScale::builtin(ContinuousColorScale::RAINBOW); + colorScale.setExtents(labels.min(), labels.max()); + Scatterplot *cpPlot = engine.rootObjects()[0]->findChild<Scatterplot *>("cpPlot"); cpPlot->setAcceptedMouseButtons(Qt::LeftButton | Qt::MiddleButton | Qt::RightButton); // cpPlot->setColorData(arma::zeros<arma::vec>(cpSize)); @@ -177,13 +179,13 @@ int main(int argc, char **argv) cpPlot, SLOT(setScale(const LinearScale<float> &, const LinearScale<float> &))); BarChart *barChart = engine.rootObjects()[0]->findChild<BarChart *>("barChart"); - barChart->setValues(arma::randn<arma::vec>(100)); + barChart->setValues(labels); //history->addHistoryItem(Ys); colormap->setColorScale(colorScale); plot->setColorScale(&colorScale); plot->setColorData(labels, false); - //splat->setColormap(colorScale); + splat->setColorScale(colorScale); splat->setValues(labels); cpPlot->setAutoScale(false); |