summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog2
-rw-r--r--muse2/muse/arranger/trackinfo.cpp6
-rw-r--r--muse2/muse/mixer/strip.cpp2
-rw-r--r--muse2/muse/track.cpp5
-rw-r--r--muse2/muse/track.h4
5 files changed, 18 insertions, 1 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index c6201cdf..d8bfa646 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,5 @@
+23.11.2010
+ - Added Track::cname(), applied to strip labels' object names, so they may be used in style sheets. (Tim)
22.11.2010
- Oops, fixed regression, marker view and cliplist crashes, removed setAttribute(Qt::WA_DeleteOnClose)
from TopWin constructor, and added it to individual TopWin sub-classes (only MidiEditor needs it). (Tim)
diff --git a/muse2/muse/arranger/trackinfo.cpp b/muse2/muse/arranger/trackinfo.cpp
index 20053d45..8437563d 100644
--- a/muse2/muse/arranger/trackinfo.cpp
+++ b/muse2/muse/arranger/trackinfo.cpp
@@ -1210,11 +1210,17 @@ void Arranger::genMidiTrackInfo()
//midiTrackInfo->trackNameLabel->setAlignment(Qt::AlignCenter | Qt::TextWordWrap | Qt::TextWrapAnywhere);
//midiTrackInfo->trackNameLabel->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
+ if(selected)
+ midiTrackInfo->trackNameLabel->setObjectName(selected->cname());
QPalette pal;
pal.setColor(midiTrackInfo->trackNameLabel->backgroundRole(), QColor(0, 160, 255)); // Med blue
midiTrackInfo->trackNameLabel->setPalette(pal);
midiTrackInfo->trackNameLabel->setWordWrap(true);
midiTrackInfo->trackNameLabel->setAutoFillBackground(true);
+ midiTrackInfo->trackNameLabel->setTextFormat(Qt::PlainText);
+ midiTrackInfo->trackNameLabel->setLineWidth(2);
+ midiTrackInfo->trackNameLabel->setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
+ midiTrackInfo->trackNameLabel->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum));
// Added by Tim. p3.3.9
setTrackInfoLabelText();
diff --git a/muse2/muse/mixer/strip.cpp b/muse2/muse/mixer/strip.cpp
index 9ddf48f9..ec092482 100644
--- a/muse2/muse/mixer/strip.cpp
+++ b/muse2/muse/mixer/strip.cpp
@@ -194,7 +194,7 @@ Strip::Strip(QWidget* parent, Track* t)
// NOTE: This was required, otherwise the strip labels have no colour in the mixer only - track info OK !
// Not sure why...
label = new QLabel(this);
-
+ label->setObjectName(track->cname());
// Moved by Tim. p3.3.9
//setLabelText();
diff --git a/muse2/muse/track.cpp b/muse2/muse/track.cpp
index 8a51062b..866fa21f 100644
--- a/muse2/muse/track.cpp
+++ b/muse2/muse/track.cpp
@@ -26,6 +26,11 @@ Track* Track::_tmpSoloChainTrack = 0;
bool Track::_tmpSoloChainDoIns = false;
bool Track::_tmpSoloChainNoDec = false;
+const char* Track::_cname[] = {
+ "Midi", "Drum", "Wave", "AudioOut", "AudioIn", "AudioGroup",
+ "AudioAux", "AudioSynth"
+ };
+
//---------------------------------------------------------
// addPortCtrlEvents
//---------------------------------------------------------
diff --git a/muse2/muse/track.h b/muse2/muse/track.h
index c0a11056..0d9c3f6e 100644
--- a/muse2/muse/track.h
+++ b/muse2/muse/track.h
@@ -89,6 +89,9 @@ class Track {
Track(const Track&, bool cloneParts);
virtual ~Track() {};
virtual Track& operator=(const Track& t);
+
+ static const char* _cname[];
+
QString comment() const { return _comment; }
void setComment(const QString& s) { _comment = s; }
@@ -117,6 +120,7 @@ class Track {
TrackType type() const { return _type; }
void setType(TrackType t) { _type = t; }
+ QString cname() const { int t = type(); return QString(_cname[t]); }
// routing
RouteList* inRoutes() { return &_inRoutes; }