I am attempting to add a "Play/Pause" QPushButton for a tile morphing app. My issue is that this button should have two functions in itself (play/pause).
How would I go about adding the pause functionality? My current code has the play function working:
GLWidget.cpp
Code:
void GLWidget::s_play() { m_flagScale = 1; m_flagCentroid = 1; m_flagRotate = 1; }
MainWindow.cpp
Code:
connect(m_load, SIGNAL(clicked()), this, SLOT(s_loadTiles())); connect(m_scale, SIGNAL(stateChanged(int)), m_glwidget, SLOT(s_setScale(int))); connect(m_rotate, SIGNAL(stateChanged(int)), m_glwidget, SLOT(s_setRotate(int))); connect(m_centroid, SIGNAL(stateChanged(int)), m_glwidget, SLOT(s_setCentroid(int))); connect(m_play, SIGNAL(clicked()), m_glwidget, SLOT(s_play()));
Thank for the help in advance!