hydrogen 1.2.6
PatternFillDialog.cpp
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2025 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 *
22 */
23
24#include "PatternFillDialog.h"
25
26#include <core/Hydrogen.h>
27#include <core/Basics/Song.h>
28#include <core/Basics/Pattern.h>
29
31 : QDialog(parent)
32 {
33 setupUi( this );
34
35 setWindowTitle( tr( "Fill with selected pattern" ) );
36 adjustSize();
37 setFixedSize( width(), height() );
38
39 __fill_range = pRange;
41}
42
43
44
48
49
50
52{
53 reject();
54}
55
56
57
59{
60 __fill_range->fromVal = fromText->text().toUInt();
61 __fill_range->toVal = toText->text().toUInt();
62 __fill_range->bInsert = fillRB->isChecked();
63 accept();
64}
65
66
67
72
73
75{
77}
78
79
80
82{
83 int fromVal, toVal;
84
85 if ( ( fromVal = fromText->text().toUInt() ) &&
86 ( toVal = toText->text().toUInt() ) &&
87 ( toVal > fromVal ) ) {
88
89 okBtn->setEnabled(true);
90 }
91 else {
92 okBtn->setEnabled(false);
93 }
94}
void on_toText_textChanged(const QString &text)
PatternFillDialog(QWidget *parent, FillRange *range)
void on_fromText_textChanged(const QString &text)
void __text_changed()
Does some name check.