kwave  18.07.70
NewSignalDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  NewSignalDialog.h - dialog for the "newsignal" plugin
3  -------------------
4  begin : Wed Jul 18 2001
5  copyright : (C) 2001 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 NEW_SIGNAL_DIALOG_H
19 #define NEW_SIGNAL_DIALOG_H
20 
21 #include "config.h"
22 
23 #include <QDialog>
24 #include <QTimer>
25 #include <QWidget>
26 
27 #include "ui_NewSigDlg.h"
28 
29 #include "libkwave/Sample.h"
30 
31 class QString;
32 
33 namespace Kwave
34 {
35  class NewSignalDialog: public QDialog,
36  public Ui::NewSigDlg
37  {
38  Q_OBJECT
39  public:
49  NewSignalDialog(QWidget *parent, sample_index_t samples,
50  unsigned int rate, unsigned int bits,
51  unsigned int tracks, bool by_time);
52 
54  virtual ~NewSignalDialog() {}
55 
58 
60  double rate();
61 
63  unsigned int bitsPerSample();
64 
66  unsigned int tracks();
67 
69  bool byTime();
70 
71  private slots:
72 
77  void checkNewSampleEdit();
78 
80  void checkTimeAndLengthInfo(int);
81 
83  void rbTimeToggled(bool);
84 
86  void timeChanged(int);
87 
89  void sampleRateChanged(const QString&);
90 
92  void tracksChanged(int);
93 
95  void samplesChanged(int);
96 
98  void updateFileSize();
99 
101  void setLengthPercentage(int percent);
102 
104  void invokeHelp();
105 
106  private:
107 
114 
119  void setHMS(sample_index_t &samples);
120 
121  private:
122 
124  QTimer m_timer;
125 
128  };
129 }
130 
131 #endif /* NEW_SIGNAL_DIALOG_H */
132 
133 //***************************************************************************
134 //***************************************************************************
unsigned int bitsPerSample()
Definition: App.h:33
sample_index_t maxSamples()
quint64 sample_index_t
Definition: Sample.h:28
NewSignalDialog(QWidget *parent, sample_index_t samples, unsigned int rate, unsigned int bits, unsigned int tracks, bool by_time)
void setHMS(sample_index_t &samples)
void setLengthPercentage(int percent)
void sampleRateChanged(const QString &)
sample_index_t samples()