1 //========================================================= 2 // MusE 3 // Linux Music Editor 4 // $Id: transpose.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $ 5 // (C) Copyright 2011 Florian Jung (flo93@sourceforge.net) 6 // 7 // This program is free software; you can redistribute it and/or 8 // modify it under the terms of the GNU General Public License 9 // as published by the Free Software Foundation; version 2 of 10 // the License, or (at your option) any later version. 11 // 12 // This program is distributed in the hope that it will be useful, 13 // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 // GNU General Public License for more details. 16 // 17 // You should have received a copy of the GNU General Public License 18 // along with this program; if not, write to the Free Software 19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 // 21 //========================================================= 22 23 #ifndef __TRANSPOSE_H__ 24 #define __TRANSPOSE_H__ 25 26 #include "ui_transposebase.h" 27 #include "function_dialog_base.h" 28 29 namespace MusECore { 30 class Xml; 31 } 32 33 namespace MusEGui { 34 35 class Transpose : public FunctionDialogBase, public Ui::TransposeBase 36 { 37 Q_OBJECT 38 39 protected slots: 40 void pull_values(); 41 42 public: 43 Transpose(QWidget* parent = 0); 44 45 static int _range; 46 static int _parts; 47 static int amount; 48 static FunctionReturnDialogFlags_t _ret_flags; 49 static FunctionDialogElements_t _elements; 50 51 static void setElements(FunctionDialogElements_t elements = 52 FunctionAllEventsButton | FunctionSelectedEventsButton | 53 FunctionLoopedButton | FunctionSelectedLoopedButton) { _elements = elements; } 54 55 static void read_configuration(MusECore::Xml& xml); 56 void write_configuration(int level, MusECore::Xml& xml); 57 58 void setupDialog(); 59 curRange()60 int curRange() const { return _range; } setCurRange(int range)61 void setCurRange(int range) { _range = range; } curParts()62 int curParts() const { return _parts; } setCurParts(int parts)63 void setCurParts(int parts) { _parts = parts; } setReturnFlags(FunctionReturnDialogFlags_t f)64 void setReturnFlags(FunctionReturnDialogFlags_t f) { _ret_flags = f; } elements()65 FunctionDialogElements_t elements() const { return _elements; } 66 }; 67 68 } // namespace MusEGui 69 70 #endif 71 72