1
//=========================================================
4
// $Id: move.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
5
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
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.
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.
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.
21
//=========================================================
23
#include <QButtonGroup>
29
Move::Move(QWidget* parent)
33
range_group = new QButtonGroup;
34
range_group->addButton(all_events_button,0);
35
range_group->addButton(selected_events_button,1);
36
range_group->addButton(looped_events_button,2);
37
range_group->addButton(selected_looped_button,3);
42
void Move::pull_values()
44
range = range_group->checkedId();
45
amount = amount_spinbox->value();
56
if ((range < 0) || (range > 3)) range=0;
58
range_group->button(range)->setChecked(true);
59
amount_spinbox->setValue(amount);
61
return QDialog::exec();
65
void Move::read_configuration(MusECore::Xml& xml)
69
MusECore::Xml::Token token = xml.parse();
70
if (token == MusECore::Xml::Error || token == MusECore::Xml::End)
73
const QString& tag = xml.s1();
76
case MusECore::Xml::TagStart:
79
else if (tag == "amount")
80
amount=xml.parseInt();
85
case MusECore::Xml::TagEnd:
95
void Move::write_configuration(int level, MusECore::Xml& xml)
97
xml.tag(level++, "move");
98
xml.intTag(level, "range", range);
99
xml.intTag(level, "amount", amount);
100
xml.tag(level, "/move");
103
} // namespace MusEGui