Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mauser committed Oct 4, 2015
1 parent 75c4fd7 commit 265ce38
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 36 deletions.
8 changes: 3 additions & 5 deletions src/gui/src/AudioEngineInfoForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void AudioEngineInfoForm::hideEvent ( QHideEvent* )
void AudioEngineInfoForm::updateInfo()
{
Hydrogen *pEngine = Hydrogen::get_instance();
Song *song = pEngine->getSong();
Song *pSong = pEngine->getSong();

// Song position
QString sSongPos = "N/A";
Expand All @@ -121,11 +121,11 @@ void AudioEngineInfoForm::updateInfo()
processTimeLbl->setText(tmp);

// Song state
if (song == NULL) {
if (pSong == NULL) {
songStateLbl->setText( "NULL song" );
}
else {
if (song->__is_modified) {
if (pSong->__is_modified) {
songStateLbl->setText( "Modified" );
}
else {
Expand Down Expand Up @@ -194,8 +194,6 @@ void AudioEngineInfoForm::updateInfo()
m_pSelectedInstrLbl->setText( QString("%1").arg(nSelectedInstrumentNumber) );
}


QString currentPatternName;
PatternList *pPatternList = Hydrogen::get_instance()->getCurrentPatternList();
if (pPatternList) {
currentPatternLbl->setText( QString::number(pPatternList->size()) );
Expand Down
62 changes: 31 additions & 31 deletions src/gui/src/PatternEditor/PatternEditorPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace H2Core
///
class PatternEditorPanel : public QWidget, public EventListener, public H2Core::Object
{
H2_OBJECT
H2_OBJECT
Q_OBJECT

public:
Expand All @@ -67,7 +67,7 @@ class PatternEditorPanel : public QWidget, public EventListener, public H2Core::
NotePropertiesRuler* getNoteKeyEditor() { return m_pNoteNoteKeyEditor; }
PatternEditorInstrumentList* getInstrumentList() { return m_pInstrumentList; }
PianoRollEditor* getPianoRollEditor() { return m_pPianoRollEditor; }
QString getPropertiesComboText(){ return __pPropertiesCombo->getText(); }
QString getPropertiesComboText(){ return __pPropertiesCombo->getText(); }

void updateSLnameLabel();
void displayorHidePrePostCB();
Expand Down Expand Up @@ -104,73 +104,73 @@ class PatternEditorPanel : public QWidget, public EventListener, public H2Core::
void recPostDeleteSelect( int index );

private:
H2Core::Pattern *m_pPattern;
QPixmap m_backgroundPixmap;
QLabel *pSLlabel;
H2Core::Pattern * m_pPattern;
QPixmap m_backgroundPixmap;
QLabel * pSLlabel;

// Editor top
LCDCombo *__pattern_size_combo;
LCDCombo *__resolution_combo;
ToggleButton *__show_drum_btn;
ToggleButton *__show_piano_btn;
QComboBox *__recpredelete;
QComboBox *__recpostdelete;
LCDCombo * __pattern_size_combo;
LCDCombo * __resolution_combo;
ToggleButton * __show_drum_btn;
ToggleButton * __show_piano_btn;
QComboBox * __recpredelete;
QComboBox * __recpostdelete;


// ~Editor top

//note properties combo
LCDCombo * __pPropertiesCombo;
//note properties combo
LCDCombo * __pPropertiesCombo;

// drum editor
QScrollArea* m_pEditorScrollView;
DrumPatternEditor *m_pDrumPatternEditor;
QScrollArea* m_pEditorScrollView;
DrumPatternEditor * m_pDrumPatternEditor;

// piano roll editor
QScrollArea* m_pPianoRollInternScrollView;
QScrollArea* m_pPianoRollScrollView;
PianoRollEditor *m_pPianoRollEditor;
QScrollArea* m_pPianoRollInternScrollView;
QScrollArea* m_pPianoRollScrollView;
PianoRollEditor * m_pPianoRollEditor;

// ruler
QScrollArea* m_pRulerScrollView;
QScrollArea* m_pRulerScrollView;
PatternEditorRuler *m_pPatternEditorRuler;

// instr list
QScrollArea* m_pInstrListScrollView;
QScrollArea* m_pInstrListScrollView;
PatternEditorInstrumentList *m_pInstrumentList;

// note velocity editor
QScrollArea* m_pNoteVelocityScrollView;
QScrollArea* m_pNoteVelocityScrollView;
NotePropertiesRuler *m_pNoteVelocityEditor;

// note pan editor
QScrollArea* m_pNotePanScrollView;
QScrollArea* m_pNotePanScrollView;
NotePropertiesRuler *m_pNotePanEditor;

// note leadlag editor
QScrollArea* m_pNoteLeadLagScrollView;
QScrollArea* m_pNoteLeadLagScrollView;
NotePropertiesRuler *m_pNoteLeadLagEditor;

// note notekey editor
QScrollArea* m_pNoteNoteKeyScrollView;
QScrollArea* m_pNoteNoteKeyScrollView;
NotePropertiesRuler *m_pNoteNoteKeyEditor;

QScrollBar *m_pPatternEditorHScrollBar;
QScrollBar *m_pPatternEditorVScrollBar;
QScrollBar * m_pPatternEditorHScrollBar;
QScrollBar * m_pPatternEditorVScrollBar;

// TOOLBAR
QLabel *m_pPatternNameLbl;
QLabel * m_pPatternNameLbl;



Button *m_pRandomVelocityBtn;
Button * m_pRandomVelocityBtn;
//~ TOOLBAR


Button *sizeDropdownBtn;
Button *resDropdownBtn;
Button * sizeDropdownBtn;
Button * resDropdownBtn;

bool m_bEnablePatternResize;
bool m_bEnablePatternResize;


virtual void dragEnterEvent(QDragEnterEvent *event);
Expand Down

0 comments on commit 265ce38

Please sign in to comment.