diff options
Diffstat (limited to 'src/gui/widgets')
62 files changed, 930 insertions, 930 deletions
diff --git a/src/gui/widgets/AudioFaderBox.cpp b/src/gui/widgets/AudioFaderBox.cpp index 05789ff..27980e7 100644 --- a/src/gui/widgets/AudioFaderBox.cpp +++ b/src/gui/widgets/AudioFaderBox.cpp @@ -24,7 +24,7 @@ #include "AudioFaderBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kstddirs.h> @@ -40,61 +40,61 @@ #include "gui/studio/AudioPluginOSCGUIManager.h" #include "Rotary.h" #include <kglobal.h> -#include <qframe.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qsignalmapper.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqsignalmapper.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> #include "VUMeter.h" namespace Rosegarden { -AudioFaderBox::AudioFaderBox(QWidget *parent, - QString id, +AudioFaderBox::AudioFaderBox(TQWidget *parent, + TQString id, bool haveInOut, const char *name): - QFrame(parent, name), - m_signalMapper(new QSignalMapper(this)), + TQFrame(parent, name), + m_signalMapper(new TQSignalMapper(this)), m_id(id), m_isStereo(false) { // Plugin box // - QPushButton *plugin; - QVBox *pluginVbox = 0; + TQPushButton *plugin; + TQVBox *pluginVbox = 0; - pluginVbox = new QVBox(this); + pluginVbox = new TQVBox(this); pluginVbox->setSpacing(2); for (int i = 0; i < 5; i++) { - plugin = new QPushButton(pluginVbox); + plugin = new TQPushButton(pluginVbox); plugin->setText(i18n("<no plugin>")); - QToolTip::add + TQToolTip::add (plugin, i18n("Audio plugin button")); m_plugins.push_back(plugin); m_signalMapper->setMapping(plugin, i); - connect(plugin, SIGNAL(clicked()), - m_signalMapper, SLOT(map())); + connect(plugin, TQT_SIGNAL(clicked()), + m_signalMapper, TQT_SLOT(map())); } - m_synthButton = new QPushButton(this); + m_synthButton = new TQPushButton(this); m_synthButton->setText(i18n("<no synth>")); - QToolTip::add + TQToolTip::add (m_synthButton, i18n("Synth plugin button")); // VU meter and fader // - QHBox *faderHbox = new QHBox(this); + TQHBox *faderHbox = new TQHBox(this); m_vuMeter = new AudioVUMeter(faderHbox, VUMeter::AudioPeakHoldShort, true, true); @@ -115,9 +115,9 @@ AudioFaderBox::AudioFaderBox(QWidget *parent, m_fader->setOutlineColour(GUIPalette::getColour(GUIPalette::PlaybackFaderOutline)); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - m_monoPixmap.load(QString("%1/misc/mono.xpm").arg(pixmapDir)); - m_stereoPixmap.load(QString("%1/misc/stereo.xpm").arg(pixmapDir)); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + m_monoPixmap.load(TQString("%1/misc/mono.xpm").arg(pixmapDir)); + m_stereoPixmap.load(TQString("%1/misc/stereo.xpm").arg(pixmapDir)); m_pan = new Rotary(this, -100.0, 100.0, 1.0, 5.0, 0.0, 22, Rotary::NoTicks, false, true); @@ -125,14 +125,14 @@ AudioFaderBox::AudioFaderBox(QWidget *parent, // same as the knob colour on the MIDI pan m_pan->setKnobColour(GUIPalette::getColour(GUIPalette::RotaryPastelGreen)); - m_stereoButton = new QPushButton(this); + m_stereoButton = new TQPushButton(this); m_stereoButton->setPixmap(m_monoPixmap); // default is mono m_stereoButton->setFixedSize(24, 24); - connect(m_stereoButton, SIGNAL(clicked()), - this, SLOT(slotChannelStateChanged())); + connect(m_stereoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChannelStateChanged())); - m_synthGUIButton = new QPushButton(this); + m_synthGUIButton = new TQPushButton(this); m_synthGUIButton->setText(i18n("Editor")); if (haveInOut) { @@ -149,28 +149,28 @@ AudioFaderBox::AudioFaderBox(QWidget *parent, m_audioOutput = 0; } - QToolTip::add + TQToolTip::add (m_pan, i18n("Set the audio pan position in the stereo field")); - QToolTip::add + TQToolTip::add (m_synthGUIButton, i18n("Open synth plugin's native editor")); - QToolTip::add + TQToolTip::add (m_stereoButton, i18n("Mono or Stereo Instrument")); - QToolTip::add + TQToolTip::add (m_recordFader, i18n("Record level")); - QToolTip::add + TQToolTip::add (m_fader, i18n("Playback level")); - QToolTip::add + TQToolTip::add (m_vuMeter, i18n("Audio level")); - QGridLayout *grid = new QGridLayout(this, 3, 6, 4, 4); + TQGridLayout *grid = new TQGridLayout(this, 3, 6, 4, 4); grid->addMultiCellWidget(m_synthButton, 0, 0, 0, 2); if (haveInOut) { - m_inputLabel = new QLabel(i18n("In:"), this); + m_inputLabel = new TQLabel(i18n("In:"), this); grid->addWidget(m_inputLabel, 0, 0, AlignRight); grid->addMultiCellWidget(m_audioInput->getWidget(), 0, 0, 1, 2); - m_outputLabel = new QLabel(i18n("Out:"), this); + m_outputLabel = new TQLabel(i18n("Out:"), this); grid->addWidget(m_outputLabel, 0, 3, AlignRight); grid->addMultiCellWidget(m_audioOutput->getWidget(), 0, 0, 4, 5); } @@ -241,7 +241,7 @@ AudioFaderBox::slotSetInstrument(Studio *studio, } bool -AudioFaderBox::owns(const QObject *object) +AudioFaderBox::owns(const TQObject *object) { return (object && ((object->parent() == this) || diff --git a/src/gui/widgets/AudioFaderBox.h b/src/gui/widgets/AudioFaderBox.h index 060fc9c..0c96b86 100644 --- a/src/gui/widgets/AudioFaderBox.h +++ b/src/gui/widgets/AudioFaderBox.h @@ -26,17 +26,17 @@ #ifndef _RG_AUDIOFADERBOX_H_ #define _RG_AUDIOFADERBOX_H_ -#include <qframe.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqstring.h> #include <vector> -class QWidget; -class QSignalMapper; -class QPushButton; -class QObject; -class QLabel; +class TQWidget; +class TQSignalMapper; +class TQPushButton; +class TQObject; +class TQLabel; namespace Rosegarden @@ -55,8 +55,8 @@ class AudioFaderBox : public QFrame Q_OBJECT public: - AudioFaderBox(QWidget *parent, - QString id = "", + AudioFaderBox(TQWidget *parent, + TQString id = "", bool haveInOut = true, const char *name = 0); @@ -64,10 +64,10 @@ public: void setIsSynth(bool); - bool owns(const QObject *object); + bool owns(const TQObject *object); - QPushButton *m_synthButton; - std::vector<QPushButton*> m_plugins; + TQPushButton *m_synthButton; + std::vector<TQPushButton*> m_plugins; AudioVUMeter *m_vuMeter; @@ -75,20 +75,20 @@ public: Fader *m_recordFader; Rotary *m_pan; - QPixmap m_monoPixmap; - QPixmap m_stereoPixmap; + TQPixmap m_monoPixmap; + TQPixmap m_stereoPixmap; - QSignalMapper *m_signalMapper; + TQSignalMapper *m_signalMapper; - QLabel *m_inputLabel; - QLabel *m_outputLabel; + TQLabel *m_inputLabel; + TQLabel *m_outputLabel; AudioRouteMenu *m_audioInput; AudioRouteMenu *m_audioOutput; - QPushButton *m_synthGUIButton; + TQPushButton *m_synthGUIButton; - QString m_id; + TQString m_id; bool isStereo() const { return m_isStereo; } @@ -103,7 +103,7 @@ protected slots: void slotChannelStateChanged(); protected: - QPushButton *m_stereoButton; + TQPushButton *m_stereoButton; bool m_isStereo; }; diff --git a/src/gui/widgets/AudioListItem.h b/src/gui/widgets/AudioListItem.h index bbd8fc2..410c374 100644 --- a/src/gui/widgets/AudioListItem.h +++ b/src/gui/widgets/AudioListItem.h @@ -47,7 +47,7 @@ public: m_segment(0) {;} AudioListItem(KListView *parent, - QString label, + TQString label, AudioFileId id): KListViewItem(parent, label, @@ -56,7 +56,7 @@ public: m_segment(0) {;} AudioListItem(KListViewItem *parent, - QString label, + TQString label, AudioFileId id): KListViewItem(parent, label, diff --git a/src/gui/widgets/AudioListView.cpp b/src/gui/widgets/AudioListView.cpp index 45193a6..3c75526 100644 --- a/src/gui/widgets/AudioListView.cpp +++ b/src/gui/widgets/AudioListView.cpp @@ -27,11 +27,11 @@ #include "misc/Debug.h" #include "gui/widgets/AudioListItem.h" -#include "qdragobject.h" +#include "tqdragobject.h" namespace Rosegarden { -AudioListView::AudioListView(QWidget *parent, const char *name) +AudioListView::AudioListView(TQWidget *parent, const char *name) : KListView(parent, name) { setDragEnabled(true); @@ -39,17 +39,17 @@ AudioListView::AudioListView(QWidget *parent, const char *name) setDropVisualizer(false); } -bool AudioListView::acceptDrag(QDropEvent* e) const +bool AudioListView::acceptDrag(TQDropEvent* e) const { - return QUriDrag::canDecode(e) || KListView::acceptDrag(e); + return TQUriDrag::canDecode(e) || KListView::acceptDrag(e); } -QDragObject* AudioListView::dragObject() +TQDragObject* AudioListView::dragObject() { AudioListItem* item = dynamic_cast<AudioListItem*>(currentItem()); - QString audioData; - QTextOStream ts(&audioData); + TQString audioData; + TQTextOStream ts(&audioData); ts << "AudioFileManager\n" << item->getId() << '\n' << item->getStartTime().sec << '\n' @@ -61,7 +61,7 @@ QDragObject* AudioListView::dragObject() << "file id = " << item->getId() << ", start time = " << item->getStartTime() << endl; - return new QTextDrag(audioData, this); + return new TQTextDrag(audioData, this); } } diff --git a/src/gui/widgets/AudioListView.h b/src/gui/widgets/AudioListView.h index 477054a..04c293e 100644 --- a/src/gui/widgets/AudioListView.h +++ b/src/gui/widgets/AudioListView.h @@ -32,11 +32,11 @@ namespace Rosegarden { class AudioListView : public KListView { public: - AudioListView(QWidget *parent = 0, const char *name = 0); + AudioListView(TQWidget *parent = 0, const char *name = 0); protected: - bool acceptDrag(QDropEvent* e) const; - virtual QDragObject* dragObject(); + bool acceptDrag(TQDropEvent* e) const; + virtual TQDragObject* dragObject(); }; } diff --git a/src/gui/widgets/AudioRouteMenu.cpp b/src/gui/widgets/AudioRouteMenu.cpp index 6f4c93f..0cdc889 100644 --- a/src/gui/widgets/AudioRouteMenu.cpp +++ b/src/gui/widgets/AudioRouteMenu.cpp @@ -34,22 +34,22 @@ #include "sound/MappedStudio.h" #include <kcombobox.h> #include <klocale.h> -#include <qcursor.h> -#include <qobject.h> -#include <qpoint.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcursor.h> +#include <tqobject.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -AudioRouteMenu::AudioRouteMenu(QWidget *par, +AudioRouteMenu::AudioRouteMenu(TQWidget *par, Direction direction, Format format, Studio *studio, Instrument *instrument) : - QObject(par), + TQObject(par), m_studio(studio), m_instrument(instrument), m_direction(direction), @@ -60,15 +60,15 @@ AudioRouteMenu::AudioRouteMenu(QWidget *par, case Compact: { m_combo = 0; m_button = new WheelyButton(par); - connect(m_button, SIGNAL(wheel(bool)), this, SLOT(slotWheel(bool))); - connect(m_button, SIGNAL(clicked()), this, SLOT(slotShowMenu())); + connect(m_button, TQT_SIGNAL(wheel(bool)), this, TQT_SLOT(slotWheel(bool))); + connect(m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowMenu())); break; } case Regular: { m_button = 0; m_combo = new KComboBox(par); - connect(m_combo, SIGNAL(activated(int)), this, SLOT(slotEntrySelected(int))); + connect(m_combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEntrySelected(int))); break; } @@ -77,7 +77,7 @@ AudioRouteMenu::AudioRouteMenu(QWidget *par, slotRepopulate(); } -QWidget * +TQWidget * AudioRouteMenu::getWidget() { if (m_button) @@ -133,17 +133,17 @@ AudioRouteMenu::slotShowMenu() if (getNumEntries() == 0) return ; - RosegardenPopupMenu *menu = new RosegardenPopupMenu((QWidget *)parent()); + RosegardenPopupMenu *menu = new RosegardenPopupMenu((TQWidget *)parent()); for (int i = 0; i < getNumEntries(); ++i) { - menu->insertItem(getEntryText(i), this, SLOT(slotEntrySelected(int)), + menu->insertItem(getEntryText(i), this, TQT_SLOT(slotEntrySelected(int)), 0, i); menu->setItemParameter(i, i); } int itemHeight = menu->itemHeight(0) + 2; - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); pos.rx() -= 10; pos.ry() -= (itemHeight / 2 + getCurrentEntry() * itemHeight); @@ -261,7 +261,7 @@ AudioRouteMenu::getEntryText(int entry) return i18n("Sub %1").arg(entry); } - return QString(); + return TQString(); } void diff --git a/src/gui/widgets/AudioRouteMenu.h b/src/gui/widgets/AudioRouteMenu.h index 259da68..659a57b 100644 --- a/src/gui/widgets/AudioRouteMenu.h +++ b/src/gui/widgets/AudioRouteMenu.h @@ -26,11 +26,11 @@ #ifndef _RG_AUDIOROUTEMENU_H_ #define _RG_AUDIOROUTEMENU_H_ -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> -class QWidget; +class TQWidget; class KComboBox; @@ -50,13 +50,13 @@ public: enum Direction { In, Out }; enum Format { Compact, Regular }; - AudioRouteMenu(QWidget *parent, + AudioRouteMenu(TQWidget *parent, Direction direction, Format format, Studio *studio = 0, Instrument *instrument = 0); - QWidget *getWidget(); + TQWidget *getWidget(); public slots: void slotRepopulate(); @@ -83,7 +83,7 @@ private: int getNumEntries(); int getCurrentEntry(); // for instrument - QString getEntryText(int n); + TQString getEntryText(int n); }; diff --git a/src/gui/widgets/AudioVUMeter.cpp b/src/gui/widgets/AudioVUMeter.cpp index 4c15a07..d881818 100644 --- a/src/gui/widgets/AudioVUMeter.cpp +++ b/src/gui/widgets/AudioVUMeter.cpp @@ -26,25 +26,25 @@ #include "AudioVUMeter.h" #include "gui/rulers/VelocityColour.h" -#include <qcolor.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqwidget.h> #include "VUMeter.h" namespace Rosegarden { -AudioVUMeter::AudioVUMeter(QWidget *parent, +AudioVUMeter::AudioVUMeter(TQWidget *parent, VUMeter::VUMeterType type, bool stereo, bool hasRecord, int width, int height, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_stereo(stereo) { setBackgroundMode(Qt::NoBackground); @@ -73,9 +73,9 @@ AudioVUMeter::AudioVUMeter(QWidget *parent, } void -AudioVUMeter::paintEvent(QPaintEvent *e) +AudioVUMeter::paintEvent(TQPaintEvent *e) { - QPainter paint(this); + TQPainter paint(this); paint.setPen(colorGroup().mid()); paint.drawRect(0, 0, width(), height()); @@ -90,7 +90,7 @@ AudioVUMeter::paintEvent(QPaintEvent *e) m_meter->paintEvent(e); } -AudioVUMeter::AudioVUMeterImpl::AudioVUMeterImpl(QWidget *parent, +AudioVUMeter::AudioVUMeterImpl::AudioVUMeterImpl(TQWidget *parent, VUMeterType type, bool stereo, bool hasRecord, diff --git a/src/gui/widgets/AudioVUMeter.h b/src/gui/widgets/AudioVUMeter.h index cff7c27..e59014d 100644 --- a/src/gui/widgets/AudioVUMeter.h +++ b/src/gui/widgets/AudioVUMeter.h @@ -26,11 +26,11 @@ #ifndef _RG_AUDIOVUMETER_H_ #define _RG_AUDIOVUMETER_H_ -#include <qwidget.h> +#include <tqwidget.h> #include "VUMeter.h" -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -41,7 +41,7 @@ namespace Rosegarden class AudioVUMeter : public QWidget { public: - AudioVUMeter(QWidget *parent = 0, + AudioVUMeter(TQWidget *parent = 0, VUMeter::VUMeterType type = VUMeter::AudioPeakHoldShort, bool stereo = true, bool hasRecord = false, @@ -63,13 +63,13 @@ public: m_meter->setRecordLevel(dBleft, dBright); } - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); protected: class AudioVUMeterImpl : public VUMeter { public: - AudioVUMeterImpl(QWidget *parent, + AudioVUMeterImpl(TQWidget *parent, VUMeterType type, bool stereo, bool hasRecord, diff --git a/src/gui/widgets/BigArrowButton.h b/src/gui/widgets/BigArrowButton.h index 505e374..7adfb9b 100644 --- a/src/gui/widgets/BigArrowButton.h +++ b/src/gui/widgets/BigArrowButton.h @@ -32,13 +32,13 @@ namespace Rosegarden { class BigArrowButton : public KArrowButton { public: - BigArrowButton(QWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, + BigArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0) : KArrowButton(parent, arrow, name) { } virtual ~BigArrowButton() { } - virtual QSize sizeHint() const { - return QSize(20, 20); + virtual TQSize sizeHint() const { + return TQSize(20, 20); } }; diff --git a/src/gui/widgets/CollapsingFrame.cpp b/src/gui/widgets/CollapsingFrame.cpp index 1f71ebf..fdc351b 100644 --- a/src/gui/widgets/CollapsingFrame.cpp +++ b/src/gui/widgets/CollapsingFrame.cpp @@ -28,43 +28,43 @@ #include <kstddirs.h> #include <kconfig.h> #include <kglobal.h> -#include <qfont.h> -#include <qframe.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qstring.h> -#include <qtoolbutton.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqtoolbutton.h> +#include <tqwidget.h> #include <cassert> namespace Rosegarden { -CollapsingFrame::CollapsingFrame(QString label, QWidget *parent, const char *n) : - QFrame(parent, n), +CollapsingFrame::CollapsingFrame(TQString label, TQWidget *parent, const char *n) : + TQFrame(parent, n), m_widget(0), m_fill(false), m_collapsed(false) { - m_layout = new QGridLayout(this, 3, 3, 0, 0); + m_layout = new TQGridLayout(this, 3, 3, 0, 0); - m_toggleButton = new QToolButton(this); + m_toggleButton = new TQToolButton(this); m_toggleButton->setTextLabel(label); m_toggleButton->setUsesTextLabel(true); m_toggleButton->setUsesBigPixmap(false); - m_toggleButton->setTextPosition(QToolButton::BesideIcon); + m_toggleButton->setTextPosition(TQToolButton::BesideIcon); m_toggleButton->setAutoRaise(true); - QFont font(m_toggleButton->font()); + TQFont font(m_toggleButton->font()); font.setBold(true); m_toggleButton->setFont(font); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QPixmap pixmap(pixmapDir + "/misc/arrow-expanded.png"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQPixmap pixmap(pixmapDir + "/misc/arrow-expanded.png"); m_toggleButton->setIconSet(pixmap); - connect(m_toggleButton, SIGNAL(clicked()), this, SLOT(toggle())); + connect(m_toggleButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggle())); m_layout->addMultiCellWidget(m_toggleButton, 0, 0, 0, 2); } @@ -85,13 +85,13 @@ CollapsingFrame::font() const } void -CollapsingFrame::setFont(QFont font) +CollapsingFrame::setFont(TQFont font) { m_toggleButton->setFont(font); } void -CollapsingFrame::setWidget(QWidget *widget) +CollapsingFrame::setWidget(TQWidget *widget) { assert(!m_widget); m_widget = widget; @@ -104,7 +104,7 @@ CollapsingFrame::setWidget(QWidget *widget) bool expanded = true; if (name(0)) { KConfig *config = kapp->config(); - QString groupTemp = config->group(); + TQString groupTemp = config->group(); config->setGroup("CollapsingFrame"); expanded = config->readBoolEntry(name(), true); config->setGroup(groupTemp); @@ -122,18 +122,18 @@ CollapsingFrame::toggle() m_widget->setShown(!m_collapsed); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QPixmap pixmap; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQPixmap pixmap; if (m_collapsed) { - pixmap = QPixmap(pixmapDir + "/misc/arrow-contracted.png"); + pixmap = TQPixmap(pixmapDir + "/misc/arrow-contracted.png"); } else { - pixmap = QPixmap(pixmapDir + "/misc/arrow-expanded.png"); + pixmap = TQPixmap(pixmapDir + "/misc/arrow-expanded.png"); } if (name(0)) { KConfig *config = kapp->config(); - QString groupTemp = config->group(); + TQString groupTemp = config->group(); config->setGroup("CollapsingFrame"); config->writeEntry(name(), !m_collapsed); config->setGroup(groupTemp); diff --git a/src/gui/widgets/CollapsingFrame.h b/src/gui/widgets/CollapsingFrame.h index 780a8b1..bdce001 100644 --- a/src/gui/widgets/CollapsingFrame.h +++ b/src/gui/widgets/CollapsingFrame.h @@ -26,13 +26,13 @@ #ifndef _RG_COLLAPSINGFRAME_H_ #define _RG_COLLAPSINGFRAME_H_ -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> -class QWidget; -class QToolButton; -class QGridLayout; +class TQWidget; +class TQToolButton; +class TQGridLayout; namespace Rosegarden @@ -45,25 +45,25 @@ class CollapsingFrame : public QFrame Q_OBJECT public: - CollapsingFrame(QString label, QWidget *parent = 0, const char *name = 0); + CollapsingFrame(TQString label, TQWidget *parent = 0, const char *name = 0); virtual ~CollapsingFrame(); - QFont font() const; - void setFont(QFont font); + TQFont font() const; + void setFont(TQFont font); /// If true, the widget fills the available space. Call before setWidget void setWidgetFill(bool fill); /// This frame contains a single other widget. Set it here. - void setWidget(QWidget *w); + void setWidget(TQWidget *w); public slots: void toggle(); protected: - QGridLayout *m_layout; - QToolButton *m_toggleButton; - QWidget *m_widget; + TQGridLayout *m_layout; + TQToolButton *m_toggleButton; + TQWidget *m_widget; bool m_fill; bool m_collapsed; }; diff --git a/src/gui/widgets/ColourTable.cpp b/src/gui/widgets/ColourTable.cpp index c5fcfc6..2cceca4 100644 --- a/src/gui/widgets/ColourTable.cpp +++ b/src/gui/widgets/ColourTable.cpp @@ -32,27 +32,27 @@ #include "gui/general/GUIPalette.h" #include <kcolordialog.h> #include <klineeditdlg.h> -#include <qcolor.h> -#include <qpoint.h> -#include <qstring.h> -#include <qtable.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqtable.h> +#include <tqwidget.h> namespace Rosegarden { ColourTable::ColourTable -(QWidget *parent, ColourMap &input, ColourList &list) - : QTable(1, 2, parent, "RColourTable") +(TQWidget *parent, ColourMap &input, ColourList &list) + : TQTable(1, 2, parent, "RColourTable") { setSorting(FALSE); - setSelectionMode(QTable::SingleRow); + setSelectionMode(TQTable::SingleRow); horizontalHeader()->setLabel(0, i18n("Name")); horizontalHeader()->setLabel(1, i18n("Color")); populate_table(input, list); - connect(this, SIGNAL(doubleClicked(int, int, int, const QPoint&)), - SLOT(slotEditEntry(int, int))); + connect(this, TQT_SIGNAL(doubleClicked(int, int, int, const TQPoint&)), + TQT_SLOT(slotEditEntry(int, int))); } @@ -65,7 +65,7 @@ ColourTable::slotEditEntry(int row, int col) if (row == 0) return ; bool ok = false; - QString newName = KLineEditDlg::getText(i18n("Modify Color Name"), i18n("Enter new name"), + TQString newName = KLineEditDlg::getText(i18n("Modify Color Name"), i18n("Enter new name"), item(row, col)->text(), &ok); if ((ok == true) && (!newName.isEmpty())) { @@ -75,7 +75,7 @@ ColourTable::slotEditEntry(int row, int col) } break; case 1: { - QColor temp = m_colours[row]; + TQColor temp = m_colours[row]; KColorDialog box(this, "", true); int result = box.getColor(temp); @@ -98,7 +98,7 @@ ColourTable::populate_table(ColourMap &input, ColourList &list) m_colours.reserve(input.size()); setNumRows(input.size()); - QString name; + TQString name; unsigned int i = 0; @@ -108,9 +108,9 @@ ColourTable::populate_table(ColourMap &input, ColourList &list) else name = strtoqstr(it->second.second); - QTableItem *text = new QTableItem( - dynamic_cast<QTable*>(this), - QTableItem::Never, name); + TQTableItem *text = new TQTableItem( + dynamic_cast<TQTable*>(this), + TQTableItem::Never, name); setItem(i, 0, text); @@ -120,7 +120,7 @@ ColourTable::populate_table(ColourMap &input, ColourList &list) ColourTableItem *temp = new ColourTableItem(this, m_colours[i]); setItem(i, 1, temp); - verticalHeader()->setLabel(i, QString::number(it->first)); + verticalHeader()->setLabel(i, TQString::number(it->first)); ++i; } diff --git a/src/gui/widgets/ColourTable.h b/src/gui/widgets/ColourTable.h index 48e2309..b1e470a 100644 --- a/src/gui/widgets/ColourTable.h +++ b/src/gui/widgets/ColourTable.h @@ -30,11 +30,11 @@ #define _RG_ROSEGARDENCOLOURTABLE_H_ #include <map> -#include <qtable.h> +#include <tqtable.h> #include <vector> -class QWidget; +class TQWidget; class ColourList; @@ -50,19 +50,19 @@ class ColourTable : public QTable public: typedef std::map<unsigned int, unsigned int, std::less<unsigned int> > ColourList; - ColourTable(QWidget *parent, ColourMap &input, ColourList &list); + ColourTable(TQWidget *parent, ColourMap &input, ColourList &list); void populate_table(ColourMap &input, ColourList &list); signals: - void entryTextChanged(unsigned int, QString); - void entryColourChanged(unsigned int, QColor); + void entryTextChanged(unsigned int, TQString); + void entryColourChanged(unsigned int, TQColor); public slots: void slotEditEntry (int, int); protected: - std::vector<QColor> m_colours; + std::vector<TQColor> m_colours; }; diff --git a/src/gui/widgets/ColourTableItem.cpp b/src/gui/widgets/ColourTableItem.cpp index 3dfbd87..370ff36 100644 --- a/src/gui/widgets/ColourTableItem.cpp +++ b/src/gui/widgets/ColourTableItem.cpp @@ -25,28 +25,28 @@ #include "ColourTableItem.h" -#include <qcolor.h> -#include <qpainter.h> -#include <qrect.h> -#include <qtable.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqtable.h> namespace Rosegarden { void -ColourTableItem::setColor(QColor &input) +ColourTableItem::setColor(TQColor &input) { currentColour = input; } void -ColourTableItem::paint(QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected) +ColourTableItem::paint(TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected) { - QColorGroup g(cg); - g.setColor(QColorGroup::Base, currentColour); + TQColorGroup g(cg); + g.setColor(TQColorGroup::Base, currentColour); selected = false; - QTableItem::paint(p, g, cr, selected); + TQTableItem::paint(p, g, cr, selected); } } diff --git a/src/gui/widgets/ColourTableItem.h b/src/gui/widgets/ColourTableItem.h index a8c906e..fb5b417 100644 --- a/src/gui/widgets/ColourTableItem.h +++ b/src/gui/widgets/ColourTableItem.h @@ -26,13 +26,13 @@ #ifndef _RG_ROSEGARDENCOLOURTABLEITEM_H_ #define _RG_ROSEGARDENCOLOURTABLEITEM_H_ -#include <qcolor.h> -#include <qtable.h> +#include <tqcolor.h> +#include <tqtable.h> -class QTable; -class QRect; -class QPainter; -class QColorGroup; +class TQTable; +class TQRect; +class TQPainter; +class TQColorGroup; namespace Rosegarden @@ -43,14 +43,14 @@ namespace Rosegarden class ColourTableItem : public QTableItem { public: - ColourTableItem(QTable *t, const QColor &input) - : QTableItem(t, QTableItem::Never, ""), + ColourTableItem(TQTable *t, const TQColor &input) + : TQTableItem(t, TQTableItem::Never, ""), currentColour(input) {} - void setColor(QColor &input); - void paint(QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected); + void setColor(TQColor &input); + void paint(TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected); protected: - QColor currentColour; + TQColor currentColour; }; diff --git a/src/gui/widgets/CurrentProgressDialog.cpp b/src/gui/widgets/CurrentProgressDialog.cpp index 2e3735f..fe5b5df 100644 --- a/src/gui/widgets/CurrentProgressDialog.cpp +++ b/src/gui/widgets/CurrentProgressDialog.cpp @@ -26,7 +26,7 @@ #include "CurrentProgressDialog.h" #include "ProgressDialog.h" -#include <qobject.h> +#include <tqobject.h> namespace Rosegarden @@ -56,8 +56,8 @@ CurrentProgressDialog::set(ProgressDialog* d) m_currentProgressDialog = d; // this lets the progress dialog deregister itself when it's deleted - connect(d, SIGNAL(destroyed()), - getInstance(), SLOT(slotCurrentProgressDialogDestroyed())); + connect(d, TQT_SIGNAL(destroyed()), + getInstance(), TQT_SLOT(slotCurrentProgressDialogDestroyed())); } void CurrentProgressDialog::freeze() diff --git a/src/gui/widgets/CurrentProgressDialog.h b/src/gui/widgets/CurrentProgressDialog.h index d0eea2e..2ca0838 100644 --- a/src/gui/widgets/CurrentProgressDialog.h +++ b/src/gui/widgets/CurrentProgressDialog.h @@ -26,7 +26,7 @@ #ifndef _RG_CURRENTPROGRESSDIALOG_H_ #define _RG_CURRENTPROGRESSDIALOG_H_ -#include <qobject.h> +#include <tqobject.h> @@ -64,8 +64,8 @@ public slots: void slotCurrentProgressDialogDestroyed(); protected: - CurrentProgressDialog(QObject* parent, const char* name = 0) - : QObject(parent, name) {} + CurrentProgressDialog(TQObject* parent, const char* name = 0) + : TQObject(parent, name) {} //--------------- Data members --------------------------------- static CurrentProgressDialog* m_instance; diff --git a/src/gui/widgets/DiatonicPitchChooser.cpp b/src/gui/widgets/DiatonicPitchChooser.cpp index 95b8b3a..6a1b8ab 100644 --- a/src/gui/widgets/DiatonicPitchChooser.cpp +++ b/src/gui/widgets/DiatonicPitchChooser.cpp @@ -32,27 +32,27 @@ #include "gui/general/MidiPitchLabel.h" #include "PitchDragLabel.h" #include <kcombobox.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -DiatonicPitchChooser::DiatonicPitchChooser(QString title, - QWidget *parent, +DiatonicPitchChooser::DiatonicPitchChooser(TQString title, + TQWidget *parent, int defaultNote, int defaultPitch, int defaultOctave) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_defaultPitch(defaultPitch) { m_pitchDragLabel = new PitchDragLabel(this, defaultPitch); - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); hbox->setSpacing(6); m_step = new KComboBox( hbox ); @@ -87,45 +87,45 @@ DiatonicPitchChooser::DiatonicPitchChooser(QString title, m_accidental->insertItem(i18n("double sharp")); m_accidental->setCurrentItem(2); // default: natural - m_pitchLabel = new QLabel(QString("%1").arg(getPitch()), hbox); + m_pitchLabel = new TQLabel(TQString("%1").arg(getPitch()), hbox); m_pitchLabel->setMinimumWidth(40); - connect(m_accidental, SIGNAL(activated(int)), - this, SLOT(slotSetAccidental(int))); + connect(m_accidental, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetAccidental(int))); - connect(m_octave, SIGNAL(activated(int)), - this, SLOT(slotSetOctave(int))); + connect(m_octave, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetOctave(int))); - connect(m_step, SIGNAL(activated(int)), - this, SLOT(slotSetStep(int))); + connect(m_step, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetStep(int))); - //connect(m_pitch, SIGNAL(valueChanged(int)), - // this, SIGNAL(pitchChanged(int))); + //connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + // this, TQT_SIGNAL(pitchChanged(int))); - //connect(m_pitch, SIGNAL(valueChanged(int)), - // this, SIGNAL(preview(int))); + //connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + // this, TQT_SIGNAL(preview(int))); - connect(m_pitchDragLabel, SIGNAL(pitchDragged(int,int,int)), - this, SLOT(slotSetNote(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchDragged(int,int,int)), + this, TQT_SLOT(slotSetNote(int,int,int))); - //connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - // this, SLOT(slotSetPitch(int))); + //connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + // this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int,int,int)), - this, SLOT(slotSetNote(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int,int,int)), + this, TQT_SLOT(slotSetNote(int,int,int))); - //connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - // this, SIGNAL(pitchChanged(int))); + //connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + // this, TQT_SIGNAL(pitchChanged(int))); - connect(m_pitchDragLabel, SIGNAL(pitchDragged(int,int,int)), - this, SIGNAL(noteChanged(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchDragged(int,int,int)), + this, TQT_SIGNAL(noteChanged(int,int,int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int,int,int)), - this, SIGNAL(noteChanged(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int,int,int)), + this, TQT_SIGNAL(noteChanged(int,int,int))); - connect(m_pitchDragLabel, SIGNAL(preview(int)), - this, SIGNAL(preview(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(preview(int)), + this, TQT_SIGNAL(preview(int))); } @@ -157,7 +157,7 @@ DiatonicPitchChooser::slotSetPitch(int pitch) m_accidental->setCurrentItem(pitchChange + 2); - m_pitchLabel->setText(QString("%1").arg(pitch)); + m_pitchLabel->setText(TQString("%1").arg(pitch)); update(); } @@ -199,7 +199,7 @@ DiatonicPitchChooser::setLabelsIfNeeded() //{ m_pitchDragLabel->slotSetPitch(getPitch(), m_octave->currentItem(), m_step->currentItem()); //} - m_pitchLabel->setText(QString("%1").arg(getPitch())); + m_pitchLabel->setText(TQString("%1").arg(getPitch())); } void @@ -217,7 +217,7 @@ DiatonicPitchChooser::slotSetNote(int pitch, int octave, int step) m_accidental->setCurrentItem(pitchOffset + 2); //MidiPitchLabel pl(p); - m_pitchLabel->setText(QString("%1").arg(pitch)); + m_pitchLabel->setText(TQString("%1").arg(pitch)); update(); } diff --git a/src/gui/widgets/DiatonicPitchChooser.h b/src/gui/widgets/DiatonicPitchChooser.h index 8e5b20d..bf20539 100644 --- a/src/gui/widgets/DiatonicPitchChooser.h +++ b/src/gui/widgets/DiatonicPitchChooser.h @@ -26,14 +26,14 @@ #ifndef _RG_ROSEGARDENDIATONICPITCHCHOOSER_H_ #define _RG_ROSEGARDENDIATONICPITCHCHOOSER_H_ -#include <qgroupbox.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqstring.h> -class QWidget; -class QSpinBox; -class QComboBox; -class QLabel; +class TQWidget; +class TQSpinBox; +class TQComboBox; +class TQLabel; namespace Rosegarden @@ -46,8 +46,8 @@ class DiatonicPitchChooser : public QGroupBox { Q_OBJECT public: - DiatonicPitchChooser(QString title, - QWidget *parent, + DiatonicPitchChooser(TQString title, + TQWidget *parent, int defaultNote = 0, int defaultPitch = 60, int defaultOctave = 5); @@ -86,11 +86,11 @@ protected: PitchDragLabel *m_pitchDragLabel; - QComboBox *m_step; - QComboBox *m_accidental; - QComboBox *m_octave; + TQComboBox *m_step; + TQComboBox *m_accidental; + TQComboBox *m_octave; - QLabel *m_pitchLabel; + TQLabel *m_pitchLabel; private: void setLabelsIfNeeded(); diff --git a/src/gui/widgets/Fader.cpp b/src/gui/widgets/Fader.cpp index 2413323..fc77f8e 100644 --- a/src/gui/widgets/Fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -28,14 +28,14 @@ #include "misc/Debug.h" #include "base/AudioLevel.h" -#include <qcolor.h> -#include <qevent.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> #include <cmath> namespace Rosegarden @@ -45,8 +45,8 @@ Fader::PixmapCache Fader::m_pixmapCache; Fader::Fader(AudioLevel::FaderType type, - int w, int h, QWidget *parent) : - QWidget(parent), + int w, int h, TQWidget *parent) : + TQWidget(parent), m_integral(false), m_vertical(h > w), m_min(0), @@ -54,7 +54,7 @@ Fader::Fader(AudioLevel::FaderType type, m_type(type), m_clickMousePos( -1), m_float(new TextFloat(this)), - m_floatTimer(new QTimer()) + m_floatTimer(new TQTimer()) { setBackgroundMode(Qt::NoBackground); setFixedSize(w, h); // provisional @@ -78,20 +78,20 @@ Fader::Fader(AudioLevel::FaderType type, calculateGroovePixmap(); setFader(0.0); - connect(m_floatTimer, SIGNAL(timeout()), this, SLOT(slotFloatTimeout())); + connect(m_floatTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFloatTimeout())); m_float->hide(); } Fader::Fader(int min, int max, int deflt, - int w, int h, QWidget *parent) : - QWidget(parent), + int w, int h, TQWidget *parent) : + TQWidget(parent), m_integral(true), m_vertical(h > w), m_min(min), m_max(max), m_clickMousePos( -1), m_float(new TextFloat(this)), - m_floatTimer(new QTimer()) + m_floatTimer(new TQTimer()) { setBackgroundMode(Qt::NoBackground); setFixedSize(w, h); // provisional @@ -115,20 +115,20 @@ Fader::Fader(int min, int max, int deflt, calculateGroovePixmap(); setFader(deflt); - connect(m_floatTimer, SIGNAL(timeout()), this, SLOT(slotFloatTimeout())); + connect(m_floatTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFloatTimeout())); m_float->hide(); } Fader::Fader(int min, int max, int deflt, - bool vertical, QWidget *parent) : - QWidget(parent), + bool vertical, TQWidget *parent) : + TQWidget(parent), m_integral(true), m_vertical(vertical), m_min(min), m_max(max), m_clickMousePos( -1), m_float(new TextFloat(this)), - m_floatTimer(new QTimer()) + m_floatTimer(new TQTimer()) { setBackgroundMode(Qt::NoBackground); calculateButtonPixmap(); @@ -146,7 +146,7 @@ Fader::Fader(int min, int max, int deflt, calculateGroovePixmap(); setFader(deflt); - connect(m_floatTimer, SIGNAL(timeout()), this, SLOT(slotFloatTimeout())); + connect(m_floatTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFloatTimeout())); m_float->hide(); } @@ -154,13 +154,13 @@ Fader::~Fader() {} void -Fader::setOutlineColour(QColor c) +Fader::setOutlineColour(TQColor c) { m_outlineColour = c; calculateGroovePixmap(); } -QPixmap * +TQPixmap * Fader::groovePixmap() { PixmapCache::iterator i = m_pixmapCache.find(SizeRec(width(), height())); @@ -173,7 +173,7 @@ Fader::groovePixmap() return 0; } -QPixmap * +TQPixmap * Fader::buttonPixmap() { PixmapCache::iterator i = m_pixmapCache.find(SizeRec(width(), height())); @@ -248,9 +248,9 @@ Fader::value_to_position(float value) } void -Fader::paintEvent(QPaintEvent *) +Fader::paintEvent(TQPaintEvent *) { - QPainter paint(this); + TQPainter paint(this); int position = value_to_position(m_value); if (m_vertical) { @@ -316,13 +316,13 @@ Fader::paintEvent(QPaintEvent *) } void -Fader::mousePressEvent(QMouseEvent *e) +Fader::mousePressEvent(TQMouseEvent *e) { m_clickMousePos = -1; if (e->button() == LeftButton) { - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { setFader(0); return ; } @@ -342,14 +342,14 @@ Fader::mousePressEvent(QMouseEvent *e) } void -Fader::mouseReleaseEvent(QMouseEvent *e) +Fader::mouseReleaseEvent(TQMouseEvent *e) { mouseMoveEvent(e); m_clickMousePos = -1; } void -Fader::mouseMoveEvent(QMouseEvent *e) +Fader::mouseMoveEvent(TQMouseEvent *e) { if (m_clickMousePos >= 0) { if (m_vertical) { @@ -368,7 +368,7 @@ Fader::mouseMoveEvent(QMouseEvent *e) } void -Fader::wheelEvent(QWheelEvent *e) +Fader::wheelEvent(TQWheelEvent *e) { int buttonPosition = value_to_position(m_value); if (e->state() & ShiftButton) { @@ -394,15 +394,15 @@ Fader::showFloatText() { // draw on the float text - QString text; + TQString text; if (m_integral) { - text = QString("%1").arg(int(m_value)); + text = TQString("%1").arg(int(m_value)); } else if (m_value == AudioLevel::DB_FLOOR) { text = "Off"; } else { float v = fabs(m_value); - text = QString("%1%2.%3%4%5 dB") + text = TQString("%1%2.%3%4%5 dB") .arg(m_value < 0 ? '-' : '+') .arg(int(v)) .arg(int(v * 10) % 10) @@ -415,8 +415,8 @@ Fader::showFloatText() // Reposition - we need to sum the relative positions up to the // topLevel or dialog to please move(). // - QWidget *par = parentWidget(); - QPoint totalPos = this->pos(); + TQWidget *par = parentWidget(); + TQPoint totalPos = this->pos(); while (par->parentWidget() && !par->isTopLevel() && !par->isDialog()) { totalPos += par->pos(); @@ -425,7 +425,7 @@ Fader::showFloatText() // Move just top/right // - m_float->move(totalPos + QPoint(width() + 2, 0)); + m_float->move(totalPos + TQPoint(width() + 2, 0)); // Show m_float->show(); @@ -443,12 +443,12 @@ Fader::slotFloatTimeout() void Fader::calculateGroovePixmap() { - QPixmap *& map = m_pixmapCache[SizeRec(width(), height())].first[m_outlineColour.pixel()]; + TQPixmap *& map = m_pixmapCache[SizeRec(width(), height())].first[m_outlineColour.pixel()]; delete map; - map = new QPixmap(width(), height()); + map = new TQPixmap(width(), height()); map->fill(colorGroup().background()); - QPainter paint(map); + TQPainter paint(map); paint.setBrush(colorGroup().background()); if (m_vertical) { @@ -494,7 +494,7 @@ Fader::calculateButtonPixmap() if (i != m_pixmapCache.end() && i->second.second) return ; - QPixmap *& map = m_pixmapCache[SizeRec(width(), height())].second; + TQPixmap *& map = m_pixmapCache[SizeRec(width(), height())].second; if (m_vertical) { @@ -510,13 +510,13 @@ Fader::calculateButtonPixmap() if (buttonWidth > width() - 2) buttonWidth = width() - 2; - map = new QPixmap(buttonWidth, buttonHeight); + map = new TQPixmap(buttonWidth, buttonHeight); map->fill(colorGroup().background()); int x = 0; int y = 0; - QPainter paint(map); + TQPainter paint(map); paint.setPen(colorGroup().light()); paint.drawLine(x + 1, y, x + buttonWidth - 2, y); diff --git a/src/gui/widgets/Fader.h b/src/gui/widgets/Fader.h index f4afb24..60aca20 100644 --- a/src/gui/widgets/Fader.h +++ b/src/gui/widgets/Fader.h @@ -28,16 +28,16 @@ #include "base/AudioLevel.h" #include <map> -#include <qcolor.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqwidget.h> #include <utility> -class QWheelEvent; -class QTimer; -class QPixmap; -class QPaintEvent; -class QMouseEvent; +class TQWheelEvent; +class TQTimer; +class TQPixmap; +class TQPaintEvent; +class TQMouseEvent; namespace Rosegarden @@ -56,25 +56,25 @@ public: * based on the given dimensions. */ Fader(AudioLevel::FaderType, - int width, int height, QWidget *parent); + int width, int height, TQWidget *parent); /** * Construct a fader on an integral scale. The fader calculates * its orientation based on the given dimensions. */ Fader(int min, int max, int deflt, - int width, int height, QWidget *parent); + int width, int height, TQWidget *parent); /** * Construct a fader on an integral scale, with a 1:1 ratio of * pixel positions and values. */ Fader(int min, int max, int deflt, - bool vertical, QWidget *parent); + bool vertical, TQWidget *parent); virtual ~Fader(); - void setOutlineColour(QColor); + void setOutlineColour(TQColor); float getFaderLevel() const; @@ -86,11 +86,11 @@ signals: void faderChanged(float); protected: - virtual void paintEvent(QPaintEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void wheelEvent(TQWheelEvent *); float position_to_value(int); int value_to_position(float); @@ -114,16 +114,16 @@ protected: int m_clickButtonPos; TextFloat *m_float; - QTimer *m_floatTimer; + TQTimer *m_floatTimer; - QPixmap *groovePixmap(); - QPixmap *buttonPixmap(); + TQPixmap *groovePixmap(); + TQPixmap *buttonPixmap(); - QColor m_outlineColour; + TQColor m_outlineColour; typedef std::pair<int, int> SizeRec; - typedef std::map<unsigned int, QPixmap *> ColourPixmapRec; // key is QColor::pixel() - typedef std::pair<ColourPixmapRec, QPixmap *> PixmapRec; + typedef std::map<unsigned int, TQPixmap *> ColourPixmapRec; // key is TQColor::pixel() + typedef std::pair<ColourPixmapRec, TQPixmap *> PixmapRec; typedef std::map<SizeRec, PixmapRec> PixmapCache; static PixmapCache m_pixmapCache; }; diff --git a/src/gui/widgets/HSpinBox.cpp b/src/gui/widgets/HSpinBox.cpp index efdb9d1..f3b5970 100644 --- a/src/gui/widgets/HSpinBox.cpp +++ b/src/gui/widgets/HSpinBox.cpp @@ -25,16 +25,16 @@ #include "HSpinBox.h" -#include <qstring.h> +#include <tqstring.h> #include <cmath> #include <algorithm> namespace Rosegarden { -QString HSpinBox::mapValueToText(int j) +TQString HSpinBox::mapValueToText(int j) { - QString str; + TQString str; str.sprintf(m_format, float(j) / m_scaleFactor); return str; } @@ -46,27 +46,27 @@ int HSpinBox::mapTextToValue( bool* ok ) return int(f * m_scaleFactor); } -HSpinBox::HSpinBox( int minV, int maxV, int step, QWidget* parent, +HSpinBox::HSpinBox( int minV, int maxV, int step, TQWidget* parent, double bottom, double top, int decimals, float initialValue) - : QSpinBox(minV,maxV,step,parent) + : TQSpinBox(minV,maxV,step,parent) { - setValidator(new QDoubleValidator(bottom,top,decimals,this)); + setValidator(new TQDoubleValidator(bottom,top,decimals,this)); initialize(decimals); setValuef(initialValue); } //constructor with default settings -HSpinBox::HSpinBox( QWidget* parent, float initialValue, int step, +HSpinBox::HSpinBox( TQWidget* parent, float initialValue, int step, double bottom, double top, int decimals, - const QObject* recv, const char* mem) - : QSpinBox((int)(bottom*pow(10.0, decimals)), + const TQObject* recv, const char* mem) + : TQSpinBox((int)(bottom*pow(10.0, decimals)), (int)(top*pow(10.0, decimals)), step, parent) { - setValidator(new QDoubleValidator(bottom,top,decimals,this)); + setValidator(new TQDoubleValidator(bottom,top,decimals,this)); initialize(decimals); setValuef(initialValue); if (recv != NULL && mem != NULL) - QObject::connect(this, SIGNAL(valueChanged(int)), recv, mem); + TQObject::connect(this, TQT_SIGNAL(valueChanged(int)), recv, mem); } float HSpinBox::valuef() { return float(value()) / m_scaleFactor; } diff --git a/src/gui/widgets/HSpinBox.h b/src/gui/widgets/HSpinBox.h index aa60b65..70baf87 100644 --- a/src/gui/widgets/HSpinBox.h +++ b/src/gui/widgets/HSpinBox.h @@ -26,10 +26,10 @@ #ifndef _RG_HSPINBOX_H_ #define _RG_HSPINBOX_H_ -#include <qobject.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvalidator.h> +#include <tqobject.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvalidator.h> namespace Rosegarden @@ -37,18 +37,18 @@ namespace Rosegarden class HSpinBox : public QSpinBox { - QString mapValueToText(int j); + TQString mapValueToText(int j); int mapTextToValue( bool* ok ); public: - HSpinBox( int minV, int maxV, int step, QWidget* parent, + HSpinBox( int minV, int maxV, int step, TQWidget* parent, double bottom, double top, int decimals, float initialValue); //constructor with default settings - HSpinBox( QWidget* parent, float initialValue = 0.2, int step=1, + HSpinBox( TQWidget* parent, float initialValue = 0.2, int step=1, double bottom=-25.0, double top=25.0, int decimals=3, - const QObject* recv=NULL, const char* mem=NULL); + const TQObject* recv=NULL, const char* mem=NULL); float valuef(); void setValuef(float v); diff --git a/src/gui/widgets/Label.h b/src/gui/widgets/Label.h index e704c35..a30b196 100644 --- a/src/gui/widgets/Label.h +++ b/src/gui/widgets/Label.h @@ -26,12 +26,12 @@ #ifndef _RG_ROSEGARDENLABEL_H_ #define _RG_ROSEGARDENLABEL_H_ -#include <qlabel.h> +#include <tqlabel.h> -class QWidget; -class QWheelEvent; -class QMouseEvent; +class TQWidget; +class TQWheelEvent; +class TQMouseEvent; namespace Rosegarden @@ -41,14 +41,14 @@ class Label : public QLabel { Q_OBJECT public: - Label(QWidget *parent = 0, const char *name=0): - QLabel(parent, name) {;} + Label(TQWidget *parent = 0, const char *name=0): + TQLabel(parent, name) {;} protected: - virtual void mouseDoubleClickEvent(QMouseEvent * /*e*/) + virtual void mouseDoubleClickEvent(TQMouseEvent * /*e*/) { emit doubleClicked(); } - virtual void wheelEvent(QWheelEvent * e) + virtual void wheelEvent(TQWheelEvent * e) { emit scrollWheel(e->delta()); } signals: diff --git a/src/gui/widgets/MidiFaderWidget.cpp b/src/gui/widgets/MidiFaderWidget.cpp index a2ef7fc..27eafde 100644 --- a/src/gui/widgets/MidiFaderWidget.cpp +++ b/src/gui/widgets/MidiFaderWidget.cpp @@ -29,10 +29,10 @@ #include "Fader.h" #include "Rotary.h" #include <kcombobox.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden diff --git a/src/gui/widgets/MidiFaderWidget.h b/src/gui/widgets/MidiFaderWidget.h index 7bdf520..308d022 100644 --- a/src/gui/widgets/MidiFaderWidget.h +++ b/src/gui/widgets/MidiFaderWidget.h @@ -26,12 +26,12 @@ #ifndef _RG_MIDIFADERWIDGET_H_ #define _RG_MIDIFADERWIDGET_H_ -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> -class QWidget; -class QPushButton; +class TQWidget; +class TQPushButton; class KComboBox; @@ -48,21 +48,21 @@ class MidiFaderWidget : public QFrame Q_OBJECT public: - MidiFaderWidget(QWidget *parent, - QString id = ""); + MidiFaderWidget(TQWidget *parent, + TQString id = ""); AudioVUMeter *m_vuMeter; Fader *m_fader; - QPushButton *m_muteButton; - QPushButton *m_soloButton; - QPushButton *m_recordButton; + TQPushButton *m_muteButton; + TQPushButton *m_soloButton; + TQPushButton *m_recordButton; Rotary *m_pan; KComboBox *m_output; - QString m_id; + TQString m_id; }; diff --git a/src/gui/widgets/PitchChooser.cpp b/src/gui/widgets/PitchChooser.cpp index e20647d..2aa1c57 100644 --- a/src/gui/widgets/PitchChooser.cpp +++ b/src/gui/widgets/PitchChooser.cpp @@ -28,59 +28,59 @@ #include <klocale.h> #include "gui/general/MidiPitchLabel.h" #include "PitchDragLabel.h" -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -PitchChooser::PitchChooser(QString title, - QWidget *parent, +PitchChooser::PitchChooser(TQString title, + TQWidget *parent, int defaultPitch) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_defaultPitch(defaultPitch) { m_pitchDragLabel = new PitchDragLabel(this, defaultPitch); - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); hbox->setSpacing(6); - new QLabel(i18n("Pitch:"), hbox); + new TQLabel(i18n("Pitch:"), hbox); - m_pitch = new QSpinBox(hbox); + m_pitch = new TQSpinBox(hbox); m_pitch->setMinValue(0); m_pitch->setMaxValue(127); m_pitch->setValue(defaultPitch); MidiPitchLabel pl(defaultPitch); - m_pitchLabel = new QLabel(pl.getQString(), hbox); + m_pitchLabel = new TQLabel(pl.getQString(), hbox); m_pitchLabel->setMinimumWidth(40); - connect(m_pitch, SIGNAL(valueChanged(int)), - this, SLOT(slotSetPitch(int))); + connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitch, SIGNAL(valueChanged(int)), - this, SIGNAL(pitchChanged(int))); + connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(pitchChanged(int))); - connect(m_pitch, SIGNAL(valueChanged(int)), - this, SIGNAL(preview(int))); + connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(preview(int))); - connect(m_pitchDragLabel, SIGNAL(pitchDragged(int)), - this, SLOT(slotSetPitch(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchDragged(int)), + this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - this, SLOT(slotSetPitch(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - this, SIGNAL(pitchChanged(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + this, TQT_SIGNAL(pitchChanged(int))); - connect(m_pitchDragLabel, SIGNAL(preview(int)), - this, SIGNAL(preview(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(preview(int)), + this, TQT_SIGNAL(preview(int))); } diff --git a/src/gui/widgets/PitchChooser.h b/src/gui/widgets/PitchChooser.h index df3b8ef..4c844ca 100644 --- a/src/gui/widgets/PitchChooser.h +++ b/src/gui/widgets/PitchChooser.h @@ -26,13 +26,13 @@ #ifndef _RG_ROSEGARDENPITCHCHOOSER_H_ #define _RG_ROSEGARDENPITCHCHOOSER_H_ -#include <qgroupbox.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqstring.h> -class QWidget; -class QSpinBox; -class QLabel; +class TQWidget; +class TQSpinBox; +class TQLabel; namespace Rosegarden @@ -45,8 +45,8 @@ class PitchChooser : public QGroupBox { Q_OBJECT public: - PitchChooser(QString title, - QWidget *parent, + PitchChooser(TQString title, + TQWidget *parent, int defaultPitch = 60); int getPitch() const; @@ -62,8 +62,8 @@ public slots: protected: int m_defaultPitch; PitchDragLabel *m_pitchDragLabel; - QSpinBox *m_pitch; - QLabel *m_pitchLabel; + TQSpinBox *m_pitch; + TQLabel *m_pitchLabel; }; diff --git a/src/gui/widgets/PitchDragLabel.cpp b/src/gui/widgets/PitchDragLabel.cpp index 1d22a77..9a174bb 100644 --- a/src/gui/widgets/PitchDragLabel.cpp +++ b/src/gui/widgets/PitchDragLabel.cpp @@ -28,20 +28,20 @@ #include "base/NotationRules.h" #include "base/NotationTypes.h" #include "gui/editors/notation/NotePixmapFactory.h" -#include <qcanvas.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -PitchDragLabel::PitchDragLabel(QWidget *parent, +PitchDragLabel::PitchDragLabel(TQWidget *parent, int defaultPitch, bool defaultSharps) : - QWidget(parent), + TQWidget(parent), m_pitch(defaultPitch), m_usingSharps(defaultSharps), m_clickedY(0), @@ -82,7 +82,7 @@ PitchDragLabel::slotSetPitch(int pitch, int octave, int step) } void -PitchDragLabel::mousePressEvent(QMouseEvent *e) +PitchDragLabel::mousePressEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_clickedY = e->y(); @@ -93,7 +93,7 @@ PitchDragLabel::mousePressEvent(QMouseEvent *e) } void -PitchDragLabel::mouseMoveEvent(QMouseEvent *e) +PitchDragLabel::mouseMoveEvent(TQMouseEvent *e) { if (m_clicked) { @@ -132,7 +132,7 @@ PitchDragLabel::mouseMoveEvent(QMouseEvent *e) } void -PitchDragLabel::mouseReleaseEvent(QMouseEvent *e) +PitchDragLabel::mouseReleaseEvent(TQMouseEvent *e) { mouseMoveEvent(e); emitPitchChange(); @@ -159,7 +159,7 @@ PitchDragLabel::emitPitchChange() } void -PitchDragLabel::wheelEvent(QWheelEvent *e) +PitchDragLabel::wheelEvent(TQWheelEvent *e) { if (e->delta() > 0) { if (m_pitch < 127) { @@ -183,9 +183,9 @@ PitchDragLabel::wheelEvent(QWheelEvent *e) } void -PitchDragLabel::paintEvent(QPaintEvent *) +PitchDragLabel::paintEvent(TQPaintEvent *) { - QPainter paint(this); + TQPainter paint(this); paint.fillRect(0, 0, width(), height(), paint.backgroundColor()); int x = width() / 2 - m_pixmap.width() / 2; @@ -204,7 +204,7 @@ PitchDragLabel::paintEvent(QPaintEvent *) QSize PitchDragLabel::sizeHint() const { - return QSize(150, 135); + return TQSize(150, 135); } void @@ -226,7 +226,7 @@ PitchDragLabel::calculatePixmap(int pitch, int octave, int step) const } } - QCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap + TQCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap (m_pitch, Clef(clefType, octaveOffset), octave, step); @@ -255,7 +255,7 @@ PitchDragLabel::calculatePixmap() const } } - QCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap + TQCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap (m_pitch, Clef(clefType, octaveOffset), m_usingSharps); diff --git a/src/gui/widgets/PitchDragLabel.h b/src/gui/widgets/PitchDragLabel.h index 7114611..fa3ecfd 100644 --- a/src/gui/widgets/PitchDragLabel.h +++ b/src/gui/widgets/PitchDragLabel.h @@ -26,14 +26,14 @@ #ifndef _RG_ROSEGARDENPITCHDRAGLABEL_H_ #define _RG_ROSEGARDENPITCHDRAGLABEL_H_ -#include <qpixmap.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqpixmap.h> +#include <tqsize.h> +#include <tqwidget.h> -class QWheelEvent; -class QPaintEvent; -class QMouseEvent; +class TQWheelEvent; +class TQPaintEvent; +class TQMouseEvent; namespace Rosegarden @@ -46,13 +46,13 @@ class PitchDragLabel : public QWidget { Q_OBJECT public: - PitchDragLabel(QWidget *parent, + PitchDragLabel(TQWidget *parent, int defaultPitch = 60, bool defaultSharps = true); ~PitchDragLabel(); int getPitch() const { return m_pitch; } - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; signals: void pitchDragged(int); @@ -68,11 +68,11 @@ public slots: void slotSetPitch(int,int,int); protected: - virtual void paintEvent(QPaintEvent *); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void wheelEvent(QWheelEvent *e); + virtual void paintEvent(TQPaintEvent *); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); void calculatePixmap() const; void calculatePixmap(int pitch, int octave, int step) const; @@ -80,7 +80,7 @@ protected: /** emits 'pitchChanged' events, both diatonic and chromatic */ void emitPitchChange(); - mutable QPixmap m_pixmap; + mutable TQPixmap m_pixmap; int m_pitch; int m_clickedY; diff --git a/src/gui/widgets/PluginControl.cpp b/src/gui/widgets/PluginControl.cpp index acf33ea..69e9591 100644 --- a/src/gui/widgets/PluginControl.cpp +++ b/src/gui/widgets/PluginControl.cpp @@ -30,21 +30,21 @@ #include "gui/general/GUIPalette.h" #include "gui/studio/AudioPluginManager.h" #include "gui/widgets/Rotary.h" -#include <qfont.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qobject.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqwidget.h> #include <cmath> namespace Rosegarden { -PluginControl::PluginControl(QWidget *parent, - QGridLayout *layout, +PluginControl::PluginControl(TQWidget *parent, + TQGridLayout *layout, ControlType type, PluginPort *port, AudioPluginManager *aPM, @@ -52,18 +52,18 @@ PluginControl::PluginControl(QWidget *parent, float initialValue, bool showBounds, bool hidden): - QObject(parent), + TQObject(parent), m_layout(layout), m_type(type), m_port(port), m_pluginManager(aPM), m_index(index) { - QFont plainFont; + TQFont plainFont; plainFont.setPointSize((plainFont.pointSize() * 9 ) / 10); - QLabel *controlTitle = - new QLabel(QString("%1 ").arg(strtoqstr(port->getName())), parent); + TQLabel *controlTitle = + new TQLabel(TQString("%1 ").arg(strtoqstr(port->getName())), parent); controlTitle->setFont(plainFont); if (type == Rotary) { @@ -118,12 +118,12 @@ PluginControl::PluginControl(QWidget *parent, initialValue = log10f(initialValue); } - QLabel *low; + TQLabel *low; if (port->getDisplayHint() & (PluginPort::Integer | PluginPort::Toggled)) { - low = new QLabel(QString("%1").arg(int(displayLower)), parent); + low = new TQLabel(TQString("%1").arg(int(displayLower)), parent); } else { - low = new QLabel(QString("%1").arg(displayLower), parent); + low = new TQLabel(TQString("%1").arg(displayLower), parent); } low->setFont(plainFont); @@ -148,23 +148,23 @@ PluginControl::PluginControl(QWidget *parent, m_dial->setKnobColour(GUIPalette::getColour(GUIPalette::RotaryPlugin)); - connect(m_dial, SIGNAL(valueChanged(float)), - this, SLOT(slotValueChanged(float))); + connect(m_dial, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotValueChanged(float))); - QLabel *upp; + TQLabel *upp; if (port->getDisplayHint() & (PluginPort::Integer | PluginPort::Toggled)) { - upp = new QLabel(QString("%1").arg(int(displayUpper)), parent); + upp = new TQLabel(TQString("%1").arg(int(displayUpper)), parent); } else { - upp = new QLabel(QString("%1").arg(displayUpper), parent); + upp = new TQLabel(TQString("%1").arg(displayUpper), parent); } upp->setFont(plainFont); - QWidgetItem *item; + TQWidgetItem *item; if (!hidden) { controlTitle->show(); - item = new QWidgetItem(controlTitle); + item = new TQWidgetItem(controlTitle); item->setAlignment(Qt::AlignRight | Qt::AlignBottom); m_layout->addItem(item); } else { @@ -173,7 +173,7 @@ PluginControl::PluginControl(QWidget *parent, if (showBounds && !hidden) { low->show(); - item = new QWidgetItem(low); + item = new TQWidgetItem(low); item->setAlignment(Qt::AlignRight | Qt::AlignBottom); m_layout->addItem(item); } else { @@ -182,7 +182,7 @@ PluginControl::PluginControl(QWidget *parent, if (!hidden) { m_dial->show(); - item = new QWidgetItem(m_dial); + item = new TQWidgetItem(m_dial); item->setAlignment(Qt::AlignCenter); m_layout->addItem(item); } else { @@ -191,7 +191,7 @@ PluginControl::PluginControl(QWidget *parent, if (showBounds && !hidden) { upp->show(); - item = new QWidgetItem(upp); + item = new TQWidgetItem(upp); item->setAlignment(Qt::AlignLeft | Qt::AlignBottom); m_layout->addItem(item); } else { diff --git a/src/gui/widgets/PluginControl.h b/src/gui/widgets/PluginControl.h index 83d2d33..d809d81 100644 --- a/src/gui/widgets/PluginControl.h +++ b/src/gui/widgets/PluginControl.h @@ -26,13 +26,13 @@ #ifndef _RG_PLUGINCONTROL_H_ #define _RG_PLUGINCONTROL_H_ -#include <qobject.h> +#include <tqobject.h> #include <vector> -class QWidget; -class QHBox; -class QGridLayout; +class TQWidget; +class TQHBox; +class TQGridLayout; namespace Rosegarden @@ -55,8 +55,8 @@ public: NumericSlider } ControlType; - PluginControl(QWidget *parent, - QGridLayout *layout, + PluginControl(TQWidget *parent, + TQGridLayout *layout, ControlType type, PluginPort *port, AudioPluginManager *pluginManager, @@ -83,7 +83,7 @@ protected: //--------------- Data members --------------------------------- - QGridLayout *m_layout; + TQGridLayout *m_layout; ControlType m_type; PluginPort *m_port; @@ -96,7 +96,7 @@ protected: }; typedef std::vector<PluginControl*>::iterator ControlIterator; -typedef std::vector<QHBox*>::iterator ControlLineIterator; +typedef std::vector<TQHBox*>::iterator ControlLineIterator; } diff --git a/src/gui/widgets/ProgressBar.cpp b/src/gui/widgets/ProgressBar.cpp index c4cb88e..c1a4456 100644 --- a/src/gui/widgets/ProgressBar.cpp +++ b/src/gui/widgets/ProgressBar.cpp @@ -26,7 +26,7 @@ #include "ProgressBar.h" #include <kprogress.h> -#include <qwidget.h> +#include <tqwidget.h> namespace Rosegarden @@ -34,7 +34,7 @@ namespace Rosegarden ProgressBar::ProgressBar(int totalSteps, bool /*useDelay*/, - QWidget *creator, + TQWidget *creator, const char *name, WFlags f) : KProgress(totalSteps, creator, name, f) diff --git a/src/gui/widgets/ProgressBar.h b/src/gui/widgets/ProgressBar.h index 3ce93e1..383a58a 100644 --- a/src/gui/widgets/ProgressBar.h +++ b/src/gui/widgets/ProgressBar.h @@ -29,7 +29,7 @@ #include <kprogress.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -44,7 +44,7 @@ class ProgressBar : public KProgress public: ProgressBar(int totalSteps, bool useDelay, - QWidget *creator = 0, + TQWidget *creator = 0, const char *name = 0, WFlags f = 0); diff --git a/src/gui/widgets/ProgressDialog.cpp b/src/gui/widgets/ProgressDialog.cpp index 1f6811f..715e9ae 100644 --- a/src/gui/widgets/ProgressDialog.cpp +++ b/src/gui/widgets/ProgressDialog.cpp @@ -28,11 +28,11 @@ #include "misc/Debug.h" #include "gui/application/RosegardenApplication.h" #include <klocale.h> -#include <qcursor.h> -#include <qprogressdialog.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqcursor.h> +#include <tqprogressdialog.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden @@ -41,11 +41,11 @@ namespace Rosegarden bool ProgressDialog::m_modalVisible = false; -ProgressDialog::ProgressDialog(QWidget *creator, +ProgressDialog::ProgressDialog(TQWidget *creator, const char *name, bool modal): KProgressDialog(creator, name, - i18n("Processing..."), QString::null, modal), + i18n("Processing..."), TQString::null, modal), m_wasVisible(false), m_frozen(false), m_modal(modal) @@ -54,8 +54,8 @@ ProgressDialog::ProgressDialog(QWidget *creator, RG_DEBUG << "ProgressDialog::ProgressDialog type 1 - " << labelText() << " - modal : " << modal << endl; - connect(progressBar(), SIGNAL(percentageChanged (int)), - this, SLOT(slotCheckShow(int))); + connect(progressBar(), TQT_SIGNAL(percentageChanged (int)), + this, TQT_SLOT(slotCheckShow(int))); m_chrono.start(); @@ -66,9 +66,9 @@ ProgressDialog::ProgressDialog(QWidget *creator, } ProgressDialog::ProgressDialog( - const QString &labelText, + const TQString &labelText, int totalSteps, - QWidget *creator, + TQWidget *creator, const char *name, bool modal) : KProgressDialog(creator, @@ -85,8 +85,8 @@ ProgressDialog::ProgressDialog( RG_DEBUG << "ProgressDialog::ProgressDialog type 2 - " << labelText << " - modal : " << modal << endl; - connect(progressBar(), SIGNAL(percentageChanged (int)), - this, SLOT(slotCheckShow(int))); + connect(progressBar(), TQT_SIGNAL(percentageChanged (int)), + this, TQT_SLOT(slotCheckShow(int))); m_chrono.start(); @@ -109,20 +109,20 @@ ProgressDialog::polish() if (allowCancel()) setCursor(Qt::ArrowCursor); else - QApplication::setOverrideCursor(QCursor(Qt::waitCursor)); + TQApplication::setOverrideCursor(TQCursor(Qt::waitCursor)); } -void ProgressDialog::hideEvent(QHideEvent* e) +void ProgressDialog::hideEvent(TQHideEvent* e) { if (!allowCancel()) - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KProgressDialog::hideEvent(e); m_modalVisible = false; } void -ProgressDialog::slotSetOperationName(QString name) +ProgressDialog::slotSetOperationName(TQString name) { // RG_DEBUG << "ProgressDialog::slotSetOperationName(" // << name << ") visible : " << isVisible() << endl; @@ -172,7 +172,7 @@ void ProgressDialog::slotFreeze() // This is also a convenient place to ensure the wait cursor (if // currently shown) returns to the original cursor to ensure that // the user can respond to whatever's freezing the progress dialog - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); mShowTimer->stop(); m_frozen = true; diff --git a/src/gui/widgets/ProgressDialog.h b/src/gui/widgets/ProgressDialog.h index b753493..8e6e030 100644 --- a/src/gui/widgets/ProgressDialog.h +++ b/src/gui/widgets/ProgressDialog.h @@ -29,11 +29,11 @@ #define private protected // fugly #include <kprogress.h> #undef private -#include <qdatetime.h> +#include <tqdatetime.h> -class QWidget; -class QString; -class QHideEvent; +class TQWidget; +class TQString; +class TQHideEvent; namespace Rosegarden @@ -45,13 +45,13 @@ class ProgressDialog : public KProgressDialog { Q_OBJECT public: - ProgressDialog(QWidget * creator = 0, + ProgressDialog(TQWidget * creator = 0, const char * name = 0, bool modal = true); - ProgressDialog(const QString &labelText, + ProgressDialog(const TQString &labelText, int totalSteps, - QWidget *creator = 0, + TQWidget *creator = 0, const char *name = 0, bool modal = true); @@ -68,7 +68,7 @@ public: virtual void polish(); public slots: - void slotSetOperationName(QString); + void slotSetOperationName(TQString); void slotCancel(); /// Stop and hide (if it's shown) the progress dialog @@ -81,11 +81,11 @@ protected slots: void slotCheckShow(int); protected: - virtual void hideEvent(QHideEvent*); + virtual void hideEvent(TQHideEvent*); //--------------- Data members --------------------------------- - QTime m_chrono; + TQTime m_chrono; bool m_wasVisible; bool m_frozen; bool m_modal; diff --git a/src/gui/widgets/QDeferScrollView.cpp b/src/gui/widgets/QDeferScrollView.cpp index 01864a3..38cb211 100644 --- a/src/gui/widgets/QDeferScrollView.cpp +++ b/src/gui/widgets/QDeferScrollView.cpp @@ -25,17 +25,17 @@ #include "QDeferScrollView.h" -#include <qscrollview.h> -#include <qwidget.h> +#include <tqscrollview.h> +#include <tqwidget.h> namespace Rosegarden { -QDeferScrollView::QDeferScrollView(QWidget* parent, const char *name, WFlags f) - : QScrollView(parent, name, f) +QDeferScrollView::QDeferScrollView(TQWidget* parent, const char *name, WFlags f) + : TQScrollView(parent, name, f) { - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(TQWidget::WheelFocus); } void QDeferScrollView::setBottomMargin(int m) @@ -43,7 +43,7 @@ void QDeferScrollView::setBottomMargin(int m) setMargins(leftMargin(), topMargin(), rightMargin(), m); } -void QDeferScrollView::contentsWheelEvent(QWheelEvent* e) +void QDeferScrollView::contentsWheelEvent(TQWheelEvent* e) { emit gotWheelEvent(e); } diff --git a/src/gui/widgets/QDeferScrollView.h b/src/gui/widgets/QDeferScrollView.h index e4b2e3d..9ba02a9 100644 --- a/src/gui/widgets/QDeferScrollView.h +++ b/src/gui/widgets/QDeferScrollView.h @@ -26,11 +26,11 @@ #ifndef _RG_QDEFERSCROLLVIEW_H_ #define _RG_QDEFERSCROLLVIEW_H_ -#include <qscrollview.h> +#include <tqscrollview.h> -class QWidget; -class QWheelEvent; +class TQWidget; +class TQWheelEvent; namespace Rosegarden @@ -39,8 +39,8 @@ namespace Rosegarden /** - * A QScrollView which defers vertical scrolling (through mouse wheel) - * elsewhere, typically another QScrollView, so that both can be kept + * A TQScrollView which defers vertical scrolling (through mouse wheel) + * elsewhere, typically another TQScrollView, so that both can be kept * in sync. The master scrollview will connect its vertical scrollbar * to the slave view so the scrollbar will act on both views. * @@ -57,15 +57,15 @@ class QDeferScrollView : public QScrollView { Q_OBJECT public: - QDeferScrollView(QWidget* parent=0, const char *name=0, WFlags f=0); + QDeferScrollView(TQWidget* parent=0, const char *name=0, WFlags f=0); void setBottomMargin(int); signals: - void gotWheelEvent(QWheelEvent*); + void gotWheelEvent(TQWheelEvent*); protected: - virtual void contentsWheelEvent(QWheelEvent*); + virtual void contentsWheelEvent(TQWheelEvent*); }; diff --git a/src/gui/widgets/QuantizeParameters.cpp b/src/gui/widgets/QuantizeParameters.cpp index 19ba96a..1cb2a58 100644 --- a/src/gui/widgets/QuantizeParameters.cpp +++ b/src/gui/widgets/QuantizeParameters.cpp @@ -24,7 +24,7 @@ #include "QuantizeParameters.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -37,53 +37,53 @@ #include "gui/editors/notation/NotePixmapFactory.h" #include <kcombobox.h> #include <kconfig.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -QuantizeParameters::QuantizeParameters(QWidget *parent, +QuantizeParameters::QuantizeParameters(TQWidget *parent, QuantizerType defaultQuantizer, bool showNotationOption, bool showAdvancedButton, - QString configCategory, - QString preamble) : - QFrame(parent), + TQString configCategory, + TQString preamble) : + TQFrame(parent), m_configCategory(configCategory), m_standardQuantizations (BasicQuantizer::getStandardQuantizations()) { - m_mainLayout = new QGridLayout(this, + m_mainLayout = new TQGridLayout(this, preamble ? 3 : 4, 2, preamble ? 10 : 0, preamble ? 5 : 4); int zero = 0; if (preamble) { - QLabel *label = new QLabel(preamble, this); + TQLabel *label = new TQLabel(preamble, this); label->setAlignment(Qt::WordBreak); m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1); zero = 1; } - QGroupBox *quantizerBox = new QGroupBox + TQGroupBox *quantizerBox = new QGroupBox (1, Horizontal, i18n("Quantizer"), this); m_mainLayout->addWidget(quantizerBox, zero, 0); - QFrame *typeFrame = new QFrame(quantizerBox); + TQFrame *typeFrame = new TQFrame(quantizerBox); - QGridLayout *layout = new QGridLayout(typeFrame, 2, 2, 5, 3); - layout->addWidget(new QLabel(i18n("Quantizer type:"), typeFrame), 0, 0); + TQGridLayout *layout = new TQGridLayout(typeFrame, 2, 2, 5, 3); + layout->addWidget(new TQLabel(i18n("Quantizer type:"), typeFrame), 0, 0); m_typeCombo = new KComboBox(typeFrame); m_typeCombo->insertItem(i18n("Grid quantizer")); m_typeCombo->insertItem(i18n("Legato quantizer")); @@ -97,21 +97,21 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, if (!showNotationOption) m_notationTarget->hide(); - QHBox *parameterBox = new QHBox(this); + TQHBox *parameterBox = new TQHBox(this); m_mainLayout->addWidget(parameterBox, zero + 1, 0); m_notationBox = new QGroupBox (1, Horizontal, i18n("Notation parameters"), parameterBox); - QFrame *notationFrame = new QFrame(m_notationBox); + TQFrame *notationFrame = new TQFrame(m_notationBox); - layout = new QGridLayout(notationFrame, 4, 2, 5, 3); + layout = new TQGridLayout(notationFrame, 4, 2, 5, 3); - layout->addWidget(new QLabel(i18n("Base grid unit:"), notationFrame), + layout->addWidget(new TQLabel(i18n("Base grid unit:"), notationFrame), 1, 0); m_notationUnitCombo = new KComboBox(notationFrame); layout->addWidget(m_notationUnitCombo, 1, 1); - layout->addWidget(new QLabel(i18n("Complexity:"), + layout->addWidget(new TQLabel(i18n("Complexity:"), notationFrame), 0, 0); m_simplicityCombo = new KComboBox(notationFrame); @@ -122,7 +122,7 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, m_simplicityCombo->insertItem(i18n("Very low")); layout->addWidget(m_simplicityCombo, 0, 1); - layout->addWidget(new QLabel(i18n("Tuplet level:"), + layout->addWidget(new TQLabel(i18n("Tuplet level:"), notationFrame), 2, 0); m_maxTuplet = new KComboBox(notationFrame); m_maxTuplet->insertItem(i18n("None")); @@ -138,25 +138,25 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, m_maxTuplet->insertItem(i18n("Any")); layout->addWidget(m_maxTuplet, 2, 1); - m_counterpoint = new QCheckBox(i18n("Permit counterpoint"), notationFrame); + m_counterpoint = new TQCheckBox(i18n("Permit counterpoint"), notationFrame); layout->addMultiCellWidget(m_counterpoint, 3, 3, 0, 1); m_gridBox = new QGroupBox (1, Horizontal, i18n("Grid parameters"), parameterBox); - QFrame *gridFrame = new QFrame(m_gridBox); + TQFrame *gridFrame = new TQFrame(m_gridBox); - layout = new QGridLayout(gridFrame, 4, 2, 5, 3); + layout = new TQGridLayout(gridFrame, 4, 2, 5, 3); - layout->addWidget(new QLabel(i18n("Base grid unit:"), gridFrame), 0, 0); + layout->addWidget(new TQLabel(i18n("Base grid unit:"), gridFrame), 0, 0); m_gridUnitCombo = new KComboBox(gridFrame); layout->addWidget(m_gridUnitCombo, 0, 1); - m_swingLabel = new QLabel(i18n("Swing:"), gridFrame); + m_swingLabel = new TQLabel(i18n("Swing:"), gridFrame); layout->addWidget(m_swingLabel, 1, 0); m_swingCombo = new KComboBox(gridFrame); layout->addWidget(m_swingCombo, 1, 1); - m_iterativeLabel = new QLabel(i18n("Iterative amount:"), gridFrame); + m_iterativeLabel = new TQLabel(i18n("Iterative amount:"), gridFrame); layout->addWidget(m_iterativeLabel, 2, 0); m_iterativeCombo = new KComboBox(gridFrame); layout->addWidget(m_iterativeCombo, 2, 1); @@ -180,27 +180,27 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, m_advancedButton = 0; if (showAdvancedButton) { m_advancedButton = - new QPushButton(i18n("Show advanced options"), this); + new TQPushButton(i18n("Show advanced options"), this); m_mainLayout->addWidget(m_advancedButton, zero + 2, 0, Qt::AlignLeft); - QObject::connect(m_advancedButton, SIGNAL(clicked()), - this, SLOT(slotAdvancedChanged())); + TQObject::connect(m_advancedButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAdvancedChanged())); } - QFrame *postFrame = new QFrame(m_postProcessingBox); + TQFrame *postFrame = new TQFrame(m_postProcessingBox); - layout = new QGridLayout(postFrame, 4, 1, 5, 3); - m_rebeam = new QCheckBox(i18n("Re-beam"), postFrame); + layout = new TQGridLayout(postFrame, 4, 1, 5, 3); + m_rebeam = new TQCheckBox(i18n("Re-beam"), postFrame); m_articulate = new QCheckBox (i18n("Add articulations (staccato, tenuto, slurs)"), postFrame); - m_makeViable = new QCheckBox(i18n("Tie notes at barlines etc"), postFrame); - m_deCounterpoint = new QCheckBox(i18n("Split-and-tie overlapping chords"), postFrame); + m_makeViable = new TQCheckBox(i18n("Tie notes at barlines etc"), postFrame); + m_deCounterpoint = new TQCheckBox(i18n("Split-and-tie overlapping chords"), postFrame); layout->addWidget(m_rebeam, 0, 0); layout->addWidget(m_articulate, 1, 0); layout->addWidget(m_makeViable, 2, 0); layout->addWidget(m_deCounterpoint, 3, 0); - QPixmap noMap = NotePixmapFactory::toQPixmap + TQPixmap noMap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("menu-no-note")); int defaultType = 0; @@ -278,16 +278,16 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, timeT time = m_standardQuantizations[i]; timeT error = 0; - QPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(time, error)); - QString label = NotationStrings::makeNoteMenuLabel(time, false, error); + TQString label = NotationStrings::makeNoteMenuLabel(time, false, error); if (error == 0) { m_gridUnitCombo->insertItem(pmap, label); m_notationUnitCombo->insertItem(pmap, label); } else { - m_gridUnitCombo->insertItem(noMap, QString("%1").arg(time)); - m_notationUnitCombo->insertItem(noMap, QString("%1").arg(time)); + m_gridUnitCombo->insertItem(noMap, TQString("%1").arg(time)); + m_notationUnitCombo->insertItem(noMap, TQString("%1").arg(time)); } if (m_standardQuantizations[i] == defaultUnit) { @@ -298,14 +298,14 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, } for (int i = -100; i <= 200; i += 10) { - m_swingCombo->insertItem(i == 0 ? i18n("None") : QString("%1%").arg(i)); + m_swingCombo->insertItem(i == 0 ? i18n("None") : TQString("%1%").arg(i)); if (i == defaultSwing) m_swingCombo->setCurrentItem(m_swingCombo->count() - 1); } for (int i = 10; i <= 100; i += 10) { m_iterativeCombo->insertItem(i == 100 ? i18n("Full quantize") : - QString("%1%").arg(i)); + TQString("%1%").arg(i)); if (i == defaultIterate) m_iterativeCombo->setCurrentItem(m_iterativeCombo->count() - 1); } @@ -337,7 +337,7 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, break; } - connect(m_typeCombo, SIGNAL(activated(int)), SLOT(slotTypeChanged(int))); + connect(m_typeCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int))); } Quantizer * diff --git a/src/gui/widgets/QuantizeParameters.h b/src/gui/widgets/QuantizeParameters.h index 8eee7ff..8efd0c5 100644 --- a/src/gui/widgets/QuantizeParameters.h +++ b/src/gui/widgets/QuantizeParameters.h @@ -26,18 +26,18 @@ #ifndef _RG_ROSEGARDENQUANTIZEPARAMETERS_H_ #define _RG_ROSEGARDENQUANTIZEPARAMETERS_H_ -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -#include <qgroupbox.h> +#include <tqgroupbox.h> -class QWidget; -class QPushButton; -class QLabel; -class QGridLayout; -class QCheckBox; +class TQWidget; +class TQPushButton; +class TQLabel; +class TQGridLayout; +class TQCheckBox; class KComboBox; @@ -53,12 +53,12 @@ class QuantizeParameters : public QFrame public: enum QuantizerType { Grid, Legato, Notation }; - QuantizeParameters(QWidget *parent, + QuantizeParameters(TQWidget *parent, QuantizerType defaultQuantizer, bool showNotationOption, bool showAdvancedButton, - QString configCategory, - QString preamble = 0); + TQString configCategory, + TQString preamble = 0); /** * Returned quantizer object is on heap -- caller must delete. @@ -66,7 +66,7 @@ public: */ Quantizer *getQuantizer() const; - QWidget *getAdvancedWidget() { return m_postProcessingBox; } + TQWidget *getAdvancedWidget() { return m_postProcessingBox; } bool shouldRebeam() const { return m_rebeam; } bool shouldDeCounterpoint() const { return m_deCounterpoint; } @@ -79,35 +79,35 @@ public slots: void slotAdvancedChanged(); protected: - QString m_configCategory; + TQString m_configCategory; std::vector<timeT> m_standardQuantizations; - QGridLayout *m_mainLayout; + TQGridLayout *m_mainLayout; KComboBox *m_typeCombo; - QGroupBox *m_gridBox; - QCheckBox *m_durationCheckBox; + TQGroupBox *m_gridBox; + TQCheckBox *m_durationCheckBox; KComboBox *m_gridUnitCombo; - QLabel *m_swingLabel; + TQLabel *m_swingLabel; KComboBox *m_swingCombo; - QLabel *m_iterativeLabel; + TQLabel *m_iterativeLabel; KComboBox *m_iterativeCombo; - QGroupBox *m_notationBox; - QCheckBox *m_notationTarget; + TQGroupBox *m_notationBox; + TQCheckBox *m_notationTarget; KComboBox *m_notationUnitCombo; KComboBox *m_simplicityCombo; KComboBox *m_maxTuplet; - QCheckBox *m_counterpoint; - - QPushButton *m_advancedButton; - QGroupBox *m_postProcessingBox; - QCheckBox *m_articulate; - QCheckBox *m_makeViable; - QCheckBox *m_deCounterpoint; - QCheckBox *m_rebeam; + TQCheckBox *m_counterpoint; + + TQPushButton *m_advancedButton; + TQGroupBox *m_postProcessingBox; + TQCheckBox *m_articulate; + TQCheckBox *m_makeViable; + TQCheckBox *m_deCounterpoint; + TQCheckBox *m_rebeam; }; diff --git a/src/gui/widgets/RosegardenPopupMenu.h b/src/gui/widgets/RosegardenPopupMenu.h index aca82a9..8bc81cb 100644 --- a/src/gui/widgets/RosegardenPopupMenu.h +++ b/src/gui/widgets/RosegardenPopupMenu.h @@ -25,7 +25,7 @@ #ifndef _RG_ROSEGARDENPOPUPMENU_H_ #define _RG_ROSEGARDENPOPUPMENU_H_ -#include <qpopupmenu.h> +#include <tqpopupmenu.h> namespace Rosegarden { @@ -33,8 +33,8 @@ class RosegardenPopupMenu : public QPopupMenu { // just to make itemHeight public public: - RosegardenPopupMenu(QWidget *parent) : QPopupMenu(parent) { } - using QPopupMenu::itemHeight; + RosegardenPopupMenu(TQWidget *parent) : TQPopupMenu(parent) { } + using TQPopupMenu::itemHeight; }; diff --git a/src/gui/widgets/Rotary.cpp b/src/gui/widgets/Rotary.cpp index 36d5817..f7cd1ec 100644 --- a/src/gui/widgets/Rotary.cpp +++ b/src/gui/widgets/Rotary.cpp @@ -31,19 +31,19 @@ #include "TextFloat.h" #include <kapplication.h> #include <klocale.h> -#include <qbrush.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qstring.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqwidget.h> #include <cmath> @@ -55,12 +55,12 @@ namespace Rosegarden #define ROTARY_RANGE (ROTARY_MAX - ROTARY_MIN) static TextFloat* _float = 0; -static QTimer *_floatTimer = 0; +static TQTimer *_floatTimer = 0; Rotary::PixmapCache Rotary::m_pixmaps; -Rotary::Rotary(QWidget *parent, +Rotary::Rotary(TQWidget *parent, float minValue, float maxValue, float step, @@ -71,7 +71,7 @@ Rotary::Rotary(QWidget *parent, bool snapToTicks, bool centred, bool logarithmic) : - QWidget(parent), + TQWidget(parent), m_minValue(minValue), m_maxValue(maxValue), m_step(step), @@ -95,15 +95,15 @@ Rotary::Rotary(QWidget *parent, _float = new TextFloat(this); if (!_floatTimer) { - _floatTimer = new QTimer(); + _floatTimer = new TQTimer(); } // connect timer - connect(_floatTimer, SIGNAL(timeout()), this, - SLOT(slotFloatTimeout())); + connect(_floatTimer, TQT_SIGNAL(timeout()), this, + TQT_SLOT(slotFloatTimeout())); _float->hide(); - QToolTip::add + TQToolTip::add (this, i18n("Click and drag up and down or left and right to modify.\nDouble click to edit value directly.")); setFixedSize(size, size); @@ -115,8 +115,8 @@ Rotary::~Rotary() { // Remove this connection // - disconnect(_floatTimer, SIGNAL(timeout()), this, - SLOT(slotFloatTimeout())); + disconnect(_floatTimer, TQT_SIGNAL(timeout()), this, + TQT_SLOT(slotFloatTimeout())); delete _float; _float = 0; @@ -130,16 +130,16 @@ Rotary::slotFloatTimeout() } void -Rotary::setKnobColour(const QColor &colour) +Rotary::setKnobColour(const TQColor &colour) { m_knobColour = colour; repaint(); } void -Rotary::paintEvent(QPaintEvent *) +Rotary::paintEvent(TQPaintEvent *) { - QPainter paint; + TQPainter paint; double angle = ROTARY_MIN // offset + (ROTARY_RANGE * @@ -178,12 +178,12 @@ Rotary::paintEvent(QPaintEvent *) int scale = 4; int width = m_size * scale; - QPixmap map(width, width); + TQPixmap map(width, width); map.fill(paletteBackgroundColor()); paint.begin(&map); - QPen pen; - pen.setColor(kapp->palette().color(QPalette::Active, QColorGroup::Dark)); + TQPen pen; + pen.setColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); pen.setWidth(scale); paint.setPen(pen); @@ -191,10 +191,10 @@ Rotary::paintEvent(QPaintEvent *) paint.setBrush(m_knobColour); } else { paint.setBrush( - kapp->palette().color(QPalette::Active, QColorGroup::Base)); + kapp->palette().color(TQPalette::Active, TQColorGroup::Base)); } - QColor c(m_knobColour); + TQColor c(m_knobColour); pen.setColor(c); paint.setPen(pen); @@ -221,7 +221,7 @@ Rotary::paintEvent(QPaintEvent *) --darkWidth; } - paint.setBrush(QBrush::NoBrush); + paint.setBrush(TQBrush::NoBrush); pen.setColor(colorGroup().dark()); pen.setWidth(scale); @@ -296,15 +296,15 @@ Rotary::paintEvent(QPaintEvent *) paint.end(); - QImage i = map.convertToImage().smoothScale(m_size, m_size); - m_pixmaps[index] = QPixmap(i); + TQImage i = map.convertToImage().smoothScale(m_size, m_size); + m_pixmaps[index] = TQPixmap(i); paint.begin(this); paint.drawPixmap(0, 0, m_pixmaps[index]); paint.end(); } void -Rotary::drawTick(QPainter &paint, double angle, int size, bool internal) +Rotary::drawTick(TQPainter &paint, double angle, int size, bool internal) { double hyp = double(size) / 2.0; double x0 = hyp - (hyp - 1) * sin(angle); @@ -371,7 +371,7 @@ Rotary::snapPosition() } void -Rotary::mousePressEvent(QMouseEvent *e) +Rotary::mousePressEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_buttonPressed = true; @@ -391,16 +391,16 @@ Rotary::mousePressEvent(QMouseEvent *e) emit valueChanged(m_snapPosition); } - QPoint totalPos = mapTo(topLevelWidget(), QPoint(0, 0)); + TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); if (!_float) _float = new TextFloat(this); _float->reparent(this); - _float->move(totalPos + QPoint(width() + 2, -height() / 2)); + _float->move(totalPos + TQPoint(width() + 2, -height() / 2)); if (m_logarithmic) { - _float->setText(QString("%1").arg(powf(10, m_position))); + _float->setText(TQString("%1").arg(powf(10, m_position))); } else { - _float->setText(QString("%1").arg(m_position)); + _float->setText(TQString("%1").arg(m_position)); } _float->show(); @@ -414,7 +414,7 @@ Rotary::mousePressEvent(QMouseEvent *e) } void -Rotary::mouseDoubleClickEvent(QMouseEvent * /*e*/) +Rotary::mouseDoubleClickEvent(TQMouseEvent * /*e*/) { float minv = m_minValue; float maxv = m_maxValue; @@ -437,7 +437,7 @@ Rotary::mouseDoubleClickEvent(QMouseEvent * /*e*/) val, step); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { float newval = dialog.getValue(); if (m_logarithmic) { if (m_position < powf(10, -10)) m_position = -10; @@ -453,7 +453,7 @@ Rotary::mouseDoubleClickEvent(QMouseEvent * /*e*/) } void -Rotary::mouseReleaseEvent(QMouseEvent *e) +Rotary::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_buttonPressed = false; @@ -468,7 +468,7 @@ Rotary::mouseReleaseEvent(QMouseEvent *e) } void -Rotary::mouseMoveEvent(QMouseEvent *e) +Rotary::mouseMoveEvent(TQMouseEvent *e) { if (m_buttonPressed) { // Dragging by x or y axis when clicked modifies value @@ -498,15 +498,15 @@ Rotary::mouseMoveEvent(QMouseEvent *e) // draw on the float text if (m_logarithmic) { - _float->setText(QString("%1").arg(powf(10, m_snapPosition))); + _float->setText(TQString("%1").arg(powf(10, m_snapPosition))); } else { - _float->setText(QString("%1").arg(m_snapPosition)); + _float->setText(TQString("%1").arg(m_snapPosition)); } } } void -Rotary::wheelEvent(QWheelEvent *e) +Rotary::wheelEvent(TQWheelEvent *e) { if (e->delta() > 0) m_position -= m_pageStep; @@ -527,17 +527,17 @@ Rotary::wheelEvent(QWheelEvent *e) // draw on the float text if (m_logarithmic) { - _float->setText(QString("%1").arg(powf(10, m_snapPosition))); + _float->setText(TQString("%1").arg(powf(10, m_snapPosition))); } else { - _float->setText(QString("%1").arg(m_snapPosition)); + _float->setText(TQString("%1").arg(m_snapPosition)); } // Reposition - we need to sum the relative positions up to the // topLevel or dialog to please move(). Move just top/right of the rotary // - QPoint totalPos = mapTo(topLevelWidget(), QPoint(0, 0)); + TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); _float->reparent(this); - _float->move(totalPos + QPoint(width() + 2, -height() / 2)); + _float->move(totalPos + TQPoint(width() + 2, -height() / 2)); _float->show(); // one shot, 500ms diff --git a/src/gui/widgets/Rotary.h b/src/gui/widgets/Rotary.h index 2efacf9..cecff8c 100644 --- a/src/gui/widgets/Rotary.h +++ b/src/gui/widgets/Rotary.h @@ -27,14 +27,14 @@ #define _RG_ROSEGARDENROTARY_H_ #include <map> -#include <qcolor.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqwidget.h> -class QWheelEvent; -class QPaintEvent; -class QPainter; -class QMouseEvent; +class TQWheelEvent; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; namespace Rosegarden @@ -55,7 +55,7 @@ public: StepTicks // end points plus every step interval }; - Rotary(QWidget *parent, + Rotary(TQWidget *parent, float minValue = 0.0, float maxValue = 100.0, float step = 1.0, @@ -89,8 +89,8 @@ public: // Set the colour of the knob // - void setKnobColour(const QColor &colour); - QColor getKnobColour() const { return m_knobColour; } + void setKnobColour(const TQColor &colour); + TQColor getKnobColour() const { return m_knobColour; } signals: void valueChanged(float); @@ -99,16 +99,16 @@ protected slots: void slotFloatTimeout(); protected: - virtual void paintEvent(QPaintEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void wheelEvent(QWheelEvent *e); + virtual void paintEvent(TQPaintEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); void snapPosition(); void drawPosition(); - void drawTick(QPainter &paint, double angle, int size, bool internal); + void drawTick(TQPainter &paint, double angle, int size, bool internal); float m_minValue; float m_maxValue; @@ -127,7 +127,7 @@ protected: int m_lastY; int m_lastX; - QColor m_knobColour; + TQColor m_knobColour; struct CacheIndex { @@ -156,7 +156,7 @@ protected: bool centred; }; - typedef std::map<CacheIndex, QPixmap> PixmapCache; + typedef std::map<CacheIndex, TQPixmap> PixmapCache; static PixmapCache m_pixmaps; }; diff --git a/src/gui/widgets/ScrollBox.cpp b/src/gui/widgets/ScrollBox.cpp index b409209..d129a08 100644 --- a/src/gui/widgets/ScrollBox.cpp +++ b/src/gui/widgets/ScrollBox.cpp @@ -29,28 +29,28 @@ #include "ScrollBox.h" -#include <qapplication.h> -#include <qframe.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqapplication.h> +#include <tqframe.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -ScrollBox::ScrollBox(QWidget* parent, SizeMode sizeMode, const char* name) : - QFrame(parent, name), +ScrollBox::ScrollBox(TQWidget* parent, SizeMode sizeMode, const char* name) : + TQFrame(parent, name), m_sizeMode(sizeMode) { setFrameStyle(Panel | Sunken); } -void ScrollBox::mousePressEvent(QMouseEvent* e) +void ScrollBox::mousePressEvent(TQMouseEvent* e) { m_mouse = e->pos(); if (e->button() == RightButton) @@ -59,7 +59,7 @@ void ScrollBox::mousePressEvent(QMouseEvent* e) emit button2Pressed(); } -void ScrollBox::mouseMoveEvent(QMouseEvent* e) +void ScrollBox::mouseMoveEvent(TQMouseEvent* e) { if (e->state() != LeftButton) return ; @@ -67,18 +67,18 @@ void ScrollBox::mouseMoveEvent(QMouseEvent* e) int dx = (e->pos().x() - m_mouse.x()) * m_pagesize.width() / width(); int dy = (e->pos().y() - m_mouse.y()) * m_pagesize.height() / height(); - emit valueChanged(QPoint(m_viewpos.x() + dx, m_viewpos.y() + dy)); + emit valueChanged(TQPoint(m_viewpos.x() + dx, m_viewpos.y() + dy)); emit valueChangedRelative(dx, dy); m_mouse = e->pos(); } -void ScrollBox::drawContents(QPainter* paint) +void ScrollBox::drawContents(TQPainter* paint) { if (m_pagesize.isEmpty()) return ; - QRect c(contentsRect()); + TQRect c(contentsRect()); paint->setPen(Qt::red); @@ -97,15 +97,15 @@ void ScrollBox::drawContents(QPainter* paint) paint->drawRect(x, y, w, h); } -void ScrollBox::setPageSize(const QSize& s) +void ScrollBox::setPageSize(const TQSize& s) { m_pagesize = s; setFixedWidth(100); setFixedHeight(100); - int maxWidth = int(QApplication::desktop()->width() * 0.75); - int maxHeight = int(QApplication::desktop()->height() * 0.75); + int maxWidth = int(TQApplication::desktop()->width() * 0.75); + int maxHeight = int(TQApplication::desktop()->height() * 0.75); if (m_sizeMode == FixWidth) { int height = s.height() * width() / s.width(); @@ -126,13 +126,13 @@ void ScrollBox::setPageSize(const QSize& s) repaint(); } -void ScrollBox::setViewSize(const QSize& s) +void ScrollBox::setViewSize(const TQSize& s) { m_viewsize = s; repaint(); } -void ScrollBox::setViewPos(const QPoint& pos) +void ScrollBox::setViewPos(const TQPoint& pos) { m_viewpos = pos; repaint(); @@ -140,17 +140,17 @@ void ScrollBox::setViewPos(const QPoint& pos) void ScrollBox::setViewX(int x) { - m_viewpos = QPoint(x, m_viewpos.y()); + m_viewpos = TQPoint(x, m_viewpos.y()); repaint(); } void ScrollBox::setViewY(int y) { - m_viewpos = QPoint(m_viewpos.x(), y); + m_viewpos = TQPoint(m_viewpos.x(), y); repaint(); } -void ScrollBox::setThumbnail(QPixmap img) +void ScrollBox::setThumbnail(TQPixmap img) { setPaletteBackgroundPixmap(img.convertToImage().smoothScale(size())); } diff --git a/src/gui/widgets/ScrollBox.h b/src/gui/widgets/ScrollBox.h index 3f8140e..ebd99a8 100644 --- a/src/gui/widgets/ScrollBox.h +++ b/src/gui/widgets/ScrollBox.h @@ -30,15 +30,15 @@ #ifndef _RG_SCROLLBOX_H_ #define _RG_SCROLLBOX_H_ -#include <qframe.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qsize.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqsize.h> -class QWidget; -class QPainter; -class QMouseEvent; +class TQWidget; +class TQPainter; +class TQMouseEvent; namespace Rosegarden @@ -51,35 +51,35 @@ class ScrollBox: public QFrame public: enum SizeMode { FixWidth, FixHeight }; - ScrollBox(QWidget *parent = 0, + ScrollBox(TQWidget *parent = 0, SizeMode mode = FixWidth, const char *name = 0); public slots: - void setPageSize(const QSize&); - void setViewSize(const QSize&); - void setViewPos(const QPoint&); - void setViewPos(int x, int y) { setViewPos(QPoint(x, y)); } + void setPageSize(const TQSize&); + void setViewSize(const TQSize&); + void setViewPos(const TQPoint&); + void setViewPos(int x, int y) { setViewPos(TQPoint(x, y)); } void setViewX(int x); void setViewY(int y); - void setThumbnail(QPixmap img); + void setThumbnail(TQPixmap img); signals: - void valueChanged(const QPoint&); + void valueChanged(const TQPoint&); void valueChangedRelative(int dx, int dy); void button2Pressed(); void button3Pressed(); protected: - void mousePressEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); - void drawContents(QPainter *); + void mousePressEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); + void drawContents(TQPainter *); private: - QPoint m_viewpos; - QPoint m_mouse; - QSize m_pagesize; - QSize m_viewsize; + TQPoint m_viewpos; + TQPoint m_mouse; + TQSize m_pagesize; + TQSize m_viewsize; SizeMode m_sizeMode; }; diff --git a/src/gui/widgets/ScrollBoxDialog.cpp b/src/gui/widgets/ScrollBoxDialog.cpp index e442985..008c868 100644 --- a/src/gui/widgets/ScrollBoxDialog.cpp +++ b/src/gui/widgets/ScrollBoxDialog.cpp @@ -27,18 +27,18 @@ #include "ScrollBox.h" #include <kdialog.h> -#include <qframe.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -ScrollBoxDialog::ScrollBoxDialog(QWidget *parent, +ScrollBoxDialog::ScrollBoxDialog(TQWidget *parent, ScrollBox::SizeMode sizeMode, const char *name, WFlags flags) : @@ -51,13 +51,13 @@ ScrollBoxDialog::~ScrollBoxDialog() { } -void ScrollBoxDialog::closeEvent(QCloseEvent *e) +void ScrollBoxDialog::closeEvent(TQCloseEvent *e) { e->accept(); emit closed(); } -void ScrollBoxDialog::setPageSize(const QSize& s) +void ScrollBoxDialog::setPageSize(const TQSize& s) { m_scrollbox->setPageSize(s); setFixedHeight(m_scrollbox->height()); diff --git a/src/gui/widgets/ScrollBoxDialog.h b/src/gui/widgets/ScrollBoxDialog.h index 8da1771..a4478c1 100644 --- a/src/gui/widgets/ScrollBoxDialog.h +++ b/src/gui/widgets/ScrollBoxDialog.h @@ -30,9 +30,9 @@ #include <kdialog.h> -class QWidget; -class QSize; -class QCloseEvent; +class TQWidget; +class TQSize; +class TQCloseEvent; namespace Rosegarden @@ -45,17 +45,17 @@ class ScrollBoxDialog : public KDialog Q_OBJECT public: - ScrollBoxDialog(QWidget *parent = 0, + ScrollBoxDialog(TQWidget *parent = 0, ScrollBox::SizeMode mode = ScrollBox::FixWidth, const char *name = 0, WFlags flags = 0); ~ScrollBoxDialog(); ScrollBox *scrollbox() { return m_scrollbox; } - void setPageSize(const QSize&); + void setPageSize(const TQSize&); protected: - virtual void closeEvent(QCloseEvent * e); + virtual void closeEvent(TQCloseEvent * e); signals: void closed(); diff --git a/src/gui/widgets/SpinBox.cpp b/src/gui/widgets/SpinBox.cpp index 10963c8..64bd300 100644 --- a/src/gui/widgets/SpinBox.cpp +++ b/src/gui/widgets/SpinBox.cpp @@ -26,22 +26,22 @@ #include "SpinBox.h" #include "misc/Strings.h" -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -SpinBox::SpinBox(QWidget *parent, const char *name): - QSpinBox(parent, name), m_doubleValue(0) +SpinBox::SpinBox(TQWidget *parent, const char *name): + TQSpinBox(parent, name), m_doubleValue(0) {} QString SpinBox::mapValueToText(int value) { - QString doubleStr; + TQString doubleStr; // Assume we want to show the precision // diff --git a/src/gui/widgets/SpinBox.h b/src/gui/widgets/SpinBox.h index a0dfffe..804935b 100644 --- a/src/gui/widgets/SpinBox.h +++ b/src/gui/widgets/SpinBox.h @@ -26,11 +26,11 @@ #ifndef _RG_ROSEGARDENSPINBOX_H_ #define _RG_ROSEGARDENSPINBOX_H_ -#include <qspinbox.h> -#include <qstring.h> +#include <tqspinbox.h> +#include <tqstring.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -47,12 +47,12 @@ class SpinBox : public QSpinBox { Q_OBJECT public: - SpinBox(QWidget *parent = 0, const char *name=0); + SpinBox(TQWidget *parent = 0, const char *name=0); double getDoubleValue() const { return m_doubleValue; } protected: - virtual QString mapValueToText (int value); + virtual TQString mapValueToText (int value); virtual int mapTextToValue(bool *ok); double m_doubleValue; diff --git a/src/gui/widgets/TextFloat.cpp b/src/gui/widgets/TextFloat.cpp index 5e3ddbc..b1f5cfd 100644 --- a/src/gui/widgets/TextFloat.cpp +++ b/src/gui/widgets/TextFloat.cpp @@ -27,20 +27,20 @@ #include <kapplication.h> #include "gui/general/GUIPalette.h" -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -TextFloat::TextFloat(QWidget *parent): - QWidget(parent, "TextFloat", +TextFloat::TextFloat(TQWidget *parent): + TQWidget(parent, "TextFloat", WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop), m_text("") { @@ -49,9 +49,9 @@ TextFloat::TextFloat(QWidget *parent): } void -TextFloat::reparent(QWidget *newParent) +TextFloat::reparent(TQWidget *newParent) { - QPoint position = newParent->pos(); + TQPoint position = newParent->pos(); // Get position and reparent to either top level or dialog // @@ -63,36 +63,36 @@ TextFloat::reparent(QWidget *newParent) // Position this widget to the right of the parent // - //move(pos + QPoint(parent->width() + 5, 5)); + //move(pos + TQPoint(parent->width() + 5, 5)); - QWidget::reparent(newParent, + TQWidget::reparent(newParent, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop, - position + QPoint(20, 5)); + position + TQPoint(20, 5)); } void -TextFloat::paintEvent(QPaintEvent *e) +TextFloat::paintEvent(TQPaintEvent *e) { - QPainter paint(this); + TQPainter paint(this); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - paint.setPen(kapp->palette().color(QPalette::Active, QColorGroup::Dark)); + paint.setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); paint.setPen(GUIPalette::getColour(GUIPalette::RotaryFloatForeground)); paint.setBrush(GUIPalette::getColour(GUIPalette::RotaryFloatBackground)); - QFontMetrics metrics(paint.fontMetrics()); + TQFontMetrics metrics(paint.fontMetrics()); - QRect r = metrics.boundingRect(0, 0, 400, 400, Qt::AlignAuto, m_text); + TQRect r = metrics.boundingRect(0, 0, 400, 400, Qt::AlignAuto, m_text); resize(r.width() + 7, r.height() + 7); paint.drawRect(0, 0, r.width() + 6, r.height() + 6); paint.setPen(Qt::black); - paint.drawText(QRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text); + paint.drawText(TQRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text); /* - QRect textBound = metrics.boundingRect(m_text); + TQRect textBound = metrics.boundingRect(m_text); resize(textBound.width() + 7, textBound.height() + 7); paint.drawRect(0, 0, textBound.width() + 6, textBound.height() + 6); @@ -103,7 +103,7 @@ TextFloat::paintEvent(QPaintEvent *e) } void -TextFloat::setText(const QString &text) +TextFloat::setText(const TQString &text) { m_text = text; repaint(); diff --git a/src/gui/widgets/TextFloat.h b/src/gui/widgets/TextFloat.h index d604a83..b9463aa 100644 --- a/src/gui/widgets/TextFloat.h +++ b/src/gui/widgets/TextFloat.h @@ -26,11 +26,11 @@ #ifndef _RG_ROSEGARDENTEXTFLOAT_H_ #define _RG_ROSEGARDENTEXTFLOAT_H_ -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -41,19 +41,19 @@ namespace Rosegarden class TextFloat : public QWidget { public: - TextFloat(QWidget *parent); + TextFloat(TQWidget *parent); virtual ~TextFloat() {;} - void setText(const QString &text); + void setText(const TQString &text); // Reparent the float correctly by context // - void reparent(QWidget *newParent); + void reparent(TQWidget *newParent); protected: - virtual void paintEvent(QPaintEvent *e); + virtual void paintEvent(TQPaintEvent *e); - QString m_text; + TQString m_text; }; diff --git a/src/gui/widgets/TimeWidget.cpp b/src/gui/widgets/TimeWidget.cpp index b9bad6f..8eced3a 100644 --- a/src/gui/widgets/TimeWidget.cpp +++ b/src/gui/widgets/TimeWidget.cpp @@ -24,7 +24,7 @@ #include "TimeWidget.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -33,27 +33,27 @@ #include "base/RealTime.h" #include "gui/editors/notation/NotationStrings.h" #include "gui/editors/notation/NotePixmapFactory.h" -#include <qcombobox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpixmap.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcombobox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpixmap.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -TimeWidget::TimeWidget(QString title, - QWidget *parent, +TimeWidget::TimeWidget(TQString title, + TQWidget *parent, Composition *composition, timeT absTime, bool editable, bool constrainToCompositionDuration) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_composition(composition), m_isDuration(false), m_constrain(constrainToCompositionDuration), @@ -64,14 +64,14 @@ TimeWidget::TimeWidget(QString title, init(editable); } -TimeWidget::TimeWidget(QString title, - QWidget *parent, +TimeWidget::TimeWidget(TQString title, + TQWidget *parent, Composition *composition, timeT startTime, timeT duration, bool editable, bool constrainToCompositionDuration) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_composition(composition), m_isDuration(true), m_constrain(constrainToCompositionDuration), @@ -92,18 +92,18 @@ TimeWidget::init(bool editable) bool savedEditable = editable; editable = true; - QFrame *frame = new QFrame(this); - QGridLayout *layout = new QGridLayout(frame, 7, 3, 5, 5); - QLabel *label = 0; + TQFrame *frame = new TQFrame(this); + TQGridLayout *layout = new TQGridLayout(frame, 7, 3, 5, 5); + TQLabel *label = 0; if (m_isDuration) { - label = new QLabel(i18n("Note:"), frame); + label = new TQLabel(i18n("Note:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 0, 0); if (editable) { - m_note = new QComboBox(frame); + m_note = new TQComboBox(frame); m_noteDurations.push_back(0); m_note->insertItem(i18n("<inexact>")); for (size_t i = 0; i < sizeof(denoms) / sizeof(denoms[0]); ++i) { @@ -116,52 +116,52 @@ TimeWidget::init(bool editable) timeT dottedDuration = duration * 3 / 2; m_noteDurations.push_back(dottedDuration); timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel + TQString label = NotationStrings::makeNoteMenuLabel (dottedDuration, false, error); - QPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(dottedDuration, error)); m_note->insertItem(pmap, label); // ignore error } m_noteDurations.push_back(duration); timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel + TQString label = NotationStrings::makeNoteMenuLabel (duration, false, error); - QPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(duration, error)); m_note->insertItem(pmap, label); // ignore error } - connect(m_note, SIGNAL(activated(int)), - this, SLOT(slotNoteChanged(int))); + connect(m_note, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotNoteChanged(int))); layout->addMultiCellWidget(m_note, 0, 0, 1, 3); } else { m_note = 0; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel + TQString label = NotationStrings::makeNoteMenuLabel (m_time, false, error); if (error != 0) label = i18n("<inexact>"); - QLineEdit *le = new QLineEdit(label, frame); + TQLineEdit *le = new TQLineEdit(label, frame); le->setReadOnly(true); layout->addMultiCellWidget(le, 0, 0, 1, 3); } - label = new QLabel(i18n("Units:"), frame); + label = new TQLabel(i18n("Units:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 0, 4); if (editable) { - m_timeT = new QSpinBox(frame); + m_timeT = new TQSpinBox(frame); m_timeT->setLineStep (Note(Note::Shortest).getDuration()); - connect(m_timeT, SIGNAL(valueChanged(int)), - this, SLOT(slotTimeTChanged(int))); + connect(m_timeT, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotTimeTChanged(int))); layout->addWidget(m_timeT, 0, 5); } else { m_timeT = 0; - QLineEdit *le = new QLineEdit(QString("%1").arg(m_time), frame); + TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame); le->setReadOnly(true); layout->addWidget(le, 0, 5); } @@ -170,64 +170,64 @@ TimeWidget::init(bool editable) m_note = 0; - label = new QLabel(i18n("Time:"), frame); + label = new TQLabel(i18n("Time:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 0, 0); if (editable) { - m_timeT = new QSpinBox(frame); + m_timeT = new TQSpinBox(frame); m_timeT->setLineStep (Note(Note::Shortest).getDuration()); - connect(m_timeT, SIGNAL(valueChanged(int)), - this, SLOT(slotTimeTChanged(int))); + connect(m_timeT, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotTimeTChanged(int))); layout->addWidget(m_timeT, 0, 1); - layout->addWidget(new QLabel(i18n("units"), frame), 0, 2); + layout->addWidget(new TQLabel(i18n("units"), frame), 0, 2); } else { m_timeT = 0; - QLineEdit *le = new QLineEdit(QString("%1").arg(m_time), frame); + TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame); le->setReadOnly(true); layout->addWidget(le, 0, 2); } } - label = new QLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame); + label = new TQLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 1, 0); if (editable) { m_barLabel = 0; - m_bar = new QSpinBox(frame); + m_bar = new TQSpinBox(frame); if (m_isDuration) m_bar->setMinValue(0); - connect(m_bar, SIGNAL(valueChanged(int)), - this, SLOT(slotBarBeatOrFractionChanged(int))); + connect(m_bar, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); layout->addWidget(m_bar, 1, 1); } else { m_bar = 0; - m_barLabel = new QLineEdit(frame); + m_barLabel = new TQLineEdit(frame); m_barLabel->setReadOnly(true); layout->addWidget(m_barLabel, 1, 1); } - label = new QLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame); + label = new TQLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 1, 2); if (editable) { m_beatLabel = 0; - m_beat = new QSpinBox(frame); + m_beat = new TQSpinBox(frame); m_beat->setMinValue(1); - connect(m_beat, SIGNAL(valueChanged(int)), - this, SLOT(slotBarBeatOrFractionChanged(int))); + connect(m_beat, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); layout->addWidget(m_beat, 1, 3); } else { m_beat = 0; - m_beatLabel = new QLineEdit(frame); + m_beatLabel = new TQLineEdit(frame); m_beatLabel->setReadOnly(true); layout->addWidget(m_beatLabel, 1, 3); } - label = new QLabel(i18n("%1:").arg(NotationStrings::getShortNoteName + label = new TQLabel(i18n("%1:").arg(NotationStrings::getShortNoteName (Note (Note::Shortest), true)), frame); @@ -236,61 +236,61 @@ TimeWidget::init(bool editable) if (editable) { m_fractionLabel = 0; - m_fraction = new QSpinBox(frame); + m_fraction = new TQSpinBox(frame); m_fraction->setMinValue(1); - connect(m_fraction, SIGNAL(valueChanged(int)), - this, SLOT(slotBarBeatOrFractionChanged(int))); + connect(m_fraction, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); layout->addWidget(m_fraction, 1, 5); } else { m_fraction = 0; - m_fractionLabel = new QLineEdit(frame); + m_fractionLabel = new TQLineEdit(frame); m_fractionLabel->setReadOnly(true); layout->addWidget(m_fractionLabel, 1, 5); } - m_timeSig = new QLabel(frame); + m_timeSig = new TQLabel(frame); layout->addWidget(m_timeSig, 1, 6); - label = new QLabel(i18n("Seconds:"), frame); + label = new TQLabel(i18n("Seconds:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 2, 0); if (editable) { m_secLabel = 0; - m_sec = new QSpinBox(frame); + m_sec = new TQSpinBox(frame); if (m_isDuration) m_sec->setMinValue(0); - connect(m_sec, SIGNAL(valueChanged(int)), - this, SLOT(slotSecOrMSecChanged(int))); + connect(m_sec, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSecOrMSecChanged(int))); layout->addWidget(m_sec, 2, 1); } else { m_sec = 0; - m_secLabel = new QLineEdit(frame); + m_secLabel = new TQLineEdit(frame); m_secLabel->setReadOnly(true); layout->addWidget(m_secLabel, 2, 1); } - label = new QLabel(i18n("msec:"), frame); + label = new TQLabel(i18n("msec:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 2, 2); if (editable) { m_msecLabel = 0; - m_msec = new QSpinBox(frame); + m_msec = new TQSpinBox(frame); m_msec->setMinValue(0); m_msec->setLineStep(10); - connect(m_msec, SIGNAL(valueChanged(int)), - this, SLOT(slotSecOrMSecChanged(int))); + connect(m_msec, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSecOrMSecChanged(int))); layout->addWidget(m_msec, 2, 3); } else { m_msec = 0; - m_msecLabel = new QLineEdit(frame); + m_msecLabel = new TQLineEdit(frame); m_msecLabel->setReadOnly(true); layout->addWidget(m_msecLabel, 2, 3); } if (m_isDuration) { - m_tempo = new QLabel(frame); + m_tempo = new TQLabel(frame); layout->addWidget(m_tempo, 2, 6); } else { m_tempo = 0; @@ -383,7 +383,7 @@ TimeWidget::populate() } m_bar->setValue(bars); } else { - m_barLabel->setText(QString("%1").arg(bars)); + m_barLabel->setText(TQString("%1").arg(bars)); } if (m_beat) { @@ -391,7 +391,7 @@ TimeWidget::populate() m_beat->setMaxValue(timeSig.getBeatsPerBar() - 1); m_beat->setValue(beats); } else { - m_beatLabel->setText(QString("%1").arg(beats)); + m_beatLabel->setText(TQString("%1").arg(beats)); } if (m_fraction) { @@ -401,7 +401,7 @@ TimeWidget::populate() getDuration() - 1); m_fraction->setValue(hemidemis); } else { - m_fractionLabel->setText(QString("%1").arg(hemidemis)); + m_fractionLabel->setText(TQString("%1").arg(hemidemis)); } m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()). @@ -422,7 +422,7 @@ TimeWidget::populate() } m_sec->setValue(rt.sec); } else { - m_secLabel->setText(QString("%1").arg(rt.sec)); + m_secLabel->setText(TQString("%1").arg(rt.sec)); } if (m_msec) { @@ -430,7 +430,7 @@ TimeWidget::populate() m_msec->setMaxValue(999); m_msec->setValue(rt.msec()); } else { - m_msecLabel->setText(QString("%1").arg(rt.msec())); + m_msecLabel->setText(TQString("%1").arg(rt.msec())); } bool change = (m_composition->getTempoChangeNumberAt(endTime) != @@ -507,7 +507,7 @@ TimeWidget::populate() } m_bar->setValue(bar + 1); } else { - m_barLabel->setText(QString("%1").arg(bar + 1)); + m_barLabel->setText(TQString("%1").arg(bar + 1)); } if (m_beat) { @@ -515,7 +515,7 @@ TimeWidget::populate() m_beat->setMaxValue(timeSig.getBeatsPerBar()); m_beat->setValue(beat); } else { - m_beatLabel->setText(QString("%1").arg(beat)); + m_beatLabel->setText(TQString("%1").arg(beat)); } if (m_fraction) { @@ -525,7 +525,7 @@ TimeWidget::populate() getDuration() - 1); m_fraction->setValue(hemidemis); } else { - m_fractionLabel->setText(QString("%1").arg(hemidemis)); + m_fractionLabel->setText(TQString("%1").arg(hemidemis)); } m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()). @@ -543,7 +543,7 @@ TimeWidget::populate() } m_sec->setValue(rt.sec); } else { - m_secLabel->setText(QString("%1").arg(rt.sec)); + m_secLabel->setText(TQString("%1").arg(rt.sec)); } if (m_msec) { @@ -551,7 +551,7 @@ TimeWidget::populate() m_msec->setMaxValue(999); m_msec->setValue(rt.msec()); } else { - m_msecLabel->setText(QString("%1").arg(rt.msec())); + m_msecLabel->setText(TQString("%1").arg(rt.msec())); } } diff --git a/src/gui/widgets/TimeWidget.h b/src/gui/widgets/TimeWidget.h index 5ffa17a..874981d 100644 --- a/src/gui/widgets/TimeWidget.h +++ b/src/gui/widgets/TimeWidget.h @@ -27,17 +27,17 @@ #define _RG_ROSEGARDENTIMEWIDGET_H_ #include "base/RealTime.h" -#include <qgroupbox.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QSpinBox; -class QLineEdit; -class QLabel; -class QComboBox; +class TQWidget; +class TQSpinBox; +class TQLineEdit; +class TQLabel; +class TQComboBox; namespace Rosegarden @@ -53,8 +53,8 @@ public: /** * Constructor for absolute time widget */ - TimeWidget(QString title, - QWidget *parent, + TimeWidget(TQString title, + TQWidget *parent, Composition *composition, // for bar/beat/msec timeT initialTime, bool editable = true, @@ -65,8 +65,8 @@ public: * at which this duration begins, necessary so that we can show the * correct real-time (based on tempo at startTime) etc. */ - TimeWidget(QString title, - QWidget *parent, + TimeWidget(TQString title, + TQWidget *parent, Composition *composition, // for bar/beat/msec timeT startTime, timeT initialDuration, @@ -98,20 +98,20 @@ private: timeT m_startTime; timeT m_defaultTime; - QComboBox *m_note; - QSpinBox *m_timeT; - QSpinBox *m_bar; - QSpinBox *m_beat; - QSpinBox *m_fraction; - QLineEdit *m_barLabel; - QLineEdit *m_beatLabel; - QLineEdit *m_fractionLabel; - QLabel *m_timeSig; - QSpinBox *m_sec; - QSpinBox *m_msec; - QLineEdit *m_secLabel; - QLineEdit *m_msecLabel; - QLabel *m_tempo; + TQComboBox *m_note; + TQSpinBox *m_timeT; + TQSpinBox *m_bar; + TQSpinBox *m_beat; + TQSpinBox *m_fraction; + TQLineEdit *m_barLabel; + TQLineEdit *m_beatLabel; + TQLineEdit *m_fractionLabel; + TQLabel *m_timeSig; + TQSpinBox *m_sec; + TQSpinBox *m_msec; + TQLineEdit *m_secLabel; + TQLineEdit *m_msecLabel; + TQLabel *m_tempo; void init(bool editable); void populate(); diff --git a/src/gui/widgets/TristateCheckBox.cpp b/src/gui/widgets/TristateCheckBox.cpp index 89ade5d..df52362 100644 --- a/src/gui/widgets/TristateCheckBox.cpp +++ b/src/gui/widgets/TristateCheckBox.cpp @@ -25,15 +25,15 @@ #include "TristateCheckBox.h" -#include <qcheckbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqwidget.h> namespace Rosegarden { void -TristateCheckBox::mouseReleaseEvent(QMouseEvent *) +TristateCheckBox::mouseReleaseEvent(TQMouseEvent *) {} TristateCheckBox::~TristateCheckBox() diff --git a/src/gui/widgets/TristateCheckBox.h b/src/gui/widgets/TristateCheckBox.h index 699252a..30e7db0 100644 --- a/src/gui/widgets/TristateCheckBox.h +++ b/src/gui/widgets/TristateCheckBox.h @@ -26,11 +26,11 @@ #ifndef _RG_ROSEGARDENTRISTATECHECKBOX_H_ #define _RG_ROSEGARDENTRISTATECHECKBOX_H_ -#include <qcheckbox.h> +#include <tqcheckbox.h> -class QWidget; -class QMouseEvent; +class TQWidget; +class TQMouseEvent; namespace Rosegarden @@ -46,15 +46,15 @@ class TristateCheckBox : public QCheckBox { Q_OBJECT public: - TristateCheckBox(QWidget *parent=0, - const char *name=0):QCheckBox(parent, name) + TristateCheckBox(TQWidget *parent=0, + const char *name=0):TQCheckBox(parent, name) { setTristate(true) ;} virtual ~TristateCheckBox(); protected: // don't emit when the button is released - virtual void mouseReleaseEvent(QMouseEvent *); + virtual void mouseReleaseEvent(TQMouseEvent *); private: }; diff --git a/src/gui/widgets/VUMeter.cpp b/src/gui/widgets/VUMeter.cpp index ae9fe84..1a6d90d 100644 --- a/src/gui/widgets/VUMeter.cpp +++ b/src/gui/widgets/VUMeter.cpp @@ -29,18 +29,18 @@ #include "base/AudioLevel.h" #include "gui/general/GUIPalette.h" #include "gui/rulers/VelocityColour.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden { -VUMeter::VUMeter(QWidget *parent, +VUMeter::VUMeter(TQWidget *parent, VUMeterType type, bool stereo, bool hasRecord, @@ -48,7 +48,7 @@ VUMeter::VUMeter(QWidget *parent, int height, VUAlignment alignment, const char *name): - QLabel(parent, name), + TQLabel(parent, name), m_originalHeight(height), m_active(true), m_type(type), @@ -92,28 +92,28 @@ VUMeter::VUMeter(QWidget *parent, // Always init the left fall timer // - m_fallTimerLeft = new QTimer(); + m_fallTimerLeft = new TQTimer(); - connect(m_fallTimerLeft, SIGNAL(timeout()), - this, SLOT(slotReduceLevelLeft())); + connect(m_fallTimerLeft, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotReduceLevelLeft())); if (m_showPeakLevel) { - m_peakTimerLeft = new QTimer(); + m_peakTimerLeft = new TQTimer(); - connect(m_peakTimerLeft, SIGNAL(timeout()), - this, SLOT(slotStopShowingPeakLeft())); + connect(m_peakTimerLeft, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotStopShowingPeakLeft())); } if (stereo) { - m_fallTimerRight = new QTimer(); + m_fallTimerRight = new TQTimer(); - connect(m_fallTimerRight, SIGNAL(timeout()), - this, SLOT(slotReduceLevelRight())); + connect(m_fallTimerRight, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotReduceLevelRight())); if (m_showPeakLevel) { - m_peakTimerRight = new QTimer(); - connect(m_peakTimerRight, SIGNAL(timeout()), - this, SLOT(slotStopShowingPeakRight())); + m_peakTimerRight = new TQTimer(); + connect(m_peakTimerRight, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotStopShowingPeakRight())); } } @@ -133,22 +133,22 @@ VUMeter::VUMeter(QWidget *parent, red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::ShortFader); orange = AudioLevel::dB_to_fader( -2.0, max, AudioLevel::ShortFader); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::ShortFader); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldLong) { red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::LongFader); orange = AudioLevel::dB_to_fader( -2.0, max, AudioLevel::LongFader); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::LongFader); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldIEC) { red = AudioLevel::dB_to_fader( -0.1, max, AudioLevel::IEC268Meter); orange = AudioLevel::dB_to_fader( -6.0, max, AudioLevel::IEC268Meter); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::IEC268Meter); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldIECLong) { red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::IEC268LongMeter); orange = AudioLevel::dB_to_fader( -6.0, max, AudioLevel::IEC268LongMeter); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::IEC268LongMeter); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else { red = max * 92 / 100; orange = max * 60 / 100; @@ -315,16 +315,16 @@ VUMeter::setLevel(double leftLevel, double rightLevel, bool record) } if (m_active) { - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } } void -VUMeter::paintEvent(QPaintEvent *e) +VUMeter::paintEvent(TQPaintEvent *e) { // RG_DEBUG << "VUMeter::paintEvent - height = " << height() << endl; - QPainter paint(this); + TQPainter paint(this); if (m_type == VUMeter::AudioPeakHoldShort || m_type == VUMeter::AudioPeakHoldLong || @@ -368,7 +368,7 @@ VUMeter::paintEvent(QPaintEvent *e) } void -VUMeter::drawColouredBar(QPainter *paint, int channel, +VUMeter::drawColouredBar(TQPainter *paint, int channel, int x, int y, int w, int h) { if (m_type == AudioPeakHoldLong || @@ -384,14 +384,14 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { if (h > loud) { paint->setPen(m_velocityColour->getLoudColour()); - paint->setBrush(QBrush(m_velocityColour->getLoudColour(), + paint->setBrush(TQBrush(m_velocityColour->getLoudColour(), style)); paint->drawRect(x, y, w, h - loud); } } else { if (w > loud) { paint->setPen(m_velocityColour->getLoudColour()); - paint->setBrush(QBrush(m_velocityColour->getLoudColour(), + paint->setBrush(TQBrush(m_velocityColour->getLoudColour(), style)); paint->drawRect(x + loud, y, w - loud, h); } @@ -400,7 +400,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { if (h > medium) { paint->setPen(m_velocityColour->getMediumColour()); - paint->setBrush(QBrush(m_velocityColour->getMediumColour(), + paint->setBrush(TQBrush(m_velocityColour->getMediumColour(), style)); paint->drawRect(x, y + (h > loud ? (h - loud) : 0), w, std::min(h - medium, loud - medium)); @@ -408,7 +408,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, } else { if (w > medium) { paint->setPen(m_velocityColour->getMediumColour()); - paint->setBrush(QBrush(m_velocityColour->getMediumColour(), + paint->setBrush(TQBrush(m_velocityColour->getMediumColour(), style)); paint->drawRect(x + medium, y, std::min(w - medium, loud - medium), h); @@ -417,13 +417,13 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { paint->setPen(m_velocityColour->getQuietColour()); - paint->setBrush(QBrush(m_velocityColour->getQuietColour(), + paint->setBrush(TQBrush(m_velocityColour->getQuietColour(), style)); paint->drawRect(x, y + (h > medium ? (h - medium) : 0), w, std::min(h, medium)); } else { paint->setPen(m_velocityColour->getQuietColour()); - paint->setBrush(QBrush(m_velocityColour->getQuietColour(), + paint->setBrush(TQBrush(m_velocityColour->getQuietColour(), style)); paint->drawRect(x, y, std::min(w, medium), h); } @@ -432,14 +432,14 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (channel == 0) { - QColor mixedColour = m_velocityColour->getColour(m_levelLeft); + TQColor mixedColour = m_velocityColour->getColour(m_levelLeft); paint->setPen(mixedColour); paint->setBrush(mixedColour); } else { - QColor mixedColour = m_velocityColour->getColour(m_levelRight); + TQColor mixedColour = m_velocityColour->getColour(m_levelRight); paint->setPen(mixedColour); paint->setBrush(mixedColour); @@ -452,7 +452,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, } void -VUMeter::drawMeterLevel(QPainter* paint) +VUMeter::drawMeterLevel(TQPainter* paint) { int medium = m_velocityColour->getMediumKnee(), loud = m_velocityColour->getLoudKnee(); @@ -639,7 +639,7 @@ VUMeter::slotReduceLevelRight() meterStop(); } - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } @@ -674,7 +674,7 @@ VUMeter::slotReduceLevelLeft() meterStop(); } - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } diff --git a/src/gui/widgets/VUMeter.h b/src/gui/widgets/VUMeter.h index 0a06dfd..fd75b9a 100644 --- a/src/gui/widgets/VUMeter.h +++ b/src/gui/widgets/VUMeter.h @@ -26,14 +26,14 @@ #ifndef _RG_VUMETER_H_ #define _RG_VUMETER_H_ -#include <qcolor.h> -#include <qlabel.h> +#include <tqcolor.h> +#include <tqlabel.h> -class QWidget; -class QTimer; -class QPaintEvent; -class QPainter; +class TQWidget; +class TQTimer; +class TQPaintEvent; +class TQPainter; namespace Rosegarden @@ -76,13 +76,13 @@ public: void setRecordLevel(double level); void setRecordLevel(double leftLevel, double rightLevel); - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); protected: // Constructor is protected - we can only create an object // from a sub-class of this type from a sub-class. // - VUMeter(QWidget *parent = 0, + VUMeter(TQWidget *parent = 0, VUMeterType type = Plain, bool stereo = false, bool hasRecord = false, @@ -109,13 +109,13 @@ private slots: private: - void drawMeterLevel(QPainter *paint); - void drawColouredBar(QPainter *paint, int channel, + void drawMeterLevel(TQPainter *paint); + void drawColouredBar(TQPainter *paint, int channel, int x, int y, int w, int h); VUMeterType m_type; VUAlignment m_alignment; - QColor m_background; + TQColor m_background; short m_maxLevel; @@ -124,16 +124,16 @@ private: short m_peakLevelLeft; short m_levelStepLeft; short m_recordLevelStepLeft; - QTimer *m_fallTimerLeft; - QTimer *m_peakTimerLeft; + TQTimer *m_fallTimerLeft; + TQTimer *m_peakTimerLeft; short m_levelRight; short m_recordLevelRight; short m_peakLevelRight; short m_levelStepRight; short m_recordLevelStepRight; - QTimer *m_fallTimerRight; - QTimer *m_peakTimerRight; + TQTimer *m_fallTimerRight; + TQTimer *m_peakTimerRight; bool m_showPeakLevel; short m_baseLevelStep; diff --git a/src/gui/widgets/WheelyButton.cpp b/src/gui/widgets/WheelyButton.cpp index e63cb3b..527a6d0 100644 --- a/src/gui/widgets/WheelyButton.cpp +++ b/src/gui/widgets/WheelyButton.cpp @@ -25,8 +25,8 @@ #include "WheelyButton.h" -#include <qpushbutton.h> -#include <qwidget.h> +#include <tqpushbutton.h> +#include <tqwidget.h> namespace Rosegarden diff --git a/src/gui/widgets/WheelyButton.h b/src/gui/widgets/WheelyButton.h index 83de80d..050fd9b 100644 --- a/src/gui/widgets/WheelyButton.h +++ b/src/gui/widgets/WheelyButton.h @@ -26,11 +26,11 @@ #ifndef _RG_WHEELYBUTTON_H_ #define _RG_WHEELYBUTTON_H_ -#include <qpushbutton.h> +#include <tqpushbutton.h> -class QWidget; -class QWheelEvent; +class TQWidget; +class TQWheelEvent; namespace Rosegarden @@ -43,14 +43,14 @@ class WheelyButton : public QPushButton Q_OBJECT public: - WheelyButton(QWidget *w) : QPushButton(w) { } + WheelyButton(TQWidget *w) : TQPushButton(w) { } virtual ~WheelyButton() { } signals: void wheel(bool up); protected: - void wheelEvent(QWheelEvent *e) { + void wheelEvent(TQWheelEvent *e) { emit wheel(e->delta() > 0); } }; diff --git a/src/gui/widgets/ZoomSlider.cpp b/src/gui/widgets/ZoomSlider.cpp index 1986635..aff7388 100644 --- a/src/gui/widgets/ZoomSlider.cpp +++ b/src/gui/widgets/ZoomSlider.cpp @@ -25,8 +25,8 @@ #include "ZoomSlider.h" -#include <qslider.h> -#include <qwidget.h> +#include <tqslider.h> +#include <tqwidget.h> namespace Rosegarden diff --git a/src/gui/widgets/ZoomSlider.h b/src/gui/widgets/ZoomSlider.h index 635d074..9f4235a 100644 --- a/src/gui/widgets/ZoomSlider.h +++ b/src/gui/widgets/ZoomSlider.h @@ -26,12 +26,12 @@ #ifndef _RG_ZOOMSLIDER_H_ #define _RG_ZOOMSLIDER_H_ -#include <qslider.h> +#include <tqslider.h> #include <vector> class T; -class QWidget; +class TQWidget; namespace Rosegarden @@ -60,7 +60,7 @@ public: * to the user as a nice continuous range. */ ZoomSlider(const std::vector<T> &sizes, T defaultValue, - Orientation, QWidget * parent, const char * name=0); + Orientation, TQWidget * parent, const char * name=0); virtual ~ZoomSlider(); @@ -85,8 +85,8 @@ protected: template<class T> ZoomSlider<T>::ZoomSlider(const std::vector<T> &sizes, T initialSize, Orientation o, - QWidget *parent, const char *name) : - QSlider(0, sizes.size()-1, 1, + TQWidget *parent, const char *name) : + TQSlider(0, sizes.size()-1, 1, getIndex(sizes, initialSize), o, parent, name), m_sizes(sizes), m_defaultValue(initialSize) |