MidiPort: coding style improvements
This commit is contained in:
@@ -73,34 +73,35 @@ public:
|
||||
Output, // from MIDI-event-processor to MIDI-client
|
||||
Duplex // both directions
|
||||
} ;
|
||||
typedef Modes Mode;
|
||||
|
||||
MidiPort( const QString & _name,
|
||||
MidiClient * _mc,
|
||||
MidiEventProcessor * _mep,
|
||||
Model * _parent = NULL,
|
||||
Modes _mode = Disabled );
|
||||
MidiPort( const QString& name,
|
||||
MidiClient* client,
|
||||
MidiEventProcessor* eventProcessor,
|
||||
Model* parent = NULL,
|
||||
Mode mode = Disabled );
|
||||
virtual ~MidiPort();
|
||||
|
||||
void setName( const QString & _name );
|
||||
void setName( const QString& name );
|
||||
|
||||
inline Modes mode() const
|
||||
Mode mode() const
|
||||
{
|
||||
return m_mode;
|
||||
}
|
||||
|
||||
void setMode( Modes _mode );
|
||||
void setMode( Mode mode );
|
||||
|
||||
inline bool inputEnabled() const
|
||||
bool isInputEnabled() const
|
||||
{
|
||||
return mode() == Input || mode() == Duplex;
|
||||
}
|
||||
|
||||
inline bool outputEnabled() const
|
||||
bool isOutputEnabled() const
|
||||
{
|
||||
return mode() == Output || mode() == Duplex;
|
||||
}
|
||||
|
||||
inline int realOutputChannel() const
|
||||
int realOutputChannel() const
|
||||
{
|
||||
return outputChannel() - 1;
|
||||
}
|
||||
@@ -109,31 +110,29 @@ public:
|
||||
void processOutEvent( const MidiEvent& event, const MidiTime& time = MidiTime() );
|
||||
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual void saveSettings( QDomDocument& doc, QDomElement& thisElement );
|
||||
virtual void loadSettings( const QDomElement& thisElement );
|
||||
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
return "midiport";
|
||||
}
|
||||
|
||||
void subscribeReadablePort( const QString & _port,
|
||||
bool _subscribe = true );
|
||||
void subscribeWritablePort( const QString & _port,
|
||||
bool _subscribe = true );
|
||||
void subscribeReadablePort( const QString& port, bool subscribe = true );
|
||||
void subscribeWritablePort( const QString& port, bool subscribe = true );
|
||||
|
||||
const Map & readablePorts() const
|
||||
const Map& readablePorts() const
|
||||
{
|
||||
return m_readablePorts;
|
||||
}
|
||||
|
||||
const Map & writablePorts() const
|
||||
const Map& writablePorts() const
|
||||
{
|
||||
return m_writablePorts;
|
||||
}
|
||||
|
||||
MidiPortMenu * m_readablePortsMenu;
|
||||
MidiPortMenu * m_writablePortsMenu;
|
||||
MidiPortMenu* m_readablePortsMenu;
|
||||
MidiPortMenu* m_writablePortsMenu;
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -147,10 +146,10 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
MidiClient * m_midiClient;
|
||||
MidiEventProcessor * m_midiEventProcessor;
|
||||
MidiClient* m_midiClient;
|
||||
MidiEventProcessor* m_midiEventProcessor;
|
||||
|
||||
Modes m_mode;
|
||||
Mode m_mode;
|
||||
|
||||
IntModel m_inputChannelModel;
|
||||
IntModel m_outputChannelModel;
|
||||
|
||||
Reference in New Issue
Block a user