[Kalzium] KDE/kdeedu/kalzium

Carsten Niehaus cniehaus at gmx.de
Mon Jan 2 13:21:03 CET 2006


SVN commit 493401 by cniehaus:

* Make use of the new API of KalziumPainter (QBrush). Therefore,
  now the IconicScheme works
* Install three graphics. They are just dummyfiles, I still need the
  graphics for each and every file. But at least now it is just a matter
  of drawing them and adding to kalzium/data/iconsets/school/
* Some more Qt4-includes

CCMAIL:kalzium at kde.org


 AM            data/iconsets/school/1.jpg  
 AM            data/iconsets/school/2.jpg  
 AM            data/iconsets/school/3.jpg  
 A             data/iconsets/school/Makefile.am  
 M  +3 -4      src/kalziumdataobject.cpp  
 M  +2 -4      src/kalziumschemetype.cpp  
 M  +1 -1      src/spectrumviewimpl.cpp  
 M  +8 -7      src/spectrumwidget.cpp  


** trunk/KDE/kdeedu/kalzium/data/iconsets/school/1.jpg #property svn:mime-type
   + application/octet-stream
** trunk/KDE/kdeedu/kalzium/data/iconsets/school/2.jpg #property svn:mime-type
   + application/octet-stream
** trunk/KDE/kdeedu/kalzium/data/iconsets/school/3.jpg #property svn:mime-type
   + application/octet-stream
--- trunk/KDE/kdeedu/kalzium/src/kalziumdataobject.cpp #493400:493401
@@ -58,13 +58,12 @@
 	
 	for ( int i = 0 ; i < m_numOfElements ; i++ )
 	{
+		//FIXME in case we ever get more than one theme we need
+		//a settings-dialog where we can select the different iconsets...
 		QString setname = "school";
 	
-//		QString pathname = KGlobal::dirs()->findResourceDir( "data", "kalzium/data/" ) + "kalzium/iconsets/";
+		QString pathname = KGlobal::dirs()->findResourceDir( "appdata", "data/iconsets/" ) + "data/iconsets/";
 		
-//FIXME The path is of course wrong
-		QString pathname = "/home/kde4/svn/kdeedu/kalzium/data/iconsets/";
-		
 		QString filename = pathname + setname + "/" + QString::number( i+1 ) + ".jpg";
 
 		QFile file( filename );
--- trunk/KDE/kdeedu/kalzium/src/kalziumschemetype.cpp #493400:493401
@@ -213,11 +213,9 @@
 
 QBrush KalziumIconicSchemeType::elementBrush( int el, const QRect& elrect ) const
 {
-	QLinearGradient linearGrad( elrect.topLeft(), elrect.bottomRight() );
+	QPixmap pixmap = KalziumDataObject::instance()->pixmap( el );
 	
-	linearGrad.setColorAt( 0, QColor( Qt::yellow ) );
-	linearGrad.setColorAt( 1, QColor( Qt::green ) );
-	return QBrush( linearGrad );
+	return QBrush( pixmap );
 }
 
 QColor KalziumIconicSchemeType::textColor( int el ) const
--- trunk/KDE/kdeedu/kalzium/src/spectrumviewimpl.cpp #493400:493401
@@ -12,7 +12,7 @@
  ***************************************************************************/
 #include "spectrumviewimpl.h"
 
-#include <qspinbox.h>
+#include <QSpinBox>
 
 #include <kfiledialog.h>
 #include <kguiitem.h>
--- trunk/KDE/kdeedu/kalzium/src/spectrumwidget.cpp #493400:493401
@@ -20,19 +20,20 @@
  ***************************************************************************/
 #include "spectrumwidget.h"
 #include "spectrum.h"
-#include "element.h"
 #include "kalziumutils.h"
 
+#include <element.h>
+
 #include <kdebug.h>
 #include <klocale.h>
 #include <math.h>
 
-#include <qcursor.h>
-#include <qevent.h>
-#include <qsizepolicy.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qtooltip.h>
+#include <QCursor>
+#include <QKeyEvent>
+#include <QSizePolicy>
+#include <QPainter>
+#include <QPixmap>
+#include <QToolTip>
 
 #include <qglobal.h>
 #if defined(Q_OS_SOLARIS)


More information about the Kalzium mailing list