diff options
Diffstat (limited to 'src/gui/dialogs/TextEventDialog.cpp')
-rw-r--r-- | src/gui/dialogs/TextEventDialog.cpp | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/src/gui/dialogs/TextEventDialog.cpp b/src/gui/dialogs/TextEventDialog.cpp index 156b5d1..ef02fbd 100644 --- a/src/gui/dialogs/TextEventDialog.cpp +++ b/src/gui/dialogs/TextEventDialog.cpp @@ -34,23 +34,23 @@ #include <kcombobox.h> #include <kconfig.h> #include <kdialogbase.h> -#include <qbitmap.h> -#include <qgrid.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qobject.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qspinbox.h> +#include <tqbitmap.h> +#include <tqgrid.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqobject.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqspinbox.h> namespace Rosegarden { -TextEventDialog::TextEventDialog(QWidget *parent, +TextEventDialog::TextEventDialog(TQWidget *parent, NotePixmapFactory *npf, Text defaultText, int maxLength) : @@ -60,23 +60,23 @@ TextEventDialog::TextEventDialog(QWidget *parent, //m_directives(Text::getLilyPondDirectives()) */ { setHelp("nv-text"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *entryBox = new QGroupBox + TQGroupBox *entryBox = new QGroupBox (1, Horizontal, i18n("Specification"), vbox); - QGroupBox *exampleBox = new QGroupBox + TQGroupBox *exampleBox = new QGroupBox (1, Horizontal, i18n("Preview"), vbox); - QGrid *entryGrid = new QGrid(2, QGrid::Horizontal, entryBox); + TQGrid *entryGrid = new TQGrid(2, TQGrid::Horizontal, entryBox); - new QLabel(i18n("Text: "), entryGrid); - m_text = new QLineEdit(entryGrid); + new TQLabel(i18n("Text: "), entryGrid); + m_text = new TQLineEdit(entryGrid); m_text->setText(strtoqstr(defaultText.getText())); if (maxLength > 0) m_text->setMaxLength(maxLength); // style combo - new QLabel(i18n("Style: "), entryGrid); + new TQLabel(i18n("Style: "), entryGrid); m_typeCombo = new KComboBox(entryGrid); for (unsigned int i = 0; i < m_styles.size(); ++i) @@ -135,9 +135,9 @@ TextEventDialog::TextEventDialog(QWidget *parent, } } - m_verseLabel = new QLabel(i18n("Verse: "), entryGrid); + m_verseLabel = new TQLabel(i18n("Verse: "), entryGrid); m_verseLabel->hide(); - m_verseSpin = new QSpinBox(entryGrid); + m_verseSpin = new TQSpinBox(entryGrid); m_verseSpin->setMinValue(1); m_verseSpin->setMaxValue(12); m_verseSpin->setLineStep(1); @@ -145,7 +145,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_verseSpin->hide(); // dynamic shortcuts combo - m_dynamicShortcutLabel = new QLabel(i18n("Dynamic: "), entryGrid); + m_dynamicShortcutLabel = new TQLabel(i18n("Dynamic: "), entryGrid); m_dynamicShortcutLabel->hide(); m_dynamicShortcutCombo = new KComboBox(entryGrid); @@ -162,7 +162,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_dynamicShortcutCombo->hide(); // direction shortcuts combo - m_directionShortcutLabel = new QLabel(i18n("Direction: "), entryGrid); + m_directionShortcutLabel = new TQLabel(i18n("Direction: "), entryGrid); m_directionShortcutLabel->hide(); m_directionShortcutCombo = new KComboBox(entryGrid); @@ -181,7 +181,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_directionShortcutCombo->hide(); // local direction shortcuts combo - m_localDirectionShortcutLabel = new QLabel(i18n("Local Direction: "), entryGrid); + m_localDirectionShortcutLabel = new TQLabel(i18n("Local Direction: "), entryGrid); m_localDirectionShortcutLabel->hide(); m_localDirectionShortcutCombo = new KComboBox(entryGrid); @@ -207,7 +207,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_localDirectionShortcutCombo->hide(); // tempo shortcuts combo - m_tempoShortcutLabel = new QLabel(i18n("Tempo: "), entryGrid); + m_tempoShortcutLabel = new TQLabel(i18n("Tempo: "), entryGrid); m_tempoShortcutLabel->hide(); m_tempoShortcutCombo = new KComboBox(entryGrid); @@ -231,7 +231,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, // nobody is actually sure what is supposed to distinguish Tempo from // Local Tempo, or what this text style is supposed to be good for in the // way of standard notation) - m_localTempoShortcutLabel = new QLabel(i18n("Local Tempo: "), entryGrid); + m_localTempoShortcutLabel = new TQLabel(i18n("Local Tempo: "), entryGrid); m_localTempoShortcutLabel->hide(); m_localTempoShortcutCombo = new KComboBox(entryGrid); @@ -252,7 +252,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_localTempoShortcutCombo->hide(); // LilyPond directive combo - m_directiveLabel = new QLabel(i18n("Directive: "), entryGrid); + m_directiveLabel = new TQLabel(i18n("Directive: "), entryGrid); m_directiveLabel->hide(); m_lilyPondDirectiveCombo = new KComboBox(entryGrid); @@ -276,18 +276,18 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_lilyPondDirectiveCombo->insertItem(Text::Small); m_lilyPondDirectiveCombo->insertItem(Text::NormalSize); - QVBox *exampleVBox = new QVBox(exampleBox); + TQVBox *exampleVBox = new TQVBox(exampleBox); int ls = m_notePixmapFactory->getLineSpacing(); int mapWidth = 200; - QPixmap map(mapWidth, ls * 5 + 1); - QBitmap mask(mapWidth, ls * 5 + 1); + TQPixmap map(mapWidth, ls * 5 + 1); + TQBitmap mask(mapWidth, ls * 5 + 1); map.fill(); mask.fill(Qt::color0); - QPainter p, pm; + TQPainter p, pm; p.begin(&map); pm.begin(&mask); @@ -306,12 +306,12 @@ TextEventDialog::TextEventDialog(QWidget *parent, map.setMask(mask); - m_staffAboveLabel = new QLabel("staff", exampleVBox); + m_staffAboveLabel = new TQLabel("staff", exampleVBox); m_staffAboveLabel->setPixmap(map); - m_textExampleLabel = new QLabel(i18n("Example"), exampleVBox); + m_textExampleLabel = new TQLabel(i18n("Example"), exampleVBox); - m_staffBelowLabel = new QLabel("staff", exampleVBox); + m_staffBelowLabel = new TQLabel("staff", exampleVBox); m_staffBelowLabel->setPixmap(map); // restore last setting for shortcut combos @@ -329,23 +329,23 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_prevLyric = config->readEntry("previous_lyric", ""); m_prevAnnotation = config->readEntry("previous_annotation", ""); - QObject::connect(m_text, SIGNAL(textChanged(const QString &)), - this, SLOT(slotTextChanged(const QString &))); - QObject::connect(m_typeCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotTypeChanged(const QString &))); - QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotOK())); - QObject::connect(m_dynamicShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotDynamicShortcutChanged(const QString &))); - QObject::connect(m_directionShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotDirectionShortcutChanged(const QString &))); - QObject::connect(m_localDirectionShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotLocalDirectionShortcutChanged(const QString &))); - QObject::connect(m_tempoShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotTempoShortcutChanged(const QString &))); - QObject::connect(m_localTempoShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotLocalTempoShortcutChanged(const QString &))); - QObject::connect(m_lilyPondDirectiveCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotLilyPondDirectiveChanged(const QString &))); + TQObject::connect(m_text, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotTextChanged(const TQString &))); + TQObject::connect(m_typeCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotTypeChanged(const TQString &))); + TQObject::connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOK())); + TQObject::connect(m_dynamicShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotDynamicShortcutChanged(const TQString &))); + TQObject::connect(m_directionShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotDirectionShortcutChanged(const TQString &))); + TQObject::connect(m_localDirectionShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotLocalDirectionShortcutChanged(const TQString &))); + TQObject::connect(m_tempoShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotTempoShortcutChanged(const TQString &))); + TQObject::connect(m_localTempoShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotLocalTempoShortcutChanged(const TQString &))); + TQObject::connect(m_lilyPondDirectiveCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotLilyPondDirectiveChanged(const TQString &))); m_text->setFocus(); slotTypeChanged(strtoqstr(getTextType())); @@ -379,11 +379,11 @@ TextEventDialog::getTextString() const } void -TextEventDialog::slotTextChanged(const QString &qtext) +TextEventDialog::slotTextChanged(const TQString &qtext) { std::string type(getTextType()); - QString qtrunc(qtext); + TQString qtrunc(qtext); if (qtrunc.length() > 20) qtrunc = qtrunc.left(20) + "..."; std::string text(qstrtostr(qtrunc)); @@ -396,11 +396,11 @@ TextEventDialog::slotTextChanged(const QString &qtext) } void -TextEventDialog::slotTypeChanged(const QString &) +TextEventDialog::slotTypeChanged(const TQString &) { std::string type(getTextType()); - QString qtrunc(m_text->text()); + TQString qtrunc(m_text->text()); if (qtrunc.length() > 20) qtrunc = qtrunc.left(20) + "..."; std::string text(qstrtostr(qtrunc)); @@ -534,7 +534,7 @@ TextEventDialog::slotOK() } void -TextEventDialog::slotDynamicShortcutChanged(const QString &text) +TextEventDialog::slotDynamicShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_dynamicShortcutCombo->currentText())); @@ -544,7 +544,7 @@ TextEventDialog::slotDynamicShortcutChanged(const QString &text) } void -TextEventDialog::slotDirectionShortcutChanged(const QString &text) +TextEventDialog::slotDirectionShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_directionShortcutCombo->currentText())); @@ -554,7 +554,7 @@ TextEventDialog::slotDirectionShortcutChanged(const QString &text) } void -TextEventDialog::slotLocalDirectionShortcutChanged(const QString &text) +TextEventDialog::slotLocalDirectionShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_localDirectionShortcutCombo->currentText())); @@ -564,7 +564,7 @@ TextEventDialog::slotLocalDirectionShortcutChanged(const QString &text) } void -TextEventDialog::slotTempoShortcutChanged(const QString &text) +TextEventDialog::slotTempoShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_tempoShortcutCombo->currentText())); @@ -574,7 +574,7 @@ TextEventDialog::slotTempoShortcutChanged(const QString &text) } void -TextEventDialog::slotLocalTempoShortcutChanged(const QString &text) +TextEventDialog::slotLocalTempoShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_localTempoShortcutCombo->currentText())); @@ -584,7 +584,7 @@ TextEventDialog::slotLocalTempoShortcutChanged(const QString &text) } void -TextEventDialog::slotLilyPondDirectiveChanged(const QString &) +TextEventDialog::slotLilyPondDirectiveChanged(const TQString &) { m_text->setText(strtoqstr(m_lilyPondDirectiveCombo->currentText())); } |