• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • indi
streamwg.h
Go to the documentation of this file.
1 /* Stream Widget
2  Copyright (C) 2003 Jasem Mutlaq (mutlaqja@ikarustech.com)
3 
4  This application is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  2004-03-16: A class to handle video streaming.
10  */
11 
12  #ifndef STREAMWG_H_
13  #define STREAMWG_H_
14 
15 #include <QPixmap>
16 #include <QVBoxLayout>
17 #include <QResizeEvent>
18 #include <QPaintEvent>
19 #include <QCloseEvent>
20 #include <QVector>
21 #include <QColor>
22 
23 #include <kicon.h>
24 
25 #include "ui_streamform.h"
26 
27 
28 
29 class QImage;
30 class VideoWG;
31 class QVBoxLayout;
32 
33 class StreamWG : public QWidget, public Ui::streamForm
34 {
35  Q_OBJECT
36 
37 public:
38  explicit StreamWG(QWidget * parent =0);
39  ~StreamWG();
40 
41  friend class VideoWG;
42 
43  void setColorFrame(bool color);
44  void setSize(int wd, int ht);
45  void enableStream(bool enable);
46  bool isStreamEnabled() { return processStream; }
47  void newFrame(unsigned char *buffer, int buffSiz, int w, int h);
48  int getWidth() { return streamWidth; }
49  int getHeight() { return streamHeight; }
50 
51 
52 private:
53  bool processStream;
54  int streamWidth, streamHeight;
55  VideoWG *streamFrame;
56  bool colorFrame;
57  KIcon playPix, pausePix, capturePix;
58 
59 protected:
60  void closeEvent ( QCloseEvent * e );
61  void resizeEvent(QResizeEvent *ev);
62 
63 
64 public slots:
65  void playPressed();
66  void captureImage();
67 
68 
69 };
70 
71 class VideoWG : public QFrame
72 {
73  Q_OBJECT
74 
75 public:
76  VideoWG(QWidget * parent =0);
77  ~VideoWG();
78 
79  friend class StreamWG;
80 
81  void newFrame(unsigned char *buffer, int buffSiz, int w, int h);
82 
83 private:
84  int totalBaseCount;
85  QVector<QRgb> grayTable;
86  QImage *streamImage;
87  QPixmap kPix;
88 
89 protected:
90  void paintEvent(QPaintEvent *ev);
91 
92 };
93 
94 #endif
StreamWG::setColorFrame
void setColorFrame(bool color)
Definition: streamwg.cpp:78
VideoWG::paintEvent
void paintEvent(QPaintEvent *ev)
Definition: streamwg.cpp:223
StreamWG::closeEvent
void closeEvent(QCloseEvent *e)
Definition: streamwg.cpp:72
StreamWG
Definition: streamwg.h:33
StreamWG::newFrame
void newFrame(unsigned char *buffer, int buffSiz, int w, int h)
Definition: streamwg.cpp:133
QWidget
StreamWG::StreamWG
StreamWG(QWidget *parent=0)
Definition: streamwg.cpp:44
StreamWG::getHeight
int getHeight()
Definition: streamwg.h:49
VideoWG
Definition: streamwg.h:71
VideoWG::VideoWG
VideoWG(QWidget *parent=0)
Definition: streamwg.cpp:192
VideoWG::newFrame
void newFrame(unsigned char *buffer, int buffSiz, int w, int h)
Definition: streamwg.cpp:208
StreamWG::playPressed
void playPressed()
Definition: streamwg.cpp:117
VideoWG::~VideoWG
~VideoWG()
Definition: streamwg.cpp:202
StreamWG::~StreamWG
~StreamWG()
Definition: streamwg.cpp:67
StreamWG::getWidth
int getWidth()
Definition: streamwg.h:48
StreamWG::isStreamEnabled
bool isStreamEnabled()
Definition: streamwg.h:46
StreamWG::enableStream
void enableStream(bool enable)
Definition: streamwg.cpp:83
StreamWG::captureImage
void captureImage()
Definition: streamwg.cpp:138
StreamWG::setSize
void setSize(int wd, int ht)
Definition: streamwg.cpp:99
StreamWG::resizeEvent
void resizeEvent(QResizeEvent *ev)
Definition: streamwg.cpp:111
QFrame
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal