[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib
From: John Tapsell <john.tapsell () kdemail ! net>
Date: 2009-10-25 14:33:32
Message-ID: 1256481212.236139.20409.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1040080 by johnflux:
Remove setAxisFont and axisFont and instead just use font() and setFont()
M +6 -7 FancyPlotter.cc
M +2 -18 SignalPlotter.cc
M +0 -5 SignalPlotter.h
M +0 -1 SignalPlotter_p.h
--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/FancyPlotter.cc \
#1040079:1040080 @@ -134,7 +134,7 @@
mLabelLayout->setContentsMargins(0,0,0,0);
QFont font;
font.setPointSize( KSGRD::Style->fontSize() );
- mPlotter->setAxisFont( font );
+ mPlotter->setFont( font );
mPlotter->setThinFrame(!workSheetSettings);
@@ -190,7 +190,7 @@
mSettingsDialog->setShowAxis( mPlotter->showAxis() );
- mSettingsDialog->setFontSize( mPlotter->axisFont().pointSize() );
+ mSettingsDialog->setFontSize( mPlotter->font().pointSize() );
mSettingsDialog->setRangeUnits( mUnit );
mSettingsDialog->setRangeUnits( mUnit );
@@ -261,7 +261,7 @@
QFont font;
font.setPointSize( mSettingsDialog->fontSize() );
- mPlotter->setAxisFont( font );
+ mPlotter->setFont( font );
QList<int> deletedBeams = mSettingsDialog->deleted();
for ( int i =0; i < deletedBeams.count(); ++i) {
@@ -321,9 +321,9 @@
}
void FancyPlotter::applyStyle()
{
- QFont font = mPlotter->axisFont();
+ QFont font = mPlotter->font();
font.setPointSize(KSGRD::Style->fontSize() );
- mPlotter->setAxisFont( font );
+ mPlotter->setFont( font );
for ( int i = 0; i < mPlotter->numBeams() &&
(unsigned int)i < KSGRD::Style->numSensorColors(); ++i ) {
setBeamColor(i, KSGRD::Style->sensorColor(i));
@@ -708,8 +708,7 @@
if(fontsize == 0) fontsize = KSGRD::Style->fontSize();
QFont font;
font.setPointSize( fontsize );
-
- mPlotter->setAxisFont( font );
+ mPlotter->setFont( font );
}
QDomNodeList dnList = element.elementsByTagName( "beam" );
for ( int i = 0; i < dnList.count(); ++i ) {
--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc \
#1040079:1040080 @@ -422,22 +422,6 @@
return d->mShowAxis;
}
-void KSignalPlotter::setAxisFont( const QFont &font )
-{
- d->mFont = font;
- d->mBackgroundImage = QPixmap(); //we changed a paint setting, so reset the \
cache
-#ifdef USE_QIMAGE
- d->mScrollableImage = QImage();
-#else
- d->mScrollableImage = QPixmap();
-#endif
- update();
-}
-
-QFont KSignalPlotter::axisFont() const
-{
- return d->mFont;
-}
QString KSignalPlotter::svgBackground() const {
return d->mSvgFilename;
}
@@ -522,7 +506,7 @@
void KSignalPlotterPrivate::drawWidget(QPainter *p, QRect boundingBox, bool \
onlyDrawPlotter) {
if(boundingBox.height() <= 2 || boundingBox.width() <= 2 ) return;
- p->setFont( mFont );
+ p->setFont( q->font() );
int fontheight = p->fontMetrics().height();
int newHorizontalLinesCount = qBound(0, (int)(boundingBox.height() / \
fontheight)-2, 4); if(newHorizontalLinesCount != mHorizontalLinesCount) {
@@ -570,7 +554,7 @@
Q_ASSERT(!mBackgroundImage.isNull());
QPainter pCache(&mBackgroundImage);
pCache.setRenderHint(QPainter::Antialiasing, false);
- pCache.setFont( mFont );
+ pCache.setFont( q->font() );
//To paint to the cache, we need a new bounding box
QRect cacheBoundingBox = QRect(0,0,boundingBox.width(), \
boundingBox.height());
--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/SignalPlotter.h \
#1040079:1040080 @@ -331,11 +331,6 @@
* Default is true. */
bool showHorizontalLines() const;
- /** \brief Set the font used for the axis */
- void setAxisFont( const QFont &font );
- /** \brief The font used for the axis */
- QFont axisFont() const;
-
/** \brief Set whether to show the vertical axis labels.
*
* Default is true.
--- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/SignalPlotter_p.h \
#1040079:1040080 @@ -109,7 +109,6 @@
KLocalizedString mUnit;
- QFont mFont;
int mAxisTextWidth;
QRect mPlottingArea; /// The area in which the beams are drawn. Saved to make \
update() more efficient
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic