summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/segment/TrackLabel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
commit458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch)
tree624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/editors/segment/TrackLabel.cpp
parent747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff)
downloadrosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz
rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/segment/TrackLabel.cpp')
-rw-r--r--src/gui/editors/segment/TrackLabel.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gui/editors/segment/TrackLabel.cpp b/src/gui/editors/segment/TrackLabel.cpp
index 9df485f..53795a7 100644
--- a/src/gui/editors/segment/TrackLabel.cpp
+++ b/src/gui/editors/segment/TrackLabel.cpp
@@ -45,9 +45,9 @@ namespace Rosegarden
TrackLabel::TrackLabel(TrackId id,
int position,
- TQWidget *parent,
+ TQWidget *tqparent,
const char *name):
- TQWidgetStack(parent, name),
+ TQWidgetStack(tqparent, name),
m_instrumentLabel(new TQLabel(this)),
m_trackLabel(new TQLabel(this)),
m_id(id),
@@ -124,18 +124,18 @@ TrackLabel::setSelected(bool on)
if (on) {
m_selected = true;
- m_instrumentLabel->setPaletteBackgroundColor(colorGroup().highlight());
- m_instrumentLabel->setPaletteForegroundColor(colorGroup().highlightedText());
- m_trackLabel->setPaletteBackgroundColor(colorGroup().highlight());
- m_trackLabel->setPaletteForegroundColor(colorGroup().highlightedText());
+ m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().highlight());
+ m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText());
+ m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().highlight());
+ m_trackLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText());
} else {
m_selected = false;
- m_instrumentLabel->setPaletteBackgroundColor(colorGroup().background());
- m_trackLabel->setPaletteBackgroundColor(colorGroup().background());
- m_instrumentLabel->setPaletteForegroundColor(colorGroup().text());
- m_trackLabel->setPaletteForegroundColor(colorGroup().text());
+ m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().background());
+ m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().background());
+ m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().text());
+ m_trackLabel->setPaletteForegroundColor(tqcolorGroup().text());
}
if (visibleWidget())
visibleWidget()->update();
@@ -144,12 +144,12 @@ TrackLabel::setSelected(bool on)
void
TrackLabel::mousePressEvent(TQMouseEvent *e)
{
- if (e->button() == RightButton) {
+ if (e->button() == Qt::RightButton) {
emit clicked();
emit changeToInstrumentList();
- } else if (e->button() == LeftButton) {
+ } else if (e->button() == Qt::LeftButton) {
// start a timer on this hold
m_pressTimer->start(200, true); // 200ms, single shot
@@ -163,7 +163,7 @@ TrackLabel::mouseReleaseEvent(TQMouseEvent *e)
if (m_pressTimer->isActive())
m_pressTimer->stop();
- if (e->button() == LeftButton) {
+ if (e->button() == Qt::LeftButton) {
emit clicked();
}
}
@@ -171,7 +171,7 @@ TrackLabel::mouseReleaseEvent(TQMouseEvent *e)
void
TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e)
{
- if (e->button() != LeftButton)
+ if (e->button() != Qt::LeftButton)
return ;
// Highlight this label alone and cheat using
@@ -186,7 +186,7 @@ TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e)
bool ok = false;
- TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK
+ TQRegExpValidator validator(TQRegExp(".*"), TQT_TQOBJECT(this)); // empty is OK
TQString newText = KLineEditDlg::getText(i18n("Change track name"),
i18n("Enter new track name"),