Rename automatable_button to AutomatableButton
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* automatable_button.h - class automatableButton, the base for all buttons
|
||||
* AutomatableButton.h - class automatableButton, the base for all buttons
|
||||
*
|
||||
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -34,13 +34,13 @@
|
||||
class automatableButtonGroup;
|
||||
|
||||
|
||||
class EXPORT automatableButton : public QPushButton, public BoolModelView
|
||||
class EXPORT AutomatableButton : public QPushButton, public BoolModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
automatableButton( QWidget * _parent, const QString & _name
|
||||
AutomatableButton( QWidget * _parent, const QString & _name
|
||||
= QString::null );
|
||||
virtual ~automatableButton();
|
||||
virtual ~AutomatableButton();
|
||||
|
||||
inline void setCheckable( bool _on )
|
||||
{
|
||||
@@ -87,10 +87,10 @@ public:
|
||||
= QString::null );
|
||||
virtual ~automatableButtonGroup();
|
||||
|
||||
void addButton( automatableButton * _btn );
|
||||
void removeButton( automatableButton * _btn );
|
||||
void addButton( AutomatableButton * _btn );
|
||||
void removeButton( AutomatableButton * _btn );
|
||||
|
||||
void activateButton( automatableButton * _btn );
|
||||
void activateButton( AutomatableButton * _btn );
|
||||
|
||||
virtual void modelChanged();
|
||||
|
||||
@@ -100,7 +100,7 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
QList<automatableButton *> m_buttons;
|
||||
QList<AutomatableButton *> m_buttons;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
#ifndef LED_CHECKBOX_H
|
||||
#define LED_CHECKBOX_H
|
||||
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
|
||||
|
||||
class QPixmap;
|
||||
|
||||
|
||||
class EXPORT ledCheckBox : public automatableButton
|
||||
class EXPORT ledCheckBox : public AutomatableButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
|
||||
|
||||
class EXPORT pixmapButton : public automatableButton
|
||||
class EXPORT pixmapButton : public AutomatableButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "SampleBuffer.h"
|
||||
#include "knob.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
#include "combobox.h"
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include "lb302.h"
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
#include "TempoSyncKnob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentView.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
#include "TempoSyncKnob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QPainter>
|
||||
|
||||
#include "TripleOscillator.h"
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
#include "debug.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "InstrumentView.h"
|
||||
#include "graph.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
#include "TempoSyncKnob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* automatable_button.cpp - implementation of class automatableButton and
|
||||
* AutomatableButton.cpp - implementation of class automatableButton and
|
||||
* automatableButtonGroup
|
||||
*
|
||||
* Copyright (c) 2006-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -23,7 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "automatable_button.h"
|
||||
#include "AutomatableButton.h"
|
||||
|
||||
#include <QCursor>
|
||||
#include <QMouseEvent>
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
|
||||
automatableButton::automatableButton( QWidget * _parent,
|
||||
AutomatableButton::AutomatableButton( QWidget * _parent,
|
||||
const QString & _name ) :
|
||||
QPushButton( _parent ),
|
||||
BoolModelView( new BoolModel( false, NULL, _name, true ), this ),
|
||||
@@ -50,7 +50,7 @@ automatableButton::automatableButton( QWidget * _parent,
|
||||
|
||||
|
||||
|
||||
automatableButton::~automatableButton()
|
||||
AutomatableButton::~AutomatableButton()
|
||||
{
|
||||
if( m_group != NULL )
|
||||
{
|
||||
@@ -61,7 +61,7 @@ automatableButton::~automatableButton()
|
||||
|
||||
|
||||
|
||||
void automatableButton::modelChanged()
|
||||
void AutomatableButton::modelChanged()
|
||||
{
|
||||
if( QPushButton::isChecked() != model()->value() )
|
||||
{
|
||||
@@ -72,7 +72,7 @@ void automatableButton::modelChanged()
|
||||
|
||||
|
||||
|
||||
void automatableButton::update()
|
||||
void AutomatableButton::update()
|
||||
{
|
||||
if( QPushButton::isChecked() != model()->value() )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ void automatableButton::update()
|
||||
|
||||
|
||||
|
||||
void automatableButton::contextMenuEvent( QContextMenuEvent * _me )
|
||||
void AutomatableButton::contextMenuEvent( QContextMenuEvent * _me )
|
||||
{
|
||||
// for the case, the user clicked right while pressing left mouse-
|
||||
// button, the context-menu appears while mouse-cursor is still hidden
|
||||
@@ -110,7 +110,7 @@ void automatableButton::contextMenuEvent( QContextMenuEvent * _me )
|
||||
|
||||
|
||||
|
||||
void automatableButton::mousePressEvent( QMouseEvent * _me )
|
||||
void AutomatableButton::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
! ( _me->modifiers() & Qt::ControlModifier ) )
|
||||
@@ -147,7 +147,7 @@ void automatableButton::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void automatableButton::mouseReleaseEvent( QMouseEvent * _me )
|
||||
void AutomatableButton::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me && _me->button() == Qt::LeftButton )
|
||||
{
|
||||
@@ -158,7 +158,7 @@ void automatableButton::mouseReleaseEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void automatableButton::toggle()
|
||||
void AutomatableButton::toggle()
|
||||
{
|
||||
if( isCheckable() && m_group != NULL )
|
||||
{
|
||||
@@ -194,7 +194,7 @@ automatableButtonGroup::automatableButtonGroup( QWidget * _parent,
|
||||
|
||||
automatableButtonGroup::~automatableButtonGroup()
|
||||
{
|
||||
for( QList<automatableButton *>::iterator it = m_buttons.begin();
|
||||
for( QList<AutomatableButton *>::iterator it = m_buttons.begin();
|
||||
it != m_buttons.end(); ++it )
|
||||
{
|
||||
( *it )->m_group = NULL;
|
||||
@@ -204,7 +204,7 @@ automatableButtonGroup::~automatableButtonGroup()
|
||||
|
||||
|
||||
|
||||
void automatableButtonGroup::addButton( automatableButton * _btn )
|
||||
void automatableButtonGroup::addButton( AutomatableButton * _btn )
|
||||
{
|
||||
_btn->m_group = this;
|
||||
_btn->setCheckable( true );
|
||||
@@ -221,7 +221,7 @@ void automatableButtonGroup::addButton( automatableButton * _btn )
|
||||
|
||||
|
||||
|
||||
void automatableButtonGroup::removeButton( automatableButton * _btn )
|
||||
void automatableButtonGroup::removeButton( AutomatableButton * _btn )
|
||||
{
|
||||
m_buttons.erase( qFind( m_buttons.begin(), m_buttons.end(), _btn ) );
|
||||
_btn->m_group = NULL;
|
||||
@@ -230,13 +230,13 @@ void automatableButtonGroup::removeButton( automatableButton * _btn )
|
||||
|
||||
|
||||
|
||||
void automatableButtonGroup::activateButton( automatableButton * _btn )
|
||||
void automatableButtonGroup::activateButton( AutomatableButton * _btn )
|
||||
{
|
||||
if( _btn != m_buttons[model()->value()] &&
|
||||
m_buttons.indexOf( _btn ) != -1 )
|
||||
{
|
||||
model()->setValue( m_buttons.indexOf( _btn ) );
|
||||
foreach( automatableButton * btn, m_buttons )
|
||||
foreach( AutomatableButton * btn, m_buttons )
|
||||
{
|
||||
btn->update();
|
||||
}
|
||||
@@ -261,7 +261,7 @@ void automatableButtonGroup::updateButtons()
|
||||
{
|
||||
model()->setRange( 0, m_buttons.size() - 1 );
|
||||
int i = 0;
|
||||
foreach( automatableButton * btn, m_buttons )
|
||||
foreach( AutomatableButton * btn, m_buttons )
|
||||
{
|
||||
btn->model()->setValue( i == model()->value() );
|
||||
++i;
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
pixmapButton::pixmapButton( QWidget * _parent, const QString & _name ) :
|
||||
automatableButton( _parent, _name ),
|
||||
AutomatableButton( _parent, _name ),
|
||||
m_activePixmap(),
|
||||
m_inactivePixmap(),
|
||||
m_pressed( false )
|
||||
@@ -83,7 +83,7 @@ void pixmapButton::mousePressEvent( QMouseEvent * _me )
|
||||
update();
|
||||
}
|
||||
|
||||
automatableButton::mousePressEvent( _me );
|
||||
AutomatableButton::mousePressEvent( _me );
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ void pixmapButton::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
void pixmapButton::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
automatableButton::mouseReleaseEvent( _me );
|
||||
AutomatableButton::mouseReleaseEvent( _me );
|
||||
|
||||
if( !isCheckable() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user