summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-09-10 17:06:00 +0000
committerFlorian Jung <flo@windfisch.org>2011-09-10 17:06:00 +0000
commit24f84a489364741eb3fc126a3f83d91a86b65e27 (patch)
tree63a4e20aaf4a2ebd2462c91b574eddceeac31170 /muse2/muse/widgets
parent38c5cccc7273247353264bb7dc97f42296d8e259 (diff)
parent2120ea4f083228dde0d7307203391a4ec8f57e2d (diff)
merged the first bunch of orcans changes
STILL WAIT WITH COMMITTING NEW STUFF! i have to merge the rest as well! this is a bit buggy (connect errors, not tested much), but doesn't segfault immediately
Diffstat (limited to 'muse2/muse/widgets')
-rw-r--r--muse2/muse/widgets/CMakeLists.txt13
-rw-r--r--muse2/muse/widgets/aboutbox_impl.cpp26
-rw-r--r--muse2/muse/widgets/aboutbox_impl.h26
-rw-r--r--muse2/muse/widgets/action.h18
-rw-r--r--muse2/muse/widgets/bigtime.cpp35
-rw-r--r--muse2/muse/widgets/bigtime.h30
-rw-r--r--muse2/muse/widgets/canvas.cpp19
-rw-r--r--muse2/muse/widgets/canvas.h20
-rw-r--r--muse2/muse/widgets/checkbox.cpp19
-rw-r--r--muse2/muse/widgets/checkbox.h18
-rw-r--r--muse2/muse/widgets/citem.cpp18
-rw-r--r--muse2/muse/widgets/citem.h19
-rw-r--r--muse2/muse/widgets/comboQuant.cpp18
-rw-r--r--muse2/muse/widgets/comboQuant.h19
-rw-r--r--muse2/muse/widgets/combobox.cpp18
-rw-r--r--muse2/muse/widgets/combobox.h19
-rw-r--r--muse2/muse/widgets/comment.cpp18
-rw-r--r--muse2/muse/widgets/comment.h19
-rw-r--r--muse2/muse/widgets/ctrlcombo.cpp18
-rw-r--r--muse2/muse/widgets/ctrlcombo.h18
-rw-r--r--muse2/muse/widgets/dentry.cpp18
-rw-r--r--muse2/muse/widgets/dentry.h20
-rw-r--r--muse2/muse/widgets/didyouknow.h10
-rw-r--r--muse2/muse/widgets/dimap.cpp35
-rw-r--r--muse2/muse/widgets/dimap.h23
-rw-r--r--muse2/muse/widgets/doublelabel.cpp19
-rw-r--r--muse2/muse/widgets/doublelabel.h19
-rw-r--r--muse2/muse/widgets/drange.cpp34
-rw-r--r--muse2/muse/widgets/drange.h23
-rw-r--r--muse2/muse/widgets/editnotedialogbase.ui4
-rw-r--r--muse2/muse/widgets/filedialog.cpp32
-rw-r--r--muse2/muse/widgets/filedialog.h18
-rw-r--r--muse2/muse/widgets/function_dialogs/CMakeLists.txt11
-rw-r--r--muse2/muse/widgets/function_dialogs/crescendo.cpp19
-rw-r--r--muse2/muse/widgets/function_dialogs/crescendo.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/deloverlaps.cpp18
-rw-r--r--muse2/muse/widgets/function_dialogs/deloverlaps.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/gatetime.cpp19
-rw-r--r--muse2/muse/widgets/function_dialogs/gatetime.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/legato.cpp19
-rw-r--r--muse2/muse/widgets/function_dialogs/legato.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/move.cpp19
-rw-r--r--muse2/muse/widgets/function_dialogs/move.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/quantize.cpp20
-rw-r--r--muse2/muse/widgets/function_dialogs/quantize.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/remove.cpp20
-rw-r--r--muse2/muse/widgets/function_dialogs/remove.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/setlen.cpp19
-rw-r--r--muse2/muse/widgets/function_dialogs/setlen.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/transpose.cpp19
-rw-r--r--muse2/muse/widgets/function_dialogs/transpose.h19
-rw-r--r--muse2/muse/widgets/function_dialogs/velocity.cpp19
-rw-r--r--muse2/muse/widgets/function_dialogs/velocity.h19
-rw-r--r--muse2/muse/widgets/genset.cpp449
-rw-r--r--muse2/muse/widgets/genset.h19
-rw-r--r--muse2/muse/widgets/header.cpp19
-rw-r--r--muse2/muse/widgets/header.h19
-rw-r--r--muse2/muse/widgets/hitscale.cpp18
-rw-r--r--muse2/muse/widgets/hitscale.h20
-rw-r--r--muse2/muse/widgets/intlabel.cpp22
-rw-r--r--muse2/muse/widgets/intlabel.h19
-rw-r--r--muse2/muse/widgets/itransformbase.ui10
-rw-r--r--muse2/muse/widgets/knob.cpp33
-rw-r--r--muse2/muse/widgets/knob.h25
-rw-r--r--muse2/muse/widgets/lcombo.cpp18
-rw-r--r--muse2/muse/widgets/lcombo.h18
-rw-r--r--muse2/muse/widgets/menutitleitem.cpp11
-rw-r--r--muse2/muse/widgets/menutitleitem.h18
-rw-r--r--muse2/muse/widgets/meter.cpp31
-rw-r--r--muse2/muse/widgets/meter.h20
-rw-r--r--muse2/muse/widgets/metronome.cpp58
-rw-r--r--muse2/muse/widgets/metronome.h20
-rw-r--r--muse2/muse/widgets/midisyncimpl.cpp24
-rw-r--r--muse2/muse/widgets/midisyncimpl.h19
-rw-r--r--muse2/muse/widgets/mittransposebase.ui4
-rw-r--r--muse2/muse/widgets/mixdowndialog.cpp22
-rw-r--r--muse2/muse/widgets/mixdowndialog.h19
-rw-r--r--muse2/muse/widgets/mlabel.cpp17
-rw-r--r--muse2/muse/widgets/mlabel.h20
-rw-r--r--muse2/muse/widgets/mmath.cpp25
-rw-r--r--muse2/muse/widgets/mmath.h19
-rw-r--r--muse2/muse/widgets/moc_ttoolbar.cpp22
-rw-r--r--muse2/muse/widgets/mtrackinfo.cpp50
-rw-r--r--muse2/muse/widgets/mtrackinfo.h19
-rw-r--r--muse2/muse/widgets/mtrackinfobase.ui24
-rw-r--r--muse2/muse/widgets/mtscale.cpp26
-rw-r--r--muse2/muse/widgets/mtscale.h20
-rw-r--r--muse2/muse/widgets/mtscale_flo.cpp27
-rw-r--r--muse2/muse/widgets/mtscale_flo.h20
-rw-r--r--muse2/muse/widgets/musewidgetsplug.cpp15
-rw-r--r--muse2/muse/widgets/nentry.cpp18
-rw-r--r--muse2/muse/widgets/nentry.h20
-rw-r--r--muse2/muse/widgets/noteinfo.cpp18
-rw-r--r--muse2/muse/widgets/noteinfo.h23
-rw-r--r--muse2/muse/widgets/pastedialog.cpp2
-rw-r--r--muse2/muse/widgets/pitchedit.cpp18
-rw-r--r--muse2/muse/widgets/pitchedit.h21
-rw-r--r--muse2/muse/widgets/pitchlabel.cpp18
-rw-r--r--muse2/muse/widgets/pitchlabel.h18
-rw-r--r--muse2/muse/widgets/popupmenu.cpp24
-rw-r--r--muse2/muse/widgets/popupmenu.h18
-rw-r--r--muse2/muse/widgets/posedit.cpp19
-rw-r--r--muse2/muse/widgets/posedit.h19
-rw-r--r--muse2/muse/widgets/poslabel.cpp20
-rw-r--r--muse2/muse/widgets/poslabel.h18
-rw-r--r--muse2/muse/widgets/projectcreateimpl.cpp36
-rw-r--r--muse2/muse/widgets/projectcreateimpl.h26
-rw-r--r--muse2/muse/widgets/routepopup.cpp17
-rw-r--r--muse2/muse/widgets/routepopup.h15
-rw-r--r--muse2/muse/widgets/scldiv.cpp79
-rw-r--r--muse2/muse/widgets/scldiv.h23
-rw-r--r--muse2/muse/widgets/scldraw.cpp73
-rw-r--r--muse2/muse/widgets/scldraw.h23
-rw-r--r--muse2/muse/widgets/sclif.cpp22
-rw-r--r--muse2/muse/widgets/sclif.h23
-rw-r--r--muse2/muse/widgets/scrollscale.cpp18
-rw-r--r--muse2/muse/widgets/scrollscale.h19
-rw-r--r--muse2/muse/widgets/section.h19
-rw-r--r--muse2/muse/widgets/shortcutcapturedialog.cpp34
-rw-r--r--muse2/muse/widgets/shortcutcapturedialog.h33
-rw-r--r--muse2/muse/widgets/shortcutconfig.cpp35
-rw-r--r--muse2/muse/widgets/shortcutconfig.h38
-rw-r--r--muse2/muse/widgets/sigedit.cpp19
-rw-r--r--muse2/muse/widgets/sigedit.h19
-rw-r--r--muse2/muse/widgets/siglabel.cpp19
-rw-r--r--muse2/muse/widgets/siglabel.h20
-rw-r--r--muse2/muse/widgets/sigscale.cpp21
-rw-r--r--muse2/muse/widgets/sigscale.h20
-rw-r--r--muse2/muse/widgets/slider.cpp668
-rw-r--r--muse2/muse/widgets/slider.h41
-rw-r--r--muse2/muse/widgets/sliderbase.cpp24
-rw-r--r--muse2/muse/widgets/sliderbase.h23
-rw-r--r--muse2/muse/widgets/songinfo.h12
-rw-r--r--muse2/muse/widgets/spinbox.cpp18
-rw-r--r--muse2/muse/widgets/spinbox.h19
-rw-r--r--muse2/muse/widgets/spinboxFP.cpp21
-rw-r--r--muse2/muse/widgets/spinboxFP.h19
-rw-r--r--muse2/muse/widgets/splitter.cpp19
-rw-r--r--muse2/muse/widgets/splitter.h19
-rw-r--r--muse2/muse/widgets/swidget.cpp18
-rw-r--r--muse2/muse/widgets/swidget.h19
-rw-r--r--muse2/muse/widgets/tb1.cpp18
-rw-r--r--muse2/muse/widgets/tb1.h24
-rw-r--r--muse2/muse/widgets/tempolabel.cpp19
-rw-r--r--muse2/muse/widgets/tempolabel.h19
-rw-r--r--muse2/muse/widgets/tools.cpp18
-rw-r--r--muse2/muse/widgets/tools.h22
-rw-r--r--muse2/muse/widgets/transformbase.ui18
-rw-r--r--muse2/muse/widgets/ttoolbar.cpp25
-rw-r--r--muse2/muse/widgets/ttoolbar.h15
-rw-r--r--muse2/muse/widgets/ttoolbutton.cpp19
-rw-r--r--muse2/muse/widgets/ttoolbutton.h19
-rw-r--r--muse2/muse/widgets/unusedwavefiles.cpp46
-rw-r--r--muse2/muse/widgets/unusedwavefiles.h26
-rw-r--r--muse2/muse/widgets/utils.cpp21
-rw-r--r--muse2/muse/widgets/utils.h18
-rw-r--r--muse2/muse/widgets/verticalmeter.cpp21
-rw-r--r--muse2/muse/widgets/verticalmeter.h20
-rw-r--r--muse2/muse/widgets/view.cpp19
-rw-r--r--muse2/muse/widgets/view.h19
-rw-r--r--muse2/muse/widgets/visibletracks.cpp18
-rw-r--r--muse2/muse/widgets/visibletracks.h23
-rw-r--r--muse2/muse/widgets/vscale.cpp18
-rw-r--r--muse2/muse/widgets/vscale.h19
-rw-r--r--muse2/muse/widgets/wtscale.cpp19
-rw-r--r--muse2/muse/widgets/wtscale.h20
166 files changed, 3764 insertions, 898 deletions
diff --git a/muse2/muse/widgets/CMakeLists.txt b/muse2/muse/widgets/CMakeLists.txt
index 66fefa6f..4e934ad0 100644
--- a/muse2/muse/widgets/CMakeLists.txt
+++ b/muse2/muse/widgets/CMakeLists.txt
@@ -3,10 +3,12 @@
# Linux Music Editor
# $Id:$
#
-# Copyright (C) 2002-2006 by Werner Schweer and others
+# Copyright (C) 1999-2011 by Werner Schweer and others
#
# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2.
+# it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +16,9 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#=============================================================================
set (SubDirs
@@ -187,7 +190,7 @@ file (GLOB widgets_source_files
tb1.cpp
tempolabel.cpp
tools.cpp
- ttoolbar.cpp
+ # ttoolbar.cpp
ttoolbutton.cpp
unusedwavefiles.cpp
utils.cpp
diff --git a/muse2/muse/widgets/aboutbox_impl.cpp b/muse2/muse/widgets/aboutbox_impl.cpp
index bf370ab7..36ba299e 100644
--- a/muse2/muse/widgets/aboutbox_impl.cpp
+++ b/muse2/muse/widgets/aboutbox_impl.cpp
@@ -1,7 +1,31 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/aboutbox_impl.cpp $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#include "aboutbox_impl.h"
#include "config.h"
#include "icons.h"
+namespace MusEWidget {
+
AboutBoxImpl::AboutBoxImpl()
{
setupUi(this);
@@ -10,3 +34,5 @@ AboutBoxImpl::AboutBoxImpl()
QString svnrevision(SVNVERSION);
versionLabel->setText("Version: " + version + " (svn revision: "+ svnrevision +")");
}
+
+}
diff --git a/muse2/muse/widgets/aboutbox_impl.h b/muse2/muse/widgets/aboutbox_impl.h
index de75bfc9..3ad3cd93 100644
--- a/muse2/muse/widgets/aboutbox_impl.h
+++ b/muse2/muse/widgets/aboutbox_impl.h
@@ -1,8 +1,32 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/aboutbox_impl.h $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#ifndef ABOUTBOXIMPL_H
#define ABOUTBOXIMPL_H
#include "ui_aboutbox.h"
+namespace MusEWidget {
+
class AboutBoxImpl : public QDialog, public Ui::AboutBox
{
Q_OBJECT
@@ -13,4 +37,6 @@ public:
};
+}
+
#endif // ABOUTBOXIMPL_H
diff --git a/muse2/muse/widgets/action.h b/muse2/muse/widgets/action.h
index 7fa040c4..efc7c2ee 100644
--- a/muse2/muse/widgets/action.h
+++ b/muse2/muse/widgets/action.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: action.h,v 1.1.1.1.2.1 2008/01/19 13:33:46 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __ACTION_H__
@@ -10,6 +25,8 @@
#include <QAction>
+namespace MusEWidget {
+
//---------------------------------------------------------
// Action
//---------------------------------------------------------
@@ -28,6 +45,7 @@ class Action : public QAction {
int id() const { return _id; }
};
+}
#endif
diff --git a/muse2/muse/widgets/bigtime.cpp b/muse2/muse/widgets/bigtime.cpp
index b47773c8..572710e2 100644
--- a/muse2/muse/widgets/bigtime.cpp
+++ b/muse2/muse/widgets/bigtime.cpp
@@ -1,3 +1,25 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/bigtime.cpp $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#include <stdio.h>
#include <limits.h>
@@ -13,6 +35,8 @@
extern int mtcType;
+namespace MusEWidget {
+
//
// the bigtime widget
// display is split into several parts to avoid flickering.
@@ -165,8 +189,8 @@ void BigTime::fmtButtonToggled(bool v)
void BigTime::configChanged()
{
- setBgColor(config.bigTimeBackgroundColor);
- setFgColor(config.bigTimeForegroundColor);
+ setBgColor(MusEConfig::config.bigTimeBackgroundColor);
+ setFgColor(MusEConfig::config.bigTimeForegroundColor);
}
//---------------------------------------------------------
@@ -208,7 +232,7 @@ bool BigTime::setString(unsigned v)
int bar, beat;
unsigned tick;
AL::sigmap.tickValues(v, &bar, &beat, &tick);
- double time = double(absFrame)/double(sampleRate);
+ double time = double(absFrame)/double(MusEGlobal::sampleRate);
//int hour = int(time) / 3600;
//int min = (int(time) / 60) % 60;
int min = int(time) / 60;
@@ -335,8 +359,8 @@ void BigTime::resizeEvent(QResizeEvent *ev)
//dwin->setFont(f);
QString fstr = QString("font-size:%1px; font-family:'Courier'; ").arg(fs); // Tim p4.0.8
dwin->setStyleSheet(fstr);
- setBgColor(config.bigTimeBackgroundColor);
- setFgColor(config.bigTimeForegroundColor);
+ setBgColor(MusEConfig::config.bigTimeBackgroundColor);
+ setFgColor(MusEConfig::config.bigTimeForegroundColor);
int digitWidth = dwin->fontMetrics().width(QString("0"));
int vspace = (ev->size().height() - (fs*2)) / 3;
@@ -446,3 +470,4 @@ void BigTime::setBgColor(QColor c)
setPalette(newpalette);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/bigtime.h b/muse2/muse/widgets/bigtime.h
index eff0ef92..636abfb3 100644
--- a/muse2/muse/widgets/bigtime.h
+++ b/muse2/muse/widgets/bigtime.h
@@ -1,3 +1,25 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/bigtime.h $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#ifndef __BIGTIME_H__
#define __BIGTIME_H__
@@ -6,7 +28,11 @@
class QCheckBox;
class QLabel;
+namespace MusEApp {
class MusE;
+}
+
+namespace MusEWidget {
//---------------------------------------------------------
// BigTime
@@ -16,7 +42,7 @@ class BigTime : public QWidget {
Q_OBJECT
bool tickmode;
- MusE* seq;
+ MusEApp::MusE* seq;
bool setString(unsigned);
@@ -52,4 +78,6 @@ class BigTime : public QWidget {
BigTime(QWidget* parent);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/canvas.cpp b/muse2/muse/widgets/canvas.cpp
index 6491b585..c498bfd1 100644
--- a/muse2/muse/widgets/canvas.cpp
+++ b/muse2/muse/widgets/canvas.cpp
@@ -4,6 +4,21 @@
// $Id: canvas.cpp,v 1.10.2.17 2009/05/03 04:14:01 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
// Additions, modifications (C) Copyright 2011 Tim E. Real (terminator356 on users DOT sourceforge DOT net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -31,6 +46,8 @@
#define ABS(x) ((x) < 0) ? -(x) : (x)
+namespace MusEWidget {
+
//---------------------------------------------------------
// Canvas
//---------------------------------------------------------
@@ -1525,3 +1542,5 @@ void Canvas::setCurrentPart(Part* part)
curPartId = curPart->sn();
curPartChanged();
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/canvas.h b/muse2/muse/widgets/canvas.h
index 99bbabee..553ef407 100644
--- a/muse2/muse/widgets/canvas.h
+++ b/muse2/muse/widgets/canvas.h
@@ -4,6 +4,21 @@
// $Id: canvas.h,v 1.3.2.8 2009/02/02 21:38:01 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
// Additions, modifications (C) Copyright 2011 Tim E. Real (terminator356 on users DOT sourceforge DOT net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __CANVAS_H__
@@ -20,6 +35,8 @@
class QMenu;
+namespace MusEWidget {
+
//---------------------------------------------------------
// Canvas
//---------------------------------------------------------
@@ -180,5 +197,8 @@ class Canvas : public View {
void setCurrentPart(Part*);
void setCanvasTools(int n) { canvasTools = n; }
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/checkbox.cpp b/muse2/muse/widgets/checkbox.cpp
index 8f706361..def23730 100644
--- a/muse2/muse/widgets/checkbox.cpp
+++ b/muse2/muse/widgets/checkbox.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: checkbox.cpp,v 1.2.2.2 2006/10/29 07:54:52 terminator356 Exp $
// (C) Copyright 2004 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "checkbox.h"
#include <QMouseEvent>
+namespace MusEWidget {
+
//---------------------------------------------------------
// CheckBox
//---------------------------------------------------------
@@ -56,4 +73,4 @@ void CheckBox::mouseReleaseEvent(QMouseEvent *e)
emit checkboxReleased(_id);
}
-
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/checkbox.h b/muse2/muse/widgets/checkbox.h
index f9b58ad1..d50b31d3 100644
--- a/muse2/muse/widgets/checkbox.h
+++ b/muse2/muse/widgets/checkbox.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: checkbox.h,v 1.2.2.2 2006/10/29 07:54:52 terminator356 Exp $
// (C) Copyright 2004 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __CHECKBOX_H__
@@ -10,6 +25,7 @@
#include <QCheckBox>
+namespace MusEWidget {
//---------------------------------------------------------
// CheckBox
@@ -40,5 +56,7 @@ class CheckBox : public QCheckBox {
void setId(int i) { _id = i; }
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/citem.cpp b/muse2/muse/widgets/citem.cpp
index 2974196d..1fe861a0 100644
--- a/muse2/muse/widgets/citem.cpp
+++ b/muse2/muse/widgets/citem.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: citem.cpp,v 1.2.2.3 2008/01/26 07:23:21 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "part.h"
#include "citem.h"
#include <stdio.h>
+namespace MusEWidget {
+
//---------------------------------------------------------
// CItem
//---------------------------------------------------------
@@ -91,3 +108,4 @@ void CItemList::add(CItem* item)
std::multimap<int, CItem*, std::less<int> >::insert(std::pair<const int, CItem*> (item->bbox().x(), item));
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/citem.h b/muse2/muse/widgets/citem.h
index cd77f51d..bdeca213 100644
--- a/muse2/muse/widgets/citem.h
+++ b/muse2/muse/widgets/citem.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: citem.h,v 1.2.2.1 2006/10/04 18:45:35 spamatica Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __CITEM_H__
@@ -17,6 +32,8 @@
class Event;
class Part;
+namespace MusEWidget {
+
//---------------------------------------------------------
// CItem
// virtuelle Basisklasse fr alle Canvas Item's
@@ -86,5 +103,7 @@ class CItemList: public std::multimap<int, CItem*, std::less<int> > {
CItem* find(const QPoint& pos) const;
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/comboQuant.cpp b/muse2/muse/widgets/comboQuant.cpp
index 87d88fca..c455851a 100644
--- a/muse2/muse/widgets/comboQuant.cpp
+++ b/muse2/muse/widgets/comboQuant.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: comboQuant.cpp,v 1.1.1.1 2003/10/27 18:54:52 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -13,6 +28,8 @@
#include "comboQuant.h"
+namespace MusEWidget {
+
static int quantTable[] = {
1, 16, 32, 64, 128, 256, 512, 1024,
1, 24, 48, 96, 192, 384, 768, 1536,
@@ -92,3 +109,4 @@ void ComboQuant::setValue(int val)
setCurrentIndex(0);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/comboQuant.h b/muse2/muse/widgets/comboQuant.h
index 501f0a14..8e1d80ea 100644
--- a/muse2/muse/widgets/comboQuant.h
+++ b/muse2/muse/widgets/comboQuant.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: comboQuant.h,v 1.1.1.1 2003/10/27 18:54:30 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __COMBOQUANT_H__
@@ -15,6 +30,8 @@
class QWidget;
class QTableWidget;
+namespace MusEWidget {
+
//---------------------------------------------------------
// ComboQuant
//---------------------------------------------------------
@@ -35,5 +52,7 @@ class ComboQuant : public QComboBox {
void setValue(int val);
};
+}
+
#endif
diff --git a/muse2/muse/widgets/combobox.cpp b/muse2/muse/widgets/combobox.cpp
index bd78d6f2..d32685d0 100644
--- a/muse2/muse/widgets/combobox.cpp
+++ b/muse2/muse/widgets/combobox.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: combobox.cpp,v 1.4 2004/05/06 15:08:07 wschweer Exp $
// (C) Copyright 2004 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QMenu>
@@ -11,6 +26,8 @@
#include "combobox.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// ComboBox
//---------------------------------------------------------
@@ -88,3 +105,4 @@ void ComboBox::addAction(const QString& s, int id)
itemlist << id;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/combobox.h b/muse2/muse/widgets/combobox.h
index c099b3ce..8de82989 100644
--- a/muse2/muse/widgets/combobox.h
+++ b/muse2/muse/widgets/combobox.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: combobox.h,v 1.3 2004/02/29 12:12:36 wschweer Exp $
// (C) Copyright 2004 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __COMBOBOX_H__
@@ -13,6 +28,8 @@
class QMenu;
class QSignalMapper;
+namespace MusEWidget {
+
//---------------------------------------------------------
// ComboBox
//---------------------------------------------------------
@@ -42,6 +59,8 @@ class ComboBox : public QToolButton {
void addAction(const QString& s, int id = -1);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/comment.cpp b/muse2/muse/widgets/comment.cpp
index 36298330..99fd8487 100644
--- a/muse2/muse/widgets/comment.cpp
+++ b/muse2/muse/widgets/comment.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: comment.cpp,v 1.2 2004/02/08 18:30:00 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "comment.h"
@@ -11,6 +26,8 @@
#include <QWidget>
+namespace MusEWidget {
+
//---------------------------------------------------------
// Comment
//---------------------------------------------------------
@@ -87,3 +104,4 @@ void TrackComment::setText(const QString& s)
song->update(SC_TRACK_MODIFIED);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/comment.h b/muse2/muse/widgets/comment.h
index 0dbd953b..4fc0bd33 100644
--- a/muse2/muse/widgets/comment.h
+++ b/muse2/muse/widgets/comment.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: comment.h,v 1.2 2004/02/08 18:30:00 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __COMMENT_H__
@@ -14,6 +29,8 @@ class Xml;
class Track;
class QWidget;
+namespace MusEWidget {
+
//---------------------------------------------------------
// Comment
//---------------------------------------------------------
@@ -51,5 +68,7 @@ class TrackComment : public Comment {
TrackComment(Track*, QWidget*);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/ctrlcombo.cpp b/muse2/muse/widgets/ctrlcombo.cpp
index 911357ee..61a7e50f 100644
--- a/muse2/muse/widgets/ctrlcombo.cpp
+++ b/muse2/muse/widgets/ctrlcombo.cpp
@@ -4,10 +4,27 @@
// $Id: ctrlcombo.cpp,v 1.1.1.1 2003/10/27 18:55:02 wschweer Exp $
//
// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "ctrlcombo.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// CtrlComboBox
//---------------------------------------------------------
@@ -54,3 +71,4 @@ CtrlComboBox::CtrlComboBox(QWidget* parent)
insertItem(i, QString(ctxt[i]));
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/ctrlcombo.h b/muse2/muse/widgets/ctrlcombo.h
index 2feff096..dca3d91e 100644
--- a/muse2/muse/widgets/ctrlcombo.h
+++ b/muse2/muse/widgets/ctrlcombo.h
@@ -4,6 +4,21 @@
// $Id: ctrlcombo.h,v 1.1.1.1 2003/10/27 18:54:30 wschweer Exp $
//
// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __CTRLGRP_H__
@@ -11,12 +26,15 @@
#include <QComboBox>
+namespace MusEWidget {
+
class CtrlComboBox : public QComboBox {
Q_OBJECT
public:
CtrlComboBox(QWidget* parent);
};
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/dentry.cpp b/muse2/muse/widgets/dentry.cpp
index c7aa3c1b..000dec50 100644
--- a/muse2/muse/widgets/dentry.cpp
+++ b/muse2/muse/widgets/dentry.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: dentry.cpp,v 1.1.1.1.2.3 2008/08/18 00:15:26 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -20,6 +35,8 @@
#define TIMEC2 20
#define TIMER4 50
+namespace MusEWidget {
+
//---------------------------------------------------------
// Dentry
// lineedit double values
@@ -240,3 +257,4 @@ void Dentry::setValue(double v)
val = v;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/dentry.h b/muse2/muse/widgets/dentry.h
index 21c9ff38..1e429187 100644
--- a/muse2/muse/widgets/dentry.h
+++ b/muse2/muse/widgets/dentry.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: dentry.h,v 1.1.1.1.2.3 2008/08/18 00:15:26 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __DENTRY_H__
@@ -12,6 +27,8 @@
#include "sliderbase.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// Dentry
//---------------------------------------------------------
@@ -70,4 +87,7 @@ class Dentry : public QLineEdit {
SliderBase* slider() const { return _slider; }
void setSlider(SliderBase* s) { _slider = s; }
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/didyouknow.h b/muse2/muse/widgets/didyouknow.h
index 7dbc03c5..212e9254 100644
--- a/muse2/muse/widgets/didyouknow.h
+++ b/muse2/muse/widgets/didyouknow.h
@@ -3,10 +3,11 @@
// Linux Music Editor
// $Id: didyouknow.h,v 1.0.0.0 2010/11/21 01:01:01 ogetbilo Exp $
//
-// Copyright (C) 1999-2010 by Werner Schweer and others
+// Copyright (C) 1999-2011 by Werner Schweer and others
//
// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2.
+// it under the terms of the GNU General Public License version 2 of
+// the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,13 +16,14 @@
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//=============================================================================
#include "ui_didyouknow.h"
class QDialog;
+namespace MusEWidget {
//---------------------------------------------------------
// DidYouKnowWidget
@@ -35,3 +37,5 @@ class DidYouKnowWidget : public QDialog, public Ui::DidYouKnow
public:
DidYouKnowWidget(QDialog *parent = 0) : QDialog(parent) { setupUi(this); }
};
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/dimap.cpp b/muse2/muse/widgets/dimap.cpp
index 1f87358c..7fff9115 100644
--- a/muse2/muse/widgets/dimap.cpp
+++ b/muse2/muse/widgets/dimap.cpp
@@ -4,17 +4,30 @@
// $Id: dimap.cpp,v 1.1.1.1 2003/10/27 18:55:11 wschweer Exp $
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
#include "dimap.h"
#include "mmath.h"
+namespace MusEWidget {
+
const double DiMap::LogMin = 1.0e-150;
const double DiMap::LogMax = 1.0e150;
@@ -100,7 +113,7 @@ DiMap::~DiMap()
bool DiMap::contains(double x) const
{
- return ( (x >= qwtMin(d_x1, d_x1)) && (x <= qwtMax(d_x1, d_x2)));
+ return ( (x >= MusEUtil::qwtMin(d_x1, d_x1)) && (x <= MusEUtil::qwtMax(d_x1, d_x2)));
}
//------------------------------------------------------------
@@ -117,7 +130,7 @@ bool DiMap::contains(double x) const
bool DiMap::contains(int x) const
{
- return ( (x >= qwtMin(d_y1, d_y1)) && (x <= qwtMax(d_y1, d_y2)));
+ return ( (x >= MusEUtil::qwtMin(d_y1, d_y1)) && (x <= MusEUtil::qwtMax(d_y1, d_y2)));
}
//------------------------------------------------------------
@@ -256,10 +269,10 @@ double DiMap::invTransform(int y) const
int DiMap::limTransform(double x) const
{
- if ( x > qwtMax(d_x1, d_x2) )
- x = qwtMax(d_x1, d_x2);
- else if ( x < qwtMin(d_x1, d_x2))
- x = qwtMin(d_x1, d_x2);
+ if ( x > MusEUtil::qwtMax(d_x1, d_x2) )
+ x = MusEUtil::qwtMax(d_x1, d_x2);
+ else if ( x < MusEUtil::qwtMin(d_x1, d_x2))
+ x = MusEUtil::qwtMin(d_x1, d_x2);
return transform(x);
}
@@ -306,3 +319,5 @@ void DiMap::newFactor()
else
d_cnv = 0.0;
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/dimap.h b/muse2/muse/widgets/dimap.h
index cf51dee2..fc522b4e 100644
--- a/muse2/muse/widgets/dimap.h
+++ b/muse2/muse/widgets/dimap.h
@@ -4,11 +4,22 @@
// $Id: dimap.h,v 1.1.1.1 2003/10/27 18:54:28 wschweer Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __DIMAP_H__
@@ -16,6 +27,8 @@
#include <QtGlobal>
+namespace MusEWidget {
+
class DiMap
{
double d_x1, d_x2; // double interval boundaries
@@ -52,4 +65,6 @@ class DiMap
bool logarithmic() const { return d_log;}
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/doublelabel.cpp b/muse2/muse/widgets/doublelabel.cpp
index fe2bfc6a..00d9e2fa 100644
--- a/muse2/muse/widgets/doublelabel.cpp
+++ b/muse2/muse/widgets/doublelabel.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: doublelabel.cpp,v 1.1.1.1.2.2 2008/08/18 00:15:26 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
#include "doublelabel.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// DoubleLabel
//---------------------------------------------------------
@@ -191,3 +208,5 @@ QSize DoubleLabel::minimumSizeHint() const
{
return sizeHint();
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/doublelabel.h b/muse2/muse/widgets/doublelabel.h
index b5e40597..d02546e6 100644
--- a/muse2/muse/widgets/doublelabel.h
+++ b/muse2/muse/widgets/doublelabel.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: doublelabel.h,v 1.2.2.3 2008/08/18 00:15:26 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __DOUBLELABEL_H__
@@ -10,6 +25,8 @@
#include "dentry.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// DoubleLabel
//---------------------------------------------------------
@@ -58,4 +75,6 @@ class DoubleLabel : public Dentry {
void setSuffix(const QString& s) { _suffix = s; }
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/drange.cpp b/muse2/muse/widgets/drange.cpp
index e144dfea..18868b2c 100644
--- a/muse2/muse/widgets/drange.cpp
+++ b/muse2/muse/widgets/drange.cpp
@@ -4,11 +4,22 @@
// $Id: drange.cpp,v 1.2.2.1 2009/03/09 02:05:18 terminator356 Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
@@ -18,6 +29,8 @@
#include "mmath.h"
#include "drange.h"
+namespace MusEWidget {
+
const double DoubleRange::MinRelStep = 1.0e-10;
const double DoubleRange::DefaultRelStep = 1.0e-2;
const double DoubleRange::MinEps = 1.0e-10;
@@ -60,8 +73,8 @@ void DoubleRange::setNewValue(double x, bool align)
{
d_prevValue = d_value;
- double vmin = qwtMin(d_minValue, d_maxValue);
- double vmax = qwtMax(d_minValue, d_maxValue);
+ double vmin = MusEUtil::qwtMin(d_minValue, d_maxValue);
+ double vmax = MusEUtil::qwtMax(d_minValue, d_maxValue);
// Range check
@@ -93,11 +106,11 @@ void DoubleRange::setNewValue(double x, bool align)
d_value = d_minValue;
// correct rounding error at the border
- if (fabs(d_value - d_maxValue) < MinEps * qwtAbs(d_step))
+ if (fabs(d_value - d_maxValue) < MinEps * MusEUtil::qwtAbs(d_step))
d_value = d_maxValue;
// correct rounding error if value = 0
- if (fabs(d_value) < MinEps * qwtAbs(d_step))
+ if (fabs(d_value) < MinEps * MusEUtil::qwtAbs(d_step))
d_value = 0.0;
}
if (d_prevValue != d_value)
@@ -166,7 +179,7 @@ void DoubleRange::setRange(double vmin, double vmax, double vstep, int pageSize)
//
// limit page size
//
- d_pageSize = qwtLim(pageSize,0, int(qwtAbs((d_maxValue - d_minValue) / d_step)));
+ d_pageSize = MusEUtil::qwtLim(pageSize,0, int(MusEUtil::qwtAbs((d_maxValue - d_minValue) / d_step)));
//
// If the value lies out of the range, it
@@ -260,6 +273,7 @@ void DoubleRange::incPages(int nPages)
double DoubleRange::step() const
{
- return qwtAbs(d_step);
+ return MusEUtil::qwtAbs(d_step);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/drange.h b/muse2/muse/widgets/drange.h
index d0931e86..938b70c6 100644
--- a/muse2/muse/widgets/drange.h
+++ b/muse2/muse/widgets/drange.h
@@ -4,16 +4,29 @@
// $Id: drange.h,v 1.1.1.1.2.1 2007/01/27 14:52:43 spamatica Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __DOUBLE_RANGE_H__
#define __DOUBLE_RANGE_H__
+namespace MusEWidget {
+
//---------------------------------------------------------
// DoubleRange
//---------------------------------------------------------
@@ -66,4 +79,6 @@ class DoubleRange
double step() const;
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/editnotedialogbase.ui b/muse2/muse/widgets/editnotedialogbase.ui
index b19efc49..165bdf02 100644
--- a/muse2/muse/widgets/editnotedialogbase.ui
+++ b/muse2/muse/widgets/editnotedialogbase.ui
@@ -156,7 +156,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="PitchEdit" name="pl" native="true"/>
+ <widget class="MusEWidget::PitchEdit" name="pl" native="true"/>
</item>
</layout>
</widget>
@@ -169,7 +169,7 @@
<container>0</container>
</customwidget>
<customwidget>
- <class>PitchEdit</class>
+ <class>MusEWidget::PitchEdit</class>
<extends>QWidget</extends>
<header>pitchedit.h</header>
</customwidget>
diff --git a/muse2/muse/widgets/filedialog.cpp b/muse2/muse/widgets/filedialog.cpp
index fc19a058..0df0fa7f 100644
--- a/muse2/muse/widgets/filedialog.cpp
+++ b/muse2/muse/widgets/filedialog.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: filedialog.cpp,v 1.3.2.3 2005/06/19 06:32:07 lunar_shuttle Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <errno.h>
@@ -19,6 +34,8 @@
#include "../globals.h"
#include "gconfig.h"
+namespace MusEWidget {
+
MFileDialog::ViewType MFileDialog::lastViewUsed = GLOBAL_VIEW;
//QString MFileDialog::lastUserDir = "";
//QString MFileDialog::lastGlobalDir = "";
@@ -87,7 +104,7 @@ void MFileDialog::globalToggled(bool flag)
buttons.userButton->setChecked(!flag);
buttons.projectButton->setChecked(!flag);
if (lastGlobalDir.isEmpty())
- lastGlobalDir = museGlobalShare + QString("/") + baseDir; // Initialize if first time
+ lastGlobalDir = MusEGlobal::museGlobalShare + QString("/") + baseDir; // Initialize if first time
QString dir = lastGlobalDir;
setDirectory(dir);
lastViewUsed = GLOBAL_VIEW;
@@ -106,11 +123,11 @@ void MFileDialog::userToggled(bool flag)
if (lastUserDir.isEmpty()) {
- lastUserDir = museUser + QString("/") + baseDir; // Initialize if first time
+ lastUserDir = MusEGlobal::museUser + QString("/") + baseDir; // Initialize if first time
}
if (testDirCreate(this, lastUserDir))
- setDirectory(museUser);
+ setDirectory(MusEGlobal::museUser);
else
setDirectory(lastUserDir);
@@ -129,17 +146,17 @@ void MFileDialog::projectToggled(bool flag)
buttons.userButton->setChecked(!flag);
QString s;
- if (museProject == museProjectInitPath ) {
+ if (MusEGlobal::museProject == MusEGlobal::museProjectInitPath ) {
// if project path is uninitialized, meaning it is still set to museProjectInitPath.
// then project path is set to current pwd instead.
//s = QString(getcwd(0,0)) + QString("/");
- s = config.projectBaseFolder;
+ s = MusEConfig::config.projectBaseFolder;
}
else
- s = museProject + QString("/"); // + baseDir;
+ s = MusEGlobal::museProject + QString("/"); // + baseDir;
if (testDirCreate(this, s))
- setDirectory(museProject);
+ setDirectory(MusEGlobal::museProject);
else
setDirectory(s);
lastViewUsed = PROJECT_VIEW;
@@ -548,3 +565,4 @@ FILE* MFile::open(const char* mode, const QStringList& pattern,
return f;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/filedialog.h b/muse2/muse/widgets/filedialog.h
index 6aaf091c..74297210 100644
--- a/muse2/muse/widgets/filedialog.h
+++ b/muse2/muse/widgets/filedialog.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: filedialog.h,v 1.2.2.2 2008/01/19 13:33:46 wschweer Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QFileDialog>
@@ -11,6 +26,8 @@
class QStringList;
+namespace MusEWidget {
+
//---------------------------------------------------------
// FileDialogButtonsWidget
// Wrapper around Ui::FileDialogButtons
@@ -108,3 +125,4 @@ class MFile {
bool warnIfOverwrite, const QString& caption);
};
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/function_dialogs/CMakeLists.txt b/muse2/muse/widgets/function_dialogs/CMakeLists.txt
index db1f3229..5b9fc328 100644
--- a/muse2/muse/widgets/function_dialogs/CMakeLists.txt
+++ b/muse2/muse/widgets/function_dialogs/CMakeLists.txt
@@ -3,10 +3,12 @@
# Linux Music Editor
# $Id:$
#
-# Copyright (C) 2002-2006 by Werner Schweer and others
+# Copyright (C) 1999-2011 by Werner Schweer and others
#
# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2.
+# it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +16,9 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#=============================================================================
##
diff --git a/muse2/muse/widgets/function_dialogs/crescendo.cpp b/muse2/muse/widgets/function_dialogs/crescendo.cpp
index ef31c5ef..f8245b24 100644
--- a/muse2/muse/widgets/function_dialogs/crescendo.cpp
+++ b/muse2/muse/widgets/function_dialogs/crescendo.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: crescendo.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "crescendo.h"
#include "xml.h"
+namespace MusEDialog {
+
Crescendo::Crescendo(QWidget* parent)
: QDialog(parent)
{
@@ -110,3 +127,5 @@ void Crescendo::absolute_changed(bool val)
end_spinbox->setSuffix(" %");
}
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/crescendo.h b/muse2/muse/widgets/function_dialogs/crescendo.h
index 73a7e088..c0871ab8 100644
--- a/muse2/muse/widgets/function_dialogs/crescendo.h
+++ b/muse2/muse/widgets/function_dialogs/crescendo.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: crescendo.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __CRESCENDO_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class Crescendo : public QDialog, public Ui::CrescendoBase
{
Q_OBJECT
@@ -43,5 +60,7 @@ class Crescendo : public QDialog, public Ui::CrescendoBase
void absolute_changed(bool);
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/deloverlaps.cpp b/muse2/muse/widgets/function_dialogs/deloverlaps.cpp
index 76103d74..0841b6e9 100644
--- a/muse2/muse/widgets/function_dialogs/deloverlaps.cpp
+++ b/muse2/muse/widgets/function_dialogs/deloverlaps.cpp
@@ -3,12 +3,28 @@
// Linux Music Editor
// $Id: deloverlaps.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "deloverlaps.h"
#include "xml.h"
+namespace MusEDialog {
DelOverlaps::DelOverlaps(QWidget* parent)
: QDialog(parent)
@@ -77,3 +93,5 @@ void DelOverlaps::write_configuration(int level, Xml& xml)
xml.intTag(level, "range", range);
xml.tag(level, "/del_overlaps");
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/deloverlaps.h b/muse2/muse/widgets/function_dialogs/deloverlaps.h
index d151d5a5..2fc470cd 100644
--- a/muse2/muse/widgets/function_dialogs/deloverlaps.h
+++ b/muse2/muse/widgets/function_dialogs/deloverlaps.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: deloverlaps.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __DELOVERLAPS_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class DelOverlaps : public QDialog, public Ui::DelOverlapsBase
{
Q_OBJECT
@@ -36,5 +53,7 @@ class DelOverlaps : public QDialog, public Ui::DelOverlapsBase
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/gatetime.cpp b/muse2/muse/widgets/function_dialogs/gatetime.cpp
index 9448ab1c..537260ca 100644
--- a/muse2/muse/widgets/function_dialogs/gatetime.cpp
+++ b/muse2/muse/widgets/function_dialogs/gatetime.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: gatetime.cpp,v 1.1.1.1 2003/10/27 18:54:37 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
@@ -13,6 +28,8 @@
#include "xml.h"
#include "song.h"
+namespace MusEDialog {
+
//---------------------------------------------------------
// GateTime
//---------------------------------------------------------
@@ -106,3 +123,5 @@ void GateTime::write_configuration(int level, Xml& xml)
xml.intTag(level, "rate", rateVal);
xml.tag(level, "/mod_len");
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/gatetime.h b/muse2/muse/widgets/function_dialogs/gatetime.h
index baa5a97b..20d28948 100644
--- a/muse2/muse/widgets/function_dialogs/gatetime.h
+++ b/muse2/muse/widgets/function_dialogs/gatetime.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: gatetime.h,v 1.1.1.1.2.1 2008/01/19 13:33:47 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __GATETIME_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
//---------------------------------------------------------
// GateTime
//---------------------------------------------------------
@@ -42,5 +59,7 @@ class GateTime : public QDialog, public Ui::GateTimeBase {
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/legato.cpp b/muse2/muse/widgets/function_dialogs/legato.cpp
index 0a181106..5ca6e29b 100644
--- a/muse2/muse/widgets/function_dialogs/legato.cpp
+++ b/muse2/muse/widgets/function_dialogs/legato.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: legato.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "legato.h"
#include "xml.h"
+namespace MusEDialog {
+
Legato::Legato(QWidget* parent)
: QDialog(parent)
{
@@ -86,3 +103,5 @@ void Legato::write_configuration(int level, Xml& xml)
xml.intTag(level, "allow_shortening", allow_shortening);
xml.tag(level, "/legato");
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/legato.h b/muse2/muse/widgets/function_dialogs/legato.h
index 00831830..c2cbeabc 100644
--- a/muse2/muse/widgets/function_dialogs/legato.h
+++ b/muse2/muse/widgets/function_dialogs/legato.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: legato.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __LEGATO_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class Legato : public QDialog, public Ui::LegatoBase
{
Q_OBJECT
@@ -39,5 +56,7 @@ class Legato : public QDialog, public Ui::LegatoBase
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/move.cpp b/muse2/muse/widgets/function_dialogs/move.cpp
index 2ce6cb05..2529cb68 100644
--- a/muse2/muse/widgets/function_dialogs/move.cpp
+++ b/muse2/muse/widgets/function_dialogs/move.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: move.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "move.h"
#include "xml.h"
+namespace MusEDialog {
+
Move::Move(QWidget* parent)
: QDialog(parent)
{
@@ -82,3 +99,5 @@ void Move::write_configuration(int level, Xml& xml)
xml.intTag(level, "amount", amount);
xml.tag(level, "/move");
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/move.h b/muse2/muse/widgets/function_dialogs/move.h
index 5049c567..39718134 100644
--- a/muse2/muse/widgets/function_dialogs/move.h
+++ b/muse2/muse/widgets/function_dialogs/move.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: move.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MOVE_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class Move : public QDialog, public Ui::MoveBase
{
Q_OBJECT
@@ -38,5 +55,7 @@ class Move : public QDialog, public Ui::MoveBase
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/quantize.cpp b/muse2/muse/widgets/function_dialogs/quantize.cpp
index 111087c2..0841e106 100644
--- a/muse2/muse/widgets/function_dialogs/quantize.cpp
+++ b/muse2/muse/widgets/function_dialogs/quantize.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: quantize.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "quantize.h"
#include "xml.h"
+namespace MusEDialog {
+
Quantize::Quantize(QWidget* parent)
: QDialog(parent)
{
@@ -101,3 +118,6 @@ void Quantize::write_configuration(int level, Xml& xml)
xml.intTag(level, "quant_len", quant_len);
xml.tag(level, "/quantize");
}
+
+} // namespace MusEDialog
+
diff --git a/muse2/muse/widgets/function_dialogs/quantize.h b/muse2/muse/widgets/function_dialogs/quantize.h
index a857e667..69498810 100644
--- a/muse2/muse/widgets/function_dialogs/quantize.h
+++ b/muse2/muse/widgets/function_dialogs/quantize.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: quantize.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __QUANTIZE_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class Quantize : public QDialog, public Ui::QuantBase
{
Q_OBJECT
@@ -42,5 +59,7 @@ class Quantize : public QDialog, public Ui::QuantBase
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/remove.cpp b/muse2/muse/widgets/function_dialogs/remove.cpp
index 4a875135..69558fc3 100644
--- a/muse2/muse/widgets/function_dialogs/remove.cpp
+++ b/muse2/muse/widgets/function_dialogs/remove.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: remove.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "remove.h"
#include "xml.h"
+namespace MusEDialog {
+
Remove::Remove(QWidget* parent)
: QDialog(parent)
{
@@ -96,3 +113,6 @@ void Remove::write_configuration(int level, Xml& xml)
xml.intTag(level, "len_thres_used", len_thres_used);
xml.tag(level, "/erase");
}
+
+} // namespace MusEDialog
+
diff --git a/muse2/muse/widgets/function_dialogs/remove.h b/muse2/muse/widgets/function_dialogs/remove.h
index 33ac3fd0..aba05909 100644
--- a/muse2/muse/widgets/function_dialogs/remove.h
+++ b/muse2/muse/widgets/function_dialogs/remove.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: remove.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __REMOVE_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class Remove : public QDialog, public Ui::RemoveBase
{
Q_OBJECT
@@ -41,5 +58,7 @@ class Remove : public QDialog, public Ui::RemoveBase
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/setlen.cpp b/muse2/muse/widgets/function_dialogs/setlen.cpp
index 024cdd35..81a589ae 100644
--- a/muse2/muse/widgets/function_dialogs/setlen.cpp
+++ b/muse2/muse/widgets/function_dialogs/setlen.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: setlen.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "setlen.h"
#include "xml.h"
+namespace MusEDialog {
+
Setlen::Setlen(QWidget* parent)
: QDialog(parent)
{
@@ -81,3 +98,5 @@ void Setlen::write_configuration(int level, Xml& xml)
xml.intTag(level, "len", len);
xml.tag(level, "/setlen");
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/setlen.h b/muse2/muse/widgets/function_dialogs/setlen.h
index 6a052bdb..fea6a5dd 100644
--- a/muse2/muse/widgets/function_dialogs/setlen.h
+++ b/muse2/muse/widgets/function_dialogs/setlen.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: setlen.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SETLEN_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class Setlen : public QDialog, public Ui::SetlenBase
{
Q_OBJECT
@@ -38,5 +55,7 @@ class Setlen : public QDialog, public Ui::SetlenBase
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/transpose.cpp b/muse2/muse/widgets/function_dialogs/transpose.cpp
index b10c1249..dd642050 100644
--- a/muse2/muse/widgets/function_dialogs/transpose.cpp
+++ b/muse2/muse/widgets/function_dialogs/transpose.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: transpose.cpp,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "transpose.h"
#include "xml.h"
+namespace MusEDialog {
+
Transpose::Transpose(QWidget* parent)
: QDialog(parent)
{
@@ -81,3 +98,5 @@ void Transpose::write_configuration(int level, Xml& xml)
xml.intTag(level, "amount", amount);
xml.tag(level, "/transpose");
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/transpose.h b/muse2/muse/widgets/function_dialogs/transpose.h
index b85bb827..b6363ae5 100644
--- a/muse2/muse/widgets/function_dialogs/transpose.h
+++ b/muse2/muse/widgets/function_dialogs/transpose.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: transpose.h,v 1.1.1.1 2011/05/05 18:51:04 flo93 Exp $
// (C) Copyright 2011 Florian Jung (flo93@sourceforge.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __TRANSPOSE_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
class Transpose : public QDialog, public Ui::TransposeBase
{
Q_OBJECT
@@ -36,5 +53,7 @@ class Transpose : public QDialog, public Ui::TransposeBase
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/function_dialogs/velocity.cpp b/muse2/muse/widgets/function_dialogs/velocity.cpp
index ec625489..81655b5f 100644
--- a/muse2/muse/widgets/function_dialogs/velocity.cpp
+++ b/muse2/muse/widgets/function_dialogs/velocity.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: velocity.cpp,v 1.1.1.1 2003/10/27 18:55:04 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QButtonGroup>
#include "velocity.h"
#include "xml.h"
+namespace MusEDialog {
+
//---------------------------------------------------------
// Velocity
//---------------------------------------------------------
@@ -100,3 +117,5 @@ void Velocity::write_configuration(int level, Xml& xml)
xml.intTag(level, "rate", rateVal);
xml.tag(level, "/mod_velo");
}
+
+} // namespace MusEDialog
diff --git a/muse2/muse/widgets/function_dialogs/velocity.h b/muse2/muse/widgets/function_dialogs/velocity.h
index 83aac54d..9ef6cd2a 100644
--- a/muse2/muse/widgets/function_dialogs/velocity.h
+++ b/muse2/muse/widgets/function_dialogs/velocity.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: velocity.h,v 1.1.1.1 2003/10/27 18:54:51 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __VELOCITY_H__
@@ -13,6 +28,8 @@
class QButtonGroup;
class Xml;
+namespace MusEDialog {
+
//---------------------------------------------------------
// Velocity
//---------------------------------------------------------
@@ -42,5 +59,7 @@ class Velocity : public QDialog, public Ui::VelocityBase {
int exec();
};
+} // namespace MusEDialog
+
#endif
diff --git a/muse2/muse/widgets/genset.cpp b/muse2/muse/widgets/genset.cpp
index 9510f580..c6761a07 100644
--- a/muse2/muse/widgets/genset.cpp
+++ b/muse2/muse/widgets/genset.cpp
@@ -4,6 +4,21 @@
// $Id: genset.cpp,v 1.7.2.8 2009/12/01 03:52:40 terminator356 Exp $
//
// (C) Copyright 2001-2004 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -19,6 +34,8 @@
#include "globals.h"
#include "icons.h"
+namespace MusEWidget {
+
static int rtcResolutions[] = {
1024, 2048, 4096, 8192, 16384, 32768
};
@@ -45,51 +62,51 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent)
startSongGroup->addButton(startEmptyButton, 1);
startSongGroup->addButton(startSongButton, 2);
for (unsigned i = 0; i < sizeof(rtcResolutions)/sizeof(*rtcResolutions); ++i) {
- if (rtcResolutions[i] == config.rtcTicks) {
+ if (rtcResolutions[i] == MusEConfig::config.rtcTicks) {
rtcResolutionSelect->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) {
- if (divisions[i] == config.division) {
+ if (divisions[i] == MusEConfig::config.division) {
midiDivisionSelect->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) {
- if (divisions[i] == config.guiDivision) {
+ if (divisions[i] == MusEConfig::config.guiDivision) {
guiDivisionSelect->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(dummyAudioBufSizes)/sizeof(*dummyAudioBufSizes); ++i) {
- if (dummyAudioBufSizes[i] == config.dummyAudioBufSize) {
+ if (dummyAudioBufSizes[i] == MusEConfig::config.dummyAudioBufSize) {
dummyAudioSize->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(minControlProcessPeriods)/sizeof(*minControlProcessPeriods); ++i) {
- if (minControlProcessPeriods[i] == config.minControlProcessPeriod) {
+ if (minControlProcessPeriods[i] == MusEConfig::config.minControlProcessPeriod) {
minControlProcessPeriodComboBox->setCurrentIndex(i);
break;
}
}
- userInstrumentsPath->setText(config.userInstrumentsDir);
+ userInstrumentsPath->setText(MusEConfig::config.userInstrumentsDir);
selectInstrumentsDirButton->setIcon(*openIcon);
defaultInstrumentsDirButton->setIcon(*undoIcon);
connect(selectInstrumentsDirButton, SIGNAL(clicked()), SLOT(selectInstrumentsPath()));
connect(defaultInstrumentsDirButton, SIGNAL(clicked()), SLOT(defaultInstrumentsPath()));
- guiRefreshSelect->setValue(config.guiRefresh);
- minSliderSelect->setValue(int(config.minSlider));
- minMeterSelect->setValue(config.minMeter);
- freewheelCheckBox->setChecked(config.freewheelMode);
- denormalCheckBox->setChecked(config.useDenormalBias);
- outputLimiterCheckBox->setChecked(config.useOutputLimiter);
- vstInPlaceCheckBox->setChecked(config.vstInPlace);
- dummyAudioRate->setValue(config.dummyAudioSampleRate);
+ guiRefreshSelect->setValue(MusEConfig::config.guiRefresh);
+ minSliderSelect->setValue(int(MusEConfig::config.minSlider));
+ minMeterSelect->setValue(MusEConfig::config.minMeter);
+ freewheelCheckBox->setChecked(MusEConfig::config.freewheelMode);
+ denormalCheckBox->setChecked(MusEConfig::config.useDenormalBias);
+ outputLimiterCheckBox->setChecked(MusEConfig::config.useOutputLimiter);
+ vstInPlaceCheckBox->setChecked(MusEConfig::config.vstInPlace);
+ dummyAudioRate->setValue(MusEConfig::config.dummyAudioSampleRate);
//DummyAudioDevice* dad = dynamic_cast<DummyAudioDevice*>(audioDevice);
//dummyAudioRealRate->setText(dad ? QString().setNum(sampleRate) : "---");
@@ -103,55 +120,55 @@ Period affects midi playback resolution.
Shorter periods are desirable.</string>
</property> */
- startSongEntry->setText(config.startSong);
- startSongGroup->button(config.startMode)->setChecked(true);
-
- showTransport->setChecked(config.transportVisible);
- showBigtime->setChecked(config.bigTimeVisible);
- //showMixer->setChecked(config.mixerVisible);
- showMixer->setChecked(config.mixer1Visible);
- showMixer2->setChecked(config.mixer2Visible);
-
- mainX->setValue(config.geometryMain.x());
- mainY->setValue(config.geometryMain.y());
- mainW->setValue(config.geometryMain.width());
- mainH->setValue(config.geometryMain.height());
-
- transportX->setValue(config.geometryTransport.x());
- transportY->setValue(config.geometryTransport.y());
-
- bigtimeX->setValue(config.geometryBigTime.x());
- bigtimeY->setValue(config.geometryBigTime.y());
- bigtimeW->setValue(config.geometryBigTime.width());
- bigtimeH->setValue(config.geometryBigTime.height());
-
- //mixerX->setValue(config.geometryMixer.x());
- //mixerY->setValue(config.geometryMixer.y());
- //mixerW->setValue(config.geometryMixer.width());
- //mixerH->setValue(config.geometryMixer.height());
- mixerX->setValue(config.mixer1.geometry.x());
- mixerY->setValue(config.mixer1.geometry.y());
- mixerW->setValue(config.mixer1.geometry.width());
- mixerH->setValue(config.mixer1.geometry.height());
- mixer2X->setValue(config.mixer2.geometry.x());
- mixer2Y->setValue(config.mixer2.geometry.y());
- mixer2W->setValue(config.mixer2.geometry.width());
- mixer2H->setValue(config.mixer2.geometry.height());
-
- //setMixerCurrent->setEnabled(muse->mixerWindow());
- setMixerCurrent->setEnabled(muse->mixer1Window());
- setMixer2Current->setEnabled(muse->mixer2Window());
+ startSongEntry->setText(MusEConfig::config.startSong);
+ startSongGroup->button(MusEConfig::config.startMode)->setChecked(true);
+
+ showTransport->setChecked(MusEConfig::config.transportVisible);
+ showBigtime->setChecked(MusEConfig::config.bigTimeVisible);
+ //showMixer->setChecked(MusEConfig::config.mixerVisible);
+ showMixer->setChecked(MusEConfig::config.mixer1Visible);
+ showMixer2->setChecked(MusEConfig::config.mixer2Visible);
+
+ mainX->setValue(MusEConfig::config.geometryMain.x());
+ mainY->setValue(MusEConfig::config.geometryMain.y());
+ mainW->setValue(MusEConfig::config.geometryMain.width());
+ mainH->setValue(MusEConfig::config.geometryMain.height());
+
+ transportX->setValue(MusEConfig::config.geometryTransport.x());
+ transportY->setValue(MusEConfig::config.geometryTransport.y());
+
+ bigtimeX->setValue(MusEConfig::config.geometryBigTime.x());
+ bigtimeY->setValue(MusEConfig::config.geometryBigTime.y());
+ bigtimeW->setValue(MusEConfig::config.geometryBigTime.width());
+ bigtimeH->setValue(MusEConfig::config.geometryBigTime.height());
+
+ //mixerX->setValue(MusEConfig::config.geometryMixer.x());
+ //mixerY->setValue(MusEConfig::config.geometryMixer.y());
+ //mixerW->setValue(MusEConfig::config.geometryMixer.width());
+ //mixerH->setValue(MusEConfig::config.geometryMixer.height());
+ mixerX->setValue(MusEConfig::config.mixer1.geometry.x());
+ mixerY->setValue(MusEConfig::config.mixer1.geometry.y());
+ mixerW->setValue(MusEConfig::config.mixer1.geometry.width());
+ mixerH->setValue(MusEConfig::config.mixer1.geometry.height());
+ mixer2X->setValue(MusEConfig::config.mixer2.geometry.x());
+ mixer2Y->setValue(MusEConfig::config.mixer2.geometry.y());
+ mixer2W->setValue(MusEConfig::config.mixer2.geometry.width());
+ mixer2H->setValue(MusEConfig::config.mixer2.geometry.height());
+
+ //setMixerCurrent->setEnabled(MusEGlobal::muse->mixerWindow());
+ setMixerCurrent->setEnabled(MusEGlobal::muse->mixer1Window());
+ setMixer2Current->setEnabled(MusEGlobal::muse->mixer2Window());
- setBigtimeCurrent->setEnabled(muse->bigtimeWindow());
- setTransportCurrent->setEnabled(muse->transportWindow());
-
- showSplash->setChecked(config.showSplashScreen);
- showDidYouKnow->setChecked(config.showDidYouKnow);
- externalWavEditorSelect->setText(config.externalWavEditor);
- oldStyleStopCheckBox->setChecked(config.useOldStyleStopShortCut);
- moveArmedCheckBox->setChecked(config.moveArmedCheckBox);
- projectSaveCheckBox->setChecked(config.useProjectSaveDialog);
- popsDefStayOpenCheckBox->setChecked(config.popupsDefaultStayOpen);
+ setBigtimeCurrent->setEnabled(MusEGlobal::muse->bigtimeWindow());
+ setTransportCurrent->setEnabled(MusEGlobal::muse->transportWindow());
+
+ showSplash->setChecked(MusEConfig::config.showSplashScreen);
+ showDidYouKnow->setChecked(MusEConfig::config.showDidYouKnow);
+ externalWavEditorSelect->setText(MusEConfig::config.externalWavEditor);
+ oldStyleStopCheckBox->setChecked(MusEConfig::config.useOldStyleStopShortCut);
+ moveArmedCheckBox->setChecked(MusEConfig::config.moveArmedCheckBox);
+ projectSaveCheckBox->setChecked(MusEConfig::config.useProjectSaveDialog);
+ popsDefStayOpenCheckBox->setChecked(MusEConfig::config.popupsDefaultStayOpen);
//updateSettings(); // TESTING
@@ -195,99 +212,99 @@ void GlobalSettingsConfig::addMdiSettings(TopWin::ToplevelType t)
void GlobalSettingsConfig::updateSettings()
{
for (unsigned i = 0; i < sizeof(rtcResolutions)/sizeof(*rtcResolutions); ++i) {
- if (rtcResolutions[i] == config.rtcTicks) {
+ if (rtcResolutions[i] == MusEConfig::config.rtcTicks) {
rtcResolutionSelect->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) {
- if (divisions[i] == config.division) {
+ if (divisions[i] == MusEConfig::config.division) {
midiDivisionSelect->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(divisions)/sizeof(*divisions); ++i) {
- if (divisions[i] == config.guiDivision) {
+ if (divisions[i] == MusEConfig::config.guiDivision) {
guiDivisionSelect->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(dummyAudioBufSizes)/sizeof(*dummyAudioBufSizes); ++i) {
- if (dummyAudioBufSizes[i] == config.dummyAudioBufSize) {
+ if (dummyAudioBufSizes[i] == MusEConfig::config.dummyAudioBufSize) {
dummyAudioSize->setCurrentIndex(i);
break;
}
}
for (unsigned i = 0; i < sizeof(minControlProcessPeriods)/sizeof(*minControlProcessPeriods); ++i) {
- if (minControlProcessPeriods[i] == config.minControlProcessPeriod) {
+ if (minControlProcessPeriods[i] == MusEConfig::config.minControlProcessPeriod) {
minControlProcessPeriodComboBox->setCurrentIndex(i);
break;
}
}
- guiRefreshSelect->setValue(config.guiRefresh);
- minSliderSelect->setValue(int(config.minSlider));
- minMeterSelect->setValue(config.minMeter);
- freewheelCheckBox->setChecked(config.freewheelMode);
- denormalCheckBox->setChecked(config.useDenormalBias);
- outputLimiterCheckBox->setChecked(config.useOutputLimiter);
- vstInPlaceCheckBox->setChecked(config.vstInPlace);
- dummyAudioRate->setValue(config.dummyAudioSampleRate);
+ guiRefreshSelect->setValue(MusEConfig::config.guiRefresh);
+ minSliderSelect->setValue(int(MusEConfig::config.minSlider));
+ minMeterSelect->setValue(MusEConfig::config.minMeter);
+ freewheelCheckBox->setChecked(MusEConfig::config.freewheelMode);
+ denormalCheckBox->setChecked(MusEConfig::config.useDenormalBias);
+ outputLimiterCheckBox->setChecked(MusEConfig::config.useOutputLimiter);
+ vstInPlaceCheckBox->setChecked(MusEConfig::config.vstInPlace);
+ dummyAudioRate->setValue(MusEConfig::config.dummyAudioSampleRate);
//DummyAudioDevice* dad = dynamic_cast<DummyAudioDevice*>(audioDevice);
//dummyAudioRealRate->setText(dad ? QString().setNum(sampleRate) : "---");
//dummyAudioRealRate->setText(QString().setNum(sampleRate)); // Not used any more. p4.0.20
- startSongEntry->setText(config.startSong);
- startSongGroup->button(config.startMode)->setChecked(true);
-
- showTransport->setChecked(config.transportVisible);
- showBigtime->setChecked(config.bigTimeVisible);
- //showMixer->setChecked(config.mixerVisible);
- showMixer->setChecked(config.mixer1Visible);
- showMixer2->setChecked(config.mixer2Visible);
-
- mainX->setValue(config.geometryMain.x());
- mainY->setValue(config.geometryMain.y());
- mainW->setValue(config.geometryMain.width());
- mainH->setValue(config.geometryMain.height());
-
- transportX->setValue(config.geometryTransport.x());
- transportY->setValue(config.geometryTransport.y());
-
- bigtimeX->setValue(config.geometryBigTime.x());
- bigtimeY->setValue(config.geometryBigTime.y());
- bigtimeW->setValue(config.geometryBigTime.width());
- bigtimeH->setValue(config.geometryBigTime.height());
-
- //mixerX->setValue(config.geometryMixer.x());
- //mixerY->setValue(config.geometryMixer.y());
- //mixerW->setValue(config.geometryMixer.width());
- //mixerH->setValue(config.geometryMixer.height());
- mixerX->setValue(config.mixer1.geometry.x());
- mixerY->setValue(config.mixer1.geometry.y());
- mixerW->setValue(config.mixer1.geometry.width());
- mixerH->setValue(config.mixer1.geometry.height());
- mixer2X->setValue(config.mixer2.geometry.x());
- mixer2Y->setValue(config.mixer2.geometry.y());
- mixer2W->setValue(config.mixer2.geometry.width());
- mixer2H->setValue(config.mixer2.geometry.height());
-
- //setMixerCurrent->setEnabled(muse->mixerWindow());
- setMixerCurrent->setEnabled(muse->mixer1Window());
- setMixer2Current->setEnabled(muse->mixer2Window());
+ startSongEntry->setText(MusEConfig::config.startSong);
+ startSongGroup->button(MusEConfig::config.startMode)->setChecked(true);
+
+ showTransport->setChecked(MusEConfig::config.transportVisible);
+ showBigtime->setChecked(MusEConfig::config.bigTimeVisible);
+ //showMixer->setChecked(MusEConfig::config.mixerVisible);
+ showMixer->setChecked(MusEConfig::config.mixer1Visible);
+ showMixer2->setChecked(MusEConfig::config.mixer2Visible);
+
+ mainX->setValue(MusEConfig::config.geometryMain.x());
+ mainY->setValue(MusEConfig::config.geometryMain.y());
+ mainW->setValue(MusEConfig::config.geometryMain.width());
+ mainH->setValue(MusEConfig::config.geometryMain.height());
+
+ transportX->setValue(MusEConfig::config.geometryTransport.x());
+ transportY->setValue(MusEConfig::config.geometryTransport.y());
+
+ bigtimeX->setValue(MusEConfig::config.geometryBigTime.x());
+ bigtimeY->setValue(MusEConfig::config.geometryBigTime.y());
+ bigtimeW->setValue(MusEConfig::config.geometryBigTime.width());
+ bigtimeH->setValue(MusEConfig::config.geometryBigTime.height());
+
+ //mixerX->setValue(MusEConfig::config.geometryMixer.x());
+ //mixerY->setValue(MusEConfig::config.geometryMixer.y());
+ //mixerW->setValue(MusEConfig::config.geometryMixer.width());
+ //mixerH->setValue(MusEConfig::config.geometryMixer.height());
+ mixerX->setValue(MusEConfig::config.mixer1.geometry.x());
+ mixerY->setValue(MusEConfig::config.mixer1.geometry.y());
+ mixerW->setValue(MusEConfig::config.mixer1.geometry.width());
+ mixerH->setValue(MusEConfig::config.mixer1.geometry.height());
+ mixer2X->setValue(MusEConfig::config.mixer2.geometry.x());
+ mixer2Y->setValue(MusEConfig::config.mixer2.geometry.y());
+ mixer2W->setValue(MusEConfig::config.mixer2.geometry.width());
+ mixer2H->setValue(MusEConfig::config.mixer2.geometry.height());
+
+ //setMixerCurrent->setEnabled(MusEGlobal::muse->mixerWindow());
+ setMixerCurrent->setEnabled(MusEGlobal::muse->mixer1Window());
+ setMixer2Current->setEnabled(MusEGlobal::muse->mixer2Window());
- setBigtimeCurrent->setEnabled(muse->bigtimeWindow());
- setTransportCurrent->setEnabled(muse->transportWindow());
-
- showSplash->setChecked(config.showSplashScreen);
- showDidYouKnow->setChecked(config.showDidYouKnow);
- externalWavEditorSelect->setText(config.externalWavEditor);
- oldStyleStopCheckBox->setChecked(config.useOldStyleStopShortCut);
- moveArmedCheckBox->setChecked(config.moveArmedCheckBox);
- projectSaveCheckBox->setChecked(config.useProjectSaveDialog);
- popsDefStayOpenCheckBox->setChecked(config.popupsDefaultStayOpen);
+ setBigtimeCurrent->setEnabled(MusEGlobal::muse->bigtimeWindow());
+ setTransportCurrent->setEnabled(MusEGlobal::muse->transportWindow());
+
+ showSplash->setChecked(MusEConfig::config.showSplashScreen);
+ showDidYouKnow->setChecked(MusEConfig::config.showDidYouKnow);
+ externalWavEditorSelect->setText(MusEConfig::config.externalWavEditor);
+ oldStyleStopCheckBox->setChecked(MusEConfig::config.useOldStyleStopShortCut);
+ moveArmedCheckBox->setChecked(MusEConfig::config.moveArmedCheckBox);
+ projectSaveCheckBox->setChecked(MusEConfig::config.useProjectSaveDialog);
+ popsDefStayOpenCheckBox->setChecked(MusEConfig::config.popupsDefaultStayOpen);
updateMdiSettings();
}
@@ -321,112 +338,112 @@ void GlobalSettingsConfig::showEvent(QShowEvent* e)
void GlobalSettingsConfig::apply()
{
int rtcticks = rtcResolutionSelect->currentIndex();
- config.guiRefresh = guiRefreshSelect->value();
- config.minSlider = minSliderSelect->value();
- config.minMeter = minMeterSelect->value();
- config.freewheelMode = freewheelCheckBox->isChecked();
- config.useDenormalBias = denormalCheckBox->isChecked();
- config.useOutputLimiter = outputLimiterCheckBox->isChecked();
- config.vstInPlace = vstInPlaceCheckBox->isChecked();
- config.rtcTicks = rtcResolutions[rtcticks];
- config.userInstrumentsDir = userInstrumentsPath->text();
- config.startSong = startSongEntry->text();
- config.startMode = startSongGroup->checkedId();
+ MusEConfig::config.guiRefresh = guiRefreshSelect->value();
+ MusEConfig::config.minSlider = minSliderSelect->value();
+ MusEConfig::config.minMeter = minMeterSelect->value();
+ MusEConfig::config.freewheelMode = freewheelCheckBox->isChecked();
+ MusEConfig::config.useDenormalBias = denormalCheckBox->isChecked();
+ MusEConfig::config.useOutputLimiter = outputLimiterCheckBox->isChecked();
+ MusEConfig::config.vstInPlace = vstInPlaceCheckBox->isChecked();
+ MusEConfig::config.rtcTicks = rtcResolutions[rtcticks];
+ MusEConfig::config.userInstrumentsDir = userInstrumentsPath->text();
+ MusEConfig::config.startSong = startSongEntry->text();
+ MusEConfig::config.startMode = startSongGroup->checkedId();
int das = dummyAudioSize->currentIndex();
- config.dummyAudioBufSize = dummyAudioBufSizes[das];
- config.dummyAudioSampleRate = dummyAudioRate->value();
+ MusEConfig::config.dummyAudioBufSize = dummyAudioBufSizes[das];
+ MusEConfig::config.dummyAudioSampleRate = dummyAudioRate->value();
int mcp = minControlProcessPeriodComboBox->currentIndex();
- config.minControlProcessPeriod = minControlProcessPeriods[mcp];
+ MusEConfig::config.minControlProcessPeriod = minControlProcessPeriods[mcp];
int div = midiDivisionSelect->currentIndex();
- config.division = divisions[div];
+ MusEConfig::config.division = divisions[div];
div = guiDivisionSelect->currentIndex();
- config.guiDivision = divisions[div];
+ MusEConfig::config.guiDivision = divisions[div];
- config.transportVisible = showTransport->isChecked();
- config.bigTimeVisible = showBigtime->isChecked();
- //config.mixerVisible = showMixer->isChecked();
- config.mixer1Visible = showMixer->isChecked();
- config.mixer2Visible = showMixer2->isChecked();
-
- config.geometryMain.setX(mainX->value());
- config.geometryMain.setY(mainY->value());
- config.geometryMain.setWidth(mainW->value());
- config.geometryMain.setHeight(mainH->value());
-
- config.geometryTransport.setX(transportX->value());
- config.geometryTransport.setY(transportY->value());
- config.geometryTransport.setWidth(0);
- config.geometryTransport.setHeight(0);
-
- config.geometryBigTime.setX(bigtimeX->value());
- config.geometryBigTime.setY(bigtimeY->value());
- config.geometryBigTime.setWidth(bigtimeW->value());
- config.geometryBigTime.setHeight(bigtimeH->value());
-
- //config.geometryMixer.setX(mixerX->value());
- //config.geometryMixer.setY(mixerY->value());
- //config.geometryMixer.setWidth(mixerW->value());
- //config.geometryMixer.setHeight(mixerH->value());
- config.mixer1.geometry.setX(mixerX->value());
- config.mixer1.geometry.setY(mixerY->value());
- config.mixer1.geometry.setWidth(mixerW->value());
- config.mixer1.geometry.setHeight(mixerH->value());
- config.mixer2.geometry.setX(mixer2X->value());
- config.mixer2.geometry.setY(mixer2Y->value());
- config.mixer2.geometry.setWidth(mixer2W->value());
- config.mixer2.geometry.setHeight(mixer2H->value());
-
- config.showSplashScreen = showSplash->isChecked();
- config.showDidYouKnow = showDidYouKnow->isChecked();
- config.externalWavEditor = externalWavEditorSelect->text();
- config.useOldStyleStopShortCut = oldStyleStopCheckBox->isChecked();
- config.moveArmedCheckBox = moveArmedCheckBox->isChecked();
- config.useProjectSaveDialog = projectSaveCheckBox->isChecked();
- config.popupsDefaultStayOpen = popsDefStayOpenCheckBox->isChecked();
-
- //muse->showMixer(config.mixerVisible);
- muse->showMixer1(config.mixer1Visible);
- muse->showMixer2(config.mixer2Visible);
+ MusEConfig::config.transportVisible = showTransport->isChecked();
+ MusEConfig::config.bigTimeVisible = showBigtime->isChecked();
+ //MusEConfig::config.mixerVisible = showMixer->isChecked();
+ MusEConfig::config.mixer1Visible = showMixer->isChecked();
+ MusEConfig::config.mixer2Visible = showMixer2->isChecked();
+
+ MusEConfig::config.geometryMain.setX(mainX->value());
+ MusEConfig::config.geometryMain.setY(mainY->value());
+ MusEConfig::config.geometryMain.setWidth(mainW->value());
+ MusEConfig::config.geometryMain.setHeight(mainH->value());
+
+ MusEConfig::config.geometryTransport.setX(transportX->value());
+ MusEConfig::config.geometryTransport.setY(transportY->value());
+ MusEConfig::config.geometryTransport.setWidth(0);
+ MusEConfig::config.geometryTransport.setHeight(0);
+
+ MusEConfig::config.geometryBigTime.setX(bigtimeX->value());
+ MusEConfig::config.geometryBigTime.setY(bigtimeY->value());
+ MusEConfig::config.geometryBigTime.setWidth(bigtimeW->value());
+ MusEConfig::config.geometryBigTime.setHeight(bigtimeH->value());
+
+ //MusEConfig::config.geometryMixer.setX(mixerX->value());
+ //MusEConfig::config.geometryMixer.setY(mixerY->value());
+ //MusEConfig::config.geometryMixer.setWidth(mixerW->value());
+ //MusEConfig::config.geometryMixer.setHeight(mixerH->value());
+ MusEConfig::config.mixer1.geometry.setX(mixerX->value());
+ MusEConfig::config.mixer1.geometry.setY(mixerY->value());
+ MusEConfig::config.mixer1.geometry.setWidth(mixerW->value());
+ MusEConfig::config.mixer1.geometry.setHeight(mixerH->value());
+ MusEConfig::config.mixer2.geometry.setX(mixer2X->value());
+ MusEConfig::config.mixer2.geometry.setY(mixer2Y->value());
+ MusEConfig::config.mixer2.geometry.setWidth(mixer2W->value());
+ MusEConfig::config.mixer2.geometry.setHeight(mixer2H->value());
+
+ MusEConfig::config.showSplashScreen = showSplash->isChecked();
+ MusEConfig::config.showDidYouKnow = showDidYouKnow->isChecked();
+ MusEConfig::config.externalWavEditor = externalWavEditorSelect->text();
+ MusEConfig::config.useOldStyleStopShortCut = oldStyleStopCheckBox->isChecked();
+ MusEConfig::config.moveArmedCheckBox = moveArmedCheckBox->isChecked();
+ MusEConfig::config.useProjectSaveDialog = projectSaveCheckBox->isChecked();
+ MusEConfig::config.popupsDefaultStayOpen = popsDefStayOpenCheckBox->isChecked();
+
+ //MusEGlobal::muse->showMixer(MusEConfig::config.mixerVisible);
+ MusEGlobal::muse->showMixer1(MusEConfig::config.mixer1Visible);
+ MusEGlobal::muse->showMixer2(MusEConfig::config.mixer2Visible);
- muse->showBigtime(config.bigTimeVisible);
- muse->showTransport(config.transportVisible);
- QWidget* w = muse->transportWindow();
+ MusEGlobal::muse->showBigtime(MusEConfig::config.bigTimeVisible);
+ MusEGlobal::muse->showTransport(MusEConfig::config.transportVisible);
+ QWidget* w = MusEGlobal::muse->transportWindow();
if (w) {
- w->resize(config.geometryTransport.size());
- w->move(config.geometryTransport.topLeft());
+ w->resize(MusEConfig::config.geometryTransport.size());
+ w->move(MusEConfig::config.geometryTransport.topLeft());
}
- //w = muse->mixerWindow();
+ //w = MusEGlobal::muse->mixerWindow();
//if (w) {
- // w->resize(config.geometryMixer.size());
- // w->move(config.geometryMixer.topLeft());
+ // w->resize(MusEConfig::config.geometryMixer.size());
+ // w->move(MusEConfig::config.geometryMixer.topLeft());
// }
- w = muse->mixer1Window();
+ w = MusEGlobal::muse->mixer1Window();
if (w) {
- w->resize(config.mixer1.geometry.size());
- w->move(config.mixer1.geometry.topLeft());
+ w->resize(MusEConfig::config.mixer1.geometry.size());
+ w->move(MusEConfig::config.mixer1.geometry.topLeft());
}
- w = muse->mixer2Window();
+ w = MusEGlobal::muse->mixer2Window();
if (w) {
- w->resize(config.mixer2.geometry.size());
- w->move(config.mixer2.geometry.topLeft());
+ w->resize(MusEConfig::config.mixer2.geometry.size());
+ w->move(MusEConfig::config.mixer2.geometry.topLeft());
}
- w = muse->bigtimeWindow();
+ w = MusEGlobal::muse->bigtimeWindow();
if (w) {
- w->resize(config.geometryBigTime.size());
- w->move(config.geometryBigTime.topLeft());
+ w->resize(MusEConfig::config.geometryBigTime.size());
+ w->move(MusEConfig::config.geometryBigTime.topLeft());
}
- muse->resize(config.geometryMain.size());
- muse->move(config.geometryMain.topLeft());
+ MusEGlobal::muse->resize(MusEConfig::config.geometryMain.size());
+ MusEGlobal::muse->move(MusEConfig::config.geometryMain.topLeft());
- museUserInstruments = config.userInstrumentsDir;
+ MusEGlobal::museUserInstruments = MusEConfig::config.userInstrumentsDir;
- muse->setHeartBeat(); // set guiRefresh
+ MusEGlobal::muse->setHeartBeat(); // set guiRefresh
midiSeq->msgSetRtc(); // set midi tick rate
applyMdiSettings();
- muse->changeConfig(true); // save settings
+ MusEGlobal::muse->changeConfig(true); // save settings
}
//---------------------------------------------------------
@@ -454,7 +471,7 @@ void GlobalSettingsConfig::cancel()
void GlobalSettingsConfig::mixerCurrent()
{
- QWidget* w = muse->mixer1Window();
+ QWidget* w = MusEGlobal::muse->mixer1Window();
if (!w)
return;
QRect r(w->frameGeometry());
@@ -470,7 +487,7 @@ void GlobalSettingsConfig::mixerCurrent()
void GlobalSettingsConfig::mixer2Current()
{
- QWidget* w = muse->mixer2Window();
+ QWidget* w = MusEGlobal::muse->mixer2Window();
if (!w)
return;
QRect r(w->frameGeometry());
@@ -486,7 +503,7 @@ void GlobalSettingsConfig::mixer2Current()
void GlobalSettingsConfig::bigtimeCurrent()
{
- QWidget* w = muse->bigtimeWindow();
+ QWidget* w = MusEGlobal::muse->bigtimeWindow();
if (!w)
return;
QRect r(w->frameGeometry());
@@ -502,11 +519,11 @@ void GlobalSettingsConfig::bigtimeCurrent()
void GlobalSettingsConfig::mainCurrent()
{
- QRect r(muse->frameGeometry());
+ QRect r(MusEGlobal::muse->frameGeometry());
mainX->setValue(r.x());
mainY->setValue(r.y());
- mainW->setValue(muse->width()); //this is intendedly not the frameGeometry, but
- mainH->setValue(muse->height()); //the "non-frame-geom." to avoid a sizing bug
+ mainW->setValue(MusEGlobal::muse->width()); //this is intendedly not the frameGeometry, but
+ mainH->setValue(MusEGlobal::muse->height()); //the "non-frame-geom." to avoid a sizing bug
}
//---------------------------------------------------------
@@ -515,7 +532,7 @@ void GlobalSettingsConfig::mainCurrent()
void GlobalSettingsConfig::transportCurrent()
{
- QWidget* w = muse->transportWindow();
+ QWidget* w = MusEGlobal::muse->transportWindow();
if (!w)
return;
QRect r(w->frameGeometry());
@@ -527,13 +544,13 @@ void GlobalSettingsConfig::selectInstrumentsPath()
{
QString dir = QFileDialog::getExistingDirectory(this,
tr("Selects instruments directory"),
- config.userInstrumentsDir);
+ MusEConfig::config.userInstrumentsDir);
userInstrumentsPath->setText(dir);
}
void GlobalSettingsConfig::defaultInstrumentsPath()
{
- QString dir = configPath + "/instruments";
+ QString dir = MusEGlobal::configPath + "/instruments";
userInstrumentsPath->setText(dir);
}
@@ -575,3 +592,5 @@ void GlobalSettingsConfig::borlandPreset()
updateMdiSettings();
}
+} // namespace MusEWidget
+
diff --git a/muse2/muse/widgets/genset.h b/muse2/muse/widgets/genset.h
index 9c636c67..6068c429 100644
--- a/muse2/muse/widgets/genset.h
+++ b/muse2/muse/widgets/genset.h
@@ -4,6 +4,21 @@
// $Id: genset.h,v 1.3 2004/01/25 09:55:17 wschweer Exp $
//
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __GENSET_H__
@@ -16,6 +31,8 @@
#include <QShowEvent>
#include <list>
+namespace MusEWidget {
+
//---------------------------------------------------------
// GlobalSettingsConfig
//---------------------------------------------------------
@@ -51,4 +68,6 @@ class GlobalSettingsConfig : public QDialog, public Ui::GlobalSettingsDialogBase
GlobalSettingsConfig(QWidget* parent=0);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/header.cpp b/muse2/muse/widgets/header.cpp
index ef874fc4..8e2efe21 100644
--- a/muse2/muse/widgets/header.cpp
+++ b/muse2/muse/widgets/header.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: header.cpp,v 1.1.1.1 2003/10/27 18:55:05 wschweer Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "header.h"
@@ -13,6 +28,8 @@
#include <QStandardItemModel>
#include <QMouseEvent>
+namespace MusEWidget {
+
//---------------------------------------------------------
// readStatus
//---------------------------------------------------------
@@ -174,3 +191,5 @@ void Header::changeColumns(QAction *a)
else
hideSection(section);
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/header.h b/muse2/muse/widgets/header.h
index 3e7b73a4..47c79192 100644
--- a/muse2/muse/widgets/header.h
+++ b/muse2/muse/widgets/header.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: header.h,v 1.1.1.1 2003/10/27 18:55:03 wschweer Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __HEADER_H__
@@ -15,6 +30,8 @@ class QStandardItemModel;
class Xml;
+namespace MusEWidget {
+
class Header : public QHeaderView {
Q_OBJECT
@@ -32,5 +49,7 @@ class Header : public QHeaderView {
void changeColumns(QAction* a);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/hitscale.cpp b/muse2/muse/widgets/hitscale.cpp
index feba5920..c1fcdd87 100644
--- a/muse2/muse/widgets/hitscale.cpp
+++ b/muse2/muse/widgets/hitscale.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: hitscale.cpp,v 1.3.2.1 2007/01/27 14:52:43 spamatica Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "hitscale.h"
@@ -13,6 +28,8 @@
#include "song.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// HitScale
//---------------------------------------------------------
@@ -130,4 +147,5 @@ void HitScale::pdraw(QPainter& p, const QRect& r)
p.drawLine(xp, 0, xp, height());
}
+}
diff --git a/muse2/muse/widgets/hitscale.h b/muse2/muse/widgets/hitscale.h
index 0eaae399..cf43ef4a 100644
--- a/muse2/muse/widgets/hitscale.h
+++ b/muse2/muse/widgets/hitscale.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: hitscale.h,v 1.2 2004/01/11 18:55:37 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __HITSCALE_H__
@@ -12,6 +27,8 @@
class MidiEditor;
+namespace MusEWidget {
+
//---------------------------------------------------------
// HitScale
// scale for midi track
@@ -42,5 +59,8 @@ class HitScale : public View {
public:
HitScale(int* raster, QWidget* parent, int xscale);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/intlabel.cpp b/muse2/muse/widgets/intlabel.cpp
index 355f4510..6884adfb 100644
--- a/muse2/muse/widgets/intlabel.cpp
+++ b/muse2/muse/widgets/intlabel.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: intlabel.cpp,v 1.1.1.1.2.1 2008/08/18 00:15:26 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -10,6 +25,8 @@
#include "intlabel.h"
#include "utils.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// IntLabel
//---------------------------------------------------------
@@ -24,7 +41,7 @@ IntLabel::IntLabel(int _val, int _min, int _max, QWidget* parent,
val = _val+1; // dont optimize away
off = _off;
setValue(_val);
- int len = num2cols(min, max);
+ int len = MusEUtil::num2cols(min, max);
setSize(len);
}
@@ -42,7 +59,7 @@ void IntLabel::setRange(int mn, int mx)
{
min = mn;
max = mx;
- setSize(num2cols(min, max));
+ setSize(MusEUtil::num2cols(min, max));
int v = val;
if(val < mn)
v = mn;
@@ -138,3 +155,4 @@ void IntLabel::setOff(int v)
setString(val);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/intlabel.h b/muse2/muse/widgets/intlabel.h
index cb5c3ecc..34c075d8 100644
--- a/muse2/muse/widgets/intlabel.h
+++ b/muse2/muse/widgets/intlabel.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: intlabel.h,v 1.1.1.1.2.2 2008/08/18 00:15:26 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __INTLABEL_H__
@@ -13,6 +28,8 @@
class QString;
+namespace MusEWidget {
+
//---------------------------------------------------------
// IntLabel
//---------------------------------------------------------
@@ -43,4 +60,6 @@ class IntLabel : public Nentry {
void setRange(int, int);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/itransformbase.ui b/muse2/muse/widgets/itransformbase.ui
index 51280e56..2e9fb602 100644
--- a/muse2/muse/widgets/itransformbase.ui
+++ b/muse2/muse/widgets/itransformbase.ui
@@ -533,7 +533,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="SpinBoxFP" name="procVal1a">
+ <widget class="MusEWidget::SpinBoxFP" name="procVal1a">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
@@ -736,21 +736,21 @@
</widget>
</item>
<item row="2" column="2">
- <widget class="SpinBoxFP" name="procVal2a">
+ <widget class="MusEWidget::SpinBoxFP" name="procVal2a">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
</widget>
</item>
<item row="2" column="3">
- <widget class="SpinBoxFP" name="procPortVala">
+ <widget class="MusEWidget::SpinBoxFP" name="procPortVala">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
</widget>
</item>
<item row="2" column="4">
- <widget class="SpinBoxFP" name="procChannelVala">
+ <widget class="MusEWidget::SpinBoxFP" name="procChannelVala">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
@@ -1106,7 +1106,7 @@
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
- <class>SpinBoxFP</class>
+ <class>MusEWidget::SpinBoxFP</class>
<extends>QDoubleSpinBox</extends>
<header>spinboxFP.h</header>
</customwidget>
diff --git a/muse2/muse/widgets/knob.cpp b/muse2/muse/widgets/knob.cpp
index dc41e1c4..9bc63b33 100644
--- a/muse2/muse/widgets/knob.cpp
+++ b/muse2/muse/widgets/knob.cpp
@@ -2,20 +2,26 @@
// MusE
// Linux Music Editor
// $Id: knob.cpp,v 1.3.2.3 2009/03/09 02:05:18 terminator356 Exp $
-// (C) Copyright 1999 Werner Schweer (ws@seh.de)
//
// Adapted from Qwt Lib:
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
+// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+// (C) Copyright 2011 Orcan Ogetbil (ogetbilo at sf.net) completely redesigned.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -28,6 +34,8 @@
#include <QPaintEvent>
#include <QResizeEvent>
+namespace MusEWidget {
+
//---------------------------------------------------------
// The QwtKnob widget imitates look and behaviour of a volume knob on a radio.
// It contains
@@ -327,8 +335,8 @@ void Knob::resizeEvent(QResizeEvent *)
// printf("resize %d %d %d\n", r.height(), r.width(), d_knobWidth);
-// width = qwtMin(qwtMin(r.height(), r.width()), d_knobWidth);
- width = qwtMin(r.height(), r.width());
+// width = MusEUtil::qwtMin(MusEUtil::qwtMin(r.height(), r.width()), d_knobWidth);
+ width = MusEUtil::qwtMin(r.height(), r.width());
width_2 = width / 2;
int x = r.x() + r.width() / 2 - width_2;
@@ -417,7 +425,7 @@ void Knob::drawMarker(QPainter *p, double arc, const QColor &c)
p->setBrush(c);
p->setPen(Qt::NoPen);
- rb = double(qwtMax(radius - 4 - d_dotWidth / 2, 0));
+ rb = double(MusEUtil::qwtMax(radius - 4 - d_dotWidth / 2, 0));
p->drawEllipse(xm - int(rint(sa * rb)) - d_dotWidth / 2,
ym - int(rint(ca * rb)) - d_dotWidth / 2,
d_dotWidth, d_dotWidth);
@@ -430,8 +438,8 @@ void Knob::drawMarker(QPainter *p, double arc, const QColor &c)
pn.setWidth(2);
p->setPen(pn);
- rb = qwtMax(double((radius - 1) / 3.0), 0.0);
- re = qwtMax(double(radius - 1), 0.0);
+ rb = MusEUtil::qwtMax(double((radius - 1) / 3.0), 0.0);
+ re = MusEUtil::qwtMax(double(radius - 1), 0.0);
p->setRenderHint(QPainter::Antialiasing, true);
p->drawLine( xm,
@@ -462,7 +470,7 @@ void Knob::drawMarker(QPainter *p, double arc, const QColor &c)
//------------------------------------------------------------
void Knob::setKnobWidth(int w)
{
- d_knobWidth = qwtMax(w,5);
+ d_knobWidth = MusEUtil::qwtMax(w,5);
resize(size());
repaint();
}
@@ -481,7 +489,7 @@ void Knob::setKnobWidth(int w)
//------------------------------------------------------------
void Knob::setBorderWidth(int bw)
{
- d_borderWidth = qwtMax(bw, 0);
+ d_borderWidth = MusEUtil::qwtMax(bw, 0);
resize(size());
repaint();
}
@@ -565,3 +573,4 @@ void Knob::setMarkerColor(const QColor c)
repaint();
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/knob.h b/muse2/muse/widgets/knob.h
index 2a553c4e..a629f158 100644
--- a/muse2/muse/widgets/knob.h
+++ b/muse2/muse/widgets/knob.h
@@ -1,3 +1,26 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/knob.h $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+// (C) Copyright 2011 Orcan Ogetbil (ogetbilo at sf.net) completely redesigned.
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#ifndef QWT_KNOB_H
#define QWT_KNOB_H
@@ -7,6 +30,7 @@
#include <QResizeEvent>
#include <QPaintEvent>
+namespace MusEWidget {
//---------------------------------------------------------
// Knob
@@ -80,5 +104,6 @@ class Knob : public SliderBase, public ScaleIf
void setMarkerColor(const QColor c);
};
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/lcombo.cpp b/muse2/muse/widgets/lcombo.cpp
index e4bdf00c..ca17e5e3 100644
--- a/muse2/muse/widgets/lcombo.cpp
+++ b/muse2/muse/widgets/lcombo.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: lcombo.cpp,v 1.1.1.1.2.3 2009/07/01 22:14:56 spamatica Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "lcombo.h"
@@ -10,6 +25,7 @@
#include <QHBoxLayout>
#include <QLabel>
+namespace MusEWidget {
//---------------------------------------------------------
// LabelCombo
@@ -49,3 +65,5 @@ void LabelCombo::setCurrentIndex(int i)
if(box->currentIndex() != r)
box->setCurrentIndex(r);
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/lcombo.h b/muse2/muse/widgets/lcombo.h
index 760d4512..f500dc60 100644
--- a/muse2/muse/widgets/lcombo.h
+++ b/muse2/muse/widgets/lcombo.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: lcombo.h,v 1.1.1.1.2.3 2009/07/01 22:14:56 spamatica Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __LCOMBO_H__
@@ -14,6 +29,7 @@
class QString;
+namespace MusEWidget {
//---------------------------------------------------------
// LabelCombo
@@ -41,4 +57,6 @@ class LabelCombo : public QWidget {
void setFocusPolicy ( Qt::FocusPolicy fp ) { box->setFocusPolicy(fp); }
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/menutitleitem.cpp b/muse2/muse/widgets/menutitleitem.cpp
index 8769eb02..c15c8c64 100644
--- a/muse2/muse/widgets/menutitleitem.cpp
+++ b/muse2/muse/widgets/menutitleitem.cpp
@@ -3,8 +3,10 @@
// Linux Music Editor
// (C) Copyright 1999-2001 Werner Schweer (ws@seh.de)
//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2.
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,13 +15,15 @@
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//=============================================================================
#include <QLabel>
#include "menutitleitem.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// MenuTitleItem
//---------------------------------------------------------
@@ -46,3 +50,4 @@ QWidget* MenuTitleItem::createWidget(QWidget *parent)
return l;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/menutitleitem.h b/muse2/muse/widgets/menutitleitem.h
index 20583bd1..98573c72 100644
--- a/muse2/muse/widgets/menutitleitem.h
+++ b/muse2/muse/widgets/menutitleitem.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: menutitleitem.h,v 1.1.2.1 2009/06/10 00:34:59 terminator356 Exp $
// (C) Copyright 1999-2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MENU_TITLE_ITEM_H__
@@ -10,6 +25,8 @@
#include <QWidgetAction>
+namespace MusEWidget {
+
//---------------------------------------------------------
// MenuTitleItem
//---------------------------------------------------------
@@ -26,4 +43,5 @@ class MenuTitleItem : public QWidgetAction {
QWidget* createWidget(QWidget* /*parent*/);
};
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/meter.cpp b/muse2/muse/widgets/meter.cpp
index 9f13059e..f4d907d1 100644
--- a/muse2/muse/widgets/meter.cpp
+++ b/muse2/muse/widgets/meter.cpp
@@ -5,6 +5,22 @@
// redesigned by oget on 2011/08/15
//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+// (C) Copyright 2011 Orcan Ogetbil (ogetbilo at sf.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
@@ -17,6 +33,8 @@
#include "gconfig.h"
#include "fastlog.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// Meter
//---------------------------------------------------------
@@ -36,7 +54,7 @@ Meter::Meter(QWidget* parent, MeterType type)
overflow = false;
val = 0.0;
maxVal = 0.0;
- minScale = mtype == DBMeter ? config.minMeter : 0.0; // min value in dB or int
+ minScale = mtype == DBMeter ? MusEConfig::config.minMeter : 0.0; // min value in dB or int
maxScale = mtype == DBMeter ? 10.0 : 127.0;
yellowScale = -10;
redScale = 0;
@@ -158,7 +176,7 @@ void Meter::setRange(double min, double max)
// paintEvent
//---------------------------------------------------------
-void Meter::paintEvent(QPaintEvent* ev)
+void Meter::paintEvent(QPaintEvent* /*ev*/)
{
// TODO: Could make better use of event rectangle, for speed.
@@ -166,15 +184,17 @@ void Meter::paintEvent(QPaintEvent* ev)
//p.setRenderHint(QPainter::Antialiasing);
double range = maxScale - minScale;
- /*
+
int fw = frameWidth();
int w = width() - 2*fw;
int h = height() - 2*fw;
- */
-
+
+ // FIXME (Orcan): With the event rectangle we get corruption when we toggle the mono/stereo switch. Why?
+ /*
QRect rect = ev->rect();
int w = rect.width();
int h = rect.height();
+ */
int yv;
if(mtype == DBMeter)
@@ -339,3 +359,4 @@ void Meter::mousePressEvent(QMouseEvent*)
emit mousePress();
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/meter.h b/muse2/muse/widgets/meter.h
index 848ae855..62ad3fe0 100644
--- a/muse2/muse/widgets/meter.h
+++ b/muse2/muse/widgets/meter.h
@@ -5,6 +5,22 @@
// redesigned by oget on 2011/08/15
//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+// (C) Copyright 2011 Orcan Ogetbil (ogetbilo at sf.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __METER_H__
@@ -16,6 +32,7 @@ class QResizeEvent;
class QMouseEvent;
class QPainter;
+namespace MusEWidget {
class Meter : public QFrame {
Q_OBJECT
@@ -81,5 +98,8 @@ class Meter : public QFrame {
Meter(QWidget* parent, MeterType type = DBMeter);
void setRange(double min, double max);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/metronome.cpp b/muse2/muse/widgets/metronome.cpp
index 08c8abac..e639df81 100644
--- a/muse2/muse/widgets/metronome.cpp
+++ b/muse2/muse/widgets/metronome.cpp
@@ -4,6 +4,21 @@
// $Id: metronome.cpp,v 1.2.2.1 2009/12/20 05:00:35 terminator356 Exp $
//
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -15,6 +30,8 @@
#include "track.h"
#include "audio.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// MetronomeConfig
//---------------------------------------------------------
@@ -31,15 +48,15 @@ MetronomeConfig::MetronomeConfig(QDialog* parent)
connect(audioBeepRoutesButton, SIGNAL(clicked()), SLOT(audioBeepRoutesClicked()));
connect(volumeSlider, SIGNAL(valueChanged(int)), SLOT(beepVolumeChanged(int)));
- measureNote->setValue(measureClickNote);
- measureVelocity->setValue(measureClickVelo);
- beatNote->setValue(beatClickNote);
- beatVelocity->setValue(beatClickVelo);
- midiChannel->setValue(clickChan+1);
- midiPort->setValue(clickPort+1);
+ measureNote->setValue(MusEGlobal::measureClickNote);
+ measureVelocity->setValue(MusEGlobal::measureClickVelo);
+ beatNote->setValue(MusEGlobal::beatClickNote);
+ beatVelocity->setValue(MusEGlobal::beatClickVelo);
+ midiChannel->setValue(MusEGlobal::clickChan+1);
+ midiPort->setValue(MusEGlobal::clickPort+1);
/*
- precountBars->setValue(preMeasures);
+ precountBars->setValue(MusEGlobal::preMeasures);
precountEnable->setChecked(precountEnableFlag);
precountFromMastertrack->setChecked(precountFromMastertrackFlag);
precountSigZ->setValue(::precountSigZ);
@@ -48,8 +65,8 @@ MetronomeConfig::MetronomeConfig(QDialog* parent)
precountPreroll->setChecked(::precountPreroll);
*/
- midiClick->setChecked(midiClickFlag);
- audioBeep->setChecked(audioClickFlag);
+ midiClick->setChecked(MusEGlobal::midiClickFlag);
+ audioBeep->setChecked(MusEGlobal::audioClickFlag);
}
//---------------------------------------------------------
@@ -115,13 +132,13 @@ void MetronomeConfig::accept()
void MetronomeConfig::apply()
{
- measureClickNote = measureNote->value();
- measureClickVelo = measureVelocity->value();
- beatClickNote = beatNote->value();
- beatClickVelo = beatVelocity->value();
- clickChan = midiChannel->value() - 1;
- clickPort = midiPort->value() - 1;
- preMeasures = precountBars->value();
+ MusEGlobal::measureClickNote = measureNote->value();
+ MusEGlobal::measureClickVelo = measureVelocity->value();
+ MusEGlobal::beatClickNote = beatNote->value();
+ MusEGlobal::beatClickVelo = beatVelocity->value();
+ MusEGlobal::clickChan = midiChannel->value() - 1;
+ MusEGlobal::clickPort = midiPort->value() - 1;
+ MusEGlobal::preMeasures = precountBars->value();
/*
precountEnableFlag = precountEnable->isChecked();
precountFromMastertrackFlag = precountFromMastertrack->isChecked();
@@ -130,8 +147,8 @@ void MetronomeConfig::apply()
::precountPrerecord = precountPrerecord->isChecked();
::precountPreroll = precountPreroll->isChecked();
*/
- midiClickFlag = midiClick->isChecked();
- audioClickFlag = audioBeep->isChecked();
+ MusEGlobal::midiClickFlag = midiClick->isChecked();
+ MusEGlobal::audioClickFlag = audioBeep->isChecked();
//audioVolumeChanged = volumeSlider->value();
}
@@ -179,5 +196,8 @@ void MetronomeConfig::precountFromMastertrackChanged(bool /*flag*/)
void MetronomeConfig::beepVolumeChanged(int volume)
{
// this value is directly applied, not using th Apply button, it just seems more usable this way.
- audioClickVolume=volume/100.0;
+ MusEGlobal::audioClickVolume=volume/100.0;
}
+
+} // namespace MusEWidget
+
diff --git a/muse2/muse/widgets/metronome.h b/muse2/muse/widgets/metronome.h
index 976dfcd0..62edcdc5 100644
--- a/muse2/muse/widgets/metronome.h
+++ b/muse2/muse/widgets/metronome.h
@@ -4,6 +4,21 @@
// $Id: metronome.h,v 1.1.1.1.2.1 2009/12/20 05:00:35 terminator356 Exp $
//
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __METRONOME_H__
@@ -13,6 +28,8 @@
class QDialog;
+namespace MusEWidget {
+
//---------------------------------------------------------
// MetronomeConfig
//---------------------------------------------------------
@@ -33,4 +50,7 @@ class MetronomeConfig : public QDialog, public Ui::MetronomeConfigBase {
public:
MetronomeConfig(QDialog* parent=0);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/midisyncimpl.cpp b/muse2/muse/widgets/midisyncimpl.cpp
index 07527973..3829ca43 100644
--- a/muse2/muse/widgets/midisyncimpl.cpp
+++ b/muse2/muse/widgets/midisyncimpl.cpp
@@ -4,6 +4,21 @@
// $Id: midisyncimpl.cpp,v 1.1.1.1.2.4 2009/05/03 04:14:01 terminator356 Exp $
//
// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QCloseEvent>
@@ -26,6 +41,8 @@
#include "driver/audiodev.h"
#include "audio.h"
+namespace MusEWidget {
+
enum { DEVCOL_NO = 0, DEVCOL_NAME, DEVCOL_IN, DEVCOL_TICKIN, DEVCOL_MRTIN, DEVCOL_MMCIN, DEVCOL_MTCIN, DEVCOL_MTCTYPE,
DEVCOL_RID, DEVCOL_RCLK, DEVCOL_RMRT, DEVCOL_RMMC, DEVCOL_RMTC, DEVCOL_RREWSTART,
DEVCOL_TID, DEVCOL_TCLK, DEVCOL_TMRT, DEVCOL_TMMC, DEVCOL_TMTC, /* DEVCOL_TREWSTART, */ };
@@ -296,7 +313,7 @@ MidiSyncConfig::MidiSyncConfig(QWidget* parent)
// Done in show().
//connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
- //connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
+ //connect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
//inHeartBeat = false;
}
@@ -646,7 +663,7 @@ void MidiSyncConfig::show()
{
songChanged(-1);
connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
- connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
+ connect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
QDialog::show();
}
@@ -673,7 +690,7 @@ void MidiSyncConfig::closeEvent(QCloseEvent* e)
apply();
}
- disconnect(heartBeatTimer, SIGNAL(timeout()), this, SLOT(heartBeat()));
+ disconnect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), this, SLOT(heartBeat()));
disconnect(song, SIGNAL(songChanged(int)), this, SLOT(songChanged(int)));
e->accept();
@@ -1249,3 +1266,4 @@ void MidiSyncConfig::setDirty()
applyButton->setEnabled(true);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/midisyncimpl.h b/muse2/muse/widgets/midisyncimpl.h
index 9b133af2..50df186e 100644
--- a/muse2/muse/widgets/midisyncimpl.h
+++ b/muse2/muse/widgets/midisyncimpl.h
@@ -4,6 +4,21 @@
// $Id: midisyncimpl.h,v 1.1.1.1.2.3 2009/05/03 04:14:01 terminator356 Exp $
//
// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MIDISYNCIMPL_H__
@@ -16,6 +31,8 @@ class QCloseEvent;
class QDialog;
class QTreeWidgetItem;
+namespace MusEWidget {
+
//----------------------------------------------------------
// MidiSyncLViewItem
//----------------------------------------------------------
@@ -112,5 +129,7 @@ class MidiSyncConfig : public QDialog, public Ui::MidiSyncConfigBase {
void setDirty();
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/mittransposebase.ui b/muse2/muse/widgets/mittransposebase.ui
index b29e34ed..06a18029 100644
--- a/muse2/muse/widgets/mittransposebase.ui
+++ b/muse2/muse/widgets/mittransposebase.ui
@@ -44,7 +44,7 @@
</widget>
</item>
<item>
- <widget class="PitchEdit" name="triggerKeySpinBox" native="true"/>
+ <widget class="MusEWidget::PitchEdit" name="triggerKeySpinBox" native="true"/>
</item>
<item>
<widget class="QLabel" name="TextLabel2">
@@ -101,7 +101,7 @@
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
- <class>PitchEdit</class>
+ <class>MusEWidget::PitchEdit</class>
<extends>QWidget</extends>
<header>pitchedit.h</header>
</customwidget>
diff --git a/muse2/muse/widgets/mixdowndialog.cpp b/muse2/muse/widgets/mixdowndialog.cpp
index 8ab26859..01c1d049 100644
--- a/muse2/muse/widgets/mixdowndialog.cpp
+++ b/muse2/muse/widgets/mixdowndialog.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: mixdowndialog.cpp,v 1.1.1.1 2003/10/27 18:55:02 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QFileDialog>
@@ -18,13 +33,15 @@
SndFile* getSndFile(const SndFile* sf, QWidget* parent)
{
- MixdownFileDialog* dialog = new MixdownFileDialog(sf, parent);
+ MusEWidget::MixdownFileDialog* dialog = new MusEWidget::MixdownFileDialog(sf, parent);
dialog->exec();
SndFile* sndFile = dialog->sndFile();
delete dialog;
return sndFile;
}
+namespace MusEWidget {
+
//---------------------------------------------------------
// MixdownFileDialog
//---------------------------------------------------------
@@ -84,7 +101,7 @@ void MixdownFileDialog::accept()
if (path.right(4) != ".wav")
path += ".wav";
sf = new SndFile(path);
- sf->setFormat(format, channel, sampleRate);
+ sf->setFormat(format, channel, MusEGlobal::sampleRate);
done(1);
}
@@ -103,3 +120,4 @@ void MixdownFileDialog::fdialog()
editPath->setText(path);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/mixdowndialog.h b/muse2/muse/widgets/mixdowndialog.h
index 750acd28..cca60178 100644
--- a/muse2/muse/widgets/mixdowndialog.h
+++ b/muse2/muse/widgets/mixdowndialog.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: mixdowndialog.h,v 1.1.1.1 2003/10/27 18:54:28 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MIXDOWNDIALOG_H__
@@ -16,6 +31,8 @@ class SndFile;
extern SndFile* getSndFile(const SndFile* sf, QWidget* parent);
+namespace MusEWidget {
+
//---------------------------------------------------------
// MixdownFileDialog
//---------------------------------------------------------
@@ -34,5 +51,7 @@ class MixdownFileDialog : public QDialog, public Ui::MixdownFileDialogBase {
SndFile* sndFile() { return sf; }
};
+}
+
#endif
diff --git a/muse2/muse/widgets/mlabel.cpp b/muse2/muse/widgets/mlabel.cpp
index 2b9526d4..071427b6 100644
--- a/muse2/muse/widgets/mlabel.cpp
+++ b/muse2/muse/widgets/mlabel.cpp
@@ -3,13 +3,30 @@
// Linux Music Editor
// $Id: mlabel.cpp,v 1.1.1.1 2003/10/27 18:55:03 wschweer Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "mlabel.h"
+namespace MusEWidget {
void MLabel::mousePressEvent(QMouseEvent*)
{
emit mousePressed();
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/mlabel.h b/muse2/muse/widgets/mlabel.h
index 01bfa788..64a52220 100644
--- a/muse2/muse/widgets/mlabel.h
+++ b/muse2/muse/widgets/mlabel.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: mlabel.h,v 1.1.1.1 2003/10/27 18:55:03 wschweer Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MLABEL_H__
@@ -10,6 +25,8 @@
#include <QLabel>
+namespace MusEWidget {
+
//---------------------------------------------------------
// MLabel
// label widged which sends signal mousePressed
@@ -33,5 +50,8 @@ class MLabel : public QLabel {
MLabel(QWidget* parent, const char* name = 0)
: QLabel(parent) {setObjectName(name);};
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/mmath.cpp b/muse2/muse/widgets/mmath.cpp
index acc8e25a..52dffea2 100644
--- a/muse2/muse/widgets/mmath.cpp
+++ b/muse2/muse/widgets/mmath.cpp
@@ -1,3 +1,25 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/mmath.cpp $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#include <cmath>
#include "mmath.h"
@@ -24,6 +46,7 @@
// qwtInt -- Return nearest integer
// qwtLim -- Limit a values
+namespace MusEUtil {
//------------------------------------------------------------
//.F qwtGetMin
@@ -298,3 +321,5 @@ void qwtLogSpace(double *array, int size, double xmin, double xmax)
array[i] = exp(lxmin + double(i) * lstep);
}
+
+} // namespace MusEUtil
diff --git a/muse2/muse/widgets/mmath.h b/muse2/muse/widgets/mmath.h
index 51381047..813aed93 100644
--- a/muse2/muse/widgets/mmath.h
+++ b/muse2/muse/widgets/mmath.h
@@ -4,6 +4,21 @@
// $Id: mmath.h,v 1.1.1.1 2003/10/27 18:54:47 wschweer Exp $
//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MATH_H__
@@ -12,6 +27,8 @@
#define LOG_MIN 1.0e-100
#define LOG_MAX 1.0e100
+namespace MusEUtil {
+
double qwtCeil125(double x);
double qwtFloor125(double x);
void qwtTwistArray(double *array, int size);
@@ -73,5 +90,7 @@ T qwtLim(const T& x, const T& x1, const T& x2)
return rv;
}
+}
+
#endif
diff --git a/muse2/muse/widgets/moc_ttoolbar.cpp b/muse2/muse/widgets/moc_ttoolbar.cpp
index e69de29b..63787863 100644
--- a/muse2/muse/widgets/moc_ttoolbar.cpp
+++ b/muse2/muse/widgets/moc_ttoolbar.cpp
@@ -0,0 +1,22 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/moc_ttoolbar.cpp $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp
index c5cdac0b..e4c4e217 100644
--- a/muse2/muse/widgets/mtrackinfo.cpp
+++ b/muse2/muse/widgets/mtrackinfo.cpp
@@ -2,6 +2,21 @@
// MusE
// Linux Music Editor
// (C) Copyright 2010 Werner Schweer and others (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QTimer>
@@ -28,6 +43,8 @@
#include "popupmenu.h"
#include "routepopup.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// setTrack
//---------------------------------------------------------
@@ -46,10 +63,10 @@ void MidiTrackInfo::setTrack(Track* t)
QPalette pal;
if(selected->type() == Track::DRUM) {
- pal.setColor(trackNameLabel->backgroundRole(), config.drumTrackLabelBg);
+ pal.setColor(trackNameLabel->backgroundRole(), MusEConfig::config.drumTrackLabelBg);
iOutputChannel->setEnabled(false);
} else {
- pal.setColor(trackNameLabel->backgroundRole(), config.midiTrackLabelBg);
+ pal.setColor(trackNameLabel->backgroundRole(), MusEConfig::config.midiTrackLabelBg);
iOutputChannel->setEnabled(true);
}
trackNameLabel->setPalette(pal);
@@ -75,7 +92,7 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, Track* sel_track) : QWidget(parent
pan = -65;
volume = -1;
- setFont(config.fonts[2]);
+ setFont(MusEConfig::config.fonts[2]);
//iChanDetectLabel->setPixmap(*darkgreendotIcon);
iChanDetectLabel->setPixmap(*darkRedLedIcon);
@@ -100,14 +117,14 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, Track* sel_track) : QWidget(parent
QPalette pal;
//pal.setColor(trackNameLabel->backgroundRole(), QColor(0, 160, 255)); // Med blue
if(selected->type() == Track::DRUM)
- pal.setColor(trackNameLabel->backgroundRole(), config.drumTrackLabelBg);
+ pal.setColor(trackNameLabel->backgroundRole(), MusEConfig::config.drumTrackLabelBg);
else
- pal.setColor(trackNameLabel->backgroundRole(), config.midiTrackLabelBg);
+ pal.setColor(trackNameLabel->backgroundRole(), MusEConfig::config.midiTrackLabelBg);
trackNameLabel->setPalette(pal);
}
//else
//{
- // pal.setColor(trackNameLabel->backgroundRole(), config.midiTrackLabelBg);
+ // pal.setColor(trackNameLabel->backgroundRole(), MusEConfig::config.midiTrackLabelBg);
// trackNameLabel->setPalette(pal);
//}
@@ -165,9 +182,9 @@ MidiTrackInfo::MidiTrackInfo(QWidget* parent, Track* sel_track) : QWidget(parent
connect(oRButton, SIGNAL(pressed()), SLOT(outRoutesPressed()));
connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
- connect(muse, SIGNAL(configChanged()), SLOT(configChanged()));
+ connect(MusEGlobal::muse, SIGNAL(configChanged()), SLOT(configChanged()));
- connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
+ connect(MusEGlobal::heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat()));
}
//---------------------------------------------------------
@@ -487,15 +504,15 @@ void MidiTrackInfo::configChanged()
{
//printf("MidiTrackInfo::configChanged\n");
- //if (config.canvasBgPixmap.isEmpty()) {
- // canvas->setBg(config.partCanvasBg);
+ //if (MusEConfig::config.canvasBgPixmap.isEmpty()) {
+ // canvas->setBg(MusEConfig::config.partCanvasBg);
// canvas->setBg(QPixmap());
//}
//else {
- // canvas->setBg(QPixmap(config.canvasBgPixmap));
+ // canvas->setBg(QPixmap(MusEConfig::config.canvasBgPixmap));
//}
- setFont(config.fonts[2]);
+ setFont(MusEConfig::config.fonts[2]);
//updateTrackInfo(type);
}
@@ -540,9 +557,9 @@ void MidiTrackInfo::setLabelFont()
// Use the new font #6 I created just for these labels (so far).
// Set the label's font.
- trackNameLabel->setFont(config.fonts[6]);
+ trackNameLabel->setFont(MusEConfig::config.fonts[6]);
// Dealing with a horizontally constrained label. Ignore vertical. Use a minimum readable point size.
- autoAdjustFontSize(trackNameLabel, trackNameLabel->text(), false, true, config.fonts[6].pointSize(), 5);
+ MusEUtil::autoAdjustFontSize(trackNameLabel, trackNameLabel->text(), false, true, MusEConfig::config.fonts[6].pointSize(), 5);
}
//---------------------------------------------------------
@@ -607,7 +624,7 @@ void MidiTrackInfo::inRoutesPressed()
if(!selected->isMidiTrack())
return;
- RoutePopupMenu* pup = muse->getRoutingPopupMenu();
+ RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
iRButton->setDown(false);
pup->exec(QCursor::pos(), selected, false);
}
@@ -623,7 +640,7 @@ void MidiTrackInfo::outRoutesPressed()
if(!selected->isMidiTrack())
return;
- RoutePopupMenu* pup = muse->getRoutingPopupMenu();
+ RoutePopupMenu* pup = MusEGlobal::muse->getRoutingPopupMenu();
oRButton->setDown(false);
pup->exec(QCursor::pos(), selected, true);
}
@@ -1549,3 +1566,4 @@ void MidiTrackInfo::recordClicked()
}
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/mtrackinfo.h b/muse2/muse/widgets/mtrackinfo.h
index 20fd3a69..42be1f58 100644
--- a/muse2/muse/widgets/mtrackinfo.h
+++ b/muse2/muse/widgets/mtrackinfo.h
@@ -2,6 +2,21 @@
// MusE
// Linux Music Editor
// (C) Copyright 2010 Werner Schweer and others (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MTRACKINFO_H__
@@ -11,6 +26,8 @@
class Track;
+namespace MusEWidget {
+
//---------------------------------------------------------
// MidiTrackInfo
//---------------------------------------------------------
@@ -65,7 +82,7 @@ class MidiTrackInfo : public QWidget, public Ui::MidiTrackInfoBase
void updateTrackInfo(int);
};
-
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/mtrackinfobase.ui b/muse2/muse/widgets/mtrackinfobase.ui
index 53e772c8..99c06ad0 100644
--- a/muse2/muse/widgets/mtrackinfobase.ui
+++ b/muse2/muse/widgets/mtrackinfobase.ui
@@ -86,7 +86,7 @@
</widget>
</item>
<item row="2" column="0">
- <widget class="SpinBox" name="iOutputChannel">
+ <widget class="MusEWidget::SpinBox" name="iOutputChannel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -247,7 +247,7 @@
</layout>
</item>
<item row="4" column="0">
- <widget class="SpinBox" name="iTransp">
+ <widget class="MusEWidget::SpinBox" name="iTransp">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -291,7 +291,7 @@
</widget>
</item>
<item row="5" column="0">
- <widget class="SpinBox" name="iVerz">
+ <widget class="MusEWidget::SpinBox" name="iVerz">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -332,7 +332,7 @@
</widget>
</item>
<item row="6" column="0">
- <widget class="SpinBox" name="iLen">
+ <widget class="MusEWidget::SpinBox" name="iLen">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -376,7 +376,7 @@
</widget>
</item>
<item row="7" column="0">
- <widget class="SpinBox" name="iAnschl">
+ <widget class="MusEWidget::SpinBox" name="iAnschl">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -423,7 +423,7 @@
</widget>
</item>
<item row="8" column="0">
- <widget class="SpinBox" name="iKompr">
+ <widget class="MusEWidget::SpinBox" name="iKompr">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -575,7 +575,7 @@
</layout>
</item>
<item row="12" column="0">
- <widget class="SpinBox" name="iHBank">
+ <widget class="MusEWidget::SpinBox" name="iHBank">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -628,7 +628,7 @@
</widget>
</item>
<item row="13" column="0">
- <widget class="SpinBox" name="iLBank">
+ <widget class="MusEWidget::SpinBox" name="iLBank">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -681,7 +681,7 @@
</widget>
</item>
<item row="14" column="0">
- <widget class="SpinBox" name="iProgram">
+ <widget class="MusEWidget::SpinBox" name="iProgram">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -748,7 +748,7 @@
</layout>
</item>
<item row="15" column="0">
- <widget class="SpinBox" name="iLautst">
+ <widget class="MusEWidget::SpinBox" name="iLautst">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -815,7 +815,7 @@
</layout>
</item>
<item row="16" column="0">
- <widget class="SpinBox" name="iPan">
+ <widget class="MusEWidget::SpinBox" name="iPan">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -905,7 +905,7 @@
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
- <class>SpinBox</class>
+ <class>MusEWidget::SpinBox</class>
<extends>QSpinBox</extends>
<header location="global">spinbox.h</header>
</customwidget>
diff --git a/muse2/muse/widgets/mtscale.cpp b/muse2/muse/widgets/mtscale.cpp
index 624c83d4..1bd34de3 100644
--- a/muse2/muse/widgets/mtscale.cpp
+++ b/muse2/muse/widgets/mtscale.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: mtscale.cpp,v 1.8.2.7 2009/05/03 04:14:01 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <values.h>
@@ -15,6 +30,8 @@
#include "icons.h"
#include "gconfig.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// MTScale
// Midi Time Scale
@@ -215,7 +232,7 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
int y = 12;
p.setPen(Qt::black);
- p.setFont(config.fonts[4]);
+ p.setFont(MusEConfig::config.fonts[4]);
p.drawLine(r.x(), y+1, r.x() + r.width(), y+1);
QRect tr(r);
tr.setHeight(12);
@@ -376,7 +393,7 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
n = 32;
if (bar % n)
continue;
- p.setFont(config.fonts[3]);
+ p.setFont(MusEConfig::config.fonts[3]);
int x = mapx(waveMode ? b : stick);
QString s;
s.setNum(bar + 1);
@@ -400,12 +417,12 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
if (beat == 0) {
num = bar + 1;
y1 = y + 1;
- p.setFont(config.fonts[3]);
+ p.setFont(MusEConfig::config.fonts[3]);
}
else {
num = beat + 1;
y1 = y + 7;
- p.setFont(config.fonts[1]);
+ p.setFont(MusEConfig::config.fonts[1]);
r.setY(y+3);
}
s.setNum(num);
@@ -416,3 +433,4 @@ void MTScale::pdraw(QPainter& p, const QRect& r)
}
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/mtscale.h b/muse2/muse/widgets/mtscale.h
index 7c53d4ff..820e33c6 100644
--- a/muse2/muse/widgets/mtscale.h
+++ b/muse2/muse/widgets/mtscale.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: mtscale.h,v 1.3 2004/04/27 22:27:06 spamatica Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MTSCALE_H__
@@ -11,6 +26,8 @@
#include "view.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// MTScale
// scale for midi track
@@ -45,5 +62,8 @@ class MTScale : public View {
MTScale(int* raster, QWidget* parent, int xscale, bool f = false);
void setBarLocator(bool f) { barLocator = f; }
};
+
+}
+
#endif
diff --git a/muse2/muse/widgets/mtscale_flo.cpp b/muse2/muse/widgets/mtscale_flo.cpp
index e18a7d11..50abf75d 100644
--- a/muse2/muse/widgets/mtscale_flo.cpp
+++ b/muse2/muse/widgets/mtscale_flo.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: mtscale_flo.cpp,v 1.8.2.7 2011/05/19 04:14:01 flo Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <values.h>
@@ -16,6 +31,8 @@
#include "gconfig.h"
#include "scoreedit.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// MTScale
// Midi Time Scale
@@ -171,7 +188,7 @@ void MTScaleFlo::draw(QPainter& p, const QRect& r)
int y = 12;
p.setPen(Qt::black);
- p.setFont(config.fonts[4]);
+ p.setFont(MusEConfig::config.fonts[4]);
p.drawLine(r.x(), y+1, r.x() + r.width(), y+1);
QRect tr(r);
tr.setHeight(12);
@@ -270,7 +287,7 @@ void MTScaleFlo::draw(QPainter& p, const QRect& r)
n = 32;
if (bar % n)
continue;
- p.setFont(config.fonts[3]);
+ p.setFont(MusEConfig::config.fonts[3]);
int x = parent->tick_to_x(stick) + xoffset - xpos;
QString s;
s.setNum(bar + 1);
@@ -291,12 +308,12 @@ void MTScaleFlo::draw(QPainter& p, const QRect& r)
if (beat == 0) {
num = bar + 1;
y1 = y + 1;
- p.setFont(config.fonts[3]);
+ p.setFont(MusEConfig::config.fonts[3]);
}
else {
num = beat + 1;
y1 = y + 7;
- p.setFont(config.fonts[1]);
+ p.setFont(MusEConfig::config.fonts[1]);
r.setY(y+3);
}
s.setNum(num);
@@ -323,3 +340,5 @@ void MTScaleFlo::pos_add_changed()
{
redraw();
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/mtscale_flo.h b/muse2/muse/widgets/mtscale_flo.h
index b7856207..b7169ab6 100644
--- a/muse2/muse/widgets/mtscale_flo.h
+++ b/muse2/muse/widgets/mtscale_flo.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: mtscale_flo.h,v 1.3 2011/05/19 22:27:06 flo Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MTSCALE_FLO_H__
@@ -13,6 +28,8 @@
class ScoreCanvas;
+namespace MusEWidget {
+
//---------------------------------------------------------
// MTScaleFlo
// scale for midi track
@@ -47,5 +64,8 @@ class MTScaleFlo : public View {
public:
MTScaleFlo(ScoreCanvas* parent_editor, QWidget* parent_widget);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/musewidgetsplug.cpp b/muse2/muse/widgets/musewidgetsplug.cpp
index 993b0fb8..7141fe4e 100644
--- a/muse2/muse/widgets/musewidgetsplug.cpp
+++ b/muse2/muse/widgets/musewidgetsplug.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: musewidgetsplug.cpp,v 1.9.2.9 2009/12/01 03:52:40 terminator356 Exp $
// (C) Copyright 2001-2003 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
// this file makes some of the MusE widgets available
diff --git a/muse2/muse/widgets/nentry.cpp b/muse2/muse/widgets/nentry.cpp
index 77710e5a..13569b0d 100644
--- a/muse2/muse/widgets/nentry.cpp
+++ b/muse2/muse/widgets/nentry.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: nentry.cpp,v 1.1.1.1.2.1 2008/05/21 00:28:54 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QApplication>
@@ -21,6 +36,8 @@
#define TIMEC2 20
#define TIMER4 50
+namespace MusEWidget {
+
NentryFilter::NentryFilter(QObject* parent)
: QObject(parent)
{
@@ -399,3 +416,4 @@ bool Nentry::keyPress(QKeyEvent* event)
return true;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/nentry.h b/muse2/muse/widgets/nentry.h
index 48343b4a..c0508c63 100644
--- a/muse2/muse/widgets/nentry.h
+++ b/muse2/muse/widgets/nentry.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: nentry.h,v 1.1.1.1.2.2 2008/05/21 00:28:54 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __NENTRY_H__
@@ -15,6 +30,8 @@ class QLabel;
class QLineEdit;
class QTimer;
+namespace MusEWidget {
+
class NentryFilter : public QObject {
Q_OBJECT
@@ -81,4 +98,7 @@ class Nentry : public QFrame {
void setFocusPolicy(Qt::FocusPolicy);
bool contextMenu(QContextMenuEvent*);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/noteinfo.cpp b/muse2/muse/widgets/noteinfo.cpp
index f6d40857..2a262723 100644
--- a/muse2/muse/widgets/noteinfo.cpp
+++ b/muse2/muse/widgets/noteinfo.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: noteinfo.cpp,v 1.4.2.1 2008/08/18 00:15:26 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QLabel>
@@ -16,6 +31,8 @@
///#include "posedit.h"
#include "pitchedit.h"
+namespace MusEWidget {
+
//---------------------------------------------------
// NoteInfo
// ToolBar
@@ -209,3 +226,4 @@ void NoteInfo::timeChanged(const Pos& pos)
emit valueChanged(VAL_TIME, pos.tick());
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/noteinfo.h b/muse2/muse/widgets/noteinfo.h
index 64842988..6ca34a42 100644
--- a/muse2/muse/widgets/noteinfo.h
+++ b/muse2/muse/widgets/noteinfo.h
@@ -2,6 +2,21 @@
// Linux Music Editor
// $Id: noteinfo.h,v 1.3 2004/01/09 17:12:54 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __NOTE_INFO_H__
@@ -17,9 +32,12 @@ namespace Awl {
class QSpinBox;
///class PosEdit;
-class PitchEdit;
class Pos;
+namespace MusEWidget {
+
+class PitchEdit;
+
//---------------------------------------------------------
// NoteInfo
//---------------------------------------------------------
@@ -57,5 +75,8 @@ class NoteInfo : public QToolBar {
signals:
void valueChanged(NoteInfo::ValType, int);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/pastedialog.cpp b/muse2/muse/widgets/pastedialog.cpp
index a772e45b..0a6ce463 100644
--- a/muse2/muse/widgets/pastedialog.cpp
+++ b/muse2/muse/widgets/pastedialog.cpp
@@ -10,6 +10,8 @@
#include "xml.h"
#include "gconfig.h"
+using MusEConfig::config;
+
PasteDialog::PasteDialog(QWidget* parent)
: QDialog(parent)
{
diff --git a/muse2/muse/widgets/pitchedit.cpp b/muse2/muse/widgets/pitchedit.cpp
index 563cd6a8..7d637d01 100644
--- a/muse2/muse/widgets/pitchedit.cpp
+++ b/muse2/muse/widgets/pitchedit.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: pitchedit.cpp,v 1.2 2004/01/09 17:12:54 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
#include "pitchedit.h"
#include "helper.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// PitchEdit
//---------------------------------------------------------
@@ -62,3 +79,4 @@ void PitchEdit::setDeltaMode(bool val)
setRange(0, 127);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/pitchedit.h b/muse2/muse/widgets/pitchedit.h
index 8d2c8789..0c334d22 100644
--- a/muse2/muse/widgets/pitchedit.h
+++ b/muse2/muse/widgets/pitchedit.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: pitchedit.h,v 1.2 2004/01/09 17:12:54 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __PITCHEDIT_H__
@@ -10,6 +25,10 @@
#include <QSpinBox>
+extern QString pitch2string(int v);
+
+namespace MusEWidget {
+
//---------------------------------------------------------
// PitchEdit
//---------------------------------------------------------
@@ -28,6 +47,6 @@ class PitchEdit : public QSpinBox {
void setDeltaMode(bool);
};
-extern QString pitch2string(int v);
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/pitchlabel.cpp b/muse2/muse/widgets/pitchlabel.cpp
index 91daf09f..b1f062a8 100644
--- a/muse2/muse/widgets/pitchlabel.cpp
+++ b/muse2/muse/widgets/pitchlabel.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: pitchlabel.cpp,v 1.2 2004/05/16 16:55:01 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QApplication>
@@ -12,6 +27,8 @@
#include "pitchlabel.h"
#include "helper.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// PitchLabel
//---------------------------------------------------------
@@ -95,3 +112,4 @@ void PitchLabel::setPitch(int val)
setValue(val);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/pitchlabel.h b/muse2/muse/widgets/pitchlabel.h
index d29a4ee4..3fe2eb42 100644
--- a/muse2/muse/widgets/pitchlabel.h
+++ b/muse2/muse/widgets/pitchlabel.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: pitchlabel.h,v 1.1.1.1 2003/10/27 18:54:49 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __PITCHLABEL_H__
@@ -10,6 +25,8 @@
#include <QLabel>
+namespace MusEWidget {
+
//---------------------------------------------------------
// PitchLabel
//---------------------------------------------------------
@@ -36,6 +53,7 @@ class PitchLabel : public QLabel {
bool pitchMode() const { return _pitchMode; }
};
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/popupmenu.cpp b/muse2/muse/widgets/popupmenu.cpp
index adbe7dd6..2b0b6711 100644
--- a/muse2/muse/widgets/popupmenu.cpp
+++ b/muse2/muse/widgets/popupmenu.cpp
@@ -7,6 +7,21 @@
//
// PopupMenu sub-class of QMenu created by Tim.
// (C) Copyright 2010-2011 Tim E. Real (terminator356 A T sourceforge D O T net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
//#include <stdio.h>
@@ -26,6 +41,8 @@
#include "route.h"
+namespace MusEWidget {
+
//======================
// PopupMenu
//======================
@@ -157,7 +174,7 @@ bool PopupMenu::event(QEvent* event)
case QEvent::MouseButtonDblClick:
{
if(_stayOpen)
- //if(_stayOpen && config.popupsDefaultStayOpen)
+ //if(_stayOpen && MusEConfig::config.popupsDefaultStayOpen)
{
QMouseEvent* e = static_cast<QMouseEvent*>(event);
if(e->modifiers() == Qt::NoModifier)
@@ -176,7 +193,7 @@ bool PopupMenu::event(QEvent* event)
case QEvent::KeyPress:
{
if(_stayOpen)
- //if(_stayOpen && config.popupsDefaultStayOpen)
+ //if(_stayOpen && MusEConfig::config.popupsDefaultStayOpen)
{
QKeyEvent* e = static_cast<QKeyEvent*>(event);
if(e->modifiers() == Qt::NoModifier && e->key() == Qt::Key_Space)
@@ -330,7 +347,7 @@ void PopupMenu::mouseReleaseEvent(QMouseEvent *e)
#else
// Check for Ctrl to stay open.
- if(!_stayOpen || (!config.popupsDefaultStayOpen && (e->modifiers() & Qt::ControlModifier) == 0))
+ if(!_stayOpen || (!MusEConfig::config.popupsDefaultStayOpen && (e->modifiers() & Qt::ControlModifier) == 0))
{
QMenu::mouseReleaseEvent(e);
return;
@@ -373,3 +390,4 @@ void PopupView::clear()
}
*/
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/popupmenu.h b/muse2/muse/widgets/popupmenu.h
index e0e7d26f..b51cfd56 100644
--- a/muse2/muse/widgets/popupmenu.h
+++ b/muse2/muse/widgets/popupmenu.h
@@ -7,6 +7,21 @@
//
// PopupMenu sub-class of QMenu created by Tim.
// (C) Copyright 2010-2011 Tim E. Real (terminator356 A T sourceforge D O T net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __POPUPMENU_H__
@@ -32,6 +47,8 @@ class QEvent;
//class QTimer;
//class QStandardItemModel;
+namespace MusEWidget {
+
class PopupMenu : public QMenu
{
Q_OBJECT
@@ -84,6 +101,7 @@ class PopupView : public QColumnView
};
*/
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/posedit.cpp b/muse2/muse/widgets/posedit.cpp
index 3accf557..0e031c38 100644
--- a/muse2/muse/widgets/posedit.cpp
+++ b/muse2/muse/widgets/posedit.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: posedit.cpp,v 1.3.2.2 2008/05/21 00:28:54 terminator356 Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <values.h>
@@ -23,6 +38,8 @@
extern int mtcType;
+namespace MusEWidget {
+
//---------------------------------------------------------
// QNumberSection
//---------------------------------------------------------
@@ -852,3 +869,5 @@ void PosEdit::setEnabled(bool v)
QWidget::setEnabled(v);
updateButtons();
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/posedit.h b/muse2/muse/widgets/posedit.h
index e17da3a2..3224a3a6 100644
--- a/muse2/muse/widgets/posedit.h
+++ b/muse2/muse/widgets/posedit.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: posedit.h,v 1.1.1.1.2.1 2004/12/27 19:47:25 lunar_shuttle Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __POSEDIT_H__
@@ -19,6 +34,8 @@ class QTimerEvent;
class PosEditor;
class SpinBox;
+namespace MusEWidget {
+
//---------------------------------------------------------
// PosEdit
//---------------------------------------------------------
@@ -101,4 +118,6 @@ class PosEdit : public QWidget
void enterPressed();
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/poslabel.cpp b/muse2/muse/widgets/poslabel.cpp
index 78903a1f..98a7eba3 100644
--- a/muse2/muse/widgets/poslabel.cpp
+++ b/muse2/muse/widgets/poslabel.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: poslabel.cpp,v 1.2.2.2 2009/04/06 01:24:55 terminator356 Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdlib.h>
@@ -20,6 +35,8 @@
extern int mtcType;
+namespace MusEWidget {
+
//---------------------------------------------------------
// PosLabel
//---------------------------------------------------------
@@ -66,7 +83,7 @@ void PosLabel::updateValue()
{
QString s;
if (_smpte) {
- double time = double(_sampleValue) / double(sampleRate);
+ double time = double(_sampleValue) / double(MusEGlobal::sampleRate);
int min = int(time) / 60;
int sec = int(time) % 60;
double rest = time - (min * 60 + sec);
@@ -154,3 +171,4 @@ void PosLabel::setSmpte(bool val)
updateValue();
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/poslabel.h b/muse2/muse/widgets/poslabel.h
index 7be236ec..38236ac7 100644
--- a/muse2/muse/widgets/poslabel.h
+++ b/muse2/muse/widgets/poslabel.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: poslabel.h,v 1.2 2004/01/11 18:55:37 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __POSLABEL_H__
@@ -10,6 +25,8 @@
#include <QLabel>
+namespace MusEWidget {
+
//---------------------------------------------------------
// PosLabel
//---------------------------------------------------------
@@ -41,6 +58,7 @@ class PosLabel : public QLabel {
bool smpte() const { return _smpte; }
};
+} // namespace MusEWidget
#endif
diff --git a/muse2/muse/widgets/projectcreateimpl.cpp b/muse2/muse/widgets/projectcreateimpl.cpp
index 369e806a..d6f918b3 100644
--- a/muse2/muse/widgets/projectcreateimpl.cpp
+++ b/muse2/muse/widgets/projectcreateimpl.cpp
@@ -1,3 +1,25 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/projectcreateimpl.cpp $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#include <stdio.h>
#include <qfiledialog.h>
#include <qdir.h>
@@ -6,12 +28,14 @@
#include "globals.h"
#include "app.h"
+namespace MusEWidget {
+
ProjectCreateImpl::ProjectCreateImpl(QWidget *parent) :
QDialog(parent)
{
setupUi(this);
- createFolderCheckbox->setChecked(config.projectStoreInFolder);
+ createFolderCheckbox->setChecked(MusEConfig::config.projectStoreInFolder);
connect(browseDirButton,SIGNAL(clicked()), this, SLOT(selectDirectory()));
connect(projectNameEdit,SIGNAL(textChanged(QString)), this, SLOT(updateDirectoryPath()));
connect(createFolderCheckbox,SIGNAL(clicked()), this, SLOT(updateDirectoryPath()));
@@ -22,7 +46,7 @@ ProjectCreateImpl::ProjectCreateImpl(QWidget *parent) :
// as of Qt-4.7.1
//commentEdit->setPlaceholderText("<Add information about project here>");
#endif
- directoryPath = config.projectBaseFolder;
+ directoryPath = MusEConfig::config.projectBaseFolder;
updateDirectoryPath();
show();
}
@@ -64,8 +88,10 @@ QString ProjectCreateImpl::getSongInfo()
}
void ProjectCreateImpl::ok()
{
- config.projectStoreInFolder = createFolderCheckbox->isChecked();
- config.projectBaseFolder = directoryPath;
- muse->changeConfig(true);
+ MusEConfig::config.projectStoreInFolder = createFolderCheckbox->isChecked();
+ MusEConfig::config.projectBaseFolder = directoryPath;
+ MusEGlobal::muse->changeConfig(true);
emit accept();
}
+
+} //namespace MusEWidget
diff --git a/muse2/muse/widgets/projectcreateimpl.h b/muse2/muse/widgets/projectcreateimpl.h
index 3ca61e36..d6881840 100644
--- a/muse2/muse/widgets/projectcreateimpl.h
+++ b/muse2/muse/widgets/projectcreateimpl.h
@@ -1,9 +1,33 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/projectcreateimpl.h $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#ifndef PROJECTCREATEIMPL_H
#define PROJECTCREATEIMPL_H
#include <QDialog>
#include "ui_projectcreate.h"
+namespace MusEWidget {
+
class ProjectCreateImpl : public QDialog, Ui::ProjectCreate
{
Q_OBJECT
@@ -23,4 +47,6 @@ public slots:
};
+} // namespace MusEWidget
+
#endif // PROJECTCREATEIMPL_H
diff --git a/muse2/muse/widgets/routepopup.cpp b/muse2/muse/widgets/routepopup.cpp
index 0afbbdb6..ec3f3ea0 100644
--- a/muse2/muse/widgets/routepopup.cpp
+++ b/muse2/muse/widgets/routepopup.cpp
@@ -5,8 +5,10 @@
// RoutePopupMenu.cpp
// (C) Copyright 2011 Tim E. Real (terminator356 A T sourceforge D O T net)
//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2.
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +17,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//=============================================================================
#include "app.h"
@@ -32,6 +34,8 @@
#include "menutitleitem.h"
#include "popupmenu.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// addMenuItem
//---------------------------------------------------------
@@ -887,7 +891,7 @@ void RoutePopupMenu::popupActivated(QAction* action)
{
int n = action->data().value<int>();
if(!_isOutMenu && n == 0)
- muse->configMidiPorts();
+ MusEGlobal::muse->configMidiPorts();
return;
}
}
@@ -1217,7 +1221,7 @@ void RoutePopupMenu::prepare()
MenuTitleItem* titel = new MenuTitleItem(QString(buffer), _pup);
_pup->addAction(titel);
- if(!checkAudioDevice())
+ if(!MusEGlobal::checkAudioDevice())
{
_pup->clear();
return;
@@ -1302,7 +1306,7 @@ void RoutePopupMenu::prepare()
MenuTitleItem* titel = new MenuTitleItem(QString(buffer), _pup);
_pup->addAction(titel);
- if(!checkAudioDevice())
+ if(!MusEGlobal::checkAudioDevice())
{
_pup->clear();
return;
@@ -1418,3 +1422,4 @@ void RoutePopupMenu::popup(const QPoint& p, Track* track, bool isOutput)
_pup->popup(p);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/routepopup.h b/muse2/muse/widgets/routepopup.h
index 6772e8ca..7f5a8820 100644
--- a/muse2/muse/widgets/routepopup.h
+++ b/muse2/muse/widgets/routepopup.h
@@ -5,8 +5,10 @@
// RoutePopupMenu.h
// (C) Copyright 2011 Tim E. Real (terminator356 A T sourceforge D O T net)
//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2.
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +17,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//=============================================================================
#ifndef __ROUTEPOPUPMENU_H__
@@ -25,12 +27,15 @@
class Track;
class AudioTrack;
-class PopupMenu;
class QWidget;
class QString;
class QAction;
class QPoint;
+namespace MusEWidget {
+
+class PopupMenu;
+
class RoutePopupMenu : public QObject
{
Q_OBJECT
@@ -70,4 +75,6 @@ class RoutePopupMenu : public QObject
void popup(const QPoint& p, Track* track = 0, bool isOutput = false);
};
+}
+
#endif
diff --git a/muse2/muse/widgets/scldiv.cpp b/muse2/muse/widgets/scldiv.cpp
index 0a75cbd4..ba19f659 100644
--- a/muse2/muse/widgets/scldiv.cpp
+++ b/muse2/muse/widgets/scldiv.cpp
@@ -4,17 +4,30 @@
// $Id: scldiv.cpp,v 1.1.1.1 2003/10/27 18:54:32 wschweer Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
#include "scldiv.h"
#include "mmath.h"
+namespace MusEWidget {
+
// ScaleDiv - A class for building scale divisions
//
// The ScaleDiv class can build
@@ -71,10 +84,10 @@ static bool limRange(double &val, double v1, double v2, double eps_rel = 0.0,
{
bool rv = TRUE;
- double vmin = qwtMin(v1, v2);
- double vmax = qwtMax(v1, v2);
- double delta_min = qwtMax(qwtAbs(eps_rel * vmin), qwtAbs(eps_abs));
- double delta_max = qwtMax(qwtAbs(eps_rel * vmax), qwtAbs(eps_abs));
+ double vmin = MusEUtil::qwtMin(v1, v2);
+ double vmax = MusEUtil::qwtMax(v1, v2);
+ double delta_min = MusEUtil::qwtMax(MusEUtil::qwtAbs(eps_rel * vmin), MusEUtil::qwtAbs(eps_abs));
+ double delta_max = MusEUtil::qwtMax(MusEUtil::qwtAbs(eps_rel * vmax), MusEUtil::qwtAbs(eps_abs));
if (val < vmin)
{
@@ -220,8 +233,8 @@ bool ScaleDiv::rebuild(double x1, double x2, int maxMajSteps, int maxMinSteps,
int rv;
- d_lBound = qwtMin(x1, x2);
- d_hBound = qwtMax(x1, x2);
+ d_lBound = MusEUtil::qwtMin(x1, x2);
+ d_hBound = MusEUtil::qwtMax(x1, x2);
d_log = log;
if (d_log)
@@ -233,8 +246,8 @@ bool ScaleDiv::rebuild(double x1, double x2, int maxMajSteps, int maxMinSteps,
{
d_lBound = x1;
d_hBound = x2;
- qwtTwistArray(d_majMarks.data(), d_majMarks.size());
- qwtTwistArray(d_minMarks.data(), d_minMarks.size());
+ MusEUtil::qwtTwistArray(d_majMarks.data(), d_majMarks.size());
+ MusEUtil::qwtTwistArray(d_minMarks.data(), d_minMarks.size());
}
return rv;
@@ -280,9 +293,9 @@ bool ScaleDiv::buildLinDiv(int maxMajSteps, int maxMinSteps, double step)
bool rv = TRUE;
// parameter range check
- maxMajSteps = qwtMax(1, maxMajSteps);
- maxMinSteps = qwtMax(0, maxMinSteps);
- step = qwtAbs(step);
+ maxMajSteps = MusEUtil::qwtMax(1, maxMajSteps);
+ maxMinSteps = MusEUtil::qwtMax(0, maxMinSteps);
+ step = MusEUtil::qwtAbs(step);
// reset vectors
d_minMarks.resize(0);
@@ -294,7 +307,7 @@ bool ScaleDiv::buildLinDiv(int maxMajSteps, int maxMinSteps, double step)
// Set up major divisions
//
if (step == 0.0)
- d_majStep = qwtCeil125(qwtAbs(d_hBound - d_lBound) * 0.999999
+ d_majStep = MusEUtil::qwtCeil125(MusEUtil::qwtAbs(d_hBound - d_lBound) * 0.999999
/ double(maxMajSteps));
else
d_majStep = step;
@@ -304,10 +317,10 @@ bool ScaleDiv::buildLinDiv(int maxMajSteps, int maxMinSteps, double step)
firstTick = ceil( (d_lBound - step_eps * d_majStep) / d_majStep) * d_majStep;
lastTick = floor( (d_hBound + step_eps * d_majStep) / d_majStep) * d_majStep;
- nMaj = qwtMin(10000, int(rint((lastTick - firstTick) / d_majStep)) + 1);
+ nMaj = MusEUtil::qwtMin(10000, int(rint((lastTick - firstTick) / d_majStep)) + 1);
d_majMarks.resize(nMaj);
- qwtLinSpace(d_majMarks.data(), d_majMarks.size(), firstTick, lastTick);
+ MusEUtil::qwtLinSpace(d_majMarks.data(), d_majMarks.size(), firstTick, lastTick);
//
// Set up minor divisions
@@ -315,14 +328,14 @@ bool ScaleDiv::buildLinDiv(int maxMajSteps, int maxMinSteps, double step)
if (maxMinSteps < 1) // no minor divs
return TRUE;
- minStep = qwtCeil125( d_majStep / double(maxMinSteps) );
+ minStep = MusEUtil::qwtCeil125( d_majStep / double(maxMinSteps) );
if (minStep == 0.0) return TRUE;
- nMin = qwtAbs(int(rint(d_majStep / minStep))) - 1; // # minor steps per interval
+ nMin = MusEUtil::qwtAbs(int(rint(d_majStep / minStep))) - 1; // # minor steps per interval
// Do the minor steps fit into the interval?
- if ( qwtAbs(double(nMin + 1) * minStep - d_majStep) > step_eps * d_majStep)
+ if ( MusEUtil::qwtAbs(double(nMin + 1) * minStep - d_majStep) > step_eps * d_majStep)
{
nMin = 1;
minStep = d_majStep * 0.5;
@@ -397,9 +410,9 @@ bool ScaleDiv::buildLogDiv(int maxMajSteps, int maxMinSteps, double majStep)
// Parameter range check
- maxMajSteps = qwtMax(1, qwtAbs(maxMajSteps));
- maxMinSteps = qwtMax(0, qwtAbs(maxMinSteps));
- majStep = qwtAbs(majStep);
+ maxMajSteps = MusEUtil::qwtMax(1, MusEUtil::qwtAbs(maxMajSteps));
+ maxMinSteps = MusEUtil::qwtMax(0, MusEUtil::qwtAbs(maxMinSteps));
+ majStep = MusEUtil::qwtAbs(majStep);
// boundary check
limRange(d_hBound, LOG_MIN, LOG_MAX);
@@ -429,12 +442,12 @@ bool ScaleDiv::buildLogDiv(int maxMajSteps, int maxMinSteps, double majStep)
// Set up major scale divisions
//
if (majStep == 0.0)
- d_majStep = qwtCeil125( width * 0.999999 / double(maxMajSteps));
+ d_majStep = MusEUtil::qwtCeil125( width * 0.999999 / double(maxMajSteps));
else
d_majStep = majStep;
// major step must be >= 1 decade
- d_majStep = qwtMax(d_majStep, 1.0);
+ d_majStep = MusEUtil::qwtMax(d_majStep, 1.0);
lFirst = ceil((log10(d_lBound) - step_eps * d_majStep) / d_majStep) * d_majStep;
@@ -443,10 +456,10 @@ bool ScaleDiv::buildLogDiv(int maxMajSteps, int maxMinSteps, double majStep)
firstTick = pow(10.0, lFirst);
lastTick = pow(10.0, lLast);
- nMaj = qwtMin(10000, int(rint(qwtAbs(lLast - lFirst) / d_majStep)) + 1);
+ nMaj = MusEUtil::qwtMin(10000, int(rint(MusEUtil::qwtAbs(lLast - lFirst) / d_majStep)) + 1);
d_majMarks.resize(nMaj);
- qwtLogSpace(d_majMarks.data(), d_majMarks.size(), firstTick, lastTick);
+ MusEUtil::qwtLogSpace(d_majMarks.data(), d_majMarks.size(), firstTick, lastTick);
//
@@ -525,15 +538,15 @@ bool ScaleDiv::buildLogDiv(int maxMajSteps, int maxMinSteps, double majStep)
{
// substep width in decades, at least one decade
- minStep = qwtCeil125( (d_majStep - step_eps * (d_majStep / double(maxMinSteps)))
+ minStep = MusEUtil::qwtCeil125( (d_majStep - step_eps * (d_majStep / double(maxMinSteps)))
/ double(maxMinSteps) );
- minStep = qwtMax(1.0, minStep);
+ minStep = MusEUtil::qwtMax(1.0, minStep);
// # subticks per interval
nMin = int(rint(d_majStep / minStep)) - 1;
// Do the minor steps fit into the interval?
- if ( qwtAbs( double(nMin + 1) * minStep - d_majStep) > step_eps * d_majStep)
+ if ( MusEUtil::qwtAbs( double(nMin + 1) * minStep - d_majStep) > step_eps * d_majStep)
nMin = 0;
if (nMin < 1) return TRUE; // no subticks
@@ -542,7 +555,7 @@ bool ScaleDiv::buildLogDiv(int maxMajSteps, int maxMinSteps, double majStep)
buffer.resize((d_majMarks.size() + 1) * nMin );
// substep factor = 10^substeps
- minFactor = qwtMax(pow(10,minStep), 10.0);
+ minFactor = MusEUtil::qwtMax(pow(10,minStep), 10.0);
// Are there minor ticks below the first major tick?
if ( d_lBound < firstTick )
@@ -646,7 +659,7 @@ void ScaleDiv::reset()
d_log = FALSE;
}
-
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/scldiv.h b/muse2/muse/widgets/scldiv.h
index 3d1e1d58..1f91c2db 100644
--- a/muse2/muse/widgets/scldiv.h
+++ b/muse2/muse/widgets/scldiv.h
@@ -4,11 +4,22 @@
// $Id: scldiv.h,v 1.1.1.1 2003/10/27 18:54:43 wschweer Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SCLDIV_H__
@@ -16,6 +27,8 @@
#include <QVector>
+namespace MusEWidget {
+
class ScaleDiv
{
double d_lBound;
@@ -53,4 +66,6 @@ class ScaleDiv
bool log, double step = 0.0, bool ascend = TRUE);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/scldraw.cpp b/muse2/muse/widgets/scldraw.cpp
index 709e104a..c35d04e0 100644
--- a/muse2/muse/widgets/scldraw.cpp
+++ b/muse2/muse/widgets/scldraw.cpp
@@ -4,11 +4,22 @@
// $Id: scldraw.cpp,v 1.1.1.1 2003/10/27 18:54:36 wschweer Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
@@ -19,6 +30,8 @@
#include "scldraw.h"
+namespace MusEWidget {
+
int const ScaleDraw::minLen = 10;
const double step_eps = 1.0e-6;
@@ -211,7 +224,7 @@ void ScaleDraw::draw(QPainter *p) const
hval = majTick - 0.5 * d_scldiv.majStep();
}
- if (qwtAbs(val-hval) < step_eps * d_scldiv.majStep())
+ if (MusEUtil::qwtAbs(val-hval) < step_eps * d_scldiv.majStep())
drawTick(p, val, d_medLen);
else
drawTick(p, val, d_minLen);
@@ -264,10 +277,10 @@ void ScaleDraw::drawTick(QPainter *p, double val, int len) const
if ((tval <= d_minAngle + 359 * 16) || (tval >= d_minAngle - 359 * 16))
{
arc = double(tval) / 16.0 * M_PI / 180.0;
- x1 = qwtInt(d_xCenter + sin(arc) * d_radius);
- x2 = qwtInt(d_xCenter + sin(arc) * (d_radius + double(len)));
- y1 = qwtInt(d_yCenter - cos(arc) * d_radius);
- y2 = qwtInt(d_yCenter - cos(arc) * (d_radius + double(len)));
+ x1 = MusEUtil::qwtInt(d_xCenter + sin(arc) * d_radius);
+ x2 = MusEUtil::qwtInt(d_xCenter + sin(arc) * (d_radius + double(len)));
+ y1 = MusEUtil::qwtInt(d_yCenter - cos(arc) * d_radius);
+ y2 = MusEUtil::qwtInt(d_yCenter - cos(arc) * (d_radius + double(len)));
p->drawLine(x1, y1, x2, y2);
}
break;
@@ -311,7 +324,7 @@ void ScaleDraw::drawLabel(QPainter *p, double val) const
tval = transform(val);
// correct rounding errors if val = 0
- if ((!d_scldiv.logScale()) && (qwtAbs(val) < qwtAbs(step_eps * d_scldiv.majStep())))
+ if ((!d_scldiv.logScale()) && (MusEUtil::qwtAbs(val) < MusEUtil::qwtAbs(step_eps * d_scldiv.majStep())))
val = 0.0;
label.setNum(val, d_fmt, d_prec);
@@ -342,12 +355,12 @@ void ScaleDraw::drawLabel(QPainter *p, double val) const
if ((arc < -M_PI) || (arc > M_PI))
arc -= floor((arc + M_PI) / M_PI * 0.5) * 2.0 * M_PI;
- xpos = 1 + qwtInt(d_xCenter + (d_radius + double(d_majLen + d_vpad)) * sin(arc));
- ypos = qwtInt(d_yCenter - (d_radius + double(d_majLen + d_vpad)) * cos(arc));
+ xpos = 1 + MusEUtil::qwtInt(d_xCenter + (d_radius + double(d_majLen + d_vpad)) * sin(arc));
+ ypos = MusEUtil::qwtInt(d_yCenter - (d_radius + double(d_majLen + d_vpad)) * cos(arc));
if (arc < -pi_75)
{
- p->drawText(xpos - qwtInt(double(fm.width(label))
+ p->drawText(xpos - MusEUtil::qwtInt(double(fm.width(label))
* (1.0 + (arc + pi_75) * M_2_PI) ),
ypos + fm.ascent() - 1,
label);
@@ -357,13 +370,13 @@ void ScaleDraw::drawLabel(QPainter *p, double val) const
p->drawText(xpos - fm.width(label),
- ypos - qwtInt(double(fm.ascent() - 1)
+ ypos - MusEUtil::qwtInt(double(fm.ascent() - 1)
* (arc + M_PI_4) * M_2_PI),
label);
}
else if (arc < pi_4)
{
- p->drawText(xpos + qwtInt(double(fm.width(label))
+ p->drawText(xpos + MusEUtil::qwtInt(double(fm.width(label))
* ( arc - M_PI_4 ) * M_2_PI ),
ypos,
label);
@@ -371,13 +384,13 @@ void ScaleDraw::drawLabel(QPainter *p, double val) const
else if (arc < pi_75)
{
p->drawText(xpos,
- ypos + qwtInt(double(fm.ascent() - 1)
+ ypos + MusEUtil::qwtInt(double(fm.ascent() - 1)
* (arc - M_PI_4) * M_2_PI),
label);
}
else
{
- p->drawText(xpos - qwtInt(double(fm.width(label))
+ p->drawText(xpos - MusEUtil::qwtInt(double(fm.width(label))
* ( arc - pi_75) * M_2_PI ),
ypos + fm.ascent() - 1,
label);
@@ -420,8 +433,8 @@ void ScaleDraw::drawBackbone(QPainter *p) const
break;
case Round:
- a1 = qwtMin(i1(), i2()) - 90 * 16;
- a2 = qwtMax(i1(), i2()) - 90 * 16;
+ a1 = MusEUtil::qwtMin(i1(), i2()) - 90 * 16;
+ a2 = MusEUtil::qwtMax(i1(), i2()) - 90 * 16;
p->drawArc(d_xorg, d_yorg, d_len,
d_len,
@@ -681,7 +694,7 @@ QRect ScaleDraw::maxBoundingRect(QPainter *p) const
while (a > 2880) a -= 5760;
while (a < - 2880) a += 5760;
- ar = qwtAbs(a);
+ ar = MusEUtil::qwtAbs(a);
if (ar < amin) amin = ar;
if (ar > amax) amax = ar;
@@ -695,18 +708,18 @@ QRect ScaleDraw::maxBoundingRect(QPainter *p) const
while (a > 2880) a -= 5760;
while (a < - 2880) a += 5760;
- ar = qwtAbs(a);
+ ar = MusEUtil::qwtAbs(a);
if (ar < amin) amin = ar;
if (ar > amax) amax = ar;
}
arc = double(amin) / 16.0 * M_PI / 180.0;
- r.setTop(qwtInt(d_yCenter - (d_radius + double(d_majLen + d_vpad)) * cos(arc))
+ r.setTop(MusEUtil::qwtInt(d_yCenter - (d_radius + double(d_majLen + d_vpad)) * cos(arc))
+ fm.ascent() );
arc = double(amax) / 16.0 * M_PI / 180.0;
- r.setBottom(qwtInt(d_yCenter - (d_radius + double(d_majLen + d_vpad)) * cos(arc))
+ r.setBottom(MusEUtil::qwtInt(d_yCenter - (d_radius + double(d_majLen + d_vpad)) * cos(arc))
+ fm.height() );
wmax = d_len + d_majLen + d_hpad + wl;
@@ -752,10 +765,10 @@ void ScaleDraw::setAngleRange(double angle1, double angle2)
{
int amin, amax;
- angle1 = qwtLim(angle1, -360.0, 360.0);
- angle2 = qwtLim(angle2, -360.0, 360.0);
- amin = int(rint(qwtMin(angle1, angle2) * 16.0));
- amax = int(rint(qwtMax(angle1, angle2) * 16.0));
+ angle1 = MusEUtil::qwtLim(angle1, -360.0, 360.0);
+ angle2 = MusEUtil::qwtLim(angle2, -360.0, 360.0);
+ amin = int(rint(MusEUtil::qwtMin(angle1, angle2) * 16.0));
+ amax = int(rint(MusEUtil::qwtMax(angle1, angle2) * 16.0));
if (amin == amax)
{
@@ -831,10 +844,10 @@ int ScaleDraw::maxLabelWidth(QPainter *p, int worst) const
{
val = d_scldiv.majMark(i);
// correct rounding errors if val = 0
- if ((!d_scldiv.logScale()) && (qwtAbs(val) < step_eps * qwtAbs(d_scldiv.majStep())))
+ if ((!d_scldiv.logScale()) && (MusEUtil::qwtAbs(val) < step_eps * MusEUtil::qwtAbs(d_scldiv.majStep())))
val = 0.0;
s.setNum(val, d_fmt, d_prec);
- rv = qwtMax(rv,fm.width(s));
+ rv = MusEUtil::qwtMax(rv,fm.width(s));
}
}
@@ -869,7 +882,7 @@ int ScaleDraw::maxLabelWidth(QPainter *p, int worst) const
//
//------------------------------------------------------------
-
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/scldraw.h b/muse2/muse/widgets/scldraw.h
index 08a198ca..2c1543cd 100644
--- a/muse2/muse/widgets/scldraw.h
+++ b/muse2/muse/widgets/scldraw.h
@@ -4,11 +4,22 @@
// $Id: scldraw.h,v 1.1.1.1 2003/10/27 18:55:08 wschweer Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SCLDRAW_H__
@@ -20,7 +31,7 @@
class QPainter;
class QRect;
-class AutoScale;
+namespace MusEWidget {
class ScaleDraw : public DiMap {
public:
@@ -76,6 +87,8 @@ class ScaleDraw : public DiMap {
void draw(QPainter *p) const;
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/sclif.cpp b/muse2/muse/widgets/sclif.cpp
index 8740bc53..93987999 100644
--- a/muse2/muse/widgets/sclif.cpp
+++ b/muse2/muse/widgets/sclif.cpp
@@ -4,15 +4,28 @@
// $Id: sclif.cpp,v 1.1.1.1 2003/10/27 18:55:10 wschweer Exp $
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "sclif.h"
+namespace MusEWidget {
+
// ScaleIf - An interface class for widgets containing a scale
//
// This interface class is used to provide classes
@@ -203,3 +216,4 @@ void ScaleIf::setScaleMaxMinor(int ticks)
}
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/sclif.h b/muse2/muse/widgets/sclif.h
index ec8eafc9..e168dfc3 100644
--- a/muse2/muse/widgets/sclif.h
+++ b/muse2/muse/widgets/sclif.h
@@ -4,11 +4,22 @@
// $Id: sclif.h,v 1.1.1.1 2003/10/27 18:54:33 wschweer Exp $
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SCALE_IF_H__
@@ -16,6 +27,8 @@
#include "scldraw.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// ScaleIf
//---------------------------------------------------------
@@ -46,5 +59,7 @@ class ScaleIf
int scaleMaxMajor() const {return d_maxMinor;}
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/scrollscale.cpp b/muse2/muse/widgets/scrollscale.cpp
index 15ec0947..21ed10b6 100644
--- a/muse2/muse/widgets/scrollscale.cpp
+++ b/muse2/muse/widgets/scrollscale.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: scrollscale.cpp,v 1.2.2.2 2009/11/04 17:43:25 lunar_shuttle Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -20,6 +35,8 @@
#include "scrollscale.h"
#include "icons.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// setScale
// "val" - slider value in range 0-1024
@@ -509,3 +526,4 @@ int ScrollScale::convertQuickZoomLevelToMag(int zoomlevel)
return vals[zoomlevel];
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/scrollscale.h b/muse2/muse/widgets/scrollscale.h
index 67cfe573..0fce5b56 100644
--- a/muse2/muse/widgets/scrollscale.h
+++ b/muse2/muse/widgets/scrollscale.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: scrollscale.h,v 1.2.2.3 2009/11/04 17:43:26 lunar_shuttle Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SCROLLSCALE_H__
@@ -16,6 +31,8 @@ class QResizeEvent;
class QScrollBar;
class QToolButton;
+namespace MusEWidget {
+
//---------------------------------------------------------
// ScrollScale
//---------------------------------------------------------
@@ -82,5 +99,7 @@ class ScrollScale : public QWidget {
static int convertQuickZoomLevelToMag(int zoomlvl);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/section.h b/muse2/muse/widgets/section.h
index 7aaa4778..02b84355 100644
--- a/muse2/muse/widgets/section.h
+++ b/muse2/muse/widgets/section.h
@@ -3,11 +3,28 @@
// Linux Music Editor
// $Id: section.h,v 1.1.1.1 2003/10/27 18:54:27 wschweer Exp $
// (C) Copyright 2002 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SECTION_H__
#define __SECTION_H__
+namespace MusEWidget {
+
struct Section {
int offset;
unsigned len;
@@ -15,5 +32,7 @@ struct Section {
int val;
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/shortcutcapturedialog.cpp b/muse2/muse/widgets/shortcutcapturedialog.cpp
index 1c06eece..a470d698 100644
--- a/muse2/muse/widgets/shortcutcapturedialog.cpp
+++ b/muse2/muse/widgets/shortcutcapturedialog.cpp
@@ -1,14 +1,37 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/shortcutcapturedialog.cpp $
//
-// C++ Implementation: shortcutcapturedialog
-//
-// Description:
-// Dialog window for capturing keyboard shortcuts
+// Copyright (C) 1999-2011 by Werner Schweer and others
//
// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003
//
// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003
//
//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
+//
+// C++ Implementation: shortcutcapturedialog
+//
+// Description:
+// Dialog window for capturing keyboard shortcuts
+//
+
#include "shortcutcapturedialog.h"
#include "shortcuts.h"
@@ -17,6 +40,8 @@
#include <QInputEvent>
#include <QChar>
+namespace MusEWidget {
+
ShortcutCaptureDialog::ShortcutCaptureDialog(QWidget* parent, int index)
: QDialog(parent)
{
@@ -100,3 +125,4 @@ void ShortcutCaptureDialog::apply()
done(key);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/shortcutcapturedialog.h b/muse2/muse/widgets/shortcutcapturedialog.h
index a7ba69c7..9af3f7c2 100644
--- a/muse2/muse/widgets/shortcutcapturedialog.h
+++ b/muse2/muse/widgets/shortcutcapturedialog.h
@@ -1,13 +1,35 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/shortcutcapturedialog.h $
//
-// C++ Interface: shortcutcapturedialog
-//
-// Description:
-// Dialog window for capturing keyboard shortcuts
+// Copyright (C) 1999-2011 by Werner Schweer and others
//
// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003
//
// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003
//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
+//
+// C++ Interface: shortcutcapturedialog
+//
+// Description:
+// Dialog window for capturing keyboard shortcuts
+//
//
#include "shortcuts.h"
@@ -16,6 +38,8 @@
class QKeyEvent;
+namespace MusEWidget {
+
class ShortcutCaptureDialog : public QDialog, public Ui::ShortcutCaptureDialogBase
{
Q_OBJECT
@@ -33,3 +57,4 @@ class ShortcutCaptureDialog : public QDialog, public Ui::ShortcutCaptureDialogBa
~ShortcutCaptureDialog();
};
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/shortcutconfig.cpp b/muse2/muse/widgets/shortcutconfig.cpp
index 80d0290f..8e4d7b1a 100644
--- a/muse2/muse/widgets/shortcutconfig.cpp
+++ b/muse2/muse/widgets/shortcutconfig.cpp
@@ -1,14 +1,37 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/shortcutconfig.cpp $
//
-// C++ Implementation: shortcutconfig
-//
-// Description:
-// Dialog for configuring keyboard shortcuts
+// Copyright (C) 1999-2011 by Werner Schweer and others
//
// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003
//
// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003
//
//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
+//
+// C++ Implementation: shortcutconfig
+//
+// Description:
+// Dialog for configuring keyboard shortcuts
+//
+
#include <QCloseEvent>
#include <QKeySequence>
#include <QString>
@@ -18,6 +41,8 @@
#include "shortcutcapturedialog.h"
#include "shortcuts.h"
+namespace MusEWidget {
+
ShortcutConfig::ShortcutConfig(QWidget* parent)
: QDialog(parent)
{
@@ -132,3 +157,5 @@ void ShortcutConfig::assignAll()
applyButton->setDown(false);
done(_config_changed);
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/shortcutconfig.h b/muse2/muse/widgets/shortcutconfig.h
index f68bfd5a..fe417c05 100644
--- a/muse2/muse/widgets/shortcutconfig.h
+++ b/muse2/muse/widgets/shortcutconfig.h
@@ -1,14 +1,37 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/shortcutconfig.h $
//
-// C++ Interface: shortcutconfig
-//
-// Description:
-// Dialog for configuring keyboard shortcuts
-//
+// Copyright (C) 1999-2011 by Werner Schweer and others
// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003
//
// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003
//
//
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
+//
+// C++ Interface: shortcutconfig
+//
+// Description:
+// Dialog for configuring keyboard shortcuts
+//
+
#ifndef __SHORTCUTCONFIG_H
#define __SHORTCUTCONFIG_H
@@ -17,6 +40,9 @@ class QCloseEvent;
#include "ui_shortcutconfigbase.h"
#define SHRT_CATEGORY_COL 0
+
+namespace MusEWidget {
+
enum
{
SHRT_SHRTCUT_COL = 0,
@@ -57,4 +83,6 @@ class ShortcutConfig : public QDialog, public Ui::ShortcutConfigBase {
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/sigedit.cpp b/muse2/muse/widgets/sigedit.cpp
index d4c210e4..c2c5a842 100644
--- a/muse2/muse/widgets/sigedit.cpp
+++ b/muse2/muse/widgets/sigedit.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: sigedit.cpp,v 1.1.1.1.2.1 2004/12/28 23:23:51 lunar_shuttle Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -27,6 +42,8 @@
extern int mtcType;
+namespace MusEWidget {
+
bool Sig::isValid() const
{
if((z < 1) || (z > 63))
@@ -737,3 +754,5 @@ void SigEdit::enterPressed()
{
emit returnPressed();
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/sigedit.h b/muse2/muse/widgets/sigedit.h
index 07ae0741..3b1ca635 100644
--- a/muse2/muse/widgets/sigedit.h
+++ b/muse2/muse/widgets/sigedit.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: sigedit.h,v 1.1.1.1.2.1 2004/12/28 23:23:51 lunar_shuttle Exp $
// (C) Copyright 2002 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SIGEDIT_H__
@@ -15,6 +30,8 @@
class QResizeEvent;
class QTimerEvent;
+namespace MusEWidget {
+
class SigEditor;
class SpinBox;
@@ -85,4 +102,6 @@ class SigEdit : public QWidget
void enterPressed();
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/siglabel.cpp b/muse2/muse/widgets/siglabel.cpp
index 47fcd2f8..1a1c9164 100644
--- a/muse2/muse/widgets/siglabel.cpp
+++ b/muse2/muse/widgets/siglabel.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: siglabel.cpp,v 1.1.1.1 2003/10/27 18:54:28 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "siglabel.h"
@@ -20,6 +35,8 @@
#include <QWheelEvent>
#include <QLabel>
+namespace MusEWidget {
+
//---------------------------------------------------------
// SigLabel
// edit Signature Values (4/4)
@@ -162,3 +179,5 @@ void SigLabel::setFrame(bool flag)
setFrameStyle(flag ? Panel | Sunken : NoFrame);
setLineWidth(2);
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/siglabel.h b/muse2/muse/widgets/siglabel.h
index bf9e53b4..33248e53 100644
--- a/muse2/muse/widgets/siglabel.h
+++ b/muse2/muse/widgets/siglabel.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: siglabel.h,v 1.1.1.1 2003/10/27 18:54:56 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SIGLABEL_H__
@@ -15,6 +30,8 @@
class QWheelEvent;
class QMouseEvent;
+namespace MusEWidget {
+
//---------------------------------------------------------
// SigLabel
// show/edit time signature
@@ -43,5 +60,8 @@ class SigLabel : public QLabel {
AL::TimeSignature value() const { return AL::TimeSignature(z, n); }
void setFrame(bool);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/sigscale.cpp b/muse2/muse/widgets/sigscale.cpp
index 74ed0bcb..bcfb540e 100644
--- a/muse2/muse/widgets/sigscale.cpp
+++ b/muse2/muse/widgets/sigscale.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: sigscale.cpp,v 1.6 2004/04/11 13:03:32 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <values.h>
@@ -17,6 +32,8 @@
#include "song.h"
#include "gconfig.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// SigScale
//---------------------------------------------------------
@@ -115,7 +132,7 @@ void SigScale::pdraw(QPainter& p, const QRect& r)
if (x < 0)
x = 0;
- p.setFont(config.fonts[3]);
+ p.setFont(MusEConfig::config.fonts[3]);
///for (ciSigEvent si = sigmap.begin(); si != sigmap.end(); ++si) {
for (AL::ciSigEvent si = AL::sigmap.begin(); si != AL::sigmap.end(); ++si) {
///SigEvent* e = si->second;
@@ -149,4 +166,4 @@ void SigScale::pdraw(QPainter& p, const QRect& r)
p.drawLine(xp, 0, xp, h);
}
-
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/sigscale.h b/muse2/muse/widgets/sigscale.h
index 8c9ffea9..9ecacfb1 100644
--- a/muse2/muse/widgets/sigscale.h
+++ b/muse2/muse/widgets/sigscale.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: sigscale.h,v 1.2 2004/01/11 18:55:37 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SIGSCALE_H__
@@ -12,6 +27,8 @@
class MidiEditor;
+namespace MusEWidget {
+
//---------------------------------------------------------
// SigScale
// Time Signature Scale
@@ -42,5 +59,8 @@ class SigScale : public View {
public:
SigScale(int* raster, QWidget* parent, int xscale);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/slider.cpp b/muse2/muse/widgets/slider.cpp
index 4f68388d..f50c144a 100644
--- a/muse2/muse/widgets/slider.cpp
+++ b/muse2/muse/widgets/slider.cpp
@@ -1,3 +1,26 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/slider.cpp $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+// (C) Copyright 2011 Orcan Ogetbil (ogetbilo at sf.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#include <cmath>
#include "mmath.h"
@@ -6,6 +29,8 @@
#include "slider.h"
+namespace MusEWidget {
+
//-------------------------------------------------------------
// Slider - The Slider Widget
//
@@ -32,39 +57,27 @@
// ScalePos scalePos -- Position of the scale. Can be Slider::None,
// Slider::Left, Slider::Right, Slider::Top,
// or Slider::Bottom. Defaults to Slider::None.
-// int bgStyle -- Background style. Slider::BgTrough draws the
-// slider button in a trough, Slider::BgSlot draws
-// a slot underneath the button. An or-combination of both
-// may also be used. The default is Slider::BgTrough.
+// QColor fillcolor -- the color used to fill in the full side
+// of the Slider
//------------------------------------------------------------
Slider::Slider(QWidget *parent, const char *name,
- Qt::Orientation orient, ScalePos scalePos, int bgStyle)
+ Qt::Orientation orient, ScalePos scalePos, QColor fillColor)
: SliderBase(parent,name)
{
- if (bgStyle == BgSlot) {
- d_thumbLength = 16;
- d_thumbHalf = 8;
- d_thumbWidth = 30;
- }
- else {
- d_thumbLength = 30;
- d_thumbHalf = 15;
- d_thumbWidth = 16;
- }
+ d_thumbLength = 16;
+ d_thumbHalf = 8;
+ d_thumbWidth = 16;
+
- d_borderWidth = 2;
d_scaleDist = 4;
d_scaleStep = 0.0;
d_scalePos = scalePos;
d_xMargin = 0;
d_yMargin = 0;
- d_bgStyle = bgStyle;
+ d_mMargin = 1;
- if (bgStyle & BgTrough)
- d_bwTrough = d_borderWidth;
- else
- d_bwTrough = 0;
+ d_fillColor = fillColor;
d_sliderRect.setRect(0, 0, 8, 8);
setOrientation(orient);
@@ -81,28 +94,6 @@ Slider::~Slider()
{
}
-//------------------------------------------------------------
-//
-//.F Slider::setBorderWidth
-// Change the slider's border width
-//
-//.u Syntax
-//.f void Slider::setBorderWidth(int bd)
-//
-//.u Parameters
-//.p int bd -- border width
-//
-//------------------------------------------------------------
-
-void Slider::setBorderWidth(int bd)
-{
- d_borderWidth = qwtMin(qwtMax(bd,0),10);
- if (d_bgStyle & BgTrough)
- d_bwTrough = d_borderWidth;
- else
- d_bwTrough = 0;
-}
-
//----------------------------------------------------
//
//.F Slider::setThumbLength
@@ -118,7 +109,7 @@ void Slider::setBorderWidth(int bd)
//-----------------------------------------------------
void Slider::setThumbLength(int l)
{
- d_thumbLength = qwtMax(l,8);
+ d_thumbLength = MusEUtil::qwtMax(l,8);
d_thumbHalf = d_thumbLength / 2;
resize(size());
}
@@ -137,7 +128,7 @@ void Slider::setThumbLength(int l)
//------------------------------------------------------------
void Slider::setThumbWidth(int w)
{
- d_thumbWidth = qwtMax(w,4);
+ d_thumbWidth = MusEUtil::qwtMax(w,4);
resize(size());
}
@@ -177,311 +168,284 @@ void Slider::fontChange(const QFont & /*oldFont*/)
}
//------------------------------------------------------------
-// drawSlider
-// Draw the slider into the specified rectangle.
-//------------------------------------------------------------
-
-void Slider::drawSlider(QPainter *p, const QRect &r)
- {
- const QPalette& pal = palette();
- QBrush brBack(pal.window());
- QBrush brMid;
- QBrush brDark(pal.dark());
-
- QRect cr;
-
- int ipos,dist1;
- double rpos;
- int lineDist;
-
- if (d_bwTrough > 0) {
- qDrawShadePanel(p, r.x(), r.y(),
- r.width(), r.height(),
- pal, TRUE, d_bwTrough,0);
- cr.setRect(r.x() + d_bwTrough,
- r.y() + d_bwTrough,
- r.width() - 2*d_bwTrough,
- r.height() - 2*d_bwTrough);
- brMid = pal.mid();
- }
- else {
- cr = r;
- brMid = brBack;
- }
-
- rpos = (value() - minValue()) / (maxValue() - minValue());
-
- lineDist = d_borderWidth - 1;
- if (lineDist < 1) lineDist = 1;
-
- if (d_orient == Qt::Horizontal)
- {
-
- dist1 = int(double(cr.width() - d_thumbLength) * rpos);
- ipos = cr.x() + dist1;
- markerPos = ipos + d_thumbHalf;
-
- //
- // draw background
- //
- if (d_bgStyle & BgSlot)
- {
- drawHsBgSlot(p, cr, QRect(ipos, cr.y(), d_thumbLength, cr.height()), brMid);
- }
- else
- {
- p->fillRect(cr.x(),cr.y(),dist1,cr.height(),brMid);
- p->fillRect(ipos + d_thumbLength, cr.y(),
- cr.width() - d_thumbLength - dist1, cr.height(),brMid);
- }
-
- //
- // Draw thumb
- //
- qDrawShadePanel(p,ipos, cr.y(), d_thumbLength, cr.height(),
- pal, FALSE, d_borderWidth, &brBack);
-
- if (lineDist > 1)
- qDrawShadeLine(p,markerPos, cr.y() + lineDist , markerPos,
- cr.y() + cr.height() - lineDist,
- pal, TRUE, 1);
- else
- {
- p->setPen(pal.dark().color());
- p->drawLine(markerPos -1 , cr.y() + lineDist, markerPos -1,
- cr.y() + cr.height() - lineDist - 1);
- p->setPen(pal.light().color());
- p->drawLine(markerPos, cr.y() + lineDist, markerPos,
- cr.y() + cr.height() - lineDist - 1);
- }
-
-
- }
- else
- {
- dist1 = int(double(cr.height() - d_thumbLength) * (1.0 - rpos));
- ipos = cr.y() + dist1;
- markerPos = ipos + d_thumbHalf;
-
- if ( d_bgStyle & BgSlot)
- {
- drawVsBgSlot(p, cr, QRect(cr.left(), ipos, cr.width(),
- d_thumbLength), brMid);
- }
- else
- {
- p->fillRect(cr.x(),cr.y(),cr.width(),ipos,brMid);
- p->fillRect(cr.x(), ipos + d_thumbLength, cr.width(),
- cr.height() - d_thumbLength - dist1, brMid);
- }
-
- qDrawShadePanel(p,cr.x(),ipos , cr.width(), d_thumbLength,
- pal,FALSE,d_borderWidth, &brBack);
- if (lineDist > 1)
- qDrawShadeLine(p, cr.x() + lineDist , markerPos,
- cr.x() + cr.width() - lineDist, markerPos,
- pal, TRUE, 1);
- else {
-
- p->setPen(pal.dark().color());
- p->drawLine(cr.x() + lineDist, markerPos - 1 ,
- cr.x() + cr.width() - lineDist - 1, markerPos - 1);
- p->setPen(pal.light().color());
- p->drawLine(cr.x() + lineDist, markerPos,
- cr.x() + cr.width() - lineDist - 1 , markerPos);
- }
- }
-
-}
-
-//------------------------------------------------------------
-//.-
-//.F Slider::drawSlotBg
//
+// roundedPath
+// Returns a rectangle with rounded corners
//
-//.u Syntax
-//.f void Slider::drawSlotBg(QPainter *p, const QRect &rBound, const QRect &rThumb, const QRect &rSlot, const QBrush &brBack)
-//
-//.u Parameters
-//.p QPainter *p, const QRect &rBound, const QRect &rThumb, const QRect &rSlot, const QBrush &brBack
-//
+// roundCorner can be an bitwise-or combination of
+// UpperLeft, UpperRight, LowerRight, LowerLeft
//------------------------------------------------------------
-void Slider::drawHsBgSlot(QPainter *p, const QRect &rBound, const QRect &rThumb, const QBrush &brBack)
+QPainterPath Slider::roundedPath(QRect r, int xrad, int yrad, RoundCorner roundCorner)
{
- int ws, ds, dLeft;
- int lPos, rPos;
- QRect rSlot;
- const QPalette& pal = palette();
+ return roundedPath(r.x(), r.y(),
+ r.width(), r.height(),
+ xrad, yrad,
+ roundCorner);
+}
- ws = rBound.height();
- if ((ws / 2) * 2 != ws)
- ws = 5;
+QPainterPath Slider::roundedPath(int x, int y, int w, int h, int xrad, int yrad, RoundCorner roundCorner)
+{
+ QPainterPath rounded_rect;
+ rounded_rect.addRect(x, y + yrad, w, h - 2 * yrad);
+ if (roundCorner & UpperLeft)
+ {
+ rounded_rect.moveTo(x + xrad, y + yrad);
+ rounded_rect.arcTo(x, y, xrad*2, yrad*2, 180, -90);
+ }
else
- ws = 4;
-
- ds = qwtMax(1, d_thumbLength/2 - 4);
- dLeft = rThumb.left() - rBound.left();
+ {
+ rounded_rect.moveTo(x, y + yrad);
+ rounded_rect.lineTo(x,y);
+ rounded_rect.lineTo(x + xrad, y);
+ }
- rSlot = QRect(rBound.x() + ds, rBound.y() + (rBound.height() - ws) / 2,
- rBound.width() - 2 * ds, ws);
+ rounded_rect.lineTo(x + w - xrad, y);
- rPos = qwtMin(rSlot.x(), rThumb.left());
+ if (roundCorner & UpperRight)
+ rounded_rect.arcTo(x + w - xrad * 2, y, xrad*2, yrad*2, 90, -90);
+ else
+ {
+ rounded_rect.lineTo(x + w, y);
+ rounded_rect.lineTo(x + w, y + yrad);
+ }
- if (rThumb.left() > rBound.x())
- {
- p->fillRect(rBound.x(),rBound.y(),dLeft, rSlot.top() - rBound.top(), brBack);
- p->fillRect(rBound.x(),rSlot.bottom() + 1,dLeft,
- rBound.bottom() - rSlot.bottom(),brBack);
- if (rPos > rBound.left())
- p->fillRect(rBound.x(),rSlot.y(),
- rPos - rBound.left(),ws,brBack);
-
- p->setPen(pal.dark().color());
- if (rSlot.x() < rThumb.left())
- p->drawLine(rSlot.x(), rSlot.bottom(), rSlot.x(), rSlot.top());
- if (rSlot.x() < rThumb.left() - 1)
- {
- p->drawLine(rSlot.x(), rSlot.top(), rThumb.left() - 1, rSlot.top());
- p->setPen(pal.light().color());
- p->drawLine(rSlot.x() + 1, rSlot.bottom(),
- rThumb.left() - 1, rSlot.bottom());
-
- p->fillRect(rSlot.x() + 1, rSlot.y() + 1, dLeft - ds -1,
- rSlot.height() -2, QBrush(pal.currentColorGroup() == QPalette::Disabled ?
- pal.color(QPalette::Disabled, QPalette::WindowText) : Qt::black));
- }
- }
+ if (roundCorner & LowerLeft)
+ {
+ rounded_rect.moveTo(x + xrad, y + h - yrad);
+ rounded_rect.arcTo(x, y + h - yrad*2, xrad*2, yrad*2, 180, 90);
+ }
+ else
+ {
+ rounded_rect.moveTo(x, y + h - yrad);
+ rounded_rect.lineTo(x, y + h);
+ rounded_rect.lineTo(x + xrad, y + h);
+ }
- lPos = qwtMax(rSlot.right(), rThumb.right()) + 1;
- if (rThumb.right() < rBound.right())
- {
- p->fillRect(rThumb.right() + 1,rBound.y(),rBound.right() - rThumb.right(),
- rSlot.top() - rBound.top(), brBack);
- p->fillRect(rThumb.right() + 1,rSlot.bottom() + 1,
- rBound.right() - rThumb.right(),
- rBound.bottom() - rSlot.bottom(),brBack);
- if (lPos <= rBound.right())
- p->fillRect(lPos, rSlot.y() , rBound.right() - lPos + 1, ws ,brBack);
-
- p->setPen(pal.dark().color());
- if (rSlot.right() > rThumb.right())
- {
- p->drawLine(rThumb.right() + 1, rSlot.top(), rSlot.right(), rSlot.top());
- p->setPen(pal.light().color());
- p->drawLine(rSlot.right(), rSlot.bottom(), rSlot.right(), rSlot.top() + 1);
- }
+ rounded_rect.lineTo(x + w - xrad, y + h);
- if (rSlot.right() > rThumb.right() + 1)
- {
- p->setPen(pal.light().color());
- p->drawLine(rThumb.right() + 1, rSlot.bottom(),
- rSlot.right() -1, rSlot.bottom());
- p->fillRect(rThumb.right() + 1, rSlot.y() + 1,
- rSlot.right() - rThumb.right() - 1,
- rSlot.height() -2, QBrush(pal.currentColorGroup() == QPalette::Disabled ?
- pal.color(QPalette::Disabled, QPalette::WindowText) : Qt::black));
- }
- }
+ if (roundCorner & LowerRight)
+ rounded_rect.arcTo(x + w - xrad*2, y + h - yrad*2, xrad*2, yrad*2, 270, 90);
+ else
+ {
+ rounded_rect.lineTo(x + w, y + h);
+ rounded_rect.lineTo(x + w, y + h - yrad);
+ }
+ return rounded_rect;
}
//------------------------------------------------------------
-//.-
-//.F Slider::drawVsBgSlot
-//
-//
-//.u Syntax
-//.f void Slider::drawVsBgSlot(QPainter *p, const QRect &rBound, const QRect &rThumb, const QBrush &brBack)
-//
-//.u Parameters
-//.p QPainter *p, const QRect &rBound, const QRect &rThumb, const QBrush &brBack
-//
-//.u Return Value
-//
-//.u Description
-//
+// drawSlider
+// Draw the slider into the specified rectangle.
//------------------------------------------------------------
-void Slider::drawVsBgSlot(QPainter *p, const QRect &rBound, const QRect &rThumb, const QBrush &brBack)
+
+void Slider::drawSlider(QPainter *p, const QRect &r)
{
+ p->setRenderHint(QPainter::Antialiasing);
- int ws, ds, dTop;
- int lPos, hPos;
- QRect rSlot;
const QPalette& pal = palette();
+ QBrush brBack(pal.window());
+ QBrush brMid(pal.mid());
+ QBrush brDark(pal.dark());
- ws = rBound.width();
- if ((ws / 2) * 2 != ws)
- ws = 5;
+ QRect cr;
+
+ int ipos,dist1;
+ double rpos;
+
+ int xrad = 4;
+ int yrad = 4;
+
+ // for the empty side
+ QColor e_mask_edge = pal.mid().color();
+ QColor e_mask_center = pal.midlight().color();
+ int e_alpha = 215;
+ e_mask_edge.setAlpha(e_alpha);
+ e_mask_center.setAlpha(e_alpha);
+
+ QLinearGradient e_mask;
+ e_mask.setColorAt(0, e_mask_edge);
+ e_mask.setColorAt(0.5, e_mask_center);
+ e_mask.setColorAt(1, e_mask_edge);
+
+ // for the full side
+ rpos = (value() - minValue()) / (maxValue() - minValue());
+
+ int f_brightness = 155 * rpos + 100;
+ int f_alpha;
+ int f_edge;
+ if (pal.currentColorGroup() == QPalette::Disabled)
+ {
+ f_alpha = 185;
+ f_edge = 100;
+ }
else
- ws = 4;
-
- ds = qwtMax(1, d_thumbLength/2 - 4);
- dTop = rThumb.top() - rBound.top();
-
- rSlot = QRect(rBound.x() + (rBound.width() - ws) / 2, rBound.y() + ds,
- ws, rBound.height() - 2 * ds);
-
- hPos = qwtMin(rSlot.y(), rThumb.top());
+ {
+ f_alpha = 127;
+ f_edge = 0;
+ }
+
+ QColor f_mask_center = QColor(f_brightness, f_brightness, f_brightness, f_alpha);
+ QColor f_mask_edge = QColor(f_edge, f_edge, f_edge, f_alpha);
+ QLinearGradient f_mask;
+
+ f_mask.setColorAt(0, f_mask_edge);
+ f_mask.setColorAt(0.5, f_mask_center);
+ f_mask.setColorAt(1, f_mask_edge);
+
+ // for the thumb
+ QLinearGradient thumbGrad;
+ QColor thumb_edge = pal.dark().color();
+ QColor thumb_center = pal.midlight().color();
+
+ thumbGrad.setColorAt(0, thumb_edge);
+ thumbGrad.setColorAt(0.5, thumb_center);
+ thumbGrad.setColorAt(1, thumb_edge);
+
+
+ if (d_orient == Qt::Horizontal)
+ {
- if (rThumb.top() > rBound.top())
- {
- p->fillRect(rBound.x(),rBound.y(), rSlot.left() - rBound.left(),dTop, brBack);
- p->fillRect(rSlot.right() + 1, rBound.y(),
- rBound.right() - rSlot.right(), dTop,brBack);
- if (hPos > rBound.top())
- p->fillRect(rSlot.x(),rBound.y(), ws,
- hPos - rBound.top(),brBack);
+ cr.setRect(r.x(),
+ r.y() + d_mMargin,
+ r.width(),
+ r.height() - 2*d_mMargin);
+
+
+ //
+ // Draw background
+ //
+ QPainterPath bg_rect = roundedPath(cr,
+ xrad, yrad,
+ (RoundCorner) (UpperLeft | UpperRight | LowerLeft | LowerRight) );
+
+ p->fillPath(bg_rect, d_fillColor);
+
+ dist1 = int(double(cr.width() - d_thumbLength) * rpos);
+ ipos = cr.x() + dist1;
+ markerPos = ipos + d_thumbHalf;
+
+
+ //
+ // Draw empty right side
+ //
+
+ e_mask.setStart(QPointF(0, cr.y()));
+ e_mask.setFinalStop(QPointF(0, cr.y() + cr.height()));
+
+ QPainterPath e_rect = roundedPath(ipos + d_thumbLength, cr.y(),
+ cr.width() - d_thumbLength - dist1, cr.height(),
+ xrad, yrad, (RoundCorner) (UpperRight | LowerRight) );
+
+ p->fillPath(e_rect, QBrush(e_mask));
+
+
+ //
+ // Draw full left side
+ //
+
+ f_mask.setStart(QPointF(0, cr.y()));
+ f_mask.setFinalStop(QPointF(0, cr.y() + cr.height()));
+
+ QPainterPath f_rect = roundedPath(cr.x(), cr.y(),
+ ipos + 1, cr.height(),
+ xrad, yrad,
+ (RoundCorner) (LowerLeft | UpperLeft) );
+
+ p->fillPath(f_rect, QBrush(f_mask));
+
+
+ //
+ // Draw thumb
+ //
+
+ QPainterPath thumb_rect = roundedPath(ipos, r.y(),
+ d_thumbLength, r.height(),
+ 2, 2,
+ (RoundCorner) (UpperLeft | UpperRight | LowerLeft | LowerRight) );
+
+ thumbGrad.setStart(QPointF(0, cr.y()));
+ thumbGrad.setFinalStop(QPointF(0, cr.y() + cr.height()));
+
+
+ p->fillPath(thumb_rect, QBrush(thumbGrad));
+
+ // center line
+ p->fillRect(ipos + d_thumbHalf, cr.y(), 1, cr.height(), pal.dark().color());
+
- p->setPen(pal.dark().color());
- if (rSlot.top() < rThumb.top())
- p->drawLine(rSlot.left(), rSlot.top(), rSlot.right(), rSlot.top());
+ }
+ else // (d_orient == Qt::Vertical)
+ {
+
+ cr.setRect(r.x() + d_mMargin,
+ r.y(),
+ r.width() - 2*d_mMargin,
+ r.height());
+
+
+ //
+ // Draw background
+ //
+ QPainterPath bg_rect = roundedPath(cr,
+ xrad, yrad,
+ (RoundCorner) (UpperLeft | UpperRight | LowerLeft | LowerRight) );
+
+ p->fillPath(bg_rect, d_fillColor);
+
+ dist1 = int(double(cr.height() - d_thumbLength) * (1.0 - rpos));
+ ipos = cr.y() + dist1;
+ markerPos = ipos + d_thumbHalf;
- if (rSlot.top() < rThumb.top() - 1)
- {
- p->drawLine(rSlot.left(), rThumb.top() - 1, rSlot.left(), rSlot.top());
- p->setPen(pal.light().color());
- p->drawLine(rSlot.right(), rSlot.top() + 1, rSlot.right(),
- rThumb.top() - 1);
-
- p->fillRect(rSlot.x() + 1, rSlot.y() + 1, rSlot.width() - 2,
- dTop - ds -1, QBrush(pal.currentColorGroup() == QPalette::Disabled ?
- pal.color(QPalette::Disabled, QPalette::WindowText) : Qt::black));
-
- }
- }
-
- lPos = qwtMax(rSlot.bottom(), rThumb.bottom()) + 1;
- if (rThumb.bottom() < rBound.bottom())
- {
- p->fillRect(rBound.left(), rThumb.bottom() + 1,
- rSlot.left() - rBound.left(),
- rBound.bottom() - rThumb.bottom(), brBack);
- p->fillRect(rSlot.right() + 1, rThumb.bottom() + 1,
- rBound.right() - rSlot.right(),
- rBound.bottom() - rThumb.bottom(), brBack);
- if (lPos <= rBound.bottom())
- p->fillRect(rSlot.left(), lPos, ws, rBound.bottom() - lPos + 1, brBack);
-
- p->setPen(pal.dark().color());
- if (rSlot.bottom() > rThumb.bottom())
- {
- p->drawLine(rSlot.left(), rThumb.bottom() + 1, rSlot.left(), rSlot.bottom());
- p->setPen(pal.light().color());
- p->drawLine(rSlot.left() * 1, rSlot.bottom(), rSlot.right(), rSlot.bottom());
- }
-
- if (rSlot.bottom() > rThumb.bottom() + 1)
- {
- p->setPen(pal.light().color());
- p->drawLine(rSlot.right(), rThumb.bottom() + 1, rSlot.right(),
- rSlot.bottom());
- p->fillRect(rSlot.left() + 1, rThumb.bottom() + 1,
- rSlot.width() - 2, rSlot.bottom() - rThumb.bottom() - 1,
- QBrush(pal.currentColorGroup() == QPalette::Disabled ?
- pal.color(QPalette::Disabled, QPalette::WindowText) : Qt::black));
- }
- }
+ //
+ // Draw empty upper filling
+ //
+
+ e_mask.setStart(QPointF(cr.x(), 0));
+ e_mask.setFinalStop(QPointF(cr.x() + cr.width(), 0));
+
+ QPainterPath e_rect = roundedPath(cr.x(), cr.y(),
+ cr.width(), ipos + 1,
+ xrad, yrad,
+ (RoundCorner) (UpperLeft | UpperRight) );
+
+ p->fillPath(e_rect, QBrush(e_mask));
+
+
+ //
+ // Draw lower filling mask
+ //
+
+ f_mask.setStart(QPointF(cr.x(), 0));
+ f_mask.setFinalStop(QPointF(cr.x() + cr.width(), 0));
+
+ QPainterPath f_rect = roundedPath(cr.x(), ipos + d_thumbLength,
+ cr.width(), cr.height() - d_thumbLength - dist1,
+ xrad, yrad, (RoundCorner) (LowerLeft | LowerRight) );
+
+ p->fillPath(f_rect, QBrush(f_mask));
+
+
+ //
+ // Draw thumb
+ //
+
+ QPainterPath thumb_rect = roundedPath(r.x(), ipos,
+ r.width(), d_thumbLength,
+ 2, 2,
+ (RoundCorner) (UpperLeft | UpperRight | LowerLeft | LowerRight) );
+
+ thumbGrad.setStart(QPointF(cr.x(), 0));
+ thumbGrad.setFinalStop(QPointF(cr.x() + cr.width(), 0));
+
+
+ p->fillPath(thumb_rect, QBrush(thumbGrad));
+
+ // center line
+ p->fillRect(cr.x(), ipos + d_thumbHalf, cr.width(), 1, pal.dark().color());
+
+ }
}
@@ -506,11 +470,6 @@ double Slider::getValue( const QPoint &p)
int pos;
QRect r = d_sliderRect;
- r.setLeft(r.left() + d_bwTrough);
- r.setRight(r.right() - d_bwTrough);
- r.setTop(r.top() - d_bwTrough);
- r.setBottom(r.bottom() - d_bwTrough);
-
if (d_orient == Qt::Horizontal)
{
@@ -579,21 +538,11 @@ void Slider::getScrollMode( QPoint &p, const Qt::MouseButton &button, int &scrol
QPoint cp;
int ipos,dist1;
double rpos;
- int lineDist;
-
- if(d_bwTrough > 0)
- cr.setRect(d_sliderRect.x() + d_bwTrough,
- d_sliderRect.y() + d_bwTrough,
- d_sliderRect.width() - 2*d_bwTrough,
- d_sliderRect.height() - 2*d_bwTrough);
- else
- cr = d_sliderRect;
+
+ cr = d_sliderRect;
rpos = (value() - minValue()) / (maxValue() - minValue());
- lineDist = d_borderWidth - 1;
- if(lineDist < 1) lineDist = 1;
-
if(d_orient == Qt::Horizontal)
{
dist1 = int(double(cr.width() - d_thumbLength) * rpos);
@@ -687,7 +636,7 @@ void Slider::resizeEvent(QResizeEvent *e)
d_resized = TRUE;
QSize s = e->size();
- int sliderWidth = d_thumbWidth + 2 * d_bwTrough;
+ int sliderWidth = d_thumbWidth;
// reposition slider
if(d_orient == Qt::Horizontal)
@@ -701,9 +650,9 @@ void Slider::resizeEvent(QResizeEvent *e)
- d_yMargin - sliderWidth,
s.width() - 2 * d_xMargin,
sliderWidth);
- d_scale.setGeometry(d_sliderRect.x() + d_bwTrough + d_thumbHalf,
+ d_scale.setGeometry(d_sliderRect.x() + d_thumbHalf,
d_sliderRect.y() - d_scaleDist,
- d_sliderRect.width() - d_thumbLength - 2*d_bwTrough,
+ d_sliderRect.width() - d_thumbLength,
ScaleDraw::Top);
break;
@@ -714,9 +663,9 @@ void Slider::resizeEvent(QResizeEvent *e)
this->rect().y() + d_yMargin,
s.width() - 2*d_xMargin,
sliderWidth);
- d_scale.setGeometry(d_sliderRect.x() + d_bwTrough + d_thumbHalf,
+ d_scale.setGeometry(d_sliderRect.x() + d_thumbHalf,
d_sliderRect.y() + d_sliderRect.height() + d_scaleDist,
- d_sliderRect.width() - d_thumbLength - 2*d_bwTrough,
+ d_sliderRect.width() - d_thumbLength,
ScaleDraw::Bottom);
break;
@@ -727,7 +676,7 @@ void Slider::resizeEvent(QResizeEvent *e)
break;
}
}
- else
+ else // d_orient == Qt::Vertical
{
switch(d_scalePos)
{
@@ -738,8 +687,8 @@ void Slider::resizeEvent(QResizeEvent *e)
sliderWidth,
s.height() - 2 * d_yMargin);
d_scale.setGeometry(d_sliderRect.x() - d_scaleDist,
- d_sliderRect.y() + d_thumbHalf + d_bwTrough,
- s.height() - d_thumbLength - 2*d_bwTrough,
+ d_sliderRect.y() + d_thumbHalf,
+ s.height() - d_thumbLength,
ScaleDraw::Left);
break;
@@ -750,8 +699,8 @@ void Slider::resizeEvent(QResizeEvent *e)
s.height() - 2* d_yMargin);
d_scale.setGeometry(this->rect().x() + d_sliderRect.width()
+ d_scaleDist,
- d_sliderRect.y() + d_thumbHalf + d_bwTrough,
- s.height() - d_thumbLength - 2*d_bwTrough,
+ d_sliderRect.y() + d_thumbHalf,
+ s.height() - d_thumbLength,
ScaleDraw::Right);
break;
default:
@@ -759,8 +708,8 @@ void Slider::resizeEvent(QResizeEvent *e)
s.width(), s.height());
break;
}
- }
+ }
}
//------------------------------------------------------------
@@ -813,8 +762,8 @@ void Slider::rangeChange()
//------------------------------------------------------------
void Slider::setMargins(int hor, int vert)
{
- d_xMargin = qwtMax(0, hor);
- d_yMargin = qwtMin(0, vert);
+ d_xMargin = MusEUtil::qwtMax(0, hor);
+ d_yMargin = MusEUtil::qwtMin(0, vert);
resize(this->size());
}
@@ -847,20 +796,20 @@ QSize Slider::sizeHint() //const ddskrjo
switch(d_orient) {
case Qt::Vertical:
- w = 2*d_xMargin + d_thumbWidth + 2*d_bwTrough + msWidth + d_scaleDist + 2;
+ w = 2*d_xMargin + d_thumbWidth + msWidth + d_scaleDist + 2;
break;
case Qt::Horizontal:
- h = 2*d_yMargin + d_thumbWidth + 2*d_bwTrough + msHeight + d_scaleDist;
+ h = 2*d_yMargin + d_thumbWidth + msHeight + d_scaleDist;
break;
}
}
else { // no scale
switch(d_orient) {
case Qt::Vertical:
- w = 16 + 2 * d_bwTrough;
+ w = 16;
break;
case Qt::Horizontal:
- h = 16 + 2 * d_bwTrough;
+ h = 16;
break;
}
}
@@ -923,3 +872,4 @@ void Slider::setPageStep(double)
{
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/slider.h b/muse2/muse/widgets/slider.h
index 72fcc6ba..a76c5270 100644
--- a/muse2/muse/widgets/slider.h
+++ b/muse2/muse/widgets/slider.h
@@ -4,11 +4,23 @@
// $Id: slider.h,v 1.3.2.2 2008/01/19 13:33:47 wschweer Exp $
//
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+// (C) Copyright 2011 Orcan Ogetbil (ogetbilo at sf.net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SLIDER_H__
@@ -18,6 +30,8 @@
#include "sliderbase.h"
#include "scldraw.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// Slider
//---------------------------------------------------------
@@ -28,7 +42,7 @@ class Slider : public SliderBase, public ScaleIf
public:
enum ScalePos { None, Left, Right, Top, Bottom };
- enum { BgTrough = 0x1, BgSlot = 0x2 };
+ enum RoundCorner { UpperLeft = 0x1, UpperRight = 0x2, LowerLeft = 0x4, LowerRight = 0x8 };
private:
Q_PROPERTY( double lineStep READ lineStep WRITE setLineStep )
@@ -40,11 +54,12 @@ class Slider : public SliderBase, public ScaleIf
int d_thumbLength;
int d_thumbHalf;
int d_thumbWidth;
- int d_borderWidth;
- int d_bwTrough;
int d_scaleDist;
int d_xMargin;
int d_yMargin;
+ int d_mMargin;
+
+ QColor d_fillColor;
int d_resized;
bool d_autoResize;
@@ -55,6 +70,8 @@ class Slider : public SliderBase, public ScaleIf
int d_bgStyle;
int markerPos;
+ QPainterPath roundedPath(int x, int y, int w, int h, int xrad, int yrad, RoundCorner roundCorner);
+ QPainterPath roundedPath(QRect r, int xrad, int yrad, RoundCorner roundCorner);
void drawHsBgSlot(QPainter *, const QRect&, const QRect&,const QBrush&);
void drawVsBgSlot(QPainter *, const QRect&, const QRect&,const QBrush&);
@@ -71,9 +88,9 @@ class Slider : public SliderBase, public ScaleIf
public:
Slider(QWidget *parent, const char *name = 0,
- Qt::Orientation orient = Qt::Vertical,
- ScalePos scalePos = None,
- int bgStyle = BgTrough);
+ Qt::Orientation orient = Qt::Vertical,
+ ScalePos scalePos = None,
+ QColor fillColor = QColor(100, 100, 255));
~Slider();
void setThumbLength(int l);
@@ -88,8 +105,10 @@ class Slider : public SliderBase, public ScaleIf
void setLineStep(double);
void setPageStep(double);
- void setBorderWidth(int bw);
void setMargins(int x, int y);
QSize sizeHint(); // const;
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/sliderbase.cpp b/muse2/muse/widgets/sliderbase.cpp
index 320e1bc3..8b85878e 100644
--- a/muse2/muse/widgets/sliderbase.cpp
+++ b/muse2/muse/widgets/sliderbase.cpp
@@ -4,11 +4,22 @@
// $Id: sliderbase.cpp,v 1.4.2.4 2007/01/27 14:52:43 spamatica Exp $
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
@@ -18,6 +29,8 @@
#include <QMouseEvent>
#include <QTimerEvent>
+namespace MusEWidget {
+
// DESCRIPTION
// SliderBase is a base class for
// slider widgets. QwtSliderBase handles the mouse events
@@ -171,7 +184,7 @@ void SliderBase::mousePressEvent(QMouseEvent *e)
d_mouseOffset = 0;
DoubleRange::incPages(d_direction);
emit sliderMoved(value(), _id);
- d_tmrID = startTimer(qwtMax(250, 2 * d_updTime));
+ d_tmrID = startTimer(MusEUtil::qwtMax(250, 2 * d_updTime));
break;
case ScrMouse:
@@ -716,6 +729,7 @@ void SliderBase::stepPages(int pages)
//
//------------------------------------------------------------
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/sliderbase.h b/muse2/muse/widgets/sliderbase.h
index 8bfac9c3..39860153 100644
--- a/muse2/muse/widgets/sliderbase.h
+++ b/muse2/muse/widgets/sliderbase.h
@@ -4,11 +4,22 @@
// $Id: sliderbase.h,v 1.4.2.3 2006/11/14 06:28:37 terminator356 Exp $
// Copyright (C) 1997 Josef Wilgen
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License, version 2,
-// as published by the Free Software Foundation.
-//
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SLIDERBASE_H__
@@ -19,6 +30,8 @@
#include <QTime>
#include <QWidget>
+namespace MusEWidget {
+
//---------------------------------------------------------
// SliderBase
//---------------------------------------------------------
@@ -98,4 +111,6 @@ class SliderBase : public QWidget, public DoubleRange
void setId(int i) { _id = i; }
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/songinfo.h b/muse2/muse/widgets/songinfo.h
index d566e00a..8e576876 100644
--- a/muse2/muse/widgets/songinfo.h
+++ b/muse2/muse/widgets/songinfo.h
@@ -3,10 +3,12 @@
// Linux Music Editor
// $Id: songinfo.h,v 1.0.0.0 2010/11/17 01:01:01 ogetbilo Exp $
//
-// Copyright (C) 1999-2010 by Werner Schweer and others
+// Copyright (C) 1999-2011 by Werner Schweer and others
//
// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2.
+// it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +17,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//=============================================================================
#include "ui_songinfo.h"
@@ -23,6 +25,8 @@
class QDialog;
+namespace MusEWidget {
+
//---------------------------------------------------------
// SongInfoWidget
// Wrapper around Ui::SongInfo
@@ -35,3 +39,5 @@ class SongInfoWidget : public QDialog, public Ui::SongInfo
public:
SongInfoWidget(QDialog *parent = 0) : QDialog(parent) { setupUi(this); }
};
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/spinbox.cpp b/muse2/muse/widgets/spinbox.cpp
index ee585da7..0111158d 100644
--- a/muse2/muse/widgets/spinbox.cpp
+++ b/muse2/muse/widgets/spinbox.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: spinbox.cpp,v 1.1.2.3 2009/07/09 18:27:11 terminator356 Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QKeyEvent>
#include <QEvent>
#include "spinbox.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// SpinBox
//---------------------------------------------------------
@@ -82,3 +99,4 @@ void SpinBox::stepDown()
_clearFocus = true;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/spinbox.h b/muse2/muse/widgets/spinbox.h
index 43ff85be..01cd6ad5 100644
--- a/muse2/muse/widgets/spinbox.h
+++ b/muse2/muse/widgets/spinbox.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: spinbox.h,v 1.1.2.2 2009/02/02 21:38:01 terminator356 Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
// SpinBox:
@@ -15,6 +30,8 @@
#include <QSpinBox>
#include <QEvent>
+namespace MusEWidget {
+
//---------------------------------------------------------
// SpinBox
//---------------------------------------------------------
@@ -39,5 +56,7 @@ class SpinBox : public QSpinBox {
SpinBox(int minValue, int maxValue, int step = 1, QWidget* parent=0);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/spinboxFP.cpp b/muse2/muse/widgets/spinboxFP.cpp
index 2d8f3372..696e589f 100644
--- a/muse2/muse/widgets/spinboxFP.cpp
+++ b/muse2/muse/widgets/spinboxFP.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: spinboxFP.cpp,v 1.1.1.1 2003/10/27 18:55:03 wschweer Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -14,6 +29,8 @@
#include "spinboxFP.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// SpinBoxFP
//---------------------------------------------------------
@@ -169,4 +186,6 @@ int SpinBoxFP::valueFromText(const QString& text) const
return QSpinBox::valueFromText(text);
}
-*/ \ No newline at end of file
+*/
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/spinboxFP.h b/muse2/muse/widgets/spinboxFP.h
index 4c0b75db..81fc4876 100644
--- a/muse2/muse/widgets/spinboxFP.h
+++ b/muse2/muse/widgets/spinboxFP.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: spinboxFP.h,v 1.1.1.1.2.1 2008/05/21 00:28:54 terminator356 Exp $
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SPINBOXFP_H__
@@ -14,6 +29,8 @@
//class QValidator;
//class QDoubleValidator;
+namespace MusEWidget {
+
//---------------------------------------------------------
// SpinBoxFP
//---------------------------------------------------------
@@ -49,5 +66,7 @@ class SpinBoxFP : public QDoubleSpinBox {
//int decimals() const { return _decimals; }
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/splitter.cpp b/muse2/muse/widgets/splitter.cpp
index 96fe2378..09220b24 100644
--- a/muse2/muse/widgets/splitter.cpp
+++ b/muse2/muse/widgets/splitter.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: splitter.cpp,v 1.1.1.1 2003/10/27 18:54:59 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "splitter.h"
@@ -11,6 +26,8 @@
#include <QList>
#include <QStringList>
+namespace MusEWidget {
+
//---------------------------------------------------------
// Splitter
//---------------------------------------------------------
@@ -77,3 +94,5 @@ void Splitter::readStatus(Xml& xml)
}
}
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/splitter.h b/muse2/muse/widgets/splitter.h
index 98a64087..3121fe87 100644
--- a/muse2/muse/widgets/splitter.h
+++ b/muse2/muse/widgets/splitter.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: splitter.h,v 1.1.1.1 2003/10/27 18:54:51 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SPLITTER_H__
@@ -12,6 +27,8 @@
class Xml;
+namespace MusEWidget {
+
//---------------------------------------------------------
// Splitter
//---------------------------------------------------------
@@ -25,5 +42,7 @@ class Splitter : public QSplitter {
void readStatus(Xml&);
};
+}
+
#endif
diff --git a/muse2/muse/widgets/swidget.cpp b/muse2/muse/widgets/swidget.cpp
index 79f5b845..f8461977 100644
--- a/muse2/muse/widgets/swidget.cpp
+++ b/muse2/muse/widgets/swidget.cpp
@@ -3,12 +3,29 @@
// Linux Music Editor
// $Id: swidget.cpp,v 1.1.1.1 2003/10/27 18:54:27 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "swidget.h"
#include <QResizeEvent>
+namespace MusEWidget {
+
//---------------------------------------------------------
// resizeEvent
//---------------------------------------------------------
@@ -18,3 +35,4 @@ void SWidget::resizeEvent(QResizeEvent* ev)
emit heightChanged(ev->size().height());
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/swidget.h b/muse2/muse/widgets/swidget.h
index 45f8cad0..0412ac41 100644
--- a/muse2/muse/widgets/swidget.h
+++ b/muse2/muse/widgets/swidget.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: swidget.h,v 1.1.1.1 2003/10/27 18:54:49 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __SWIDGET_H__
@@ -10,6 +25,8 @@
#include <QWidget>
+namespace MusEWidget {
+
//---------------------------------------------------------
// SWidget
// a simple widget which emits a heighChanged signal
@@ -28,5 +45,7 @@ class SWidget : public QWidget {
SWidget(QWidget* parent) : QWidget(parent) {}
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp
index bd8e94a2..272359f0 100644
--- a/muse2/muse/widgets/tb1.cpp
+++ b/muse2/muse/widgets/tb1.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: tb1.cpp,v 1.3.2.2 2007/01/04 00:35:17 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
//#include <assert.h>
@@ -20,6 +35,8 @@
#include "poslabel.h"
#include "pitchlabel.h"
+namespace MusEWidget {
+
static int rasterTable[] = {
//------ 8 4 2
1, 4, 8, 16, 32, 64, 128, 256, 512, 1024,
@@ -193,3 +210,4 @@ void Toolbar1::setPitchMode(bool /*flag*/)
// pitch->setPitchMode(flag);
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/tb1.h b/muse2/muse/widgets/tb1.h
index 3e721e74..93181c39 100644
--- a/muse2/muse/widgets/tb1.h
+++ b/muse2/muse/widgets/tb1.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: tb1.h,v 1.2 2004/01/11 18:55:37 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __TB1_H__
@@ -13,11 +28,14 @@
class QToolButton;
class QTableWidget;
-class PosLabel;
-class PitchLabel;
class Track;
class LabelCombo;
+namespace MusEWidget {
+
+class PitchLabel;
+class PosLabel;
+
//---------------------------------------------------------
// Toolbar1
//---------------------------------------------------------
@@ -53,4 +71,6 @@ class Toolbar1 : public QToolBar {
void setPitchMode(bool flag);
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/tempolabel.cpp b/muse2/muse/widgets/tempolabel.cpp
index a26b0b69..cdbc029d 100644
--- a/muse2/muse/widgets/tempolabel.cpp
+++ b/muse2/muse/widgets/tempolabel.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: tempolabel.cpp,v 1.1.1.1 2003/10/27 18:54:29 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QApplication>
@@ -10,6 +25,8 @@
#include "tempolabel.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// TempoLabel
//---------------------------------------------------------
@@ -120,4 +137,4 @@ void TempoEdit::setValue(double val)
// return lrint(60000000.0/value());
// }
-
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/tempolabel.h b/muse2/muse/widgets/tempolabel.h
index 69dc1450..682c1e37 100644
--- a/muse2/muse/widgets/tempolabel.h
+++ b/muse2/muse/widgets/tempolabel.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: tempolabel.h,v 1.1.1.1 2003/10/27 18:55:05 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __TEMPOLABEL_H__
@@ -11,6 +26,8 @@
#include <QLabel>
#include <QDoubleSpinBox>
+namespace MusEWidget {
+
//---------------------------------------------------------
// TempoLabel
//---------------------------------------------------------
@@ -59,5 +76,7 @@ class TempoEdit : public QDoubleSpinBox {
//int tempo() const;
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/tools.cpp b/muse2/muse/widgets/tools.cpp
index 31f014ef..ccd0f89b 100644
--- a/muse2/muse/widgets/tools.cpp
+++ b/muse2/muse/widgets/tools.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: tools.cpp,v 1.2 2004/04/28 21:56:13 spamatica Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -13,6 +28,8 @@
#include "icons.h"
#include "action.h"
+namespace MusEWidget {
+
const char* infoPointer = QT_TRANSLATE_NOOP("@default", "select Pointer Tool:\n"
"with the pointer tool you can:\n"
" select parts\n"
@@ -145,3 +162,4 @@ int EditToolBar::curTool()
return -1;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/tools.h b/muse2/muse/widgets/tools.h
index 2116b958..55c75c4a 100644
--- a/muse2/muse/widgets/tools.h
+++ b/muse2/muse/widgets/tools.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: tools.h,v 1.1.1.1 2003/10/27 18:54:49 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __TOOLS_H__
@@ -10,12 +25,15 @@
#include <QToolBar>
-class Action;
class QAction;
class QPixmap;
class QWidget;
+namespace MusEWidget {
+
+class Action;
+
enum Tool {
PointerTool=1,
PencilTool=2,
@@ -66,5 +84,7 @@ class EditToolBar : public QToolBar {
int curTool();
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/transformbase.ui b/muse2/muse/widgets/transformbase.ui
index 578b4a97..ffa56338 100644
--- a/muse2/muse/widgets/transformbase.ui
+++ b/muse2/muse/widgets/transformbase.ui
@@ -417,7 +417,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="SpinBoxFP" name="procVal1a">
+ <widget class="MusEWidget::SpinBoxFP" name="procVal1a">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
@@ -453,21 +453,21 @@
</widget>
</item>
<item row="2" column="2">
- <widget class="SpinBoxFP" name="procVal2a">
+ <widget class="MusEWidget::SpinBoxFP" name="procVal2a">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
</widget>
</item>
<item row="2" column="3">
- <widget class="SpinBoxFP" name="procLenA">
+ <widget class="MusEWidget::SpinBoxFP" name="procLenA">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
</widget>
</item>
<item row="2" column="4">
- <widget class="SpinBoxFP" name="procPosA">
+ <widget class="MusEWidget::SpinBoxFP" name="procPosA">
<property name="maximum" stdset="0">
<number>99999999</number>
</property>
@@ -798,14 +798,14 @@
</widget>
</item>
<item row="3" column="4">
- <widget class="SpinBoxFP" name="selBarB">
+ <widget class="MusEWidget::SpinBoxFP" name="selBarB">
<property name="decimals" stdset="0">
<number>3</number>
</property>
</widget>
</item>
<item row="2" column="4">
- <widget class="SpinBoxFP" name="selBarA">
+ <widget class="MusEWidget::SpinBoxFP" name="selBarA">
<property name="minimum" stdset="0">
<number>1000</number>
</property>
@@ -974,7 +974,7 @@
</widget>
</item>
<item>
- <widget class="ComboQuant" name="funcQuantVal" native="true"/>
+ <widget class="MusEWidget::ComboQuant" name="funcQuantVal" native="true"/>
</item>
</layout>
</widget>
@@ -986,12 +986,12 @@
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
- <class>SpinBoxFP</class>
+ <class>MusEWidget::SpinBoxFP</class>
<extends>QDoubleSpinBox</extends>
<header>spinboxFP.h</header>
</customwidget>
<customwidget>
- <class>ComboQuant</class>
+ <class>MusEWidget::ComboQuant</class>
<extends>QComboBox</extends>
<header>comboQuant.h</header>
</customwidget>
diff --git a/muse2/muse/widgets/ttoolbar.cpp b/muse2/muse/widgets/ttoolbar.cpp
index 774cb34d..dddc42c1 100644
--- a/muse2/muse/widgets/ttoolbar.cpp
+++ b/muse2/muse/widgets/ttoolbar.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: ttoolbar.cpp,v 1.1.1.1 2003/10/27 18:54:46 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QAction>
@@ -14,11 +29,11 @@
void syncChanged(bool flag)
{
- startAction->setEnabled(!flag);
- forwardAction->setEnabled(!flag);
- rewindAction->setEnabled(!flag);
- stopAction->setEnabled(!flag);
- playAction->setEnabled(!flag);
+ MusEGlobal::startAction->setEnabled(!flag);
+ MusEGlobal::forwardAction->setEnabled(!flag);
+ MusEGlobal::rewindAction->setEnabled(!flag);
+ MusEGlobal::stopAction->setEnabled(!flag);
+ MusEGlobal::playAction->setEnabled(!flag);
}
diff --git a/muse2/muse/widgets/ttoolbar.h b/muse2/muse/widgets/ttoolbar.h
index b7d34b2d..96f33399 100644
--- a/muse2/muse/widgets/ttoolbar.h
+++ b/muse2/muse/widgets/ttoolbar.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: ttoolbar.h,v 1.1.1.1 2003/10/27 18:54:52 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
extern void syncChanged(bool flag);
diff --git a/muse2/muse/widgets/ttoolbutton.cpp b/muse2/muse/widgets/ttoolbutton.cpp
index 324b5fca..6bf43b1f 100644
--- a/muse2/muse/widgets/ttoolbutton.cpp
+++ b/muse2/muse/widgets/ttoolbutton.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: ttoolbutton.cpp,v 1.1 2004/02/21 16:53:50 wschweer Exp $
// (C) Copyright 2004 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QPainter>
@@ -12,6 +27,8 @@
#include "gconfig.h"
#include "icons.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// drawButton
//---------------------------------------------------------
@@ -26,4 +43,4 @@ void TransparentToolButton::drawButton(QPainter* p)
p->drawPixmap(QPoint((w - pm.width())/2, (h - pm.height())/2), pm);
}
-
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/ttoolbutton.h b/muse2/muse/widgets/ttoolbutton.h
index b4c54401..b61d2f7c 100644
--- a/muse2/muse/widgets/ttoolbutton.h
+++ b/muse2/muse/widgets/ttoolbutton.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: ttoolbutton.h,v 1.1 2004/02/21 16:53:51 wschweer Exp $
// (C) Copyright 2004 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __TTOOLBUTTON_H__
@@ -10,6 +25,8 @@
#include <QToolButton>
+namespace MusEWidget {
+
//---------------------------------------------------------
// TransparentToolButton
//---------------------------------------------------------
@@ -24,5 +41,7 @@ class TransparentToolButton : public QToolButton {
: QToolButton(parent) {setObjectName(name);}
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/unusedwavefiles.cpp b/muse2/muse/widgets/unusedwavefiles.cpp
index 5a2e620b..07fcbf0c 100644
--- a/muse2/muse/widgets/unusedwavefiles.cpp
+++ b/muse2/muse/widgets/unusedwavefiles.cpp
@@ -1,3 +1,25 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/unusedwavefiles.cpp $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#include <stdio.h>
#include <qdir.h>
#include <qfileinfo.h>
@@ -9,6 +31,8 @@
#include "globals.h"
#include "app.h"
+namespace MusEWidget {
+
UnusedWaveFiles::UnusedWaveFiles(QWidget *parent) :
QDialog(parent),
ui(new Ui::UnusedWaveFiles)
@@ -25,10 +49,10 @@ UnusedWaveFiles::UnusedWaveFiles(QWidget *parent) :
void UnusedWaveFiles::findWaveFiles()
{
ui->filelistWidget->clear();
- //printf("museProject =%s\n", museProject.toLatin1().data());
-// QFileInfo proj(museProject);
+ //printf("MusEGlobal::museProject =%s\n", MusEGlobal::museProject.toLatin1().data());
+// QFileInfo proj(MusEGlobal::museProject);
// QString projPath = proj.absolutePath();
- QDir dir(museProject);
+ QDir dir(MusEGlobal::museProject);
QStringList filter;
filter.append("*.wav");
filter.append("*.ogg");
@@ -38,14 +62,14 @@ void UnusedWaveFiles::findWaveFiles()
// get med files
QStringList medFiles;
if (ui->currentProjRadioButton->isChecked()) {
- medFiles.append(muse->projectName());
+ medFiles.append(MusEGlobal::muse->projectName());
} else {
//printf("get ALLL *.med files!\n");
QStringList medFilter("*.med");
medFiles = dir.entryList(medFilter);
}
foreach (QString medFile, medFiles) {
- QString fname = museProject+"/"+ medFile;
+ QString fname = MusEGlobal::museProject+"/"+ medFile;
//printf("fopen %s\n", fname.toLatin1().data());
FILE *fp =fopen(fname.toLatin1().data(),"r");
QTextStream fileContent(fp);
@@ -80,18 +104,20 @@ void UnusedWaveFiles::accept()
int ret = QMessageBox::question(this,"Move files", "Are you sure you want to move away the unused files?",
QMessageBox::Ok, QMessageBox::Cancel);
if (ret == QMessageBox::Ok) {
- QDir currDir(museProject);
+ QDir currDir(MusEGlobal::museProject);
currDir.mkdir("unused");
foreach(QString file, allWaveFiles) {
- QFile::rename(museProject+ "/"+file, museProject + "/unused/" +file);
+ QFile::rename(MusEGlobal::museProject+ "/"+file, MusEGlobal::museProject + "/unused/" +file);
// move the wca file if it exists
- QFileInfo wf(museProject + "/" + file);
- if (QFile::exists(museProject + "/" + wf.baseName()+".wca")) {
- QFile::rename(museProject + "/" + wf.baseName()+".wca", museProject + "/unused/" +wf.baseName()+".wca");
+ QFileInfo wf(MusEGlobal::museProject + "/" + file);
+ if (QFile::exists(MusEGlobal::museProject + "/" + wf.baseName()+".wca")) {
+ QFile::rename(MusEGlobal::museProject + "/" + wf.baseName()+".wca", MusEGlobal::museProject + "/unused/" +wf.baseName()+".wca");
}
}
}
QDialog::accept();
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/unusedwavefiles.h b/muse2/muse/widgets/unusedwavefiles.h
index e28754de..fba41212 100644
--- a/muse2/muse/widgets/unusedwavefiles.h
+++ b/muse2/muse/widgets/unusedwavefiles.h
@@ -1,3 +1,25 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: ./muse/widgets/unusedwavefiles.h $
+//
+// Copyright (C) 1999-2011 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//=========================================================
#ifndef UNUSEDWAVEFILES_H
#define UNUSEDWAVEFILES_H
@@ -7,6 +29,8 @@ namespace Ui {
class UnusedWaveFiles;
}
+namespace MusEWidget {
+
class UnusedWaveFiles : public QDialog
{
Q_OBJECT
@@ -23,4 +47,6 @@ private:
Ui::UnusedWaveFiles *ui;
};
+} // namespace MusEWidget
+
#endif // UNUSEDWAVEFILES_H
diff --git a/muse2/muse/widgets/utils.cpp b/muse2/muse/widgets/utils.cpp
index 01a5249d..e46d265c 100644
--- a/muse2/muse/widgets/utils.cpp
+++ b/muse2/muse/widgets/utils.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: utils.cpp,v 1.1.1.1.2.3 2009/11/14 03:37:48 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <stdio.h>
@@ -19,6 +34,8 @@
#include "utils.h"
+namespace MusEUtil {
+
//---------------------------------------------------------
// curTime
//---------------------------------------------------------
@@ -385,4 +402,6 @@ QGradient gGradientFromQColor(const QColor& c, const QPointF& start, const QPoin
gradient.setColorAt(1, c1);
return gradient;
-} \ No newline at end of file
+}
+
+} // namespace MusEUtils
diff --git a/muse2/muse/widgets/utils.h b/muse2/muse/widgets/utils.h
index b6997023..b74ba394 100644
--- a/muse2/muse/widgets/utils.h
+++ b/muse2/muse/widgets/utils.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: utils.h,v 1.1.1.1.2.3 2009/11/14 03:37:48 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __UTILS_H__
@@ -16,6 +31,7 @@ class QCanvas;
class QPointF;
class QColor;
+namespace MusEUtil {
extern QString bitmap2String(int bm);
extern int string2bitmap(const QString& str);
@@ -30,5 +46,7 @@ extern QFrame* vLine(QWidget* parent);
extern void dump(const unsigned char* p, int n);
extern double curTime();
+} // namespace MusEUtils
+
#endif
diff --git a/muse2/muse/widgets/verticalmeter.cpp b/muse2/muse/widgets/verticalmeter.cpp
index 76f8dcd1..b0e0198f 100644
--- a/muse2/muse/widgets/verticalmeter.cpp
+++ b/muse2/muse/widgets/verticalmeter.cpp
@@ -5,6 +5,21 @@
// redesigned by oget on 2011/08/15
//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <cmath>
@@ -17,6 +32,8 @@
#include "gconfig.h"
#include "fastlog.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// VerticalMeter
//---------------------------------------------------------
@@ -35,7 +52,7 @@ VerticalMeter::VerticalMeter(QWidget* parent, MeterType type)
overflow = false;
val = 0.0;
maxVal = 0.0;
- minScale = mtype == DBMeter ? config.minMeter : 0.0; // min value in dB or int
+ minScale = mtype == DBMeter ? MusEConfig::config.minMeter : 0.0; // min value in dB or int
maxScale = mtype == DBMeter ? 10.0 : 127.0;
yellowScale = -10;
redScale = 0;
@@ -254,3 +271,5 @@ void VerticalMeter::resizeEvent(QResizeEvent* ev)
QRegion maskregion(rounded_rect.toFillPolygon().toPolygon());
setMask(maskregion);
}
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/verticalmeter.h b/muse2/muse/widgets/verticalmeter.h
index 9613ec43..d6bee245 100644
--- a/muse2/muse/widgets/verticalmeter.h
+++ b/muse2/muse/widgets/verticalmeter.h
@@ -4,6 +4,21 @@
// $Id: meter.h,v 1.1.1.1.2.2 2009/05/03 04:14:00 terminator356 Exp $
//
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __VERTICALMETER_H__
@@ -16,6 +31,8 @@ class QResizeEvent;
class QMouseEvent;
class QPainter;
+namespace MusEWidget {
+
class VerticalMeter : public Meter {
Q_OBJECT
@@ -41,5 +58,8 @@ class VerticalMeter : public Meter {
VerticalMeter(QWidget* parent, MeterType type = DBMeter);
void setRange(double min, double max);
};
+
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/view.cpp b/muse2/muse/widgets/view.cpp
index 57955c19..9be66ed5 100644
--- a/muse2/muse/widgets/view.cpp
+++ b/muse2/muse/widgets/view.cpp
@@ -4,6 +4,21 @@
// $Id: view.cpp,v 1.3.2.2 2009/04/06 01:24:55 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
// Additions, modifications (C) Copyright 2011 Tim E. Real (terminator356 on users DOT sourceforge DOT net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "view.h"
@@ -27,6 +42,8 @@
// just ate up all the time no matter what I tried.
//#defines VIEW_USE_DOUBLE_BUFFERING 1
+namespace MusEWidget {
+
//---------------------------------------------------------
// View::View
// double xMag = (xmag < 0) ? 1.0/-xmag : double(xmag)
@@ -962,3 +979,5 @@ QRect View::devToVirt(const QRect& r)
return QRect(x, y, w, h);
}
*/
+
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/view.h b/muse2/muse/widgets/view.h
index a932f173..e5f33657 100644
--- a/muse2/muse/widgets/view.h
+++ b/muse2/muse/widgets/view.h
@@ -4,6 +4,21 @@
// $Id: view.h,v 1.2.2.1 2008/01/26 07:23:21 terminator356 Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
// Additions, modifications (C) Copyright 2011 Tim E. Real (terminator356 on users DOT sourceforge DOT net)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __VIEW_H__
@@ -19,6 +34,8 @@ class QPainter;
class QPixmap;
class QResizeEvent;
+namespace MusEWidget {
+
//---------------------------------------------------------
// View
// horizontal View with double buffering
@@ -111,5 +128,7 @@ class View : public QWidget {
int rmapx(int x) const;
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/visibletracks.cpp b/muse2/muse/widgets/visibletracks.cpp
index f6acf206..1b549975 100644
--- a/muse2/muse/widgets/visibletracks.cpp
+++ b/muse2/muse/widgets/visibletracks.cpp
@@ -4,6 +4,21 @@
// $Id: tools.cpp,v 1.2 2004/04/28 21:56:13 spamatica Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
// (C) Copyright 2011 Robert Jonsson (rj@spamatica.se)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <QActionGroup>
@@ -15,6 +30,8 @@
#include "track.h"
#include "synth.h"
+namespace MusEWidget {
+
const char* waveTrack = QT_TRANSLATE_NOOP("@default", "Show wave tracks");
const char* groupTrack = QT_TRANSLATE_NOOP("@default", "Show group tracks");
const char* auxTrack = QT_TRANSLATE_NOOP("@default", "Show aux tracks");
@@ -125,3 +142,4 @@ VisibleTracks::~VisibleTracks()
delete actions;
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/visibletracks.h b/muse2/muse/widgets/visibletracks.h
index 2f17e323..b0e92d26 100644
--- a/muse2/muse/widgets/visibletracks.h
+++ b/muse2/muse/widgets/visibletracks.h
@@ -4,18 +4,35 @@
// $Id: tools.h,v 1.1.1.1 2003/10/27 18:54:49 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
// (C) Copyright 2011 Robert Jonsson (rj@spamatica.se)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef VISIBLETRACKS_H
#define VISIBLETRACKS_H
#include <QToolBar>
-class Action;
-
class QAction;
class QPixmap;
class QWidget;
+namespace MusEWidget {
+
+class Action;
+
struct VisibleToolB {
QPixmap** icon;
const char* tip;
@@ -45,6 +62,6 @@ class VisibleTracks : public QToolBar {
~VisibleTracks();
};
-
+} // namespace MusEWidget
#endif // VISIBLETRACKS_H
diff --git a/muse2/muse/widgets/vscale.cpp b/muse2/muse/widgets/vscale.cpp
index 943124e5..22af7889 100644
--- a/muse2/muse/widgets/vscale.cpp
+++ b/muse2/muse/widgets/vscale.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: vscale.cpp,v 1.1.1.1 2003/10/27 18:54:41 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include "vscale.h"
@@ -10,6 +25,8 @@
#include <QPainter>
#include <QPaintEvent>
+namespace MusEWidget {
+
//---------------------------------------------------------
// paintEvent
//---------------------------------------------------------
@@ -26,3 +43,4 @@ void VScale::paintEvent(QPaintEvent*)
p.end();
}
+} // namespace MusEWidget
diff --git a/muse2/muse/widgets/vscale.h b/muse2/muse/widgets/vscale.h
index 100c5fb2..e926b3cb 100644
--- a/muse2/muse/widgets/vscale.h
+++ b/muse2/muse/widgets/vscale.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: vscale.h,v 1.1.1.1.2.1 2008/01/19 13:33:47 wschweer Exp $
// (C) Copyright 1999 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __VSCALE_H__
@@ -12,6 +27,8 @@
class QPaintEvent;
+namespace MusEWidget {
+
//---------------------------------------------------------
// VScale
//---------------------------------------------------------
@@ -25,5 +42,7 @@ class VScale : public QWidget {
VScale(QWidget* parent=0) : QWidget(parent) {setFixedWidth(18);}
};
+} // namespace MusEWidget
+
#endif
diff --git a/muse2/muse/widgets/wtscale.cpp b/muse2/muse/widgets/wtscale.cpp
index 2c02b631..3b6aa6eb 100644
--- a/muse2/muse/widgets/wtscale.cpp
+++ b/muse2/muse/widgets/wtscale.cpp
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: wtscale.cpp,v 1.3 2004/04/11 13:03:32 wschweer Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#include <values.h>
@@ -18,6 +33,8 @@
#include "../marker/marker.h"
#include "icons.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// WTScale
// Wave Time Scale
@@ -284,3 +301,5 @@ void WTScale::pdraw(QPainter& p, const QRect& r)
}
}
+} // namespace MusEWidget
+
diff --git a/muse2/muse/widgets/wtscale.h b/muse2/muse/widgets/wtscale.h
index f12bbc6f..b25de627 100644
--- a/muse2/muse/widgets/wtscale.h
+++ b/muse2/muse/widgets/wtscale.h
@@ -3,6 +3,21 @@
// Linux Music Editor
// $Id: wtscale.h,v 1.2 2004/01/11 18:55:37 wschweer Exp $
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
//=========================================================
#ifndef __MTSCALE_H__
@@ -10,6 +25,8 @@
#include "view.h"
+namespace MusEWidget {
+
//---------------------------------------------------------
// WTScale
// scale for wave track
@@ -42,5 +59,8 @@ class WTScale : public View {
WTScale(int* raster, QWidget* parent, int xscale);
void setBarLocator(bool f) { barLocator = f; }
};
+
+} // namespace MusEWidget
+
#endif