~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to qwt-5.0.2/examples/radio/radio.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2007-10-05 15:20:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071005152041-qmybqh4fj9jejyo2
Tags: 5.0.2-2
* Handle nostrip build option. (Closes: #437877)
* Build libqwt5-doc package in binary-indep target. (Closes: #443110)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <qapplication.h>
 
2
#include <qlayout.h>
 
3
#include "tunerfrm.h"
 
4
#include "ampfrm.h"
 
5
#include "radio.h"
 
6
 
 
7
MainWin::MainWin(): 
 
8
    QWidget()
 
9
{
 
10
    TunerFrame *frmTuner = new TunerFrame(this);
 
11
    frmTuner->setFrameStyle(QFrame::Panel|QFrame::Raised);
 
12
 
 
13
    AmpFrame *frmAmp = new AmpFrame(this);
 
14
    frmAmp->setFrameStyle(QFrame::Panel|QFrame::Raised);
 
15
 
 
16
    QVBoxLayout *layout = new QVBoxLayout(this);
 
17
    layout->setMargin(0);
 
18
    layout->setSpacing(0);
 
19
    layout->addWidget(frmTuner);
 
20
    layout->addWidget(frmAmp);
 
21
    
 
22
    connect(frmTuner, SIGNAL(fieldChanged(double)), 
 
23
        frmAmp, SLOT(setMaster(double)));
 
24
 
 
25
    frmTuner->setFreq(90.0);    
 
26
}
 
27
 
 
28
int main (int argc, char **argv)
 
29
{
 
30
    QApplication a(argc, argv);
 
31
 
 
32
    MainWin w;
 
33
 
 
34
#if QT_VERSION < 0x040000
 
35
    a.setMainWidget(&w);
 
36
#endif
 
37
    w.show();
 
38
 
 
39
    return a.exec();
 
40
}