• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

ccdpreviewwg.h

Go to the documentation of this file.
00001 /*  CCD Preview
00002     Copyright (C) 2005 Dirk Huenniger <hunniger@cip.physik.uni-bonn.de>
00003 
00004     Adapted from streamwg by Jasem Mutlaq
00005 
00006     This application is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010     
00011  */
00012  
00013  #ifndef CCDPREVIEWWG_H
00014  #define CCDPREVIEWWG_H
00015  
00016  #include <qpixmap.h>
00017  #include <kpixmapio.h>
00018   
00019  #include "ccdpreviewui.h"
00020  #include "qframe.h"
00021  
00022 enum Pixelorder {PIXELORDER_NORMAL=1, PIXELORDER_DUAL=2};
00023 
00024  class QImage;
00025  class QSocketNotifier;
00026  class CCDVideoWG;
00027  class INDIStdDevice;
00028  class QPainter;
00029  class QVBoxLayout;
00030  
00031  class CCDPreviewWG : public CCDPreviewForm
00032  {
00033    Q_OBJECT
00034    
00035     public:
00036       CCDPreviewWG(INDIStdDevice *inStdDev, QWidget * parent =0, const char * name =0);
00037       ~CCDPreviewWG();
00038  
00039    friend class CCDVideoWG;
00040    friend class INDIStdDevice;
00041    
00042    void setColorFrame(bool color);
00043    void setCtrl(int wd, int ht,int po, int bpp, unsigned long mgd);
00044    void setCCDInfo(double in_fwhm, int in_mu);
00045    void enableStream(bool enable);
00046    
00047    bool processStream;
00048    int               streamWidth, streamHeight;
00049    CCDVideoWG       *streamFrame;
00050    bool          colorFrame;
00051    
00052    private:
00053    INDIStdDevice        *stdDev;
00054    QPixmap               playPix, pausePix, capturePix;
00055    QVBoxLayout           *videoFrameLayout;
00056    double fwhm;
00057    int mu;
00058    
00059    protected:
00060    void closeEvent ( QCloseEvent * e );
00061    void resizeEvent(QResizeEvent *ev);
00062    
00063    
00064    public slots: 
00065    void playPressed();
00066    void captureImage();
00067    void brightnessChanged(int value);
00068    void contrastChanged(int value);
00069    void gammaChanged(int value);
00070    void updateFWHM();
00071  };
00072  
00073  class CCDVideoWG : public QFrame
00074  {
00075       Q_OBJECT
00076    
00077     public:
00078       CCDVideoWG(QWidget * parent =0, const char * name =0);
00079       ~CCDVideoWG();
00080       
00081       friend class CCDPreviewWG;
00082       
00083       void newFrame(unsigned char *buffer, int buffSiz, int w, int h);
00084 
00085     private:
00086       void redrawVideoWG(void);
00087       long      totalBaseCount;
00088       QRgb              *grayTable;
00089       QImage        *streamImage;
00090       QPixmap        qPix;
00091       KPixmapIO      kPixIO;
00092       unsigned char *streamBuffer;
00093       unsigned char *displayBuffer;
00094       long  streamBufferPos;
00095       double scale,offset,gamma;  
00096       int bytesPerPixel, PixelOrder;
00097       int Width, Height;
00098       unsigned long maxGoodData;
00099     protected:
00100      void paintEvent(QPaintEvent *ev);
00101 
00102    public slots: 
00103 };
00104 
00105 #endif  //CCDPREVIEWWG

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal