1 //============================================================================= 2 // MuseScore 3 // Linux Music Score Editor 4 // 5 // Copyright (C) 2008-2011 Werner Schweer and others 6 // 7 // This program is free software; you can redistribute it and/or modify 8 // it under the terms of the GNU General Public License version 2. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program; if not, write to the Free Software 17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 //============================================================================= 19 20 #include "breaksdialog.h" 21 22 namespace Ms { 23 24 //--------------------------------------------------------- 25 // BreaksDialog 26 //--------------------------------------------------------- 27 BreaksDialog(QWidget * parent)28BreaksDialog::BreaksDialog(QWidget* parent) 29 : QDialog(parent) 30 { 31 setupUi(this); 32 setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); 33 interval = 4; 34 lock = false; 35 remove = false; 36 intervalButton->setChecked(true); 37 intervalBox->setValue(interval); 38 } 39 40 //--------------------------------------------------------- 41 // accept 42 //--------------------------------------------------------- 43 accept()44void BreaksDialog::accept() 45 { 46 interval = intervalButton->isChecked() ? intervalBox->value() : 0; 47 remove = removeButton->isChecked(); 48 lock = lockButton->isChecked(); 49 QDialog::accept(); 50 } 51 52 } 53 54