QUOTE (sergey sva @ Jun 14 2011, 17:26)

Конструктор главного вы имеете ввиду mainwindow.h или mainwindow.ui ?
Я имел ввиду наследника QMainWindow. В данном случае это class QLWin
CODE
namespace App
{
class QLWin : public QMainWindow
{
Q_OBJECT
public:
typedef QSharedPointer<QLWin> Ptr;
static const int BIG_SPACE = 44;
static const int SMALL_SPACE = 15;
static QSize rightSize();
QLWin(QWidget* parent);
private slots:
void captureFinished();
private:
void closeEvent(QCloseEvent* event);
Excitation::ExcitationView* _excitView;
JackWrap::Wrapper* _jack;
Capture::Capture* _capture;
Capture::CaptureView* _captureView;
Irs::IrsTableModel* _irsTableModel;
Irs::IrsView* _irsView;
Dir::WrkDirView* _dirView;
};
}
А в конструкторе все склеивается
CODE
QLWin::QLWin(QWidget* parent)
: QMainWindow(parent)
, _excitView(new Excitation::ExcitationView(this))
, _jack(new JackWrap::Wrapper(this))
, _capture(new Capture::Capture(this))
, _captureView(new Capture::CaptureView(this, _capture))
, _irsTableModel(new Irs::IrsTableModel(this))
, _irsView(new Irs::IrsView(this, _irsTableModel))
, _dirView(new Dir::WrkDirView(this))
{
setWindowTitle("QLoud");
QVBoxLayout* mainLayout = new QVBoxLayout();
mainLayout->addWidget(_dirView);
mainLayout->addWidget(_excitView);
mainLayout->addWidget(_captureView);
mainLayout->addWidget(_irsView);
//--------------------- LAYOUT FINISHING -------------------------------------------------------------
QWidget* centralWidget = new QWidget();
centralWidget->setLayout(mainLayout);
setCentralWidget(centralWidget);
connect(_jack, SIGNAL(jackIsFinished(float)), _capture, SLOT(stop(float)));
connect(_jack, SIGNAL(jackSampleRate(unsigned int)),_captureView, SLOT(onJackSampleRate(unsigned int)));
connect(_jack, SIGNAL(jackSampleRate(unsigned int)),_excitView, SLOT(rateChanged(unsigned int)));
connect(_jack, SIGNAL(jackShutdown()), _captureView, SLOT(onJackShutdown()));
connect(_jack, SIGNAL(JackXRun()), _captureView, SLOT(onJackXRun()));
connect(_captureView, SIGNAL(startCapturing(const bool)), _dirView, SLOT(setDisable(const bool)));
connect(_capture, SIGNAL(evStartJack(JackWrap::Info&)), _jack, SLOT(start(JackWrap::Info&)));
connect(_captureView, SIGNAL(evStopCapture()), _jack, SLOT(stop()));
connect(_captureView, SIGNAL(startCapturing_()), _jack, SLOT(connect()));
connect(_jack, SIGNAL(JackIsReady()), _excitView, SLOT(checkSignal()));
connect(_excitView, SIGNAL(ExitationViewIsReady()), _captureView, SLOT(startCapture()));
connect(_excitView, SIGNAL(abortCapture()), _captureView, SLOT(stopCapture()));
connect(_jack, SIGNAL(JackIsFailed()), _captureView, SLOT(stopCapture()));
connect(_capture, SIGNAL(CaptureIsFailed()), _captureView, SLOT(stopCapture()));
//Status Bar
connect(_dirView, SIGNAL(showStatus(const QString&)), statusBar(),SLOT(showMessage(const QString&)));
connect(_dirView, SIGNAL(showStatus(const QString&, int)),statusBar(),SLOT(showMessage(const QString&,int)));
connect(_irsView, SIGNAL(showStatus(const QString&, int)),statusBar(),SLOT(showMessage(const QString&,int)));
connect(_irsTableModel,SIGNAL(showStatus(const QString&, int)),statusBar(),SLOT(showMessage(const QString&,int)));
connect(_excitView, SIGNAL(showStatus(const QString&)), statusBar(),SLOT(showMessage(const QString&)));
connect(_excitView, SIGNAL(showStatus(const QString&, int)),statusBar(),SLOT(showMessage(const QString&,int)));
connect(_captureView, SIGNAL(showStatus(const QString&)), statusBar(),SLOT(showMessage(const QString&)));
connect(_captureView, SIGNAL(showStatus(const QString&, int)),statusBar(),SLOT(showMessage(const QString&,int)));
// Capture
connect(_capture, SIGNAL(workIsDone()), this, SLOT(captureFinished()));
App::AppConfig::getInstance().notifyObservers(); //notify about current dir
// _jack->connect();
resize(App::AppConfig::getInstance().getSize());
move(App::AppConfig::getInstance().getPos());
}