1 //============================================================================= 2 // MusE Score 3 // Linux Music Score Editor 4 // 5 // Copyright (C) 2002-2010 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 #ifndef __SELECTDIALOG_H__ 21 #define __SELECTDIALOG_H__ 22 23 #include "ui_selectdialog.h" 24 25 namespace Ms { 26 27 class Element; 28 struct ElementPattern; 29 30 //--------------------------------------------------------- 31 // SelectDialog 32 //--------------------------------------------------------- 33 34 class SelectDialog : public QDialog, Ui::SelectDialog { 35 Q_OBJECT 36 const Element* e; 37 38 virtual void hideEvent(QHideEvent*); 39 public: 40 SelectDialog(const Element* e, QWidget* parent); 41 void setPattern(ElementPattern* p); doReplace()42 bool doReplace() const { return replace->isChecked(); } doAdd()43 bool doAdd() const { return add->isChecked(); } doSubtract()44 bool doSubtract() const { return subtract->isChecked(); } doFromSelection()45 bool doFromSelection() const { return fromSelection->isChecked(); } isInSelection()46 bool isInSelection() const { return inSelection->isChecked(); } 47 }; 48 49 50 } // namespace Ms 51 #endif 52 53