kwave  18.07.70
SonagramWindow.h
Go to the documentation of this file.
1 /***************************************************************************
2  SonagramWindow.h - window for showing a sonagram
3  -------------------
4  begin : Fri Jul 28 2000
5  copyright : (C) 2000 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef SONAGRAM_WINDOW_H
19 #define SONAGRAM_WINDOW_H
20 
21 #include "config.h"
22 
23 #include <QTimer>
24 
25 #include <KMainWindow>
26 
27 class QBitmap;
28 class QImage;
29 
31 #define SONAGRAM_OVERVIEW_HEIGHT 30
32 
33 namespace Kwave
34 {
35 
36  class ImageView;
37  class ScaleWidget;
38 
43  class SonagramWindow: public KMainWindow
44  {
45  Q_OBJECT
46 
47  public:
48 
55  SonagramWindow(QWidget *parent, const QString &name);
56 
60  virtual ~SonagramWindow();
61 
66  void setImage(QImage image);
67 
71  void setOverView(const QImage &image);
72 
81  void insertSlice(const unsigned int slice_nr, const QByteArray &slice);
82 
83  public slots:
84 
86  void close();
87 
89  void save();
90 
92  void load();
93 
95  void toSignal();
96 
101  void setName(const QString &name);
102 
107  void setColorMode(int mode);
108 
114  void cursorPosChanged(const QPoint pos);
115 
121  void setPoints(unsigned int points);
122 
128  void setRate(double rate);
129 
130  private slots:
131 
133  void refresh_view();
134 
135  protected:
136 
138  void updateScaleWidgets();
139 
144  void adjustBrightness();
145 
157  void translatePixels2TF(const QPoint p, double *ms, double *f);
158 
159  private:
160 
162  QLabel *m_status_time;
163 
165  QLabel *m_status_freq;
166 
168  QLabel *m_status_ampl;
169 
171  QImage m_image;
172 
178 
181 
184 
186  unsigned int m_points;
187 
189  double m_rate;
190 
193 
196 
199 
201  unsigned int m_histogram[256];
202 
203  };
204 }
205 
206 #endif // _SONOGRAM_WINDOW_H_
207 
208 //***************************************************************************
209 //***************************************************************************
Kwave::ScaleWidget * m_yscale
Definition: App.h:33
Kwave::ImageView * m_view
void insertSlice(const unsigned int slice_nr, const QByteArray &slice)
void setName(const QString &name)
const char name[16]
Definition: memcpy.c:510
void setPoints(unsigned int points)
void setRate(double rate)
Kwave::ImageView * m_overview
unsigned int m_histogram[256]
void cursorPosChanged(const QPoint pos)
void setOverView(const QImage &image)
Kwave::ScaleWidget * m_xscale
SonagramWindow(QWidget *parent, const QString &name)
void setImage(QImage image)
void translatePixels2TF(const QPoint p, double *ms, double *f)
void setColorMode(int mode)