From d14a0a7be38de94dce84818c904e609d31da21ab Mon Sep 17 00:00:00 2001
From: Orcan Ogetbil <oget.fedora@gmail.com>
Date: Wed, 15 Dec 2010 22:46:10 +0000
Subject: Major cleanup in the #includes. Moved the contents of all.h into
 individal files.

---
 muse2/ChangeLog                             |  3 +
 muse2/al/sig.h                              |  2 +
 muse2/al/xml.cpp                            |  4 ++
 muse2/al/xml.h                              |  7 +++
 muse2/all.h                                 | 98 +----------------------------
 muse2/awl/aslider.cpp                       |  3 +
 muse2/awl/aslider.h                         |  5 ++
 muse2/awl/checkbox.h                        |  2 +
 muse2/awl/combobox.h                        |  2 +
 muse2/awl/drawbar.cpp                       |  2 +
 muse2/awl/floatentry.cpp                    |  4 ++
 muse2/awl/floatentry.h                      |  6 ++
 muse2/awl/knob.cpp                          |  5 ++
 muse2/awl/midimeter.cpp                     |  3 +
 muse2/awl/midimslider.cpp                   |  3 +
 muse2/awl/mslider.cpp                       |  4 +-
 muse2/awl/pitchedit.cpp                     |  4 ++
 muse2/awl/pitchedit.h                       |  4 ++
 muse2/awl/pitchlabel.cpp                    |  3 +
 muse2/awl/pitchlabel.h                      |  2 +
 muse2/awl/posedit.cpp                       |  7 ++-
 muse2/awl/posedit.h                         |  2 +
 muse2/awl/sigedit.cpp                       |  3 +
 muse2/awl/sigedit.h                         |  2 +
 muse2/awl/slider.cpp                        |  3 +
 muse2/awl/tempoedit.cpp                     |  5 ++
 muse2/awl/tempoedit.h                       |  2 +
 muse2/awl/tempolabel.cpp                    |  2 +
 muse2/awl/tempolabel.h                      |  2 +
 muse2/awl/volslider.cpp                     |  2 +
 muse2/muse/app.cpp                          | 25 ++++----
 muse2/muse/app.h                            |  6 +-
 muse2/muse/arranger/pcanvas.cpp             | 26 ++------
 muse2/muse/arranger/pcanvas.h               | 17 ++---
 muse2/muse/arranger/tlist.cpp               |  1 +
 muse2/muse/arranger/tlist.h                 |  2 +
 muse2/muse/arranger/trackautomationview.cpp |  7 +--
 muse2/muse/arranger/trackautomationview.h   |  5 +-
 muse2/muse/arranger/trackinfo.cpp           |  6 +-
 muse2/muse/audio.cpp                        |  2 +-
 muse2/muse/audiotrack.cpp                   |  4 +-
 muse2/muse/cliplist/cliplist.cpp            |  6 +-
 muse2/muse/cobject.h                        |  1 -
 muse2/muse/conf.cpp                         |  1 -
 muse2/muse/ctrl.cpp                         |  3 +-
 muse2/muse/ctrl/ctrlpanel.cpp               |  1 +
 muse2/muse/device.h                         |  2 +-
 muse2/muse/driver/audiodev.h                |  3 +-
 muse2/muse/driver/dummyaudio.cpp            |  1 -
 muse2/muse/driver/jackmidi.cpp              |  4 +-
 muse2/muse/dssihost.cpp                     |  5 +-
 muse2/muse/event.h                          |  3 +-
 muse2/muse/exportmidi.cpp                   |  2 +-
 muse2/muse/gconfig.h                        | 10 +--
 muse2/muse/globals.cpp                      |  7 +--
 muse2/muse/globals.h                        |  1 -
 muse2/muse/helper.h                         |  2 +-
 muse2/muse/icons.cpp                        |  4 +-
 muse2/muse/icons.h                          |  2 -
 muse2/muse/importmidi.cpp                   |  3 +-
 muse2/muse/instruments/editinstrument.cpp   |  2 +
 muse2/muse/instruments/midictrledit.cpp     |  8 ---
 muse2/muse/instruments/minstrument.cpp      |  4 +-
 muse2/muse/instruments/minstrument.h        |  3 -
 muse2/muse/liste/listedit.cpp               |  4 ++
 muse2/muse/marker/marker.h                  |  4 +-
 muse2/muse/marker/markerview.cpp            |  4 ++
 muse2/muse/master/lmaster.cpp               |  5 ++
 muse2/muse/master/master.h                  |  1 +
 muse2/muse/master/masteredit.cpp            |  2 +
 muse2/muse/master/tscale.cpp                |  4 +-
 muse2/muse/master/tscale.h                  |  3 -
 muse2/muse/midi.h                           |  3 +-
 muse2/muse/midictrl.cpp                     |  1 -
 muse2/muse/midictrl.h                       |  3 +-
 muse2/muse/mididev.cpp                      |  2 +-
 muse2/muse/mididev.h                        |  3 +-
 muse2/muse/midiedit/dlist.h                 |  3 +-
 muse2/muse/midiedit/drumedit.cpp            |  3 +
 muse2/muse/midiedit/drumedit.h              |  1 +
 muse2/muse/midiedit/drummap.h               |  2 +-
 muse2/muse/midiedit/ecanvas.cpp             |  2 +
 muse2/muse/midiedit/piano.cpp               |  5 +-
 muse2/muse/midiedit/piano.h                 |  7 +--
 muse2/muse/midieditor.cpp                   |  8 +--
 muse2/muse/midieditor.h                     |  7 +--
 muse2/muse/midiseq.cpp                      |  4 +-
 muse2/muse/mixer/amixer.h                   | 21 +++----
 muse2/muse/mixer/meter.cpp                  |  7 +--
 muse2/muse/mixer/meter.h                    |  8 +--
 muse2/muse/mixer/rack.cpp                   |  1 +
 muse2/muse/mplugins/mittranspose.cpp        |  2 +-
 muse2/muse/mplugins/rhythm.cpp              | 32 +++++-----
 muse2/muse/node.h                           |  1 -
 muse2/muse/part.h                           |  4 +-
 muse2/muse/plugin.cpp                       |  3 +
 muse2/muse/plugin.h                         |  7 ++-
 muse2/muse/remote/pyapi.cpp                 |  4 +-
 muse2/muse/remote/pyapi.h                   |  2 +-
 muse2/muse/route.cpp                        |  2 +-
 muse2/muse/song.cpp                         |  1 +
 muse2/muse/song.h                           |  7 ++-
 muse2/muse/songfile.cpp                     |  1 -
 muse2/muse/stringparam.cpp                  |  1 -
 muse2/muse/synth.h                          |  7 ++-
 muse2/muse/transport.cpp                    | 17 ++---
 muse2/muse/transport.h                      | 10 +--
 muse2/muse/undo.h                           |  4 +-
 muse2/muse/value.h                          |  2 +-
 muse2/muse/vst.cpp                          |  4 +-
 muse2/muse/vst.h                            |  2 +-
 muse2/muse/wave.cpp                         |  1 +
 muse2/muse/wave.h                           |  3 +-
 muse2/muse/widgets/bigtime.cpp              | 12 ++--
 muse2/muse/widgets/bigtime.h                | 10 ++-
 muse2/muse/widgets/canvas.cpp               |  2 +
 muse2/muse/widgets/checkbox.cpp             |  2 +-
 muse2/muse/widgets/checkbox.h               |  5 +-
 muse2/muse/widgets/combobox.cpp             |  4 --
 muse2/muse/widgets/combobox.h               |  4 +-
 muse2/muse/widgets/dentry.cpp               | 10 ++-
 muse2/muse/widgets/dentry.h                 |  8 +--
 muse2/muse/widgets/dimap.h                  |  2 +-
 muse2/muse/widgets/doublelabel.cpp          |  9 +--
 muse2/muse/widgets/drange.cpp               |  3 +
 muse2/muse/widgets/drange.h                 |  2 -
 muse2/muse/widgets/filedialog.h             |  1 -
 muse2/muse/widgets/hitscale.cpp             |  5 +-
 muse2/muse/widgets/hitscale.h               |  4 --
 muse2/muse/widgets/intlabel.cpp             |  4 --
 muse2/muse/widgets/lcombo.cpp               |  6 +-
 muse2/muse/widgets/lcombo.h                 | 10 +--
 muse2/muse/widgets/midisyncimpl.cpp         |  6 +-
 muse2/muse/widgets/mlabel.cpp               |  2 -
 muse2/muse/widgets/mlabel.h                 |  4 +-
 muse2/muse/widgets/mtscale.cpp              | 12 +---
 muse2/muse/widgets/mtscale.h                |  4 --
 muse2/muse/widgets/musewidgetsplug.cpp      |  4 +-
 muse2/muse/widgets/nentry.cpp               | 18 ++----
 muse2/muse/widgets/nentry.h                 | 13 +---
 muse2/muse/widgets/noteinfo.cpp             |  7 +--
 muse2/muse/widgets/noteinfo.h               |  6 +-
 muse2/muse/widgets/pitchlabel.cpp           |  3 +-
 muse2/muse/widgets/posedit.cpp              | 22 +++----
 muse2/muse/widgets/poslabel.cpp             |  4 +-
 muse2/muse/widgets/poslabel.h               |  1 -
 muse2/muse/widgets/scldraw.cpp              |  8 +--
 muse2/muse/widgets/scldraw.h                |  7 +--
 muse2/muse/widgets/sclif.h                  |  1 -
 muse2/muse/widgets/scrollscale.h            |  2 +-
 muse2/muse/widgets/siglabel.h               |  5 +-
 muse2/muse/widgets/sigscale.cpp             |  6 +-
 muse2/muse/widgets/sigscale.h               |  4 --
 muse2/muse/widgets/slider.cpp               |  4 +-
 muse2/muse/widgets/slider.h                 |  2 -
 muse2/muse/widgets/sliderbase.h             | 11 +---
 muse2/muse/widgets/swidget.cpp              |  2 +-
 muse2/muse/widgets/swidget.h                |  4 +-
 muse2/muse/widgets/tb1.cpp                  |  7 +--
 muse2/muse/widgets/tb1.h                    |  6 +-
 muse2/muse/widgets/tempolabel.cpp           |  3 +-
 muse2/muse/widgets/tools.cpp                | 10 ---
 muse2/muse/widgets/tools.h                  |  8 +--
 muse2/muse/widgets/ttoolbar.cpp             |  2 +-
 muse2/muse/widgets/ttoolbutton.cpp          |  1 -
 muse2/muse/widgets/ttoolbutton.h            |  2 +-
 muse2/muse/widgets/utils.cpp                |  6 +-
 muse2/muse/widgets/utils.h                  |  4 +-
 muse2/muse/widgets/view.h                   | 17 +++--
 muse2/muse/widgets/vscale.h                 |  3 +-
 muse2/muse/widgets/wtscale.cpp              |  9 +--
 muse2/muse/widgets/wtscale.h                |  5 --
 muse2/muse/xml.cpp                          |  9 +--
 muse2/muse/xml.h                            |  5 +-
 muse2/synti/deicsonze/deicsonze.cpp         |  3 +
 muse2/synti/deicsonze/deicsonzegui.cpp      |  9 +++
 muse2/synti/deicsonze/deicsonzepreset.cpp   |  2 +
 muse2/synti/deicsonze/deicsonzepreset.h     |  1 +
 muse2/synti/fluidsynth/fluidsynti.cpp       |  9 +--
 muse2/synti/fluidsynth/fluidsynti.h         |  2 +-
 muse2/synti/s1/s1.cpp                       |  4 +-
 muse2/synti/simpledrums2/simpledrums.cpp    |  2 +-
 182 files changed, 441 insertions(+), 563 deletions(-)

diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index ec91076c..409340f0 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,6 @@
+15.12.2010:
+        - Major cleanup in the #includes. Emptied all.ha nnd moved its contents to individual files.
+          The build is roughly 20% faster now. (Orcan)
 14.12.2010:
         - Fixed corruption on track info instrument patch button due to latin1() conversions. (Tim)
           Changed MidiInstrument::getPatchName() and EditInstrument::getPatchName() to return QString.
diff --git a/muse2/al/sig.h b/muse2/al/sig.h
index 53f060b5..ed18981f 100644
--- a/muse2/al/sig.h
+++ b/muse2/al/sig.h
@@ -21,6 +21,8 @@
 #ifndef __SIG_H__
 #define __SIG_H__
 
+#include <map>
+
 #include "../muse/xml.h"
 class Xml;
 
diff --git a/muse2/al/xml.cpp b/muse2/al/xml.cpp
index 63143b1a..96489307 100644
--- a/muse2/al/xml.cpp
+++ b/muse2/al/xml.cpp
@@ -21,6 +21,10 @@
 #include "xml.h"
 #include "al.h"
 
