~jaromil/freej/master

« back to all changes in this revision

Viewing changes to qt/qfreej.cpp

  • Committer: fred
  • Date: 2011-02-21 18:03:21 UTC
  • Revision ID: git-v1:303b9378e51be84b36ea385f960cc8b4d13dab49
begins to add Opacity properties to the control window

Created a QOpacity class and added a menu to the main
control window.
Menus do not work anymore ;(
Have to fix this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        QWidget(parent)
40
40
{
41
41
    m_snd = NULL;
 
42
    m_Opacity = NULL;
42
43
 
43
44
    grid = new QGridLayout(this);
44
45
 
45
46
    QMenuBar *menuBar = new QMenuBar(this);
46
47
    grid->addWidget(menuBar, 0, 0);
47
 
    QMenu *menuFichier = menuBar->addMenu("&Fichier");
 
48
    QMenu *menuFichier = menuBar->addMenu("&File");
 
49
    QMenu *menuOpacity = menuBar->addMenu("&Opacity");
48
50
 
49
51
    QAction *actionPen = menuFichier->addAction("&Open");
50
52
    connect(actionPen, SIGNAL(triggered()), this, SLOT(addLayer()));
58
60
    QAction *actionJack = menuFichier->addAction("&Stream");
59
61
    connect(actionJack, SIGNAL(triggered()), this, SLOT(openSoundDevice()));//new
60
62
 
 
63
    QAction *actionOpa = menuOpacity->addAction("&Opacity");
 
64
    connect(actionOpa, SIGNAL(triggered()), this, SLOT(changeOpacity()));
 
65
 
 
66
    
61
67
    menuGenerator = menuFichier->addMenu("&Generators");
62
68
 
63
69
    poller = new QTimer (this);
80
86
    delete grid;
81
87
}
82
88
 
 
89
void Qfreej::changeOpacity()
 
90
{
 
91
  m_Opacity->show();
 
92
}
 
93
 
83
94
void Qfreej::closeEvent(QCloseEvent *event)
84
95
{
85
96
    event->accept();
111
122
 
112
123
    createMenuGenerator();
113
124
        //openSoundDevice();
 
125
    m_Opacity = new QOpacity((QWidget *)this);
114
126
}
115
127
 
116
128
void Qfreej::startStreaming()