AutomationEditor: improve zoom functionality
- entire wheelevent code was written very... weirdly, I simplified it - fix bug with x zoom with mousewheel, no more getting stuck between 25/50 - ctrl+shift+mousewheel now zooms y-axis - ctrl+alt+mousewheel now changes quantization
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* AutomationEditor.h - declaration of class AutomationEditor which is a window
|
||||
* where you can edit dynamic values in an easy way
|
||||
* where you can edit dynamic values in an easy way
|
||||
*
|
||||
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -23,8 +23,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AUTOMATION_EDITOR_H
|
||||
#define _AUTOMATION_EDITOR_H
|
||||
#ifndef AUTOMATION_EDITOR_H
|
||||
#define AUTOMATION_EDITOR_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtGui/QWidget>
|
||||
@@ -50,6 +50,9 @@ class toolButton;
|
||||
class AutomationEditor : public QWidget, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( QColor gridColor READ gridColor WRITE setGridColor )
|
||||
Q_PROPERTY( QColor graphColor READ graphColor WRITE setGraphColor )
|
||||
Q_PROPERTY( QColor vertexColor READ vertexColor WRITE setVertexColor )
|
||||
public:
|
||||
void setCurrentPattern( AutomationPattern * _new_pattern );
|
||||
|
||||
@@ -75,6 +78,13 @@ public:
|
||||
|
||||
void setPauseIcon( bool pause );
|
||||
|
||||
// qproperty access methods
|
||||
QColor gridColor() const;
|
||||
QColor graphColor() const;
|
||||
QColor vertexColor() const;
|
||||
void setGridColor( const QColor & c );
|
||||
void setGraphColor( const QColor & c );
|
||||
void setVertexColor( const QColor & c );
|
||||
|
||||
public slots:
|
||||
void update();
|
||||
@@ -252,7 +262,9 @@ private:
|
||||
void drawAutomationPoint( QPainter & p, timeMap::iterator it );
|
||||
bool inBBEditor();
|
||||
|
||||
|
||||
QColor m_gridColor;
|
||||
QColor m_graphColor;
|
||||
QColor m_vertexColor;
|
||||
|
||||
friend class engine;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user