+#include <QDomElement>
+#include <QMetaProperty>
+#include <QWidget>
+
 namespace AL {
 
 //---------------------------------------------------------
diff --git a/muse2/al/xml.h b/muse2/al/xml.h
index 340d8190..a72c1ac5 100644
--- a/muse2/al/xml.h
+++ b/muse2/al/xml.h
@@ -21,6 +21,13 @@
 #ifndef __XML_H__
 #define __XML_H__
 
+#include <QTextStream>
+
+class QColor;
+class QDomNode;
+class QRect;
+class QWidget;
+
 namespace AL {
 
 //---------------------------------------------------------
diff --git a/muse2/all.h b/muse2/all.h
index 3ec26518..2b27adfa 100644
--- a/muse2/all.h
+++ b/muse2/all.h
@@ -21,103 +21,7 @@
 #ifndef __ALLQT_H__
 #define __ALLQT_H__
 
-#include <stdio.h>
-#ifndef __APPLE__
-#include <values.h>
-#endif
-#include <errno.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <assert.h>
-#include <poll.h>
-#include <cmath>
-#include <list>
-#include <vector>
-#include <map>
-
-#include <QtCore/qplugin.h>
-#include <QtCore/QUrl>
-#include <QtCore/QFile>
-#include <QtCore/QTextStream>
-#include <QtCore/QBuffer>
-#include <QtCore/QLocale>
-#include <QtCore/QTimer>
-#include <QtCore/QSocketNotifier>
-#include <QtCore/QSignalMapper>
-#include <QtCore/QTime>
-#include <QtCore/QMetaProperty>
-#include <QtCore/QEvent>
-#include <QtCore/QTranslator>
-#include <QtCore/qatomic.h>
-#include <QtCore/QTemporaryFile>
-#include <QtCore/QQueue>
-#include <QtCore/QSettings>
-
-#include <QtDesigner/QDesignerCustomWidgetInterface>
-#include <QtDesigner/QDesignerFormEditorInterface>
-#include <QtDesigner/QFormBuilder>
-
-#include <QtXml/QDomNode>
+// Swept by Orcan
 
-#include <QtGui/QScrollBar>
-#include <QtGui/QToolBar>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QPushButton>
-#include <QtGui/QToolButton>
-#include <QtGui/QRadioButton>
-#include <QtGui/QScrollArea>
-#include <QtGui/QListWidgetItem>
-#include <QtGui/QTreeWidgetItem>
-#include <QtGui/QPainterPath>
-#include <QtGui/QStackedWidget>
-#include <QtGui/QShortcut>
-#include <QtGui/QTableView>
-#include <QtGui/QTextEdit>
-#include <QtGui/QFileDialog>
-#include <QtGui/QInputDialog>
-#include <QtGui/QGroupBox>
-#include <QtGui/QProgressDialog>
-#include <QtGui/QHeaderView>
-#include <QtGui/QStyle>
-#include <QtGui/QWindowsStyle>
-#include <QtCore/QProcess>
-#include <QtGui/QWhatsThis>
-#include <QtGui/QDial>
-#include <QtGui/QPaintEvent>
-#include <QtGui/QPen>
-#include <QtGui/QPainter>
-#include <QtGui/QLineEdit>
-#include <QtGui/QCheckBox>
-#include <QtGui/QComboBox>
-#include <QtGui/QApplication>
-#include <QtGui/QSpinBox>
-#include <QtGui/QLabel>
-#include <QtGui/QPixmap>
-#include <QtGui/QPrinter>
-#include <QtGui/QGridLayout>
-#include <QtGui/QMainWindow>
-#include <QtGui/QAction>
-#include <QtGui/QColor>
-#include <QtGui/QColorDialog>
-#include <QtGui/QCursor>
-#include <QtGui/QFont>
-#include <QtGui/QFontInfo>
-#include <QtGui/QFontMetrics>
-#include <QtGui/QIcon>
-#include <QtGui/QMessageBox>
-#include <QtGui/QMenu>
-#include <QtGui/QFontDialog>
-#include <QtGui/QKeyEvent>
-#include <QtGui/QSplitter>
-#include <QtGui/QMenuBar>
-#include <QtGui/QSizeGrip>
-#include <QtGui/QClipboard>
-#include <QtGui/QCloseEvent>
-#include <QtGui/QSplashScreen>
-#include <QtGui/QStyleFactory>
-#include <QtGui/QDockWidget>
-#include <QtGui/QDesktopServices>
-#include <QtGui/QItemDelegate>
-#include <QtSvg/QSvgRenderer>
 #endif
 
diff --git a/muse2/awl/aslider.cpp b/muse2/awl/aslider.cpp
index 79a36b88..b48ccbe0 100644
--- a/muse2/awl/aslider.cpp
+++ b/muse2/awl/aslider.cpp
@@ -21,6 +21,9 @@
 #include "fastlog.h"
 #include "aslider.h"
 
+#include <QKeyEvent>
+#include <QWheelEvent>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/aslider.h b/muse2/awl/aslider.h
index 32fc89f9..9354e6c7 100644
--- a/muse2/awl/aslider.h
+++ b/muse2/awl/aslider.h
@@ -21,6 +21,11 @@
 #ifndef __AWLASLIDER_H__
 #define __AWLASLIDER_H__
 
+#include <QWidget>
+
+class QKeyEvent;
+class QWheelEvent;
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/checkbox.h b/muse2/awl/checkbox.h
index ac67fc57..94cc3db3 100644
--- a/muse2/awl/checkbox.h
+++ b/muse2/awl/checkbox.h
@@ -21,6 +21,8 @@
 #ifndef __AWLCHECKBOX_H__
 #define __AWLCHECKBOX_H__
 
+#include <QCheckBox>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/combobox.h b/muse2/awl/combobox.h
index d335d993..1754338b 100644
--- a/muse2/awl/combobox.h
+++ b/muse2/awl/combobox.h
@@ -21,6 +21,8 @@
 #ifndef __AWLCOMBOBOX_H__
 #define __AWLCOMBOBOX_H__
 
+#include <QComboBox>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/drawbar.cpp b/muse2/awl/drawbar.cpp
index 18525ded..a82ed248 100644
--- a/muse2/awl/drawbar.cpp
+++ b/muse2/awl/drawbar.cpp
@@ -20,6 +20,8 @@
 
 #include "drawbar.h"
 
+#include <QPainter>
+
 namespace Awl {
 
 #if 0
diff --git a/muse2/awl/floatentry.cpp b/muse2/awl/floatentry.cpp
index 7831614f..471ec5a0 100644
--- a/muse2/awl/floatentry.cpp
+++ b/muse2/awl/floatentry.cpp
@@ -21,6 +21,10 @@
 #include "floatentry.h"
 #include "fastlog.h"
 
+#include <QLineEdit>
+#include <QMouseEvent>
+#include <QTimer>
+
 #define TIMER1    400
 #define TIMER2    200
 #define TIMEC     7
diff --git a/muse2/awl/floatentry.h b/muse2/awl/floatentry.h
index a90232a9..16aa7c8c 100644
--- a/muse2/awl/floatentry.h
+++ b/muse2/awl/floatentry.h
@@ -21,6 +21,12 @@
 #ifndef __FLOATLABEL_H__
 #define __FLOATLABEL_H__
 
+#include <QLineEdit>
+
+class QMouseEvent;
+class QTimer;
+class QWheelEvent;
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/knob.cpp b/muse2/awl/knob.cpp
index ccc3988e..00665d21 100644
--- a/muse2/awl/knob.cpp
+++ b/muse2/awl/knob.cpp
@@ -18,8 +18,13 @@
 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 //=============================================================================
 
+#include <cmath>
+
 #include "knob.h"
 
+#include <QMouseEvent>
+#include <QPainter>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/midimeter.cpp b/muse2/awl/midimeter.cpp
index 312e5efe..255232d7 100644
--- a/muse2/awl/midimeter.cpp
+++ b/muse2/awl/midimeter.cpp
@@ -21,6 +21,9 @@
 #include "fastlog.h"
 #include "midimeter.h"
 
+#include <QPainter>
+#include <QPaintEvent>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/midimslider.cpp b/muse2/awl/midimslider.cpp
index 92325d4a..a4867044 100644
--- a/muse2/awl/midimslider.cpp
+++ b/muse2/awl/midimslider.cpp
@@ -21,6 +21,9 @@
 #include "fastlog.h"
 #include "midimslider.h"
 
+#include <QPainter>
+#include <QPaintEvent>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/mslider.cpp b/muse2/awl/mslider.cpp
index 63c3ea4e..7424dfac 100644
--- a/muse2/awl/mslider.cpp
+++ b/muse2/awl/mslider.cpp
@@ -19,9 +19,11 @@
 //=============================================================================
 
 #include "fastlog.h"
-
 #include "mslider.h"
 
+#include <QMouseEvent>
+#include <QPainter>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/pitchedit.cpp b/muse2/awl/pitchedit.cpp
index 18136074..93f4b310 100644
--- a/muse2/awl/pitchedit.cpp
+++ b/muse2/awl/pitchedit.cpp
@@ -18,9 +18,13 @@
 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 //=============================================================================
 
+#include <stdio.h>
+
 #include "pitchedit.h"
 #include "utils.h"
 
+#include <QKeyEvent>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/pitchedit.h b/muse2/awl/pitchedit.h
index dd0ba4c7..bdcfc4c4 100644
--- a/muse2/awl/pitchedit.h
+++ b/muse2/awl/pitchedit.h
@@ -21,6 +21,10 @@
 #ifndef __AWLPITCHEDIT_H__
 #define __AWLPITCHEDIT_H__
 
+#include <QSpinBox>
+
+class QKeyEvent;
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/pitchlabel.cpp b/muse2/awl/pitchlabel.cpp
index 1d7149f6..d6e83515 100644
--- a/muse2/awl/pitchlabel.cpp
+++ b/muse2/awl/pitchlabel.cpp
@@ -22,6 +22,9 @@
 #include "pitchlabel.h"
 #include "utils.h"
 
+#include <QApplication>
+#include <QStyle>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/pitchlabel.h b/muse2/awl/pitchlabel.h
index 36a3cbfa..e5c34dba 100644
--- a/muse2/awl/pitchlabel.h
+++ b/muse2/awl/pitchlabel.h
@@ -21,6 +21,8 @@
 #ifndef __AWLPITCHLABEL_H__
 #define __AWLPITCHLABEL_H__
 
+#include <QLabel>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/posedit.cpp b/muse2/awl/posedit.cpp
index 97f36a63..3d4abaab 100644
--- a/muse2/awl/posedit.cpp
+++ b/muse2/awl/posedit.cpp
@@ -23,8 +23,13 @@
 #include "posedit.h"
 #include "al/sig.h"
 //#include "sig.h"
-
 //#include "sync.h"  // Tim.
+
+#include <QApplication>
+#include <QKeyEvent>
+#include <QLineEdit>
+#include <QStyle>
+
 extern int mtcType;
 
 namespace Awl {
diff --git a/muse2/awl/posedit.h b/muse2/awl/posedit.h
index 5b04c640..09cfd6e3 100644
--- a/muse2/awl/posedit.h
+++ b/muse2/awl/posedit.h
@@ -24,6 +24,8 @@
 ///#include "al/pos.h"
 #include "pos.h"
 
+#include <QAbstractSpinBox>
+
 namespace Awl {
 
       ///using AL::Pos;
diff --git a/muse2/awl/sigedit.cpp b/muse2/awl/sigedit.cpp
index 3e995a93..826182ca 100644
--- a/muse2/awl/sigedit.cpp
+++ b/muse2/awl/sigedit.cpp
@@ -24,6 +24,9 @@
 #include "al/sig.h"
 //#include "sig.h"
 
+#include <QKeyEvent>
+#include <QLineEdit>
+
 namespace Awl {
 
       using AL::sigmap;
diff --git a/muse2/awl/sigedit.h b/muse2/awl/sigedit.h
index 35cb0f12..dd059ea2 100644
--- a/muse2/awl/sigedit.h
+++ b/muse2/awl/sigedit.h
@@ -24,6 +24,8 @@
 #include "al/sig.h"
 //#include "sig.h"
 
+#include <QAbstractSpinBox>
+
 namespace AL {
       class TimeSignature;
       };
diff --git a/muse2/awl/slider.cpp b/muse2/awl/slider.cpp
index 7686e850..00f3d925 100644
--- a/muse2/awl/slider.cpp
+++ b/muse2/awl/slider.cpp
@@ -20,6 +20,9 @@
 
 #include "slider.h"
 
+#include <QMouseEvent>
+#include <QPainter>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/tempoedit.cpp b/muse2/awl/tempoedit.cpp
index d7dbac81..7bdc5c2d 100644
--- a/muse2/awl/tempoedit.cpp
+++ b/muse2/awl/tempoedit.cpp
@@ -18,8 +18,13 @@
 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 //=============================================================================
 
+#include <cmath>
+
 #include "tempoedit.h"
 
+#include <QApplication>
+#include <QStyle>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/tempoedit.h b/muse2/awl/tempoedit.h
index af06221d..8ad83dc7 100644
--- a/muse2/awl/tempoedit.h
+++ b/muse2/awl/tempoedit.h
@@ -21,6 +21,8 @@
 #ifndef __AWLTEMPOEDIT_H__
 #define __AWLTEMPOEDIT_H__
 
+#include <QDoubleSpinBox>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/tempolabel.cpp b/muse2/awl/tempolabel.cpp
index 3fcdec5c..fc4e8daa 100644
--- a/muse2/awl/tempolabel.cpp
+++ b/muse2/awl/tempolabel.cpp
@@ -20,6 +20,8 @@
 
 #include "tempolabel.h"
 
+#include <QApplication>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/tempolabel.h b/muse2/awl/tempolabel.h
index cf30444e..df9abfcd 100644
--- a/muse2/awl/tempolabel.h
+++ b/muse2/awl/tempolabel.h
@@ -21,6 +21,8 @@
 #ifndef __AWLTEMPOLABEL_H__
 #define __AWLTEMPOLABEL_H__
 
+#include <QLabel>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/awl/volslider.cpp b/muse2/awl/volslider.cpp
index 59f1b8cf..87997510 100644
--- a/muse2/awl/volslider.cpp
+++ b/muse2/awl/volslider.cpp
@@ -21,6 +21,8 @@
 #include "fastlog.h"
 #include "volslider.h"
 
+#include <QMouseEvent>
+
 namespace Awl {
 
 //---------------------------------------------------------
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 0f69754e..e1a2f20c 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -22,23 +22,26 @@
 #include <signal.h>
 #include <stdarg.h>
 
+#include <QAction>
+#include <QActionGroup>
+#include <QApplication>
+#include <QByteArray>
+#include <QClipboard>
+#include <QCloseEvent>
+#include <QFile>
+#include <QFocusEvent>
+#include <QKeyEvent>
 #include <QMenu>
 #include <QMessageBox>
-#include <QClipboard>
+#include <QPixmap>
+#include <QShortcut>
+#include <QSignalMapper>
+#include <QSplashScreen>
 #include <QTextCodec>
-#include <QApplication>
 #include <QTimer>
-#include <QSplashScreen>
-#include <QAction>
-#include <QFile>
-#include <QByteArray>
 #include <QTimerEvent>
-#include <QFocusEvent>
 #include <QTranslator>
-#include <QKeyEvent>
-#include <QActionGroup>
-#include <QPixmap>
-#include <QCloseEvent>
+#include <QWhatsThis>
 
 #include "app.h"
 #include "master/lmaster.h"
diff --git a/muse2/muse/app.h b/muse2/muse/app.h
index 39ee7eb4..72d20208 100644
--- a/muse2/muse/app.h
+++ b/muse2/muse/app.h
@@ -13,13 +13,17 @@
 #include "cobject.h"
 #include "tools.h"
 
+#include <QFileInfo>
+
 class QCloseEvent;
-class QFileInfo;
 class QFocusEvent;
 class QMainWindow;
 class QMenu;
 class QPoint;
 class QRect;
+class QScrollArea;
+class QSignalMapper;
+class QString;
 class QToolBar;
 class QToolButton;
 
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 1e7e323a..2e3944bd 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -13,26 +13,12 @@
 #include <uuid/uuid.h>
 #include <math.h>
 
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpainter.h>
-#include <qpoint.h>
-#include <qlineedit.h>
-#include <qmessagebox.h>
-#include <qmenudata.h>
-
-#include <QByteArray>
-#include <QMimeData>
-#include <QDrag>
-
-//Added by qt3to4:
-#include <QDragLeaveEvent>
-#include <QMouseEvent>
-#include <QDragEnterEvent>
-#include <QKeyEvent>
-#include <QEvent>
-#include <QDropEvent>
-#include <QDragMoveEvent>
+#include <QClipboard>
+#include <QLineEdit>
+#include <QMenu>
+#include <QMessageBox>
+#include <QPainter>
+#include <QUrl>
 
 #include "widgets/tools.h"
 #include "pcanvas.h"
diff --git a/muse2/muse/arranger/pcanvas.h b/muse2/muse/arranger/pcanvas.h
index 8b589d5c..103b3d02 100644
--- a/muse2/muse/arranger/pcanvas.h
+++ b/muse2/muse/arranger/pcanvas.h
@@ -11,14 +11,15 @@
 #include "song.h"
 #include "canvas.h"
 #include "trackautomationview.h"
-//Added by qt3to4:
-#include <QDragMoveEvent>
-#include <QDropEvent>
-#include <QDragLeaveEvent>
-#include <QMouseEvent>
-#include <QKeyEvent>
-#include <QEvent>
-#include <QDragEnterEvent>
+
+class QDragMoveEvent;
+class QDropEvent;
+class QDragLeaveEvent;
+class QMouseEvent;
+class QKeyEvent;
+class QEvent;
+class QDragEnterEvent;
+
 #define beats     4
 
 //---------------------------------------------------------
diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp
index c7c225d3..7ada6e22 100644
--- a/muse2/muse/arranger/tlist.cpp
+++ b/muse2/muse/arranger/tlist.cpp
@@ -18,6 +18,7 @@
 #include <QPaintEvent>
 #include <QPixmap>
 #include <QResizeEvent>
+#include <QScrollBar>
 #include <QWheelEvent>
 
 #include "globals.h"
diff --git a/muse2/muse/arranger/tlist.h b/muse2/muse/arranger/tlist.h
index de631e47..cbdcda5d 100644
--- a/muse2/muse/arranger/tlist.h
+++ b/muse2/muse/arranger/tlist.h
@@ -10,6 +10,8 @@
 
 #include "track.h"
 
+#include <QWidget>
+
 class QKeyEvent;
 class QLineEdit;
 class QMouseEvent;
diff --git a/muse2/muse/arranger/trackautomationview.cpp b/muse2/muse/arranger/trackautomationview.cpp
index 43abcc69..8f7cfb12 100644
--- a/muse2/muse/arranger/trackautomationview.cpp
+++ b/muse2/muse/arranger/trackautomationview.cpp
@@ -1,10 +1,9 @@
 #include "trackautomationview.h"
 #include "math.h"
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qimage.h>
-//Added by qt3to4:
+
+#include <QPainter>
 #include <QPaintEvent>
+
 #include "track.h"
 
 TrackAutomationView::TrackAutomationView(QWidget *parent, Track *t) : QWidget(parent)
diff --git a/muse2/muse/arranger/trackautomationview.h b/muse2/muse/arranger/trackautomationview.h
index 2631035e..2ef05125 100644
--- a/muse2/muse/arranger/trackautomationview.h
+++ b/muse2/muse/arranger/trackautomationview.h
@@ -1,9 +1,8 @@
 #ifndef TRACKAUTOMATIONVIEW_H
 #define TRACKAUTOMATIONVIEW_H
 
-#include <qwidget.h>
-//Added by qt3to4:
-#include <QPaintEvent>
+class QPaintEvent;
+class QWidget;
 
 #include "track.h"
 
diff --git a/muse2/muse/arranger/trackinfo.cpp b/muse2/muse/arranger/trackinfo.cpp
index fdf0b0ce..3a20accb 100644
--- a/muse2/muse/arranger/trackinfo.cpp
+++ b/muse2/muse/arranger/trackinfo.cpp
@@ -5,10 +5,10 @@
 //  (C) Copyright 1999-2004 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <QPalette>
-#include <QColor>
 #include <QMenu>
-#include <QPixmap>
+#include <QPainter>
+#include <QScrollBar>
+#include <QTimer>
 
 #include <math.h>
 #include <string.h>
diff --git a/muse2/muse/audio.cpp b/muse2/muse/audio.cpp
index 66003f0b..d266db9a 100644
--- a/muse2/muse/audio.cpp
+++ b/muse2/muse/audio.cpp
@@ -9,7 +9,7 @@
 #include <cmath>
 #include <errno.h>
 
-#include <qsocketnotifier.h>
+#include <QSocketNotifier>
 
 #include "app.h"
 #include "song.h"
diff --git a/muse2/muse/audiotrack.cpp b/muse2/muse/audiotrack.cpp
index 6730ce7b..0ced1b8b 100644
--- a/muse2/muse/audiotrack.cpp
+++ b/muse2/muse/audiotrack.cpp
@@ -8,8 +8,10 @@
 
 #include <values.h>
 #include <stdlib.h>
-#include <qmessagebox.h>
 #include <map>
+
+#include <QMessageBox>
+
 #include "track.h"
 #include "event.h"
 #include "song.h"
diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp
index 9c67bd9d..967c608d 100644
--- a/muse2/muse/cliplist/cliplist.cpp
+++ b/muse2/muse/cliplist/cliplist.cpp
@@ -6,17 +6,15 @@
 //  (C) Copyright 2000 Werner Schweer (ws@seh.de)
 //=========================================================
 
+#include <QCloseEvent>
+
 #include "cliplist.h"
 #include "song.h"
 #include "globals.h"
 #include "wave.h"
 #include "xml.h"
-#include "posedit.h"
 #include "ui_cliplisteditorbase.h"
 
-#include <QCloseEvent>
-#include <QDialog>
-#include <QStyle>
 
 extern int mtcType;
 enum { COL_NAME=0, COL_REFS, COL_POS, COL_LEN };
diff --git a/muse2/muse/cobject.h b/muse2/muse/cobject.h
index 9c0efdbd..8e21eaf0 100644
--- a/muse2/muse/cobject.h
+++ b/muse2/muse/cobject.h
@@ -11,7 +11,6 @@
 
 #include "config.h"
 
-//#include <q3mainwindow.h>
 #include <QMainWindow>
 #include <list>
 
diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp
index 315ce9cd..64be7faa 100644
--- a/muse2/muse/conf.cpp
+++ b/muse2/muse/conf.cpp
@@ -8,7 +8,6 @@
 
 #include <sndfile.h>
 #include <errno.h>
-#include <qlayout.h>
 #include <stdio.h>
 
 #include "app.h"
diff --git a/muse2/muse/ctrl.cpp b/muse2/muse/ctrl.cpp
index 4da22836..a2bd0754 100644
--- a/muse2/muse/ctrl.cpp
+++ b/muse2/muse/ctrl.cpp
@@ -9,8 +9,9 @@
 //=========================================================
 
 
-#include <qlocale.h>
+#include <QLocale>
 //#include <stdlib.h>
+
 #include "globals.h"
 #include "ctrl.h"
 #include "xml.h"
diff --git a/muse2/muse/ctrl/ctrlpanel.cpp b/muse2/muse/ctrl/ctrlpanel.cpp
index cdf3104d..9e990861 100644
--- a/muse2/muse/ctrl/ctrlpanel.cpp
+++ b/muse2/muse/ctrl/ctrlpanel.cpp
@@ -15,6 +15,7 @@
 #include <QPushButton>
 #include <QSizePolicy>
 #include <QHBoxLayout>
+#include <QTimer>
 #include <QVBoxLayout>
 
 #include <math.h>
diff --git a/muse2/muse/device.h b/muse2/muse/device.h
index f039fc11..b77ffb9b 100644
--- a/muse2/muse/device.h
+++ b/muse2/muse/device.h
@@ -9,7 +9,7 @@
 #ifndef __DEVICE_H__
 #define __DEVICE_H__
 
-#include <qstring.h>
+class QString;
 
 //---------------------------------------------------------
 //   Device
diff --git a/muse2/muse/driver/audiodev.h b/muse2/muse/driver/audiodev.h
index 39ff822e..0b4aacef 100644
--- a/muse2/muse/driver/audiodev.h
+++ b/muse2/muse/driver/audiodev.h
@@ -9,9 +9,10 @@
 #ifndef __AUDIODEV_H__
 #define __AUDIODEV_H__
 
-#include <qstring.h>
 #include <list>
 
+class QString;
+
 class MidiPlayEvent;
 
 //---------------------------------------------------------
diff --git a/muse2/muse/driver/dummyaudio.cpp b/muse2/muse/driver/dummyaudio.cpp
index a17a99e7..f4a00b4e 100644
--- a/muse2/muse/driver/dummyaudio.cpp
+++ b/muse2/muse/driver/dummyaudio.cpp
@@ -12,7 +12,6 @@
 #include <stdarg.h>
 #include <pthread.h>
 #include <sys/poll.h>
-#include <qmessagebox.h>
 
 #include "config.h"
 #include "audio.h"
diff --git a/muse2/muse/driver/jackmidi.cpp b/muse2/muse/driver/jackmidi.cpp
index 2d77af2f..03c75ef4 100644
--- a/muse2/muse/driver/jackmidi.cpp
+++ b/muse2/muse/driver/jackmidi.cpp
@@ -5,8 +5,8 @@
 //  (C) Copyright 1999-2010 Werner Schweer (ws@seh.de)
 //=========================================================
 
-//#include <qt.h>
-#include <qstring.h>
+#include <QString>
+
 #include <stdio.h>
 
 #include <jack/jack.h>
diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp
index cb94f7ca..8c967713 100644
--- a/muse2/muse/dssihost.cpp
+++ b/muse2/muse/dssihost.cpp
@@ -34,11 +34,10 @@
 #include <sys/stat.h>
 //#include <dssi.h>
 //#include <alsa/asoundlib.h>
-#include <qdir.h>
-//#include <qstringlist.h>
+
+#include <QDir>
 #include <QFileInfo>
 #include <QMenu>
-//#include <qprocess.h>
 
 #include "dssihost.h"
 #include "synth.h"
diff --git a/muse2/muse/event.h b/muse2/muse/event.h
index 0b0a2fbd..5a8a74f8 100644
--- a/muse2/muse/event.h
+++ b/muse2/muse/event.h
@@ -9,7 +9,6 @@
 #ifndef __EVENT_H__
 #define __EVENT_H__
 
-#include <qstring.h>
 #include <map>
 //#include <samplerate.h>
 #include <sys/types.h>
@@ -20,6 +19,8 @@
 
 enum EventType { Note, Controller, Sysex, PAfter, CAfter, Meta, Wave };
 
+class QString;
+
 class Xml;
 class EventBase;
 //class AudioConverter;
diff --git a/muse2/muse/exportmidi.cpp b/muse2/muse/exportmidi.cpp
index 4aaf1f40..8065c275 100644
--- a/muse2/muse/exportmidi.cpp
+++ b/muse2/muse/exportmidi.cpp
@@ -7,7 +7,7 @@
 //=========================================================
 
 #include <stdio.h>
-#include <qstring.h>
+#include <QString>
 
 #include "al/sig.h"  // Tim.
 
diff --git a/muse2/muse/gconfig.h b/muse2/muse/gconfig.h
index ecef559c..58b223dc 100644
--- a/muse2/muse/gconfig.h
+++ b/muse2/muse/gconfig.h
@@ -9,14 +9,14 @@
 #ifndef __CONFIG_H__
 #define __CONFIG_H__
 
-#include <qcolor.h>
-#include <qfont.h>
-#include <qstring.h>
-#include <qrect.h>
-
 #define NUM_PARTCOLORS 17
 #define NUM_FONTS 7
 
+#include <QColor>
+#include <QFont>
+#include <QRect>
+#include <QString>
+
 class Xml;
 
 //---------------------------------------------------------
diff --git a/muse2/muse/globals.cpp b/muse2/muse/globals.cpp
index ccd7682a..93cc834a 100644
--- a/muse2/muse/globals.cpp
+++ b/muse2/muse/globals.cpp
@@ -7,13 +7,12 @@
 //=========================================================
 
 #include <stdio.h>
-#include <qpixmap.h>
-//Added by qt3to4:
-#include <QActionGroup>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <qobject.h>
+
+#include <QActionGroup>
+
 #include "globals.h"
 #include "config.h"
 
diff --git a/muse2/muse/globals.h b/muse2/muse/globals.h
index 1de54abf..5cad778e 100644
--- a/muse2/muse/globals.h
+++ b/muse2/muse/globals.h
@@ -18,7 +18,6 @@
 #include <unistd.h>
 
 class QString;
-class QFont;
 class QAction;
 class QActionGroup;
 class QStringList;
diff --git a/muse2/muse/helper.h b/muse2/muse/helper.h
index 8c561db6..f772ebf6 100644
--- a/muse2/muse/helper.h
+++ b/muse2/muse/helper.h
@@ -8,7 +8,7 @@
 #ifndef __HELPER_H__
 #define __HELPER_H__
 
-#include <qstring.h>
+#include <QString>
 
 extern QString pitch2string(int v);
 
diff --git a/muse2/muse/icons.cpp b/muse2/muse/icons.cpp
index 0a843ad0..41dfe1f2 100644
--- a/muse2/muse/icons.cpp
+++ b/muse2/muse/icons.cpp
@@ -7,8 +7,8 @@
 //=========================================================
 
 #include "globals.h"
-#include <qpixmap.h>
-#include <qicon.h>
+
+#include <QIcon>
 
 #include "xpm/track_comment.xpm"
 #include "xpm/audio_bounce_to_file.xpm"
diff --git a/muse2/muse/icons.h b/muse2/muse/icons.h
index 6d97890d..a3e9ecfa 100644
--- a/muse2/muse/icons.h
+++ b/muse2/muse/icons.h
@@ -1,5 +1,3 @@
-//Added by qt3to4:
-#include <QPixmap>
 //=========================================================
 //  MusE
 //  Linux Music Editor
diff --git a/muse2/muse/importmidi.cpp b/muse2/muse/importmidi.cpp
index b9449971..793c34a8 100644
--- a/muse2/muse/importmidi.cpp
+++ b/muse2/muse/importmidi.cpp
@@ -9,7 +9,8 @@
 #include <assert.h>
 #include <errno.h>
 #include <values.h>
-#include <qmessagebox.h>
+
+#include <QMessageBox>
 
 #include "app.h"
 #include "song.h"
diff --git a/muse2/muse/instruments/editinstrument.cpp b/muse2/muse/instruments/editinstrument.cpp
index d82dff4f..18a51eff 100644
--- a/muse2/muse/instruments/editinstrument.cpp
+++ b/muse2/muse/instruments/editinstrument.cpp
@@ -11,10 +11,12 @@
 
 #include <QCloseEvent>
 #include <QDir>
+#include <QFileDialog>
 #include <QFileInfo>
 #include <QInputDialog>
 #include <QMessageBox>
 #include <QLineEdit>
+#include <QWhatsThis>
 
 #include "editinstrument.h"
 #include "minstrument.h"
diff --git a/muse2/muse/instruments/midictrledit.cpp b/muse2/muse/instruments/midictrledit.cpp
index 9a7dee3e..9dcac628 100644
--- a/muse2/muse/instruments/midictrledit.cpp
+++ b/muse2/muse/instruments/midictrledit.cpp
@@ -19,14 +19,6 @@
 #include "filedialog.h"
 #include "globals.h"
 
-#include <q3listview.h>
-#include <qlineedit.h>
-#include <q3listbox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-
 MidiControllerEditDialog* midiControllerEditDialog;
 
 static MidiController predefinedMidiController[] = {
diff --git a/muse2/muse/instruments/minstrument.cpp b/muse2/muse/instruments/minstrument.cpp
index db885113..e39ee996 100644
--- a/muse2/muse/instruments/minstrument.cpp
+++ b/muse2/muse/instruments/minstrument.cpp
@@ -8,9 +8,11 @@
 
 #include <stdio.h>
 
+#include <QAction>
 #include <QDir>
 #include <QFileInfo>
-#include <QAction>
+#include <QMenu>
+#include <QMessageBox>
 
 #include "minstrument.h"
 #include "midiport.h"
diff --git a/muse2/muse/instruments/minstrument.h b/muse2/muse/instruments/minstrument.h
index 09bfb9da..0c37701f 100644
--- a/muse2/muse/instruments/minstrument.h
+++ b/muse2/muse/instruments/minstrument.h
@@ -13,9 +13,6 @@
 #include <list>
 #include <vector>
 
-#include <QMenu>
-#include <QList>
-
 class MidiPort;
 class QMenu;
 class MidiPlayEvent;
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp
index aeb6eb99..3f29176c 100644
--- a/muse2/muse/liste/listedit.cpp
+++ b/muse2/muse/liste/listedit.cpp
@@ -9,7 +9,11 @@
 #include <QActionGroup>
 #include <QCloseEvent>
 #include <QKeyEvent>
+#include <QMenu>
+#include <QMenuBar>
+#include <QSignalMapper>
 #include <QToolBar>
+#include <QTreeWidgetItem>
 
 #include "listedit.h"
 #include "mtscale.h"
diff --git a/muse2/muse/marker/marker.h b/muse2/muse/marker/marker.h
index a00e1fc6..f1a587f7 100644
--- a/muse2/muse/marker/marker.h
+++ b/muse2/muse/marker/marker.h
@@ -9,10 +9,12 @@
 #define __MARKER_H__
 
 #include <map>
-#include <qstring.h>
+
 #include "xml.h"
 #include "pos.h"
 
+class QString;
+
 //---------------------------------------------------------
 //   Marker
 //---------------------------------------------------------
diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp
index dd4a5a69..80643b4d 100644
--- a/muse2/muse/marker/markerview.cpp
+++ b/muse2/muse/marker/markerview.cpp
@@ -18,7 +18,11 @@
 #include "awl/posedit.h"
 
 #include <QCloseEvent>
+#include <QGroupBox>
+#include <QHeaderView>
+#include <QLineEdit>
 #include <QMenu>
+#include <QMenuBar>
 #include <QHBoxLayout>
 #include <QToolBar>
 #include <QToolButton>
diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp
index 232b9672..00a09d13 100644
--- a/muse2/muse/master/lmaster.cpp
+++ b/muse2/muse/master/lmaster.cpp
@@ -19,8 +19,13 @@
 #include "debug.h"
 
 #include <QCloseEvent>
+#include <QGridLayout>
+#include <QHeaderView>
+#include <QLineEdit>
 #include <QMenu>
+#include <QMenuBar>
 #include <QMessageBox>
+#include <QSignalMapper>
 #include <QStyle>
 #include <QToolBar>
 #include <QToolButton>
diff --git a/muse2/muse/master/master.h b/muse2/muse/master/master.h
index 4c38bc16..52040aeb 100644
--- a/muse2/muse/master/master.h
+++ b/muse2/muse/master/master.h
@@ -16,6 +16,7 @@ class QMouseEvent;
 class QPainter;
 class QPoint;
 class QRect;
+class QToolBar;
 
 class MidiEditor;
 class ScrollScale;
diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp
index 42dc412f..eae0f207 100644
--- a/muse2/muse/master/masteredit.cpp
+++ b/muse2/muse/master/masteredit.cpp
@@ -25,7 +25,9 @@
 
 #include <values.h>
 
+#include <QActionGroup>
 #include <QCloseEvent>
+#include <QGridLayout>
 #include <QLabel>
 #include <QToolBar>
 #include <QToolButton>
diff --git a/muse2/muse/master/tscale.cpp b/muse2/muse/master/tscale.cpp
index e31af92c..d37d5924 100644
--- a/muse2/muse/master/tscale.cpp
+++ b/muse2/muse/master/tscale.cpp
@@ -9,9 +9,9 @@
 #include "tscale.h"
 #include "globals.h"
 #include "gconfig.h"
-//Added by qt3to4:
+
 #include <QMouseEvent>
-#include <QEvent>
+#include <QPainter>
 
 //---------------------------------------------------------
 //   TScale
diff --git a/muse2/muse/master/tscale.h b/muse2/muse/master/tscale.h
index 08f91c7e..35fa39f2 100644
--- a/muse2/muse/master/tscale.h
+++ b/muse2/muse/master/tscale.h
@@ -9,9 +9,6 @@
 #define __TSCALE_H__
 
 #include "view.h"
-//Added by qt3to4:
-#include <QEvent>
-#include <QMouseEvent>
 
 //---------------------------------------------------------
 //   Tscale
diff --git a/muse2/muse/midi.h b/muse2/muse/midi.h
index ee13fb36..ab649377 100644
--- a/muse2/muse/midi.h
+++ b/muse2/muse/midi.h
@@ -12,7 +12,8 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <qstring.h>
+
+class QString;
 
 enum {
       ME_NOTEOFF     = 0x80,
diff --git a/muse2/muse/midictrl.cpp b/muse2/muse/midictrl.cpp
index 47d651f8..b96fcda6 100644
--- a/muse2/muse/midictrl.cpp
+++ b/muse2/muse/midictrl.cpp
@@ -9,7 +9,6 @@
 #include <assert.h>
 #include <stdio.h>
 
-#include <qobject.h>
 #include "midictrl.h"
 #include "xml.h"
 #include "globals.h"
diff --git a/muse2/muse/midictrl.h b/muse2/muse/midictrl.h
index 69650a65..4c08fbe0 100644
--- a/muse2/muse/midictrl.h
+++ b/muse2/muse/midictrl.h
@@ -9,10 +9,11 @@
 #ifndef __MIDICTRL_H__
 #define __MIDICTRL_H__
 
-#include <qstring.h>
 #include <list>
 #include <map>
 
+#include <QString>
+
 const int CTRL_HBANK = 0x00;
 const int CTRL_LBANK = 0x20;
 
diff --git a/muse2/muse/mididev.cpp b/muse2/muse/mididev.cpp
index cda7b9f3..0aab9a71 100644
--- a/muse2/muse/mididev.cpp
+++ b/muse2/muse/mididev.cpp
@@ -8,7 +8,7 @@
 
 #include <config.h>
 
-#include <qmessagebox.h>
+#include <QMessageBox>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
diff --git a/muse2/muse/mididev.h b/muse2/muse/mididev.h
index 2bb5d727..16e834f2 100644
--- a/muse2/muse/mididev.h
+++ b/muse2/muse/mididev.h
@@ -9,7 +9,6 @@
 #ifndef __MIDIDEV_H__
 #define __MIDIDEV_H__
 
-#include <qstring.h>
 #include <list>
 
 #include "mpevent.h"
@@ -17,6 +16,8 @@
 #include "route.h"
 #include "globaldefs.h"
 
+#include <QString>
+
 //class RouteList;
 class Xml;
 
diff --git a/muse2/muse/midiedit/dlist.h b/muse2/muse/midiedit/dlist.h
index 5299fcb3..f0dda0d4 100644
--- a/muse2/muse/midiedit/dlist.h
+++ b/muse2/muse/midiedit/dlist.h
@@ -8,13 +8,14 @@
 #ifndef __DLIST_H__
 #define __DLIST_H__
 
+#include <QKeyEvent>
 #include <QLineEdit>
 
 #include "view.h"
 
 #define TH  18                // normal Track-hight
 
-class QKeyEvent;
+class QHeaderView;
 class QMouseEvent;
 class QPainter;
 
diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp
index bc5caca6..e340c52c 100644
--- a/muse2/muse/midiedit/drumedit.cpp
+++ b/muse2/muse/midiedit/drumedit.cpp
@@ -11,9 +11,12 @@
 #include <QGridLayout>
 #include <QKeyEvent>
 #include <QList>
+#include <QMenu>
+#include <QMenuBar>
 #include <QMessageBox>
 #include <QPushButton>
 #include <QResizeEvent>
+#include <QSignalMapper>
 #include <QSizeGrip>
 #include <QToolButton>
 #include <QWhatsThis>
diff --git a/muse2/muse/midiedit/drumedit.h b/muse2/muse/midiedit/drumedit.h
index 37473aaf..46e3123e 100644
--- a/muse2/muse/midiedit/drumedit.h
+++ b/muse2/muse/midiedit/drumedit.h
@@ -22,6 +22,7 @@ class QLabel;
 class QMenu;
 class QKeyEvent;
 class QResizeEvent;
+class QToolButton;
 class QWidget;
 
 class MidiPart;
diff --git a/muse2/muse/midiedit/drummap.h b/muse2/muse/midiedit/drummap.h
index dfe67254..eb494c9c 100644
--- a/muse2/muse/midiedit/drummap.h
+++ b/muse2/muse/midiedit/drummap.h
@@ -9,7 +9,7 @@
 #ifndef __DRUMMAP_H__
 #define __DRUMMAP_H__
 
-#include <qstring.h>
+class QString;
 
 class Xml;
 
diff --git a/muse2/muse/midiedit/ecanvas.cpp b/muse2/muse/midiedit/ecanvas.cpp
index 8323a2f8..68819adf 100644
--- a/muse2/muse/midiedit/ecanvas.cpp
+++ b/muse2/muse/midiedit/ecanvas.cpp
@@ -5,10 +5,12 @@
 //  (C) Copyright 2001 Werner Schweer (ws@seh.de)
 //=========================================================
 
+#include <errno.h>
 #include <values.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/mman.h>
+
 #include <QKeyEvent>
 #include <QDropEvent>
 #include <QEvent>
diff --git a/muse2/muse/midiedit/piano.cpp b/muse2/muse/midiedit/piano.cpp
index 625ad564..69a3a9e2 100644
--- a/muse2/muse/midiedit/piano.cpp
+++ b/muse2/muse/midiedit/piano.cpp
@@ -5,11 +5,8 @@
 //  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <qpainter.h>
-//Added by qt3to4:
-#include <QPixmap>
-#include <QEvent>
 #include <QMouseEvent>
+#include <QPainter>
 
 #include <stdio.h>
 
diff --git a/muse2/muse/midiedit/piano.h b/muse2/muse/midiedit/piano.h
index 2f06b810..35106d64 100644
--- a/muse2/muse/midiedit/piano.h
+++ b/muse2/muse/midiedit/piano.h
@@ -9,12 +9,11 @@
 #define __PIANO_H__
 
 #include "view.h"
-//Added by qt3to4:
-#include <QMouseEvent>
-#include <QEvent>
-#include <QPixmap>
 
+class QEvent;
+class QMouseEvent;
 class QPainter;
+class QPixmap;
 
 #define KH  13
 
diff --git a/muse2/muse/midieditor.cpp b/muse2/muse/midieditor.cpp
index 9bda29d4..9191233d 100644
--- a/muse2/muse/midieditor.cpp
+++ b/muse2/muse/midieditor.cpp
@@ -10,15 +10,15 @@
 #include "waveedit/waveview.h"
 #include "scrollscale.h"
 #include "mtscale.h"
-//#include <QLayout>
-#include <QRect>
-#include <QColor>
-#include <QGridLayout>
 #include "xml.h"
 #include "part.h"
 #include "track.h"
 #include "song.h"
 
+#include <QRect>
+#include <QColor>
+#include <QGridLayout>
+
 //---------------------------------------------------------
 //   MidiEditor
 //---------------------------------------------------------
diff --git a/muse2/muse/midieditor.h b/muse2/muse/midieditor.h
index 9a9ab437..1f465c2d 100644
--- a/muse2/muse/midieditor.h
+++ b/muse2/muse/midieditor.h
@@ -11,13 +11,12 @@
 ///#include "sig.h"
 #include "al/sig.h"
 #include "cobject.h"
-//#include <QGridLayout>
 
-class PartList;
-class Xml;
 class QGridLayout;
 class QWidget;
-class QColor;
+
+class PartList;
+class Xml;
 class EventCanvas;
 class ScrollScale;
 class CtrlEdit;
diff --git a/muse2/muse/midiseq.cpp b/muse2/muse/midiseq.cpp
index e6ac2073..8aabcbbb 100644
--- a/muse2/muse/midiseq.cpp
+++ b/muse2/muse/midiseq.cpp
@@ -8,8 +8,8 @@
 //  (C) Copyright 2003 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <qmessagebox.h>
-#include <qobject.h>
+#include <QMessageBox>
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
diff --git a/muse2/muse/mixer/amixer.h b/muse2/muse/mixer/amixer.h
index 16e84c73..f8e365c3 100644
--- a/muse2/muse/mixer/amixer.h
+++ b/muse2/muse/mixer/amixer.h
@@ -9,35 +9,28 @@
 #ifndef __AMIXER_H__
 #define __AMIXER_H__
 
-#include <QLayout>
-#include <QPixmap>
-#include <QToolTip>
-#include <QHBoxLayout>
-#include <QLabel>
-#include <QMenu>
-#include <QCloseEvent>
-#include <QAction>
+#include <QScrollArea>
 
 #include "cobject.h"
 #include "synth.h"
 #include "node.h"
 #include "routedialog.h"
 
-class Xml;
-class QWidget;
 class QHBoxLayout;
-class QScrollArea;
+class QLabel;
+class QMenu;
+class QToolButton;
+class QWidget;
+
+class Xml;
 class AudioTrack;
 class Meter;
 class Track;
-class QLabel;
 class Slider;
-class QToolButton;
 class Knob;
 class DoubleLabel;
 class ComboBox;
 class RouteDialog;
-class QMenu;
 class Strip;
 
 struct MixerConfig;
diff --git a/muse2/muse/mixer/meter.cpp b/muse2/muse/mixer/meter.cpp
index deb79d06..b9780f88 100644
--- a/muse2/muse/mixer/meter.cpp
+++ b/muse2/muse/mixer/meter.cpp
@@ -8,11 +8,10 @@
 
 #include <stdio.h>
 #include <cmath>
-#include <qpainter.h>
-//Added by qt3to4:
-#include <QResizeEvent>
+
 #include <QMouseEvent>
-#include <QFrame>
+#include <QPainter>
+#include <QResizeEvent>
 
 #include "meter.h"
 #include "gconfig.h"
diff --git a/muse2/muse/mixer/meter.h b/muse2/muse/mixer/meter.h
index 4802fac0..6c2dde34 100644
--- a/muse2/muse/mixer/meter.h
+++ b/muse2/muse/mixer/meter.h
@@ -9,12 +9,10 @@
 #ifndef __METER_H__
 #define __METER_H__
 
-//#include <q3frame.h>
 #include <QFrame>
-#include <qpixmap.h>
-//Added by qt3to4:
-#include <QResizeEvent>
-#include <QMouseEvent>
+
+class QResizeEvent;
+class QMouseEvent;
 
 class Meter : public QFrame {
    public:
diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp
index 2bbed787..9dc5b517 100644
--- a/muse2/muse/mixer/rack.cpp
+++ b/muse2/muse/mixer/rack.cpp
@@ -16,6 +16,7 @@
 #include <QMouseEvent>
 #include <QPainter>
 #include <QPalette>
+#include <QUrl>
 
 #include <errno.h>
 
diff --git a/muse2/muse/mplugins/mittranspose.cpp b/muse2/muse/mplugins/mittranspose.cpp
index d64022be..4aeaf046 100644
--- a/muse2/muse/mplugins/mittranspose.cpp
+++ b/muse2/muse/mplugins/mittranspose.cpp
@@ -7,7 +7,7 @@
 //=========================================================
 
 #include <QCloseEvent>
-#include <QWidget>
+#include <QTimer>
 
 #include "mittranspose.h"
 #include "song.h"
diff --git a/muse2/muse/mplugins/rhythm.cpp b/muse2/muse/mplugins/rhythm.cpp
index 84b339b2..0fe2ba16 100644
--- a/muse2/muse/mplugins/rhythm.cpp
+++ b/muse2/muse/mplugins/rhythm.cpp
@@ -14,10 +14,6 @@
 
 #include "rhythm.h"
 
-#include <QCloseEvent>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-
 //---------------------------------------------------------
 //   RhythmGen
 //---------------------------------------------------------
@@ -54,21 +50,21 @@ void RhythmGen::closeEvent(QCloseEvent* ev)
 ****************************************************************************/
 #include "rhythm.h"
 
-#include <qvariant.h>
-#include <qcheckbox.h>
-//#include <q3frame.h>
+#include <QCloseEvent>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QVariant>
+#include <QCheckBox>
 #include <QFrame>
-#include <qlabel.h>
-#include <qlcdnumber.h>
-#include <q3listbox.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <q3whatsthis.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <QLabel>
+#include <QLCDNumber>
+#include <QPushButton>
+#include <QSlider>
+#include <QToolButton>
+#include <QLayout>
+#include <QToolTip>
+#include <QImage>
+#include <QPixmap>
 
 static const char* const image0_data[] = {
 "16 16 56 1",
diff --git a/muse2/muse/node.h b/muse2/muse/node.h
index eaeacfbd..b54faea9 100644
--- a/muse2/muse/node.h
+++ b/muse2/muse/node.h
@@ -10,7 +10,6 @@
 #define __AUDIONODE_H__
 
 #include <list>
-#include <qstring.h>
 
 #ifndef i386
 #include <pthread.h>
diff --git a/muse2/muse/part.h b/muse2/muse/part.h
index b2a18851..11ff2fd4 100644
--- a/muse2/muse/part.h
+++ b/muse2/muse/part.h
@@ -11,14 +11,14 @@
 
 #include <map>
 
-#include <qstring.h>
-#include <qcolor.h>
 // Added by T356.
 #include <uuid/uuid.h>
 
 #include "event.h"
 #include "audioconvert.h"
 
+class QString;
+
 class Track;
 class MidiTrack;
 class WaveTrack;
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp
index 793fd446..5bacf092 100644
--- a/muse2/muse/plugin.cpp
+++ b/muse2/muse/plugin.cpp
@@ -20,6 +20,7 @@
 #include <QGridLayout>
 #include <QGroupBox>
 #include <QHBoxLayout>
+#include <QLabel>
 #include <QMainWindow>
 #include <QMessageBox>
 #include <QPushButton>
@@ -27,8 +28,10 @@
 #include <QSignalMapper>
 #include <QSizePolicy>
 #include <QScrollArea>
+#include <QTimer>
 #include <QToolBar>
 #include <QToolButton>
+#include <QTreeWidget>
 #include <QVBoxLayout>
 #include <QWhatsThis>
 
diff --git a/muse2/muse/plugin.h b/muse2/muse/plugin.h
index 24173de4..031eb566 100644
--- a/muse2/muse/plugin.h
+++ b/muse2/muse/plugin.h
@@ -13,6 +13,8 @@
 #include <vector>
 
 #include <QDialog>
+#include <QFileInfo>
+#include <QMainWindow>
 #include <QUiLoader>
 
 
@@ -34,10 +36,13 @@
 #include <dssi.h>
 #endif
 
+class QAbstractButton;
 class QComboBox;
-class QFileInfo;
+class QRadioButton;
 class QScrollArea;
 class QToolButton;
+class QToolButton;
+class QTreeWidget;
 
 class Xml;
 class Slider;
diff --git a/muse2/muse/remote/pyapi.cpp b/muse2/muse/remote/pyapi.cpp
index 8e8e765c..ee64226a 100644
--- a/muse2/muse/remote/pyapi.cpp
+++ b/muse2/muse/remote/pyapi.cpp
@@ -9,9 +9,7 @@
 #include <string>
 #include <pthread.h>
 
-#include <qobject.h>
-#include <qapplication.h>
-#include <qevent.h>
+#include <QApplication>
 
 #include "pyapi.h"
 #include "song.h"
diff --git a/muse2/muse/remote/pyapi.h b/muse2/muse/remote/pyapi.h
index 582f8b34..7501e591 100644
--- a/muse2/muse/remote/pyapi.h
+++ b/muse2/muse/remote/pyapi.h
@@ -6,7 +6,7 @@
 #ifndef PYAPI_H
 #define PYAPI_H
 
-#include <qevent.h>
+#include <QEvent>
 
 class QPybridgeEvent : public QEvent
 {
diff --git a/muse2/muse/route.cpp b/muse2/muse/route.cpp
index 2b0fb4cf..7356a890 100644
--- a/muse2/muse/route.cpp
+++ b/muse2/muse/route.cpp
@@ -6,7 +6,7 @@
 //  (C) Copyright 2003-2004 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <qwidget.h>
+#include <QWidget>
 
 #include "song.h"
 #include "route.h"
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index 435756e5..3bd024d3 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -15,6 +15,7 @@
 #include <QMenu>
 #include <QMessageBox>
 #include <QPoint>
+#include <QSignalMapper>
 #include <QTextStream>
 
 #include "app.h"
diff --git a/muse2/muse/song.h b/muse2/muse/song.h
index 5661fee3..593d0767 100644
--- a/muse2/muse/song.h
+++ b/muse2/muse/song.h
@@ -9,6 +9,9 @@
 #ifndef __SONG_H__
 #define __SONG_H__
 
+#include <QObject>
+#include <QStringList>
+
 #include "pos.h"
 #include "globaldefs.h"
 #include "tempo.h"
@@ -17,11 +20,9 @@
 #include "undo.h"
 #include "track.h"
 
+class QAction;
 class QFont;
 class QMenu;
-class QButton;
-class QString;
-class QStringList;
 
 class SynthI;
 struct MidiMsg;
diff --git a/muse2/muse/songfile.cpp b/muse2/muse/songfile.cpp
index 9254546e..17de3d86 100644
--- a/muse2/muse/songfile.cpp
+++ b/muse2/muse/songfile.cpp
@@ -7,7 +7,6 @@
 //=========================================================
 
 #include <assert.h>
-#include <qmessagebox.h>
 #include <uuid/uuid.h>
 
 #include "app.h"
diff --git a/muse2/muse/stringparam.cpp b/muse2/muse/stringparam.cpp
index cc2f76e6..24e28e2f 100644
--- a/muse2/muse/stringparam.cpp
+++ b/muse2/muse/stringparam.cpp
@@ -19,7 +19,6 @@
 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 //=============================================================================
 
-#include <qstring.h> 
 #include "stringparam.h" 
 #include "xml.h" 
  
diff --git a/muse2/muse/synth.h b/muse2/muse/synth.h
index 27c4d3b5..de400423 100644
--- a/muse2/muse/synth.h
+++ b/muse2/muse/synth.h
@@ -8,9 +8,6 @@
 #ifndef __SYNTH_H__
 #define __SYNTH_H__
 
-#include <QFileInfo>
-#include <QMenu>
-
 #include <string>
 #include <vector>
 #include <map>
@@ -23,6 +20,10 @@
 #include "track.h"
 #include "stringparam.h"
 
+#include <QFileInfo>
+
+class QMenu;
+
 //class MidiEvent;
 class MidiPlayEvent;
 class Mess;
diff --git a/muse2/muse/transport.cpp b/muse2/muse/transport.cpp
index 57cbf123..8d65f441 100644
--- a/muse2/muse/transport.cpp
+++ b/muse2/muse/transport.cpp
@@ -6,20 +6,13 @@
 //  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <qlabel.h>
-#include <qslider.h>
-#include <qpushbutton.h>
-#include <QFrame>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
-#include <qaction.h>
-#include <QHBoxLayout>
-#include <QPixmap>
+#include <QAction>
+#include <QComboBox>
 #include <QMouseEvent>
+#include <QSlider>
+#include <QToolButton>
+#include <QHBoxLayout>
 #include <QVBoxLayout>
-#include <QBoxLayout>
 
 #include "awl/posedit.h"
 
diff --git a/muse2/muse/transport.h b/muse2/muse/transport.h
index be352dfa..b2d3facf 100644
--- a/muse2/muse/transport.h
+++ b/muse2/muse/transport.h
@@ -11,8 +11,7 @@
 
 #include "al/sig.h"
 
-#include <QMouseEvent>
-#include <QLabel>
+#include <QWidget>
 
 namespace Awl {
       class PosEdit;
@@ -20,14 +19,15 @@ namespace Awl {
 
 using Awl::PosEdit;
 
-class QToolButton;
+class QComboBox;
 class QHBoxLayout;
+class QLabel;
 class QSlider;
+class QToolButton;
+
 class DoubleLabel;
 class SigLabel;
-class QComboBox;
 class Pos;
-class QLabel;
 
 //---------------------------------------------------------
 //    TempoSig
diff --git a/muse2/muse/undo.h b/muse2/muse/undo.h
index c20fe3f5..b17e8e21 100644
--- a/muse2/muse/undo.h
+++ b/muse2/muse/undo.h
@@ -10,10 +10,12 @@
 #define __UNDO_H__
 
 #include <list>
-#include <qstring.h>
+
 #include "event.h"
 #include "marker/marker.h"
 
+class QString;
+
 class Track;
 class TEvent;
 class SigEvent;
diff --git a/muse2/muse/value.h b/muse2/muse/value.h
index fe3817a2..22aa9b5a 100644
--- a/muse2/muse/value.h
+++ b/muse2/muse/value.h
@@ -9,7 +9,7 @@
 #ifndef __VALUE_H__
 #define __VALUE_H__
 
-#include <qobject.h>
+#include <QObject>
 
 class Xml;
 
diff --git a/muse2/muse/vst.cpp b/muse2/muse/vst.cpp
index 28657c69..b34b71ca 100644
--- a/muse2/muse/vst.cpp
+++ b/muse2/muse/vst.cpp
@@ -14,7 +14,9 @@
 
 #ifdef VST_SUPPORT
 
-#include <qdir.h>
+#include <QDir>
+#include <QMenu>
+
 #include <cmath>
 #include <fst.h>
 #include <vst/aeffectx.h>
diff --git a/muse2/muse/vst.h b/muse2/muse/vst.h
index ef3c6f11..93012093 100644
--- a/muse2/muse/vst.h
+++ b/muse2/muse/vst.h
@@ -10,7 +10,7 @@
 
 #include "synth.h"
 
-#include <QMenu>
+class QMenu;
 
 struct _FSTHandle;
 struct _FST;
diff --git a/muse2/muse/wave.cpp b/muse2/muse/wave.cpp
index 20a0e13d..b3f7b091 100644
--- a/muse2/muse/wave.cpp
+++ b/muse2/muse/wave.cpp
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <cmath>
 
+#include <QDateTime>
 #include <QFileInfo>
 #include <QMessageBox>
 #include <QProgressDialog>
diff --git a/muse2/muse/wave.h b/muse2/muse/wave.h
index 4ef0a86a..c2a0d38a 100644
--- a/muse2/muse/wave.h
+++ b/muse2/muse/wave.h
@@ -12,8 +12,9 @@
 #include <list>
 #include <sndfile.h>
 
+#include <QString>
+
 class QFileInfo;
-class QString;
 class Xml;
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/bigtime.cpp b/muse2/muse/widgets/bigtime.cpp
index 78da4248..f3aa75a8 100644
--- a/muse2/muse/widgets/bigtime.cpp
+++ b/muse2/muse/widgets/bigtime.cpp
@@ -1,14 +1,10 @@
 #include <stdio.h>
-#include <qpalette.h>
-#include <qlabel.h>
-#include <qcolor.h>
-#include <qlayout.h>
-//Added by qt3to4:
-#include <QCloseEvent>
-#include <QResizeEvent>
 #include <values.h>
 
-#include <qtooltip.h>
+#include <QCheckBox>
+#include <QLabel>
+#include <QResizeEvent>
+
 #include "globals.h"
 #include "bigtime.h"
 #include "song.h"
diff --git a/muse2/muse/widgets/bigtime.h b/muse2/muse/widgets/bigtime.h
index 5e173cb0..bb32cedc 100644
--- a/muse2/muse/widgets/bigtime.h
+++ b/muse2/muse/widgets/bigtime.h
@@ -1,13 +1,11 @@
 #ifndef __BIGTIME_H__
 #define __BIGTIME_H__
 
-#include <qwidget.h>
-#include <qlabel.h>
+#include <QWidget>
+
+class QCheckBox;
+class QLabel;
 
-#include <qcheckbox.h>
-//Added by qt3to4:
-#include <QResizeEvent>
-#include <QCloseEvent>
 class MusE;
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/canvas.cpp b/muse2/muse/widgets/canvas.cpp
index 35a80aad..20b92e8d 100644
--- a/muse2/muse/widgets/canvas.cpp
+++ b/muse2/muse/widgets/canvas.cpp
@@ -8,7 +8,9 @@
 #include <stdio.h>
 
 #include "canvas.h"
+
 #include <QApplication>
+#include <QMenu>
 #include <QPainter>
 #include <QCursor>
 #include <QTimer>
diff --git a/muse2/muse/widgets/checkbox.cpp b/muse2/muse/widgets/checkbox.cpp
index c680314e..8f706361 100644
--- a/muse2/muse/widgets/checkbox.cpp
+++ b/muse2/muse/widgets/checkbox.cpp
@@ -6,7 +6,7 @@
 //=========================================================
 
 #include "checkbox.h"
-//Added by qt3to4:
+
 #include <QMouseEvent>
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/checkbox.h b/muse2/muse/widgets/checkbox.h
index 26209987..f9b58ad1 100644
--- a/muse2/muse/widgets/checkbox.h
+++ b/muse2/muse/widgets/checkbox.h
@@ -8,9 +8,8 @@
 #ifndef __CHECKBOX_H__
 #define __CHECKBOX_H__
 
-#include <qcheckbox.h>
-//Added by qt3to4:
-#include <QMouseEvent>
+#include <QCheckBox>
+
 
 //---------------------------------------------------------
 //   CheckBox
diff --git a/muse2/muse/widgets/combobox.cpp b/muse2/muse/widgets/combobox.cpp
index cf7442ec..9e278376 100644
--- a/muse2/muse/widgets/combobox.cpp
+++ b/muse2/muse/widgets/combobox.cpp
@@ -5,11 +5,7 @@
 //  (C) Copyright 2004 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <QCursor>
 #include <QMenu>
-#include <QMouseEvent>
-#include <QFrame>
-#include <QLabel>
 
 #include "combobox.h"
 
diff --git a/muse2/muse/widgets/combobox.h b/muse2/muse/widgets/combobox.h
index eea9bb94..305ad0b3 100644
--- a/muse2/muse/widgets/combobox.h
+++ b/muse2/muse/widgets/combobox.h
@@ -8,9 +8,7 @@
 #ifndef __COMBOBOX_H__
 #define __COMBOBOX_H__
 
-#include <qlabel.h>
-
-#include <QMouseEvent>
+#include <QLabel>
 
 class QMenu;
 
diff --git a/muse2/muse/widgets/dentry.cpp b/muse2/muse/widgets/dentry.cpp
index 4c16a50d..c7aa3c1b 100644
--- a/muse2/muse/widgets/dentry.cpp
+++ b/muse2/muse/widgets/dentry.cpp
@@ -5,14 +5,12 @@
 //  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include "dentry.h"
 #include <stdio.h>
-#include <qtimer.h>
-#include <qcursor.h>
-//Added by qt3to4:
-#include <QWheelEvent>
-#include <QMouseEvent>
+
 #include <QContextMenuEvent>
+#include <QTimer>
+
+#include "dentry.h"
 #include "globals.h"
 
 #define TIMER1    400
diff --git a/muse2/muse/widgets/dentry.h b/muse2/muse/widgets/dentry.h
index 58f1ef6f..21c9ff38 100644
--- a/muse2/muse/widgets/dentry.h
+++ b/muse2/muse/widgets/dentry.h
@@ -8,16 +8,10 @@
 #ifndef __DENTRY_H__
 #define __DENTRY_H__
 
-#include <qlineedit.h>
-//Added by qt3to4:
-#include <QMouseEvent>
-#include <QContextMenuEvent>
-#include <QWheelEvent>
+#include <QLineEdit>
 
 #include "sliderbase.h"
 
-class QTimer;
-
 //---------------------------------------------------------
 //   Dentry
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/dimap.h b/muse2/muse/widgets/dimap.h
index 5e9ac3ee..cf51dee2 100644
--- a/muse2/muse/widgets/dimap.h
+++ b/muse2/muse/widgets/dimap.h
@@ -14,7 +14,7 @@
 #ifndef __DIMAP_H__
 #define __DIMAP_H__
 
-#include <qglobal.h>
+#include <QtGlobal>
 
 class DiMap
       {
diff --git a/muse2/muse/widgets/doublelabel.cpp b/muse2/muse/widgets/doublelabel.cpp
index af492738..fe2bfc6a 100644
--- a/muse2/muse/widgets/doublelabel.cpp
+++ b/muse2/muse/widgets/doublelabel.cpp
@@ -5,16 +5,9 @@
 //  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <stdio.h>
+#include <cmath>
 
 #include "doublelabel.h"
-#include <qvalidator.h>
-#include <qpalette.h>
-#include <stdio.h>
-#include <values.h>
-#include <math.h>
-
-#include "utils.h"
 
 //---------------------------------------------------------
 //   DoubleLabel
diff --git a/muse2/muse/widgets/drange.cpp b/muse2/muse/widgets/drange.cpp
index 5c986403..e144dfea 100644
--- a/muse2/muse/widgets/drange.cpp
+++ b/muse2/muse/widgets/drange.cpp
@@ -12,6 +12,9 @@
 //=========================================================
 
 #include <cmath>
+
+#include <QtGlobal>
+
 #include "mmath.h"
 #include "drange.h"
 
diff --git a/muse2/muse/widgets/drange.h b/muse2/muse/widgets/drange.h
index 1ee3dd21..d0931e86 100644
--- a/muse2/muse/widgets/drange.h
+++ b/muse2/muse/widgets/drange.h
@@ -14,8 +14,6 @@
 #ifndef __DOUBLE_RANGE_H__
 #define __DOUBLE_RANGE_H__
 
-#include <qglobal.h>
-
 //---------------------------------------------------------
 //   DoubleRange
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/filedialog.h b/muse2/muse/widgets/filedialog.h
index c2feba37..a7c8a1f7 100644
--- a/muse2/muse/widgets/filedialog.h
+++ b/muse2/muse/widgets/filedialog.h
@@ -6,7 +6,6 @@
 //=========================================================
 
 #include <QFileDialog>
-#include <QPixmap>
 
 #include "ui_fdialogbuttons.h"
 
diff --git a/muse2/muse/widgets/hitscale.cpp b/muse2/muse/widgets/hitscale.cpp
index aa3838fe..feba5920 100644
--- a/muse2/muse/widgets/hitscale.cpp
+++ b/muse2/muse/widgets/hitscale.cpp
@@ -7,10 +7,9 @@
 
 #include "hitscale.h"
 #include "midieditor.h"
-#include <qpainter.h>
-//Added by qt3to4:
-#include <QEvent>
+
 #include <QMouseEvent>
+#include <QPainter>
 
 #include "song.h"
 
diff --git a/muse2/muse/widgets/hitscale.h b/muse2/muse/widgets/hitscale.h
index 85711e71..0eaae399 100644
--- a/muse2/muse/widgets/hitscale.h
+++ b/muse2/muse/widgets/hitscale.h
@@ -9,11 +9,7 @@
 #define __HITSCALE_H__
 
 #include "view.h"
-//Added by qt3to4:
-#include <QEvent>
-#include <QMouseEvent>
 
-class QPainter;
 class MidiEditor;
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/intlabel.cpp b/muse2/muse/widgets/intlabel.cpp
index 8835e79d..355f4510 100644
--- a/muse2/muse/widgets/intlabel.cpp
+++ b/muse2/muse/widgets/intlabel.cpp
@@ -8,10 +8,6 @@
 #include <stdio.h>
 
 #include "intlabel.h"
-#include <qvalidator.h>
-#include <qpalette.h>
-#include <stdio.h>
-
 #include "utils.h"
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/lcombo.cpp b/muse2/muse/widgets/lcombo.cpp
index 16fe150a..15cf6266 100644
--- a/muse2/muse/widgets/lcombo.cpp
+++ b/muse2/muse/widgets/lcombo.cpp
@@ -7,11 +7,9 @@
 
 #include "lcombo.h"
 
-#include <QLayout>
-#include <QFrame>
-#include <qlabel.h>
-//Added by qt3to4:
 #include <QHBoxLayout>
+#include <QLabel>
+
 
 //---------------------------------------------------------
 //   LabelCombo
diff --git a/muse2/muse/widgets/lcombo.h b/muse2/muse/widgets/lcombo.h
index 885d21e7..b125fce5 100644
--- a/muse2/muse/widgets/lcombo.h
+++ b/muse2/muse/widgets/lcombo.h
@@ -8,15 +8,11 @@
 #ifndef __LCOMBO_H__
 #define __LCOMBO_H__
 
-//#include <qwidget.h>
-//#include <qcombobox.h>
-
-class QString;
-class QWidget;
-
-//class Q3ListBox;
 #include <QAbstractItemView>
 #include <QComboBox>
+#include <QVariant>
+
+class QString;
 
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/midisyncimpl.cpp b/muse2/muse/widgets/midisyncimpl.cpp
index 25508c27..75d21ac0 100644
--- a/muse2/muse/widgets/midisyncimpl.cpp
+++ b/muse2/muse/widgets/midisyncimpl.cpp
@@ -6,10 +6,12 @@
 //  (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
 //=========================================================
 
+#include <QCloseEvent>
+#include <QInputDialog>
+#include <QMessageBox>
 #include <QStringList>
+#include <QTimer>
 #include <QTreeWidgetItem>
-#include <QInputDialog>
-#include <QCloseEvent>
 
 #include "app.h"
 #include "song.h"
diff --git a/muse2/muse/widgets/mlabel.cpp b/muse2/muse/widgets/mlabel.cpp
index a6c1b183..2b9526d4 100644
--- a/muse2/muse/widgets/mlabel.cpp
+++ b/muse2/muse/widgets/mlabel.cpp
@@ -6,8 +6,6 @@
 //=========================================================
 
 #include "mlabel.h"
-//Added by qt3to4:
-#include <QMouseEvent>
 
 
 void MLabel::mousePressEvent(QMouseEvent*)
diff --git a/muse2/muse/widgets/mlabel.h b/muse2/muse/widgets/mlabel.h
index 04604041..01bfa788 100644
--- a/muse2/muse/widgets/mlabel.h
+++ b/muse2/muse/widgets/mlabel.h
@@ -8,9 +8,7 @@
 #ifndef __MLABEL_H__
 #define __MLABEL_H__
 
-#include <qlabel.h>
-//Added by qt3to4:
-#include <QMouseEvent>
+#include <QLabel>
 
 //---------------------------------------------------------
 //   MLabel
diff --git a/muse2/muse/widgets/mtscale.cpp b/muse2/muse/widgets/mtscale.cpp
index 3ed9690a..624c83d4 100644
--- a/muse2/muse/widgets/mtscale.cpp
+++ b/muse2/muse/widgets/mtscale.cpp
@@ -7,19 +7,11 @@
 
 #include <values.h>
 
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qcursor.h>
-//Added by qt3to4:
-#include <QPixmap>
 #include <QMouseEvent>
-#include <QEvent>
+#include <QPainter>
+
 #include "mtscale.h"
-#include "midieditor.h"
-#include "globals.h"
 #include "song.h"
-#include "../marker/marker.h"
-#include "../marker/markerview.h"
 #include "icons.h"
 #include "gconfig.h"
 
diff --git a/muse2/muse/widgets/mtscale.h b/muse2/muse/widgets/mtscale.h
index c632a24b..7c53d4ff 100644
--- a/muse2/muse/widgets/mtscale.h
+++ b/muse2/muse/widgets/mtscale.h
@@ -9,11 +9,7 @@
 #define __MTSCALE_H__
 
 #include "view.h"
-//Added by qt3to4:
-#include <QMouseEvent>
-#include <QEvent>
 
-class QPainter;
 
 //---------------------------------------------------------
 //   MTScale
diff --git a/muse2/muse/widgets/musewidgetsplug.cpp b/muse2/muse/widgets/musewidgetsplug.cpp
index 5aea4c81..4ec8b3a2 100644
--- a/muse2/muse/widgets/musewidgetsplug.cpp
+++ b/muse2/muse/widgets/musewidgetsplug.cpp
@@ -11,10 +11,8 @@
 // #include <qwidgetplugin.h>
 #include <QtCore/QtPlugin>                             // p4.0.2
 #include <QtDesigner/QDesignerCustomWidgetInterface>   //
-
-//Added by qt3to4:
 #include <QPixmap>
-#include "posedit.h"
+
 #include "poslabel.h"
 #include "pitchedit.h"
 #include "pitchlabel.h"
diff --git a/muse2/muse/widgets/nentry.cpp b/muse2/muse/widgets/nentry.cpp
index 7df7b964..77710e5a 100644
--- a/muse2/muse/widgets/nentry.cpp
+++ b/muse2/muse/widgets/nentry.cpp
@@ -5,22 +5,14 @@
 //  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <QLayout>
-#include <qlabel.h>
-//Added by qt3to4:
+#include <QApplication>
 #include <QHBoxLayout>
-#include <QContextMenuEvent>
-#include <QWheelEvent>
-#include <QFrame>
+#include <QLabel>
+#include <QLineEdit>
 #include <QMouseEvent>
-#include <QKeyEvent>
+#include <QTimer>
+
 #include "nentry.h"
-#include <stdio.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include "globals.h"
-#include <qapplication.h>
-#include <qcursor.h>
 
 #define TIMER1    400
 #define TIMER2    200
diff --git a/muse2/muse/widgets/nentry.h b/muse2/muse/widgets/nentry.h
index 10eefeee..48343b4a 100644
--- a/muse2/muse/widgets/nentry.h
+++ b/muse2/muse/widgets/nentry.h
@@ -9,20 +9,11 @@
 #define __NENTRY_H__
 
 #include <QFrame>
-#include <qlineedit.h>
-#include <qstring.h>
-//Added by qt3to4:
-#include <QWheelEvent>
-#include <QEvent>
-#include <QHBoxLayout>
-#include <QMouseEvent>
-#include <QLabel>
-#include <QContextMenuEvent>
-#include <QKeyEvent>
 
-class QTimer;
 class QHBoxLayout;
 class QLabel;
+class QLineEdit;
+class QTimer;
 
 class NentryFilter : public QObject {
       Q_OBJECT
diff --git a/muse2/muse/widgets/noteinfo.cpp b/muse2/muse/widgets/noteinfo.cpp
index 2bc17783..4f0e0c8c 100644
--- a/muse2/muse/widgets/noteinfo.cpp
+++ b/muse2/muse/widgets/noteinfo.cpp
@@ -5,15 +5,12 @@
 //  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include "config.h"
-
-#include "noteinfo.h"
-#include <QLayout>
 #include <QLabel>
 
+#include "config.h"
+#include "noteinfo.h"
 #include "awl/posedit.h"
 //#include "awl/pitchedit.h"
-
 #include "song.h"
 #include "globals.h"
 ///#include "posedit.h"
diff --git a/muse2/muse/widgets/noteinfo.h b/muse2/muse/widgets/noteinfo.h
index ae32bf8d..cc8fe16d 100644
--- a/muse2/muse/widgets/noteinfo.h
+++ b/muse2/muse/widgets/noteinfo.h
@@ -7,7 +7,6 @@
 #ifndef __NOTE_INFO_H__
 #define __NOTE_INFO_H__
 
-//#include <q3toolbar.h>
 #include <QToolBar>
 
 namespace Awl {
@@ -15,11 +14,10 @@ namespace Awl {
       //class PitchEdit;
       };
 
-///class PosEdit;
 class QSpinBox;
+
+///class PosEdit;
 class PitchEdit;
-//class QMainWindow;
-class QWidget;
 class Pos;
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/pitchlabel.cpp b/muse2/muse/widgets/pitchlabel.cpp
index dc5c35ee..91daf09f 100644
--- a/muse2/muse/widgets/pitchlabel.cpp
+++ b/muse2/muse/widgets/pitchlabel.cpp
@@ -7,8 +7,7 @@
 
 #include <QApplication>
 #include <QStyle>
-//Added by qt3to4:
-#include <QLabel>
+
 #include "pitchedit.h"
 #include "pitchlabel.h"
 #include "helper.h"
diff --git a/muse2/muse/widgets/posedit.cpp b/muse2/muse/widgets/posedit.cpp
index d491c235..3accf557 100644
--- a/muse2/muse/widgets/posedit.cpp
+++ b/muse2/muse/widgets/posedit.cpp
@@ -5,23 +5,17 @@
 //  (C) Copyright 2001 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <q3rangecontrol.h>
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qapplication.h>
-#include <q3valuelist.h>
-#include <qstring.h>
-#include <qstyle.h>
-//Added by qt3to4:
-#include <QTimerEvent>
+#include <values.h>
+
+#include <QApplication>
 #include <QKeyEvent>
-#include <QResizeEvent>
 #include <QMouseEvent>
-#include <QEvent>
 #include <QPaintEvent>
-#include <values.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <QPainter>
+#include <QResizeEvent>
+#include <QString>
+#include <QStyle>
+#include <QTimerEvent>
 
 #include "posedit.h"
 #include "sig.h"
diff --git a/muse2/muse/widgets/poslabel.cpp b/muse2/muse/widgets/poslabel.cpp
index 98b790ad..78903a1f 100644
--- a/muse2/muse/widgets/poslabel.cpp
+++ b/muse2/muse/widgets/poslabel.cpp
@@ -7,10 +7,10 @@
 
 #include <stdlib.h>
 #include <cmath>
+
 #include <QApplication>
 #include <QStyle>
-//Added by qt3to4:
-#include <QLabel>
+
 
 #include "poslabel.h"
 ///#include "sig.h"
diff --git a/muse2/muse/widgets/poslabel.h b/muse2/muse/widgets/poslabel.h
index f16aa64f..29c5297d 100644
--- a/muse2/muse/widgets/poslabel.h
+++ b/muse2/muse/widgets/poslabel.h
@@ -8,7 +8,6 @@
 #ifndef __POSLABEL_H__
 #define __POSLABEL_H__
 
-//#include <qlabel.h>
 #include <QLabel>
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/scldraw.cpp b/muse2/muse/widgets/scldraw.cpp
index b72d1000..709e104a 100644
--- a/muse2/muse/widgets/scldraw.cpp
+++ b/muse2/muse/widgets/scldraw.cpp
@@ -12,11 +12,11 @@
 //=========================================================
 
 #include <cmath>
-#include "scldraw.h"
-#include <qpainter.h>
-#include <qfontmetrics.h>
-#include <qrect.h>
+
+#include <QPainter>
+
 #include "mmath.h"
+#include "scldraw.h"
 
 
 int const ScaleDraw::minLen = 10;
diff --git a/muse2/muse/widgets/scldraw.h b/muse2/muse/widgets/scldraw.h
index 8ba85600..08a198ca 100644
--- a/muse2/muse/widgets/scldraw.h
+++ b/muse2/muse/widgets/scldraw.h
@@ -14,15 +14,12 @@
 #ifndef __SCLDRAW_H__
 #define __SCLDRAW_H__
 
-#include <qglobal.h>
-#include <qstring.h>
 #include "dimap.h"
 #include "scldiv.h"
-#include <qfont.h>
-#include <qrect.h>
-#include <qcolor.h>
 
 class QPainter;
+class QRect;
+
 class AutoScale;
 
 class ScaleDraw : public DiMap {
diff --git a/muse2/muse/widgets/sclif.h b/muse2/muse/widgets/sclif.h
index 86c0ecb6..ec8eafc9 100644
--- a/muse2/muse/widgets/sclif.h
+++ b/muse2/muse/widgets/sclif.h
@@ -14,7 +14,6 @@
 #ifndef __SCALE_IF_H__
 #define __SCALE_IF_H__
 
-#include <qglobal.h>
 #include "scldraw.h"
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/scrollscale.h b/muse2/muse/widgets/scrollscale.h
index 5373adcf..32043070 100644
--- a/muse2/muse/widgets/scrollscale.h
+++ b/muse2/muse/widgets/scrollscale.h
@@ -8,7 +8,7 @@
 #ifndef __SCROLLSCALE_H__
 #define __SCROLLSCALE_H__
 
-#include <QWidget>
+#include <QSlider>
 
 class QBoxLayout;
 class QLabel;
diff --git a/muse2/muse/widgets/siglabel.h b/muse2/muse/widgets/siglabel.h
index 2131d593..bf9e53b4 100644
--- a/muse2/muse/widgets/siglabel.h
+++ b/muse2/muse/widgets/siglabel.h
@@ -11,8 +11,9 @@
 #include <al/sig.h>
 
 #include <QLabel>
-#include <QWheelEvent>
-#include <QMouseEvent>
+
+class QWheelEvent;
+class QMouseEvent;
 
 //---------------------------------------------------------
 //   SigLabel
diff --git a/muse2/muse/widgets/sigscale.cpp b/muse2/muse/widgets/sigscale.cpp
index 2594fecb..74ed0bcb 100644
--- a/muse2/muse/widgets/sigscale.cpp
+++ b/muse2/muse/widgets/sigscale.cpp
@@ -7,14 +7,10 @@
 
 #include <values.h>
 
-#include <qpainter.h>
-#include <qtooltip.h>
-//Added by qt3to4:
-#include <QEvent>
 #include <QMouseEvent>
+#include <QPainter>
 
 #include "al/sig.h"  // Tim.
-
 #include "globals.h"
 #include "midieditor.h"
 #include "sigscale.h"
diff --git a/muse2/muse/widgets/sigscale.h b/muse2/muse/widgets/sigscale.h
index d66d9a73..8c9ffea9 100644
--- a/muse2/muse/widgets/sigscale.h
+++ b/muse2/muse/widgets/sigscale.h
@@ -9,11 +9,7 @@
 #define __SIGSCALE_H__
 
 #include "view.h"
-//Added by qt3to4:
-#include <QEvent>
-#include <QMouseEvent>
 
-class QPainter;
 class MidiEditor;
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/slider.cpp b/muse2/muse/widgets/slider.cpp
index f422c275..4f68388d 100644
--- a/muse2/muse/widgets/slider.cpp
+++ b/muse2/muse/widgets/slider.cpp
@@ -1,9 +1,7 @@
 #include <cmath>
 #include "mmath.h"
-#include <qdrawutil.h>
+
 #include <QPainter>
-#include <QCursor>
-#include <QPaintEvent>
 #include <QResizeEvent>
 
 #include "slider.h"
diff --git a/muse2/muse/widgets/slider.h b/muse2/muse/widgets/slider.h
index 51c819f5..72fcc6ba 100644
--- a/muse2/muse/widgets/slider.h
+++ b/muse2/muse/widgets/slider.h
@@ -17,8 +17,6 @@
 #include "sclif.h"
 #include "sliderbase.h"
 #include "scldraw.h"
-#include <QResizeEvent>
-#include <QPaintEvent>
 
 //---------------------------------------------------------
 //   Slider
diff --git a/muse2/muse/widgets/sliderbase.h b/muse2/muse/widgets/sliderbase.h
index b7c758a8..8bfac9c3 100644
--- a/muse2/muse/widgets/sliderbase.h
+++ b/muse2/muse/widgets/sliderbase.h
@@ -15,14 +15,9 @@
 #define __SLIDERBASE_H__
 
 #include "drange.h"
-#include <QFrame>
-#include <QPixmap>
-#include <QDateTime>
-//#include <qbutton.h>
-#include <QtGui>
-#include <QWheelEvent>
-#include <QMouseEvent>
-#include <QTimerEvent>
+
+#include <QTime>
+#include <QWidget>
 
 //---------------------------------------------------------
 //   SliderBase
diff --git a/muse2/muse/widgets/swidget.cpp b/muse2/muse/widgets/swidget.cpp
index 29cece1e..79f5b845 100644
--- a/muse2/muse/widgets/swidget.cpp
+++ b/muse2/muse/widgets/swidget.cpp
@@ -6,7 +6,7 @@
 //=========================================================
 
 #include "swidget.h"
-//Added by qt3to4:
+
 #include <QResizeEvent>
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/swidget.h b/muse2/muse/widgets/swidget.h
index 806fe538..c5f4fd6a 100644
--- a/muse2/muse/widgets/swidget.h
+++ b/muse2/muse/widgets/swidget.h
@@ -8,9 +8,7 @@
 #ifndef __SWIDGET_H__
 #define __SWIDGET_H__
 
-#include <qwidget.h>
-//Added by qt3to4:
-#include <QResizeEvent>
+#include <QWidget>
 
 //---------------------------------------------------------
 //   SWidget
diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp
index 49b4d027..0380b795 100644
--- a/muse2/muse/widgets/tb1.cpp
+++ b/muse2/muse/widgets/tb1.cpp
@@ -9,12 +9,9 @@
 #include <stdio.h>
 #include <values.h>
 
-#include <QLabel>          
-#include <QLayout>
-#include <QToolButton>
+#include <QHeaderView>
 #include <QTableWidget>    
-#include <QTableWidgetItem>
-#include <QComboBox>      
+#include <QToolButton>
 
 #include "config.h"
 #include "lcombo.h"
diff --git a/muse2/muse/widgets/tb1.h b/muse2/muse/widgets/tb1.h
index bbd52469..fbed13b1 100644
--- a/muse2/muse/widgets/tb1.h
+++ b/muse2/muse/widgets/tb1.h
@@ -8,15 +8,15 @@
 #ifndef __TB1_H__
 #define __TB1_H__
 
-#include <QWidget>      
 #include <QToolBar>     
 
+class QToolButton;
+class QTableWidget;
+
 class PosLabel;
 class PitchLabel;
 class Track;
 class LabelCombo;
-class QToolButton;
-class QTableWidget;
 
 //---------------------------------------------------------
 //   Toolbar1
diff --git a/muse2/muse/widgets/tempolabel.cpp b/muse2/muse/widgets/tempolabel.cpp
index df6e83c3..a26b0b69 100644
--- a/muse2/muse/widgets/tempolabel.cpp
+++ b/muse2/muse/widgets/tempolabel.cpp
@@ -7,8 +7,7 @@
 
 #include <QApplication>
 #include <QStyle>
-//Added by qt3to4:
-#include <QLabel>
+
 #include "tempolabel.h"
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/tools.cpp b/muse2/muse/widgets/tools.cpp
index 6359270e..32f42ad9 100644
--- a/muse2/muse/widgets/tools.cpp
+++ b/muse2/muse/widgets/tools.cpp
@@ -7,17 +7,7 @@
 
 #include <stdio.h>
 #include "tools.h"
-//#include <qpixmap.h>
-//#include <q3buttongroup.h>
-//#include <qtoolbutton.h>
-//#include <qtooltip.h>
-//#include <q3whatsthis.h>
-//#include <q3mainwindow.h>
 
-#include <QPixmap>
-#include <QToolButton>
-
-//Added by qt3to4:
 #include <QActionGroup>
 
 #include "icons.h"
diff --git a/muse2/muse/widgets/tools.h b/muse2/muse/widgets/tools.h
index 63304a4d..7cc5e62c 100644
--- a/muse2/muse/widgets/tools.h
+++ b/muse2/muse/widgets/tools.h
@@ -8,14 +8,12 @@
 #ifndef __TOOLS_H__
 #define __TOOLS_H__
 
-//#include <q3toolbar.h>
 #include <QToolBar>
-//Added by qt3to4:
-#include <QPixmap>
 
-class QAction;
 class Action;
-//class QMainWindow;
+
+class QAction;
+class QPixmap;
 class QWidget;
 
 enum Tool { PointerTool=1, PencilTool=2, RubberTool=4, CutTool=8,
diff --git a/muse2/muse/widgets/ttoolbar.cpp b/muse2/muse/widgets/ttoolbar.cpp
index fe15f885..774cb34d 100644
--- a/muse2/muse/widgets/ttoolbar.cpp
+++ b/muse2/muse/widgets/ttoolbar.cpp
@@ -5,7 +5,7 @@
 //  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 //=========================================================
 
-#include <qaction.h>
+#include <QAction>
 #include "globals.h"
 
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/ttoolbutton.cpp b/muse2/muse/widgets/ttoolbutton.cpp
index 907dfe75..324b5fca 100644
--- a/muse2/muse/widgets/ttoolbutton.cpp
+++ b/muse2/muse/widgets/ttoolbutton.cpp
@@ -6,7 +6,6 @@
 //=========================================================
 
 #include <QPainter>
-#include <QPixmap>
 #include <QStyle>
 
 #include "ttoolbutton.h"
diff --git a/muse2/muse/widgets/ttoolbutton.h b/muse2/muse/widgets/ttoolbutton.h
index 0f1f8af2..b4c54401 100644
--- a/muse2/muse/widgets/ttoolbutton.h
+++ b/muse2/muse/widgets/ttoolbutton.h
@@ -8,7 +8,7 @@
 #ifndef __TTOOLBUTTON_H__
 #define __TTOOLBUTTON_H__
 
-#include <qtoolbutton.h>
+#include <QToolButton>
 
 //---------------------------------------------------------
 //   TransparentToolButton
diff --git a/muse2/muse/widgets/utils.cpp b/muse2/muse/widgets/utils.cpp
index ddcc63c5..1bf4ca64 100644
--- a/muse2/muse/widgets/utils.cpp
+++ b/muse2/muse/widgets/utils.cpp
@@ -7,11 +7,13 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "utils.h"
 #include <math.h>
-#include <QFrame>
 #include <sys/time.h>
 
+#include <QFrame>
+
+#include "utils.h"
+
 //---------------------------------------------------------
 //   curTime
 //---------------------------------------------------------
diff --git a/muse2/muse/widgets/utils.h b/muse2/muse/widgets/utils.h
index 026ba360..654a7834 100644
--- a/muse2/muse/widgets/utils.h
+++ b/muse2/muse/widgets/utils.h
@@ -1,5 +1,3 @@
-//Added by qt3to4:
-#include <QFrame>
 //=========================================================
 //  MusE
 //  Linux Music Editor
@@ -11,9 +9,9 @@
 #define __UTILS_H__
 
 class QFrame;
+class QString;
 class QWidget;
 
-#include <qstring.h>
 
 extern QString bitmap2String(int bm);
 extern int string2bitmap(const QString& str);
diff --git a/muse2/muse/widgets/view.h b/muse2/muse/widgets/view.h
index 5fb5507b..782a3c81 100644
--- a/muse2/muse/widgets/view.h
+++ b/muse2/muse/widgets/view.h
@@ -9,15 +9,14 @@
 #define __VIEW_H__
 
 #include <QWidget>
-#include <QPixmap>
-#include <QMatrix>
-#include <QPainter>
-#include <QBrush>
-#include <QResizeEvent>
-#include <QDropEvent>
-#include <QMouseEvent>
-#include <QKeyEvent>
-#include <QPaintEvent>
+
+class QDropEvent;
+class QKeyEvent;
+class QMouseEvent;
+class QPaintEvent;
+class QPainter;
+class QPixmap;
+class QResizeEvent;
 
 //---------------------------------------------------------
 //   View
diff --git a/muse2/muse/widgets/vscale.h b/muse2/muse/widgets/vscale.h
index 79a527ac..100c5fb2 100644
--- a/muse2/muse/widgets/vscale.h
+++ b/muse2/muse/widgets/vscale.h
@@ -8,8 +8,9 @@
 #ifndef __VSCALE_H__
 #define __VSCALE_H__
 
+#include <QWidget>
+
 class QPaintEvent;
-class QWidget;
 
 //---------------------------------------------------------
 //   VScale
diff --git a/muse2/muse/widgets/wtscale.cpp b/muse2/muse/widgets/wtscale.cpp
index 5976670e..2c02b631 100644
--- a/muse2/muse/widgets/wtscale.cpp
+++ b/muse2/muse/widgets/wtscale.cpp
@@ -7,12 +7,9 @@
 
 #include <values.h>
 
-#include <qpainter.h>
-#include <qtooltip.h>
-//Added by qt3to4:
-#include <QPixmap>
-#include <QMouseEvent>
-#include <QEvent>
+#include <QPainter>
+#include <QRect>
+#include <QToolTip>
 
 #include "wtscale.h"
 #include "midieditor.h"
diff --git a/muse2/muse/widgets/wtscale.h b/muse2/muse/widgets/wtscale.h
index ab378296..f12bbc6f 100644
--- a/muse2/muse/widgets/wtscale.h
+++ b/muse2/muse/widgets/wtscale.h
@@ -9,11 +9,6 @@
 #define __MTSCALE_H__
 
 #include "view.h"
-//Added by qt3to4:
-#include <QMouseEvent>
-#include <QEvent>
-
-class QPainter;
 
 //---------------------------------------------------------
 //   WTScale
diff --git a/muse2/muse/xml.cpp b/muse2/muse/xml.cpp
index 99967c01..6a12283e 100644
--- a/muse2/muse/xml.cpp
+++ b/muse2/muse/xml.cpp
@@ -8,10 +8,11 @@
 
 #include <stdio.h>
 #include <stdarg.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qwidget.h>
-#include <qrect.h>
+
+#include <QString>
+#include <QColor>
+#include <QWidget>
+#include <QRect>
 
 #include "xml.h"
 
diff --git a/muse2/muse/xml.h b/muse2/muse/xml.h
index 912ddb4a..646c1a12 100644
--- a/muse2/muse/xml.h
+++ b/muse2/muse/xml.h
@@ -10,11 +10,12 @@
 #define __XML_H__
 
 #include <stdio.h>
-#include <qstring.h>
+
+#include <QString>
 
 class QColor;
-class QWidget;
 class QRect;
+class QWidget;
 
 //---------------------------------------------------------
 //   Xml
diff --git a/muse2/synti/deicsonze/deicsonze.cpp b/muse2/synti/deicsonze/deicsonze.cpp
index 131a1742..6d86eda9 100644
--- a/muse2/synti/deicsonze/deicsonze.cpp
+++ b/muse2/synti/deicsonze/deicsonze.cpp
@@ -32,6 +32,9 @@
 
 // #include <stdio.h>
 
+#include <QDomDocument>
+#include <QTemporaryFile>
+
 #include "muse/midi.h"
 #include "libsynti/mess.h"
 #include "deicsonze.h"
diff --git a/muse2/synti/deicsonze/deicsonzegui.cpp b/muse2/synti/deicsonze/deicsonzegui.cpp
index ba038b1b..8f9fafd0 100644
--- a/muse2/synti/deicsonze/deicsonzegui.cpp
+++ b/muse2/synti/deicsonze/deicsonzegui.cpp
@@ -27,6 +27,15 @@
 // 02111-1307, USA or point your web browser to http://www.gnu.org.
 //===========================================================================
 
+#include <QDir>
+#include <QDomDocument>
+#include <QFileDialog>
+#include <QMenu>
+#include <QMessageBox>
+#include <QMouseEvent>
+#include <QPainter>
+#include <QSocketNotifier>
+
 #include "muse/midi.h"
 #include "muse/midictrl.h"
 #include "config.h"
diff --git a/muse2/synti/deicsonze/deicsonzepreset.cpp b/muse2/synti/deicsonze/deicsonzepreset.cpp
index ef114014..1b070935 100644
--- a/muse2/synti/deicsonze/deicsonzepreset.cpp
+++ b/muse2/synti/deicsonze/deicsonzepreset.cpp
@@ -31,6 +31,8 @@
 #include <iostream>
 #include <algorithm>
 
+#include <QDomElement>
+
 //-----------------------------------------------------------
 // Constructor destructor
 //-----------------------------------------------------------
diff --git a/muse2/synti/deicsonze/deicsonzepreset.h b/muse2/synti/deicsonze/deicsonzepreset.h
index 67dcd9b1..be98b48e 100644
--- a/muse2/synti/deicsonze/deicsonzepreset.h
+++ b/muse2/synti/deicsonze/deicsonzepreset.h
@@ -30,6 +30,7 @@
 #ifndef __DEICSONZEPRESET_H
 #define __DEICSONZEPRESET_H
 
+#include <vector>
 #include <string>
 #include "al/xml.h"
 
diff --git a/muse2/synti/fluidsynth/fluidsynti.cpp b/muse2/synti/fluidsynth/fluidsynti.cpp
index ffd72561..72031d59 100644
--- a/muse2/synti/fluidsynth/fluidsynti.cpp
+++ b/muse2/synti/fluidsynth/fluidsynti.cpp
@@ -7,12 +7,13 @@
  *
  */
 
-#include "fluidsynti.h"
-#include "muse/midi.h"
-
 #include <list>
 #include <iostream>
-#include <qfileinfo.h>
+
+#include <QFileInfo>
+
+#include "fluidsynti.h"
+#include "muse/midi.h"
 
 FluidCtrl FluidSynth::fluidCtrl[] = {
       //{ "Expression", CTRL_EXPRESSION, 0, 127 },
diff --git a/muse2/synti/fluidsynth/fluidsynti.h b/muse2/synti/fluidsynth/fluidsynti.h
index a7e4ebfc..0816475c 100644
--- a/muse2/synti/fluidsynth/fluidsynti.h
+++ b/muse2/synti/fluidsynth/fluidsynti.h
@@ -11,9 +11,9 @@
 #define __MUSE_FLUIDSYNTI_H__
 
 #include <fluidsynth.h>
-#include <qstring.h>
 #include <pthread.h>
 #include <string>
+
 #include "fluidsynthgui.h"
 #include "libsynti/mess.h"
 #include "muse/debug.h"
diff --git a/muse2/synti/s1/s1.cpp b/muse2/synti/s1/s1.cpp
index 8520a742..0dca2656 100644
--- a/muse2/synti/s1/s1.cpp
+++ b/muse2/synti/s1/s1.cpp
@@ -15,8 +15,8 @@
 
 #include <cmath>
 #include <list>
-#include <qmessagebox.h>
-#include <stdio.h>
+
+#include <QMessageBox>
 
 #include "libsynti/mono.h"
 
diff --git a/muse2/synti/simpledrums2/simpledrums.cpp b/muse2/synti/simpledrums2/simpledrums.cpp
index 82f1bd07..95309372 100644
--- a/muse2/synti/simpledrums2/simpledrums.cpp
+++ b/muse2/synti/simpledrums2/simpledrums.cpp
@@ -15,7 +15,7 @@
 //#include "libsynti/mpevent.h"
 #include "muse/mpevent.h"   
 #include "simpledrums.h"
-// #include <qstring.h>
+
 #include <samplerate.h>
 
 const char* SimpleSynth::synth_state_descr[] =
-- 
cgit v1.2.3