Changeset 168
- Timestamp:
- 05/27/08 00:00:32 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/src/PatternEditor/PatternEditorPanel.cpp
r127 r168 61 61 PixmapWidget *editor_top = new PixmapWidget(0); 62 62 editor_top->setPixmap("/patternEditor/editor_top.png", true); 63 editor_top->setFixedHeight(62); 63 editor_top->setFixedHeight(49); 64 65 PixmapWidget *editor_top_2 = new PixmapWidget(0); 66 editor_top_2->setPixmap("/patternEditor/editor_top.png", true); 67 editor_top_2->setFixedHeight(49); 64 68 65 69 QHBoxLayout *editor_top_hbox = new QHBoxLayout(editor_top); 66 70 editor_top_hbox->setSpacing(0); 67 71 editor_top_hbox->setMargin(0); 68 72 editor_top_hbox->setAlignment(Qt::AlignLeft); 73 74 QHBoxLayout *editor_top_hbox_2 = new QHBoxLayout(editor_top_2); 75 editor_top_hbox_2->setSpacing(0); 76 editor_top_hbox_2->setMargin(0); 77 editor_top_hbox_2->setAlignment(Qt::AlignLeft); 78 79 80 //wolke some background images back_size_res 81 PixmapWidget *pSizeResol = new PixmapWidget( NULL ); 82 pSizeResol->setFixedSize( 156, 43 ); 83 pSizeResol->setPixmap( "/patternEditor/background_res.png" ); 84 pSizeResol->move( 0, 3 ); 85 editor_top_hbox_2->addWidget( pSizeResol ); 69 86 70 87 // PATTERN size 71 __pattern_size_combo = new LCDCombo(NULL, 4); 88 __pattern_size_combo = new LCDCombo(pSizeResol, 4); 89 __pattern_size_combo->move( 14, 21 ); 72 90 __pattern_size_combo->setToolTip( trUtf8("Select pattern size") ); 73 91 for ( int i = 1; i <= 32; i++) { … … 76 94 __pattern_size_combo->update(); 77 95 connect(__pattern_size_combo, SIGNAL( valueChanged( QString ) ), this, SLOT( patternSizeChanged(QString) ) ); 78 editor_top_hbox->addWidget(__pattern_size_combo);96 //editor_top_hbox->addWidget(__pattern_size_combo); 79 97 80 98 81 99 // GRID resolution 82 __resolution_combo = new LCDCombo( NULL, 7);100 __resolution_combo = new LCDCombo( pSizeResol , 7); 83 101 __resolution_combo->setToolTip(trUtf8("Select grid resolution")); 84 102 __resolution_combo->addItem( "4" ); … … 95 113 __resolution_combo->addItem( "off" ); 96 114 __resolution_combo->update(); 115 __resolution_combo->move( 68, 21 ); 97 116 connect(__resolution_combo, SIGNAL(valueChanged(QString)), this, SLOT(gridResolutionChanged(QString))); 98 editor_top_hbox->addWidget(__resolution_combo); 117 //editor_top_hbox->addWidget(__resolution_combo); 118 119 120 //wolke some background images hear note rec quant 121 122 PixmapWidget *pRec = new PixmapWidget( NULL ); 123 pRec->setFixedSize( 107, 43 ); 124 pRec->setPixmap( "/patternEditor/background_rec.png" ); 125 pRec->move( 0, 3 ); 126 editor_top_hbox_2->addWidget( pRec ); 99 127 100 128 101 129 // Hear notes btn 102 130 ToggleButton *hearNotesBtn = new ToggleButton( 103 NULL,131 pRec, 104 132 "/patternEditor/btn_hear_on.png", 105 133 "/patternEditor/btn_hear_off.png", … … 107 135 QSize(15, 13) 108 136 ); 137 hearNotesBtn->move( 11, 18 ); 109 138 hearNotesBtn->setToolTip( trUtf8( "Hear new notes" ) ); 110 139 connect( hearNotesBtn, SIGNAL(clicked(Button*)), this, SLOT( hearNotesBtnClick(Button*))); 111 editor_top_hbox->addWidget(hearNotesBtn); 112 140 //editor_top_hbox->addWidget(hearNotesBtn); 113 141 // restore hear new notes button state 114 142 hearNotesBtn->setPressed( pPref->getHearNewNotes() ); … … 117 145 // Record events btn 118 146 ToggleButton* recordEventsBtn = new ToggleButton( 119 NULL,147 pRec, 120 148 "/patternEditor/btn_record_on.png", 121 149 "/patternEditor/btn_record_off.png", … … 123 151 QSize(15, 13) 124 152 ); 153 recordEventsBtn->move( 46, 18 ); 125 154 recordEventsBtn->setPressed( pPref->getRecordEvents()); 126 155 recordEventsBtn->setToolTip( trUtf8( "Record keyboard/midi events" ) ); 127 156 connect( recordEventsBtn, SIGNAL(clicked(Button*)), this, SLOT( recordEventsBtnClick(Button*))); 128 editor_top_hbox->addWidget(recordEventsBtn);157 //editor_top_hbox->addWidget(recordEventsBtn); 129 158 130 159 131 160 // quantize 132 161 ToggleButton* quantizeEventsBtn = new ToggleButton( 133 NULL,162 pRec, 134 163 "/patternEditor/btn_quant_on.png", 135 164 "/patternEditor/btn_quant_off.png", … … 137 166 QSize(15, 13) 138 167 ); 168 quantizeEventsBtn->move( 80, 18 ); 139 169 quantizeEventsBtn->setPressed( pPref->getQuantizeEvents()); 140 170 quantizeEventsBtn->setToolTip( trUtf8( "Quantize keyboard/midi events to grid" ) ); 141 171 connect( quantizeEventsBtn, SIGNAL(clicked(Button*)), this, SLOT( quantizeEventsBtnClick(Button*))); 142 editor_top_hbox->addWidget(quantizeEventsBtn); 143 172 //editor_top_hbox->addWidget(quantizeEventsBtn); 173 174 175 //wolke some background images hear note rec quant 176 PixmapWidget *pZoom = new PixmapWidget( NULL ); 177 pZoom->setFixedSize( 73, 43 ); 178 pZoom->setPixmap( "/patternEditor/background_zoom.png" ); 179 pZoom->move( 0, 3 ); 180 editor_top_hbox_2->addWidget( pZoom ); 144 181 145 182 // zoom-in btn 146 183 Button *zoom_in_btn = new Button( 147 NULL,148 "/s kin_btn_on.png",149 "/s kin_btn_off.png",150 "/s kin_btn_over.png",151 QSize( 20, 20)184 pZoom, 185 "/songEditor/btn_new_on.png", 186 "/songEditor/btn_new_off.png", 187 "/songEditor/btn_new_over.png", 188 QSize(19, 13) 152 189 ); 153 zoom_in_btn-> setFontSize(7);154 zoom_in_btn->setText("+");190 zoom_in_btn->move( 42, 18 ); 191 //zoom_in_btn->setText("+"); 155 192 zoom_in_btn->setToolTip( trUtf8( "Zoom in" ) ); 156 193 connect(zoom_in_btn, SIGNAL(clicked(Button*)), this, SLOT( zoomInBtnClicked(Button*) ) ); 157 editor_top_hbox->addWidget(zoom_in_btn);194 //editor_top_hbox_2->addWidget(zoom_in_btn); 158 195 159 196 160 197 // zoom-out btn 161 198 Button *zoom_out_btn = new Button( 162 NULL,163 "/s kin_btn_on.png",164 "/s kin_btn_off.png",165 "/s kin_btn_over.png",166 QSize( 20, 20)199 pZoom, 200 "/songEditor/btn_minus_on.png", 201 "/songEditor/btn_minus_off.png", 202 "/songEditor/btn_minus_over.png", 203 QSize(19, 13) 167 204 ); 168 zoom_out_btn->setText("-"); 205 zoom_out_btn->move( 11, 18 ); 206 //zoom_out_btn->setText("-"); 169 207 zoom_out_btn->setToolTip( trUtf8( "Zoom out" ) ); 170 208 connect( zoom_out_btn, SIGNAL(clicked(Button*)), this, SLOT( zoomOutBtnClicked(Button*) ) ); 171 editor_top_hbox->addWidget(zoom_out_btn);209 //editor_top_hbox_2->addWidget(zoom_out_btn); 172 210 173 211 … … 358 396 pGrid->setMargin( 0 ); 359 397 360 pGrid->addWidget( editor_top, 0, 0 , 1, 3);361 398 pGrid->addWidget( editor_top, 0, 0); 399 pGrid->addWidget( editor_top_2, 0, 1, 1, 3); 362 400 pGrid->addWidget( m_pPatternNameLbl, 1, 0 ); 363 401 pGrid->addWidget( m_pRulerScrollView, 1, 1 ); … … 602 640 } 603 641 604 } 605 642 643 } 606 644 607 645