summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/SimpleEventEditDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/SimpleEventEditDialog.cpp')
-rw-r--r--src/gui/dialogs/SimpleEventEditDialog.cpp180
1 files changed, 90 insertions, 90 deletions
diff --git a/src/gui/dialogs/SimpleEventEditDialog.cpp b/src/gui/dialogs/SimpleEventEditDialog.cpp
index ca6b76a..152748a 100644
--- a/src/gui/dialogs/SimpleEventEditDialog.cpp
+++ b/src/gui/dialogs/SimpleEventEditDialog.cpp
@@ -24,7 +24,7 @@
#include "SimpleEventEditDialog.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include "base/BaseProperties.h"
#include "base/Event.h"
@@ -39,24 +39,24 @@
#include <kdialogbase.h>
#include <kfiledialog.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qdialog.h>
-#include <qfile.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qstring.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqcheckbox.h>
+#include <tqdialog.h>
+#include <tqfile.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
namespace Rosegarden
{
-SimpleEventEditDialog::SimpleEventEditDialog(QWidget *parent,
+SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent,
RosegardenGUIDoc *doc,
const Event &event,
bool inserting) :
@@ -69,16 +69,16 @@ SimpleEventEditDialog::SimpleEventEditDialog(QWidget *parent,
m_duration(event.getDuration()),
m_modified(false)
{
- QVBox *vbox = makeVBoxMainWidget();
+ TQVBox *vbox = makeVBoxMainWidget();
- QGroupBox *groupBox = new QGroupBox
+ TQGroupBox *groupBox = new QGroupBox
(1, Horizontal, i18n("Event Properties"), vbox);
- QFrame *frame = new QFrame(groupBox);
+ TQFrame *frame = new TQFrame(groupBox);
- QGridLayout *layout = new QGridLayout(frame, 7, 3, 5, 5);
+ TQGridLayout *layout = new TQGridLayout(frame, 7, 3, 5, 5);
- layout->addWidget(new QLabel(i18n("Event type:"), frame), 0, 0);
+ layout->addWidget(new TQLabel(i18n("Event type:"), frame), 0, 0);
if (inserting) {
@@ -103,128 +103,128 @@ SimpleEventEditDialog::SimpleEventEditDialog(QWidget *parent,
// Connect up the combos
//
- connect(m_typeCombo, SIGNAL(activated(int)),
- SLOT(slotEventTypeChanged(int)));
+ connect(m_typeCombo, TQT_SIGNAL(activated(int)),
+ TQT_SLOT(slotEventTypeChanged(int)));
} else {
m_typeCombo = 0;
- m_typeLabel = new QLabel(frame);
+ m_typeLabel = new TQLabel(frame);
layout->addWidget(m_typeLabel, 0, 1);
}
- m_timeLabel = new QLabel(i18n("Absolute time:"), frame);
+ m_timeLabel = new TQLabel(i18n("Absolute time:"), frame);
layout->addWidget(m_timeLabel, 1, 0);
- m_timeSpinBox = new QSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame);
- m_timeEditButton = new QPushButton("edit", frame);
+ m_timeSpinBox = new TQSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame);
+ m_timeEditButton = new TQPushButton("edit", frame);
layout->addWidget(m_timeSpinBox, 1, 1);
layout->addWidget(m_timeEditButton, 1, 2);
- connect(m_timeSpinBox, SIGNAL(valueChanged(int)),
- SLOT(slotAbsoluteTimeChanged(int)));
- connect(m_timeEditButton, SIGNAL(released()),
- SLOT(slotEditAbsoluteTime()));
+ connect(m_timeSpinBox, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotAbsoluteTimeChanged(int)));
+ connect(m_timeEditButton, TQT_SIGNAL(released()),
+ TQT_SLOT(slotEditAbsoluteTime()));
- m_durationLabel = new QLabel(i18n("Duration:"), frame);
+ m_durationLabel = new TQLabel(i18n("Duration:"), frame);
layout->addWidget(m_durationLabel, 2, 0);
- m_durationSpinBox = new QSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame);
- m_durationEditButton = new QPushButton("edit", frame);
+ m_durationSpinBox = new TQSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame);
+ m_durationEditButton = new TQPushButton("edit", frame);
layout->addWidget(m_durationSpinBox, 2, 1);
layout->addWidget(m_durationEditButton, 2, 2);
- connect(m_durationSpinBox, SIGNAL(valueChanged(int)),
- SLOT(slotDurationChanged(int)));
- connect(m_durationEditButton, SIGNAL(released()),
- SLOT(slotEditDuration()));
+ connect(m_durationSpinBox, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotDurationChanged(int)));
+ connect(m_durationEditButton, TQT_SIGNAL(released()),
+ TQT_SLOT(slotEditDuration()));
- m_pitchLabel = new QLabel(i18n("Pitch:"), frame);
+ m_pitchLabel = new TQLabel(i18n("Pitch:"), frame);
layout->addWidget(m_pitchLabel, 3, 0);
- m_pitchSpinBox = new QSpinBox(frame);
- m_pitchEditButton = new QPushButton("edit", frame);
+ m_pitchSpinBox = new TQSpinBox(frame);
+ m_pitchEditButton = new TQPushButton("edit", frame);
layout->addWidget(m_pitchSpinBox, 3, 1);
layout->addWidget(m_pitchEditButton, 3, 2);
- connect(m_pitchSpinBox, SIGNAL(valueChanged(int)),
- SLOT(slotPitchChanged(int)));
- connect(m_pitchEditButton, SIGNAL(released()),
- SLOT(slotEditPitch()));
+ connect(m_pitchSpinBox, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotPitchChanged(int)));
+ connect(m_pitchEditButton, TQT_SIGNAL(released()),
+ TQT_SLOT(slotEditPitch()));
m_pitchSpinBox->setMinValue(MidiMinValue);
m_pitchSpinBox->setMaxValue(MidiMaxValue);
- m_controllerLabel = new QLabel(i18n("Controller name:"), frame);
- m_controllerLabelValue = new QLabel(i18n("<none>"), frame);
- m_controllerLabelValue->setAlignment(QLabel::AlignRight);
+ m_controllerLabel = new TQLabel(i18n("Controller name:"), frame);
+ m_controllerLabelValue = new TQLabel(i18n("<none>"), frame);
+ m_controllerLabelValue->setAlignment(TQLabel::AlignRight);
layout->addWidget(m_controllerLabel, 4, 0);
layout->addWidget(m_controllerLabelValue, 4, 1);
- m_velocityLabel = new QLabel(i18n("Velocity:"), frame);
+ m_velocityLabel = new TQLabel(i18n("Velocity:"), frame);
layout->addWidget(m_velocityLabel, 5, 0);
- m_velocitySpinBox = new QSpinBox(frame);
+ m_velocitySpinBox = new TQSpinBox(frame);
layout->addWidget(m_velocitySpinBox, 5, 1);
- connect(m_velocitySpinBox, SIGNAL(valueChanged(int)),
- SLOT(slotVelocityChanged(int)));
+ connect(m_velocitySpinBox, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotVelocityChanged(int)));
m_velocitySpinBox->setMinValue(MidiMinValue);
m_velocitySpinBox->setMaxValue(MidiMaxValue);
- m_metaLabel = new QLabel(i18n("Meta string:"), frame);
+ m_metaLabel = new TQLabel(i18n("Meta string:"), frame);
layout->addWidget(m_metaLabel, 6, 0);
- m_metaEdit = new QLineEdit(frame);
+ m_metaEdit = new TQLineEdit(frame);
layout->addWidget(m_metaEdit, 6, 1);
- m_sysexLoadButton = new QPushButton(i18n("Load data"), frame);
+ m_sysexLoadButton = new TQPushButton(i18n("Load data"), frame);
layout->addWidget(m_sysexLoadButton, 6, 2);
- m_sysexSaveButton = new QPushButton(i18n("Save data"), frame);
+ m_sysexSaveButton = new TQPushButton(i18n("Save data"), frame);
layout->addWidget(m_sysexSaveButton, 4, 2);
- connect(m_metaEdit, SIGNAL(textChanged(const QString &)),
- SLOT(slotMetaChanged(const QString &)));
- connect(m_sysexLoadButton, SIGNAL(released()),
- SLOT(slotSysexLoad()));
- connect(m_sysexSaveButton, SIGNAL(released()),
- SLOT(slotSysexSave()));
+ connect(m_metaEdit, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(slotMetaChanged(const TQString &)));
+ connect(m_sysexLoadButton, TQT_SIGNAL(released()),
+ TQT_SLOT(slotSysexLoad()));
+ connect(m_sysexSaveButton, TQT_SIGNAL(released()),
+ TQT_SLOT(slotSysexSave()));
m_notationGroupBox = new QGroupBox
(1, Horizontal, i18n("Notation Properties"), vbox);
- frame = new QFrame(m_notationGroupBox);
+ frame = new TQFrame(m_notationGroupBox);
- layout = new QGridLayout(frame, 3, 3, 5, 5);
+ layout = new TQGridLayout(frame, 3, 3, 5, 5);
- m_lockNotationValues = new QCheckBox(i18n("Lock to changes in performed values"), frame);
+ m_lockNotationValues = new TQCheckBox(i18n("Lock to changes in performed values"), frame);
layout->addMultiCellWidget(m_lockNotationValues, 0, 0, 0, 2);
m_lockNotationValues->setChecked(true);
- connect(m_lockNotationValues, SIGNAL(released()),
- SLOT(slotLockNotationChanged()));
+ connect(m_lockNotationValues, TQT_SIGNAL(released()),
+ TQT_SLOT(slotLockNotationChanged()));
- m_notationTimeLabel = new QLabel(i18n("Notation time:"), frame);
+ m_notationTimeLabel = new TQLabel(i18n("Notation time:"), frame);
layout->addWidget(m_notationTimeLabel, 1, 0);
- m_notationTimeSpinBox = new QSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame);
- m_notationTimeEditButton = new QPushButton("edit", frame);
+ m_notationTimeSpinBox = new TQSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame);
+ m_notationTimeEditButton = new TQPushButton("edit", frame);
layout->addWidget(m_notationTimeSpinBox, 1, 1);
layout->addWidget(m_notationTimeEditButton, 1, 2);
- connect(m_notationTimeSpinBox, SIGNAL(valueChanged(int)),
- SLOT(slotNotationAbsoluteTimeChanged(int)));
- connect(m_notationTimeEditButton, SIGNAL(released()),
- SLOT(slotEditNotationAbsoluteTime()));
+ connect(m_notationTimeSpinBox, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotNotationAbsoluteTimeChanged(int)));
+ connect(m_notationTimeEditButton, TQT_SIGNAL(released()),
+ TQT_SLOT(slotEditNotationAbsoluteTime()));
- m_notationDurationLabel = new QLabel(i18n("Notation duration:"), frame);
+ m_notationDurationLabel = new TQLabel(i18n("Notation duration:"), frame);
layout->addWidget(m_notationDurationLabel, 2, 0);
- m_notationDurationSpinBox = new QSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame);
- m_notationDurationEditButton = new QPushButton("edit", frame);
+ m_notationDurationSpinBox = new TQSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame);
+ m_notationDurationEditButton = new TQPushButton("edit", frame);
layout->addWidget(m_notationDurationSpinBox, 2, 1);
layout->addWidget(m_notationDurationEditButton, 2, 2);
- connect(m_notationDurationSpinBox, SIGNAL(valueChanged(int)),
- SLOT(slotNotationDurationChanged(int)));
- connect(m_notationDurationEditButton, SIGNAL(released()),
- SLOT(slotEditNotationDuration()));
+ connect(m_notationDurationSpinBox, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(slotNotationDurationChanged(int)));
+ connect(m_notationDurationEditButton, TQT_SIGNAL(released()),
+ TQT_SLOT(slotEditNotationDuration()));
setupForEvent();
}
@@ -478,7 +478,7 @@ SimpleEventEditDialog::setupForEvent()
m_metaLabel->setText(i18n("Data:"));
try {
SystemExclusive sysEx(m_event);
- m_controllerLabelValue->setText(QString("%1").
+ m_controllerLabelValue->setText(TQString("%1").
arg(sysEx.getRawData().length()));
m_metaEdit->setText(strtoqstr(sysEx.getHexData()));
} catch (...) {
@@ -942,7 +942,7 @@ SimpleEventEditDialog::slotVelocityChanged(int value)
}
void
-SimpleEventEditDialog::slotMetaChanged(const QString &)
+SimpleEventEditDialog::slotMetaChanged(const TQString &)
{
m_modified = true;
}
@@ -964,7 +964,7 @@ SimpleEventEditDialog::slotEditAbsoluteTime()
&m_doc->getComposition(),
m_timeSpinBox->value(),
true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
m_timeSpinBox->setValue(dialog.getTime());
}
}
@@ -976,7 +976,7 @@ SimpleEventEditDialog::slotEditNotationAbsoluteTime()
&m_doc->getComposition(),
m_notationTimeSpinBox->value(),
true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
m_notationTimeSpinBox->setValue(dialog.getTime());
}
}
@@ -989,7 +989,7 @@ SimpleEventEditDialog::slotEditDuration()
m_timeSpinBox->value(),
m_durationSpinBox->value(),
true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
m_durationSpinBox->setValue(dialog.getTime());
}
}
@@ -1002,7 +1002,7 @@ SimpleEventEditDialog::slotEditNotationDuration()
m_notationTimeSpinBox->value(),
m_notationDurationSpinBox->value(),
true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
m_notationDurationSpinBox->setValue(dialog.getTime());
}
}
@@ -1011,7 +1011,7 @@ void
SimpleEventEditDialog::slotEditPitch()
{
PitchDialog dialog(this, i18n("Edit Pitch"), m_pitchSpinBox->value());
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
m_pitchSpinBox->setValue(dialog.getPitch());
}
}
@@ -1019,13 +1019,13 @@ SimpleEventEditDialog::slotEditPitch()
void
SimpleEventEditDialog::slotSysexLoad()
{
- QString path = KFileDialog::getOpenFileName(":SYSTEMEXCLUSIVE",
+ TQString path = KFileDialog::getOpenFileName(":SYSTEMEXCLUSIVE",
i18n("*.syx|System exclusive files (*.syx)"),
this, i18n("Load System Exclusive data in File"));
if (path.isNull())
return ;
- QFile file(path);
+ TQFile file(path);
file.open(IO_ReadOnly);
std::string s;
unsigned char c;
@@ -1044,13 +1044,13 @@ SimpleEventEditDialog::slotSysexLoad()
void
SimpleEventEditDialog::slotSysexSave()
{
- QString path = KFileDialog::getSaveFileName(":SYSTEMEXCLUSIVE",
+ TQString path = KFileDialog::getSaveFileName(":SYSTEMEXCLUSIVE",
i18n("*.syx|System exclusive files (*.syx)"),
this, i18n("Save System Exclusive data to..."));
if (path.isNull())
return ;
- QFile file(path);
+ TQFile file(path);
file.open(IO_WriteOnly);
SystemExclusive sysEx(m_event);
file.writeBlock(sysEx.getRawData().c_str(), sysEx.getRawData().length());