diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
commit | 4a1be16bbfafb8455b54336c4465da8f8bfe3ab6 (patch) | |
tree | 01cbdba041d5e864294909d834c1a189f0edb98b /muse2/muse/mixer | |
parent | f681783c513b54002aa4dfec2566f26bfc38689b (diff) |
ported many Qt3 methods to Qt4
Diffstat (limited to 'muse2/muse/mixer')
-rw-r--r-- | muse2/muse/mixer/astrip.cpp | 33 | ||||
-rw-r--r-- | muse2/muse/mixer/strip.cpp | 3 |
2 files changed, 28 insertions, 8 deletions
diff --git a/muse2/muse/mixer/astrip.cpp b/muse2/muse/mixer/astrip.cpp index 1c206712..1317f63d 100644 --- a/muse2/muse/mixer/astrip.cpp +++ b/muse2/muse/mixer/astrip.cpp @@ -239,9 +239,19 @@ void AudioStrip::songChanged(int val) autoType->blockSignals(true); autoType->setCurrentItem(track->automationType()); if(track->automationType() == AUTO_TOUCH || track->automationType() == AUTO_WRITE) - autoType->setPaletteBackgroundColor(Qt::red); + { + //autoType->setPaletteBackgroundColor(Qt::red); + QPalette palette; + palette.setColor(autoType->backgroundRole(), QColor(Qt::red)); + autoType->setPalette(palette); + } else - autoType->setPaletteBackgroundColor(qApp->palette().active().background()); + { + //autoType->setPaletteBackgroundColor(qApp->palette().active().background()); + QPalette palette; + palette.setColor(autoType->backgroundRole(), qApp->palette().color(QPalette::Active, QPalette::Background)); + autoType->setPalette(palette); + } autoType->blockSignals(false); } @@ -945,12 +955,21 @@ AudioStrip::AudioStrip(QWidget* parent, AudioTrack* at) //autoType->setCurrentIndex(t->automationType()); if(t->automationType() == AUTO_TOUCH || t->automationType() == AUTO_WRITE) - // FIXME: - autoType->setPaletteBackgroundColor(Qt::red); + { + // FIXME: + //autoType->setPaletteBackgroundColor(Qt::red); + QPalette palette; + palette.setColor(autoType->backgroundRole(), QColor(Qt::red)); + autoType->setPalette(palette); + } else - // FIXME: - autoType->setPaletteBackgroundColor(qApp->palette().active().background()); - + { + // FIXME: + //autoType->setPaletteBackgroundColor(qApp->palette().active().background()); + QPalette palette; + palette.setColor(autoType->backgroundRole(), qApp->palette().color(QPalette::Active, QPalette::Background)); + autoType->setPalette(palette); + } autoType->setToolTip(tr("automation type")); connect(autoType, SIGNAL(activated(int,int)), SLOT(setAutomationType(int,int))); grid->addWidget(autoType, _curGridRow++, 0, 1, 2); diff --git a/muse2/muse/mixer/strip.cpp b/muse2/muse/mixer/strip.cpp index ec092482..30515129 100644 --- a/muse2/muse/mixer/strip.cpp +++ b/muse2/muse/mixer/strip.cpp @@ -218,7 +218,8 @@ Strip::Strip(QWidget* parent, Track* t) // MusE-2 Tested: TextWrapAnywhere actually works, but in fact it takes precedence // over word wrap, so I found it is not really desirable. Maybe with a user setting... //label->setAlignment(Qt::AlignCenter | Qt::TextWordWrap | Qt::TextWrapAnywhere); - label->setAlignment(Qt::AlignCenter | Qt::TextWordWrap); + // changed by Orcan: We can't use Qt::TextWordWrap in alignment in Qt4. + label->setAlignment(Qt::AlignCenter); label->setWordWrap(true); label->setAutoFillBackground(true); label->setLineWidth(2); |