[Kstars-devel] KDE/kdeedu/kstars/kstars

Jasem Mutlaq mutlaqja at ikarustech.com
Mon Nov 14 14:55:40 CET 2005


SVN commit 480352 by mutlaqja:

Make some FITS files compile. Hopefully we can get a Qt4/KDE4 KDesigner
soon so we can port some of the UI files.

CCMAIL: kstars-devel at kde.org



 M  +13 -11    fitshistogram.cpp  
 M  +4 -4      fitsprocess.cpp  
 M  +1 -1      fitsprocess.h  
 M  +4 -2      fitsviewer.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/fitshistogram.cpp #480351:480352
@@ -23,13 +23,13 @@
  #include <math.h>
  #include <stdlib.h>
  
- #include <qpainter.h>
- #include <qslider.h>
- #include <qcursor.h>
- #include <qpen.h>
- #include <qpixmap.h>
- #include <qradiobutton.h>
- #include <qpushbutton.h>
+ #include <QPainter>
+ #include <QSlider>
+ #include <QCursor>
+ #include <QPen>
+ #include <QPixmap>
+ #include <QRadioButton>
+ #include <QPushButton>
 //Added by qt3to4:
 #include <QMouseEvent>
 #include <QPaintEvent>
@@ -167,10 +167,12 @@
  
  kdDebug() << "Maximum height is " << maxHeight << " -- binsize " << binSize << endl;
  
- histogram = new QPixmap(500, 150, 1);
+ //histogram = new QPixmap(500, 150, 1);
+ // Qt4 --> Qt4 port
+ histogram = new QPixmap(500, 150);
  histogram->fill(Qt::black);
  QPainter p(histogram);
- QPen pen( white, 1);
+ QPen pen( Qt::white, 1);
  p.setPen(pen);
    
  for (int i=0; i < BARS; i++)
@@ -189,11 +191,11 @@
   
   bitBlt(histFrame, 0, 0, histogram);
   
-  pen.setColor(blue);
+  pen.setColor(Qt::blue);
   p.setPen(pen);
   
   p.drawLine(xMin, height - 2, xMin, height/2 -2);
-  pen.setColor(red);
+  pen.setColor(Qt::red);
   p.setPen(pen);
   p.drawLine(xMax, 2, xMax, height/2 -2);
   
--- trunk/KDE/kdeedu/kstars/kstars/fitsprocess.cpp #480351:480352
@@ -55,7 +55,7 @@
    int nprogress = 0;
    
    /* #1 Load dark frames */
-   for (unsigned int i=0; i < darkFiles.size(); i++)
+   for (int i=0; i < darkFiles.size(); i++)
    {
      if ( (buffer = viewer->loadData(darkFiles[i].ascii(), buffer)) == NULL)
      {
@@ -69,7 +69,7 @@
    }
    
    /* Load flat frames */
-   for (unsigned int i=0; i < flatFiles.size(); i++)
+   for (int i=0; i < flatFiles.size(); i++)
    {
      if ( (buffer = viewer->loadData(flatFiles[i].ascii(), buffer)) == NULL)
      {
@@ -83,7 +83,7 @@
    }
    
    /* Load dark frames for the flat field */
-   for (unsigned int i=0; i < darkflatFiles.size(); i++)
+   for (int i=0; i < darkflatFiles.size(); i++)
    {
      if ( (buffer = viewer->loadData(darkflatFiles[i].ascii(), buffer)) == NULL)
      {
@@ -105,7 +105,7 @@
 	while ( ! darkflatFrames.isEmpty() ) delete darkflatFrames.takeFirst();
 }
  
-float * FITSProcess::combine(QList<float*> & frames, int mode)
+float * FITSProcess::combine(QList<float *> & frames, int mode)
  {
     int nframes = frames.count();
     float *dest;
--- trunk/KDE/kdeedu/kstars/kstars/fitsprocess.h #480351:480352
@@ -51,7 +51,7 @@
      float *finalFlat;
      float *finalDarkFlat;
      
-     float * combine(QList<float> & frames, int mode);
+     float * combine(QList<float *> & frames, int mode);
      void subtract(float * img1, float * img2);
      void divide(float * img1, float * img2);
      void reduce();
--- trunk/KDE/kdeedu/kstars/kstars/fitsviewer.cpp #480351:480352
@@ -51,6 +51,8 @@
 #include <math.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include <string.h>
+#include <errno.h>
 #include <netinet/in.h>
 
 #include "fitsviewer.h"
@@ -587,7 +589,7 @@
 	bitpixRec.sprintf("BITPIX  =                    %d /Modified by KStars                               ", image->bitpix);
 	bitpixRec.truncate(80);
 	
-	for (unsigned int j=0; j < record.count(); j++)
+	for (int j=0; j < record.count(); j++)
 	{
 	  recordList = record[j];
 	  
@@ -908,7 +910,7 @@
    header.headerView->setSorting(-1);
    header.headerView->setColumnAlignment(1, Qt::AlignHCenter);
    
-   for (unsigned int i=0; i < record.count(); i++)
+   for (int i=0; i < record.count(); i++)
    {
      recordList = record[i];
      //recordList = QString((char *) record);


More information about the Kstars-devel mailing list