summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/guitar/NoteSymbols.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/guitar/NoteSymbols.cpp
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz
rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/guitar/NoteSymbols.cpp')
-rw-r--r--src/gui/editors/guitar/NoteSymbols.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/gui/editors/guitar/NoteSymbols.cpp b/src/gui/editors/guitar/NoteSymbols.cpp
index 14379de..b7ed8f4 100644
--- a/src/gui/editors/guitar/NoteSymbols.cpp
+++ b/src/gui/editors/guitar/NoteSymbols.cpp
@@ -63,10 +63,10 @@ NoteSymbols::getY ( int imgHeight, unsigned int fretNb, unsigned int nbOfFrets )
}
void
-NoteSymbols::drawMuteSymbol ( QPainter* p,
+NoteSymbols::drawMuteSymbol ( TQPainter* p,
unsigned int position ) const
{
- QRect v = p->viewport();
+ TQRect v = p->viewport();
posPair x_pos = getX ( v.width(), position, m_nbOfStrings );
unsigned int y_pos = getTopBorder( v.height() ) / 2;
@@ -89,10 +89,10 @@ NoteSymbols::drawMuteSymbol ( QPainter* p,
}
void
-NoteSymbols::drawOpenSymbol ( QPainter* p,
+NoteSymbols::drawOpenSymbol ( TQPainter* p,
unsigned int position ) const
{
- QRect v = p->viewport();
+ TQRect v = p->viewport();
posPair x_pos = getX ( v.width(), position, m_nbOfStrings );
unsigned int y_pos = getTopBorder( v.height() ) / 2;
double columnWidth = x_pos.second;
@@ -101,7 +101,7 @@ NoteSymbols::drawOpenSymbol ( QPainter* p,
//std::cout << "NoteSymbols::drawOpenSymbol - drawing Open symbol at string #" << position
//<< std::endl;
- p->setBrush( QBrush(p->brush().color(), Qt::NoBrush) );
+ p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) );
p->drawEllipse( x_pos.first - ( radius / 2 ),
y_pos - ( radius / 2 ),
radius,
@@ -109,14 +109,14 @@ NoteSymbols::drawOpenSymbol ( QPainter* p,
}
void
-NoteSymbols::drawNoteSymbol ( QPainter* p,
+NoteSymbols::drawNoteSymbol ( TQPainter* p,
unsigned int stringNb,
int fretNb,
bool transient ) const
{
// NOTATION_DEBUG << "NoteSymbols::drawNoteSymbol - string: " << stringNb << ", fret:" << fretNb << endl;
- QRect v = p->viewport();
+ TQRect v = p->viewport();
posPair x_pos = getX ( v.width(), stringNb, m_nbOfStrings );
posPair y_pos = getY ( v.height(), fretNb, m_nbOfFrets );
double columnWidth = x_pos.second;
@@ -124,10 +124,10 @@ NoteSymbols::drawNoteSymbol ( QPainter* p,
if (transient) {
radius = static_cast<unsigned int>( columnWidth /* * 0.9 */ );
- p->setBrush( QBrush(p->brush().color(), Qt::NoBrush) );
+ p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) );
} else {
radius = static_cast<unsigned int>( columnWidth * 0.7 );
- p->setBrush( QBrush(p->brush().color(), Qt::SolidPattern) );
+ p->setBrush( TQBrush(p->brush().color(), Qt::SolidPattern) );
}
int x = x_pos.first - ( radius / 2 ),
@@ -135,7 +135,7 @@ NoteSymbols::drawNoteSymbol ( QPainter* p,
// y = y_pos.first - (radius / 2) - y_pos.second + TOP_GUITAR_CHORD_MARGIN;
-// RG_DEBUG << "NoteSymbols::drawNoteSymbol : rect = " << QRect(x,y, radius, radius) << endl;
+// RG_DEBUG << "NoteSymbols::drawNoteSymbol : rect = " << TQRect(x,y, radius, radius) << endl;
p->drawEllipse( x,
y,
@@ -149,7 +149,7 @@ NoteSymbols::drawNoteSymbol ( QPainter* p,
}
void
-NoteSymbols::drawBarreSymbol ( QPainter* p,
+NoteSymbols::drawBarreSymbol ( TQPainter* p,
int fretNb,
unsigned int start,
unsigned int end ) const
@@ -160,7 +160,7 @@ NoteSymbols::drawBarreSymbol ( QPainter* p,
drawNoteSymbol ( p, start, fretNb );
if ( ( end - start ) >= 1 ) {
- QRect v = p->viewport();
+ TQRect v = p->viewport();
posPair startXPos = getX ( v.width(), start, m_nbOfStrings );
posPair endXPos = getX ( v.width(), end, m_nbOfStrings );
posPair y_pos = getY ( v.height(), fretNb, m_nbOfFrets );
@@ -177,20 +177,20 @@ NoteSymbols::drawBarreSymbol ( QPainter* p,
}
void
-NoteSymbols::drawFretNumber ( QPainter* p,
+NoteSymbols::drawFretNumber ( TQPainter* p,
unsigned int fret_num ) const
{
if ( fret_num > 1 ) {
- QRect v = p->viewport();
+ TQRect v = p->viewport();
unsigned int imgWidth = v.width();
unsigned int imgHeight = v.height();
p->save();
- QFont font;
+ TQFont font;
font.setPixelSize(getFontPixelSize(v.width(), v.height()));
p->setFont(font);
- QString tmp;
+ TQString tmp;
tmp.setNum( fret_num );
// Use NoteSymbols to grab X and Y for first fret
@@ -205,7 +205,7 @@ NoteSymbols::drawFretNumber ( QPainter* p,
}
void
-NoteSymbols::drawFrets ( QPainter* p ) const
+NoteSymbols::drawFrets ( TQPainter* p ) const
{
/*
std::cout << "NoteSymbols::drawFretHorizontalLines" << std::endl
@@ -214,7 +214,7 @@ NoteSymbols::drawFrets ( QPainter* p ) const
<< " max string: " << maxStringNum << std::endl;
*/
- QRect v = p->viewport();
+ TQRect v = p->viewport();
unsigned int imgWidth = v.width();
unsigned int imgHeight = v.height();
//unsigned int endXPos = getGuitarChordWidth(imgWidth) + getLeftBorder(imgWidth);
@@ -223,7 +223,7 @@ NoteSymbols::drawFrets ( QPainter* p ) const
unsigned int yGuitarChord = getGuitarChordHeight( imgHeight );
unsigned int rowHeight = yGuitarChord / m_nbOfFrets;
- QPen pen(p->pen());
+ TQPen pen(p->pen());
pen.setWidth(imgHeight >= 100 ? FRET_PEN_WIDTH : FRET_PEN_WIDTH / 2);
p->save();
p->setPen(pen);
@@ -239,8 +239,8 @@ NoteSymbols::drawFrets ( QPainter* p ) const
y_pos,
endXPos.first,
y_pos);
-// NOTATION_DEBUG << "NoteSymbols::drawFrets : " << QPoint(getLeftBorder(imgWidth), y_pos)
-// << " to " << QPoint(endXPos.first, y_pos) << endl;
+// NOTATION_DEBUG << "NoteSymbols::drawFrets : " << TQPoint(getLeftBorder(imgWidth), y_pos)
+// << " to " << TQPoint(endXPos.first, y_pos) << endl;
y_pos += rowHeight;
@@ -251,10 +251,10 @@ NoteSymbols::drawFrets ( QPainter* p ) const
}
void
-NoteSymbols::drawStrings ( QPainter* p ) const
+NoteSymbols::drawStrings ( TQPainter* p ) const
{
// Vertical lines
- QRect v = p->viewport();
+ TQRect v = p->viewport();
int imgHeight = v.height();
int imgWidth = v.width();
@@ -266,7 +266,7 @@ NoteSymbols::drawStrings ( QPainter* p ) const
unsigned int x_pos = (getX ( imgWidth, 0, m_nbOfStrings )).first;
- QPen pen(p->pen());
+ TQPen pen(p->pen());
pen.setWidth(imgWidth >= 100 ? STRING_PEN_WIDTH : STRING_PEN_WIDTH / 2);
p->save();
p->setPen(pen);
@@ -286,7 +286,7 @@ NoteSymbols::drawStrings ( QPainter* p ) const
}
-QRect NoteSymbols::getTransientNoteSymbolRect(QSize guitarChordSize,
+TQRect NoteSymbols::getTransientNoteSymbolRect(TQSize guitarChordSize,
unsigned int stringNb,
int fretNb) const
{
@@ -298,7 +298,7 @@ QRect NoteSymbols::getTransientNoteSymbolRect(QSize guitarChordSize,
int x = x_pos.first - ( radius / 2 ),
y = y_pos.first + ( (y_pos.second - radius) / 2) - y_pos.second + TOP_GUITAR_CHORD_MARGIN;
- return QRect(x, y, radius, radius);
+ return TQRect(x, y, radius, radius);
}
unsigned int
@@ -438,7 +438,7 @@ NoteSymbols::getFretNumber ( int imgHeight,
}
void
-NoteSymbols::drawFingeringPixmap(const Guitar::Fingering& fingering, const Guitar::NoteSymbols& noteSymbols, QPainter *p)
+NoteSymbols::drawFingeringPixmap(const Guitar::Fingering& fingering, const Guitar::NoteSymbols& noteSymbols, TQPainter *p)
{
unsigned int startFret = fingering.getStartFret();