diff options
Diffstat (limited to 'src/gui/dialogs/KeySignatureDialog.cpp')
-rw-r--r-- | src/gui/dialogs/KeySignatureDialog.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/src/gui/dialogs/KeySignatureDialog.cpp b/src/gui/dialogs/KeySignatureDialog.cpp index c703c0a..f47d71a 100644 --- a/src/gui/dialogs/KeySignatureDialog.cpp +++ b/src/gui/dialogs/KeySignatureDialog.cpp @@ -32,30 +32,30 @@ #include "gui/widgets/BigArrowButton.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qcheckbox.h> +#include <tqbuttongroup.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqcheckbox.h> #include <algorithm> namespace Rosegarden { -KeySignatureDialog::KeySignatureDialog(QWidget *parent, +KeySignatureDialog::KeySignatureDialog(TQWidget *parent, NotePixmapFactory *npf, Clef clef, Rosegarden::Key defaultKey, bool showApplyToAll, bool showConversionOptions, - QString explanatoryText) : + TQString explanatoryText) : KDialogBase(parent, 0, true, i18n("Key Change"), Ok | Cancel | Help), m_notePixmapFactory(npf), m_key(defaultKey), @@ -68,40 +68,40 @@ KeySignatureDialog::KeySignatureDialog(QWidget *parent, { setHelp("nv-signatures-key"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QHBox *keyBox = 0; - QHBox *nameBox = 0; + TQHBox *keyBox = 0; + TQHBox *nameBox = 0; - QGroupBox *keyFrame = new QGroupBox + TQGroupBox *keyFrame = new QGroupBox (1, Horizontal, i18n("Key signature"), vbox); - QGroupBox *transposeFrame = new QButtonGroup + TQGroupBox *transposeFrame = new QButtonGroup (1, Horizontal, i18n("Key transposition"), vbox); - QGroupBox *buttonFrame = new QButtonGroup + TQGroupBox *buttonFrame = new QButtonGroup (1, Horizontal, i18n("Scope"), vbox); - QButtonGroup *conversionFrame = new QButtonGroup + TQButtonGroup *conversionFrame = new QButtonGroup (1, Horizontal, i18n("Existing notes following key change"), vbox); - keyBox = new QHBox(keyFrame); - nameBox = new QHBox(keyFrame); + keyBox = new TQHBox(keyFrame); + nameBox = new TQHBox(keyFrame); - QLabel *explanatoryLabel = 0; + TQLabel *explanatoryLabel = 0; if (explanatoryText) { - explanatoryLabel = new QLabel(explanatoryText, keyFrame); + explanatoryLabel = new TQLabel(explanatoryText, keyFrame); } BigArrowButton *keyDown = new BigArrowButton(keyBox, Qt::LeftArrow); - QToolTip::add + TQToolTip::add (keyDown, i18n("Flatten")); - m_keyLabel = new QLabel(i18n("Key"), keyBox); + m_keyLabel = new TQLabel(i18n("Key"), keyBox); m_keyLabel->setAlignment(AlignVCenter | AlignHCenter); BigArrowButton *keyUp = new BigArrowButton(keyBox, Qt::RightArrow); - QToolTip::add + TQToolTip::add (keyUp, i18n("Sharpen")); m_keyCombo = new KComboBox(nameBox); @@ -120,25 +120,25 @@ KeySignatureDialog::KeySignatureDialog(QWidget *parent, m_keyLabel->setMinimumHeight(m_keyLabel->pixmap()->height()); m_yesTransposeButton = - new QRadioButton(i18n("Transpose key according to segment transposition"), + new TQRadioButton(i18n("Transpose key according to segment transposition"), transposeFrame); - QRadioButton *noTransposeButton = - new QRadioButton(i18n("Use specified key. Do not transpose"), transposeFrame); + TQRadioButton *noTransposeButton = + new TQRadioButton(i18n("Use specified key. Do not transpose"), transposeFrame); m_yesTransposeButton->setChecked(true); // just to shut up the compiler warning about unused variable: noTransposeButton->setChecked(false); if (showApplyToAll) { - QRadioButton *applyToOneButton = - new QRadioButton(i18n("Apply to current segment only"), + TQRadioButton *applyToOneButton = + new TQRadioButton(i18n("Apply to current segment only"), buttonFrame); m_applyToAllButton = - new QRadioButton(i18n("Apply to all segments at this time"), + new TQRadioButton(i18n("Apply to all segments at this time"), buttonFrame); applyToOneButton->setChecked(true); m_noPercussionCheckBox = - new QCheckBox(i18n("Exclude percussion segments"), buttonFrame); + new TQCheckBox(i18n("Exclude percussion segments"), buttonFrame); m_noPercussionCheckBox->setChecked(true); } else { @@ -164,14 +164,14 @@ KeySignatureDialog::KeySignatureDialog(QWidget *parent, conversionFrame->hide(); } - QObject::connect(keyUp, SIGNAL(clicked()), this, SLOT(slotKeyUp())); - QObject::connect(keyDown, SIGNAL(clicked()), this, SLOT(slotKeyDown())); - QObject::connect(m_keyCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotKeyNameChanged(const QString &))); - QObject::connect(m_keyCombo, SIGNAL(textChanged(const QString &)), - this, SLOT(slotKeyNameChanged(const QString &))); - QObject::connect(m_majorMinorCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotMajorMinorChanged(const QString &))); + TQObject::connect(keyUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotKeyUp())); + TQObject::connect(keyDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotKeyDown())); + TQObject::connect(m_keyCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotKeyNameChanged(const TQString &))); + TQObject::connect(m_keyCombo, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotKeyNameChanged(const TQString &))); + TQObject::connect(m_majorMinorCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotMajorMinorChanged(const TQString &))); } KeySignatureDialog::ConversionType @@ -279,7 +279,7 @@ KeySignatureDialog::regenerateKeyCombo() m_explanatoryLabel->hide(); m_ignoreComboChanges = true; - QString currentText = m_keyCombo->currentText(); + TQString currentText = m_keyCombo->currentText(); Rosegarden::Key::KeyList keys(Rosegarden::Key::getKeys(m_key.isMinor())); m_keyCombo->clear(); @@ -289,7 +289,7 @@ KeySignatureDialog::regenerateKeyCombo() for (Rosegarden::Key::KeyList::iterator i = keys.begin(); i != keys.end(); ++i) { - QString name(strtoqstr(i->getName())); + TQString name(strtoqstr(i->getName())); int space = name.find(' '); if (space > 0) name = name.left(space); @@ -324,7 +324,7 @@ void KeySignatureDialog::redrawKeyPixmap() { if (m_valid) { - QPixmap pmap = + TQPixmap pmap = NotePixmapFactory::toQPixmap(m_notePixmapFactory->makeKeyDisplayPixmap(m_key, m_clef)); m_keyLabel->setPixmap(pmap); } else { @@ -333,7 +333,7 @@ KeySignatureDialog::redrawKeyPixmap() } void -KeySignatureDialog::slotKeyNameChanged(const QString &s) +KeySignatureDialog::slotKeyNameChanged(const TQString &s) { if (m_ignoreComboChanges) return ; @@ -361,7 +361,7 @@ KeySignatureDialog::slotKeyNameChanged(const QString &s) } void -KeySignatureDialog::slotMajorMinorChanged(const QString &s) +KeySignatureDialog::slotMajorMinorChanged(const TQString &s) { if (m_ignoreComboChanges) return ; @@ -388,9 +388,9 @@ KeySignatureDialog::setValid(bool valid) } std::string -KeySignatureDialog::getKeyName(const QString &s, bool minor) +KeySignatureDialog::getKeyName(const TQString &s, bool minor) { - QString u((s.length() >= 1) ? (s.left(1).upper() + s.right(s.length() - 1)) + TQString u((s.length() >= 1) ? (s.left(1).upper() + s.right(s.length() - 1)) : s); std::string name(qstrtostr(u)); |