~ubuntu-branches/ubuntu/vivid/soundscaperenderer/vivid

« back to all changes in this revision

Viewing changes to src/gui/qsourceproperties.h

  • Committer: Package Import Robot
  • Author(s): IOhannes m zmölnig (Debian/GNU)
  • Date: 2014-05-08 16:58:09 UTC
  • Revision ID: package-import@ubuntu.com-20140508165809-7tz9dhu5pvo5wy25
Tags: upstream-0.4.1~dfsg
Import upstream version 0.4.1~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 * Copyright © 2012-2014 Institut für Nachrichtentechnik, Universität Rostock *
 
3
 * Copyright © 2006-2012 Quality & Usability Lab,                             *
 
4
 *                       Telekom Innovation Laboratories, TU Berlin           *
 
5
 *                                                                            *
 
6
 * This file is part of the SoundScape Renderer (SSR).                        *
 
7
 *                                                                            *
 
8
 * The SSR is free software:  you can redistribute it and/or modify it  under *
 
9
 * the terms of the  GNU  General  Public  License  as published by the  Free *
 
10
 * Software Foundation, either version 3 of the License,  or (at your option) *
 
11
 * any later version.                                                         *
 
12
 *                                                                            *
 
13
 * The SSR is distributed in the hope that it will be useful, but WITHOUT ANY *
 
14
 * WARRANTY;  without even the implied warranty of MERCHANTABILITY or FITNESS *
 
15
 * FOR A PARTICULAR PURPOSE.                                                  *
 
16
 * See the GNU General Public License for more details.                       *
 
17
 *                                                                            *
 
18
 * You should  have received a copy  of the GNU General Public License  along *
 
19
 * with this program.  If not, see <http://www.gnu.org/licenses/>.            *
 
20
 *                                                                            *
 
21
 * The SSR is a tool  for  real-time  spatial audio reproduction  providing a *
 
22
 * variety of rendering algorithms.                                           *
 
23
 *                                                                            *
 
24
 * http://spatialaudio.net/ssr                           ssr@spatialaudio.net *
 
25
 ******************************************************************************/
 
26
 
 
27
/// @file
 
28
/// QSourceProperties
 
29
 
 
30
#ifndef SSR_QSOURCEPROPERTIES_H
 
31
#define SSR_QSOURCEPROPERTIES_H
 
32
 
 
33
#include <QFrame>
 
34
#include <QGridLayout>
 
35
#include <QCheckBox>
 
36
#include <QMouseEvent>
 
37
#include <QLineEdit>
 
38
#include <QComboBox>
 
39
#include <QRadioButton>
 
40
 
 
41
#include "qclicktextlabel.h"
 
42
#include "source.h"
 
43
 
 
44
/// QSourceProperties
 
45
class QSourceProperties : public QFrame
 
46
{
 
47
  Q_OBJECT
 
48
 
 
49
  public:
 
50
    QSourceProperties(QWidget* parent = 0);
 
51
    ~QSourceProperties();
 
52
 
 
53
    void update_displays(const Source& source, 
 
54
                         const DirectionalPoint& reference);
 
55
 
 
56
  private:
 
57
    QGridLayout*  _grid;
 
58
    QLineEdit*    _name_display;
 
59
    QLabel*       _coordinates_display;
 
60
    QLabel*       _distance_display;
 
61
    QLabel*       _azimuth_display;
 
62
    QCheckBox*    _position_fix_box;
 
63
    QCheckBox*    _doppler_box;
 
64
    QLabel*       _volume_display;
 
65
    QCheckBox*    _muted_check_box;
 
66
    QCheckBox*    _soloed_check_box;
 
67
    QRadioButton* _port_radio_button;
 
68
    QRadioButton* _file_radio_button;
 
69
 
 
70
    QLabel*      _source_model_label;
 
71
    QComboBox*   _source_model_display;
 
72
    QLabel*      _audio_source_label;
 
73
    QLineEdit*   _audio_source_display;
 
74
    QLabel*      _properties_label;
 
75
    QLineEdit*   _properties_display;
 
76
    QClickTextLabel* _create_source_button;
 
77
    QClickTextLabel* _close_button;
 
78
 
 
79
    QLabel* _create_text_label(const QString& text = QString());
 
80
   
 
81
    bool _create_new_source;
 
82
 
 
83
    virtual void mousePressEvent(QMouseEvent *event);
 
84
    virtual bool event(QEvent *e);
 
85
 
 
86
  private slots:
 
87
      void _set_source_mute(bool flag);
 
88
      void _set_source_solo(bool flag);
 
89
      void _set_source_position_fixed(bool flag);
 
90
      void _set_source_model(int index);
 
91
      void _set_doppler(bool flag);
 
92
 
 
93
      void _expand();
 
94
      void _collapse();
 
95
 
 
96
  public slots:
 
97
      void show(const bool create_new_source = false);
 
98
 
 
99
  signals:
 
100
    void signal_set_source_mute(bool);
 
101
    void signal_set_source_position_fixed(bool);
 
102
    void signal_set_source_model(int);
 
103
    void signal_set_source_solo(bool);
 
104
 
 
105
    //void signal_set_source_property( );
 
106
};
 
107
 
 
108
#endif
 
109
 
 
110
// Settings for Vim (http://www.vim.org/), please do not remove:
 
111
// vim:softtabstop=2:shiftwidth=2:expandtab:textwidth=80:cindent
 
112
// vim:fdm=expr:foldexpr=getline(v\:lnum)=~'/\\*\\*'&&getline(v\:lnum)!~'\\*\\*/'?'a1'\:getline(v\:lnum)=~'\\*\\*/'&&getline(v\:lnum)!~'/\\*\\*'?'s1'\:'='