summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-03-11 13:28:51 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-03-11 13:28:51 +0200
commit1a008562a663933aa242867fdf86f8de80b43042 (patch)
treead29710dfe95246f43d5c44603f531458c4fe312 /examples
parent0bb4f64c8fc3d0654454be4b9289abf5a5b9e0a2 (diff)
Setting camera position added to bars api
Added another fragment shader
Diffstat (limited to 'examples')
-rw-r--r--examples/datavis3d/spectrum/spectrumapp/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/datavis3d/spectrum/spectrumapp/main.cpp b/examples/datavis3d/spectrum/spectrumapp/main.cpp
index a78de547..ad60c5ff 100644
--- a/examples/datavis3d/spectrum/spectrumapp/main.cpp
+++ b/examples/datavis3d/spectrum/spectrumapp/main.cpp
@@ -84,9 +84,10 @@ MainApp::MainApp(Q3DBars *window)
, m_lowFreq(SpectrumLowFreq)
, m_highFreq(SpectrumHighFreq)
{
- m_chart->setupSampleSpace(QPoint(SpectrumNumBands, SpectrumNumBands*2));
- m_chart->setBarSpecs(QPointF(1.0f, 0.75f), QPointF(0.2f, 0.1f));
- m_chart->setBarType(Q3DBars::Bars, false);
+ m_chart->setupSampleSpace(QPoint(SpectrumNumBands, SpectrumNumBands*3));
+ m_chart->setBarSpecs(QPointF(1.0f, 0.75f), QPointF(0.2f, -0.5f));
+ m_chart->setBarType(Q3DBars::Cones, true);
+ m_chart->setCameraPosition(10.0f, 5.0f, 90);
QObject::connect(m_engine, &Engine::changedSpectrum, this, &MainApp::spectrumChanged);
QObject::connect(m_engine, &Engine::stateChanged, this, &MainApp::stateChanged);
m_restartTimer->setSingleShot(true);
@@ -134,11 +135,10 @@ void MainApp::spectrumChanged(qint64 position, qint64 length, const FrequencySpe
void MainApp::stateChanged(QAudio::Mode mode, QAudio::State state)
{
- qDebug() << "mode:" << mode << " state: " << state;
+ //qDebug() << "mode:" << mode << " state: " << state;
// Restart once playback is finished
- if (QAudio::AudioOutput == mode && QAudio::StoppedState == state) {
+ if (QAudio::AudioOutput == mode && QAudio::StoppedState == state)
m_restartTimer->start(500);
- }
}
//-----------------------------------------------------------------------------
@@ -153,7 +153,7 @@ void MainApp::restart()
QString nrStr;
nrStr.setNum(fileNo);
fileToLoad.append(nrStr);
- qDebug() << fileToLoad;
+ //qDebug() << fileToLoad;
start(fileToLoad);
fileNo++;
if (fileNo > 3)