mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
Animation slow down for debugging
This commit is contained in:
parent
e1c429110f
commit
baff7f213f
2 changed files with 21 additions and 1 deletions
20
filter.cpp
20
filter.cpp
|
@ -27,9 +27,14 @@
|
|||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "filter.h"
|
||||
#include <QtGlobal>
|
||||
#include <QKeyEvent>
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
#include "private/qabstractanimation_p.h"
|
||||
#endif
|
||||
|
||||
filter::filter(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
|
@ -79,6 +84,21 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
|||
case QEvent::KeyRelease: {
|
||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
if(ke->key() == Qt::Key_F9){
|
||||
QUnifiedTimer::instance()->setSlowModeEnabled(true);
|
||||
QUnifiedTimer::instance()->setSlowdownFactor(10);
|
||||
qDebug() << "Slow animations enabled";
|
||||
}
|
||||
|
||||
if(ke->key() == Qt::Key_F10){
|
||||
QUnifiedTimer::instance()->setSlowModeEnabled(false);
|
||||
QUnifiedTimer::instance()->setSlowdownFactor(1);
|
||||
|
||||
qDebug() << "Slow animations disabled";
|
||||
}
|
||||
#endif
|
||||
|
||||
if(ke->key() == Qt::Key_Backtab)
|
||||
m_backtabPressed = false;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ lessThan (QT_MAJOR_VERSION, 5) | lessThan (QT_MINOR_VERSION, 7) {
|
|||
|
||||
TEMPLATE = app
|
||||
|
||||
QT += qml quick widgets
|
||||
QT += qml gui-private quick widgets
|
||||
|
||||
WALLET_ROOT=$$PWD/monero
|
||||
|
||||
|
|
Loading…
Reference in a new issue