예제 #1
0
QDispatchGroup::QDispatchGroup (
    dispatch_group_t o
)
    : xdispatch::group( o ),
      d( new Private() )
{
    connect( d.data(), SIGNAL( groupFinished() ), this, SIGNAL( allFinished() ) );
}
예제 #2
0
QDispatchGroup::QDispatchGroup (
    const xdispatch::group &obj
)
    : xdispatch::group( obj ),
      d( new Private() )
{
    connect( d.data(), SIGNAL( groupFinished() ), this, SIGNAL( allFinished() ) );
}
예제 #3
0
MainWindow::MainWindow(QWidget *parent)
    :QWidget(parent)
{
    setupUi(this);
    keyboard = new Keyboard;
    keyboard->setVisible(false);
    layout()->addWidget(keyboard);
    devicesModel = new DevicesListModel;
    listView->setModel(devicesModel);
    deviceDelegate = new DeviceListDelegate;
    listView->setItemDelegate(deviceDelegate);

#if !defined(DEBUG)
    QWSServer *qws = QWSServer::instance();
    if (qws)
        qws->setCursorVisible(false);
#endif

    buttonGroup = new QButtonGroup(this);
    buttonGroup->addButton(pbcRadioButton);
    buttonGroup->addButton(pinRadioButton);
    buttonsEnabled(false);

    pinLineEdit->setEnabled(false);
    goCheckBox->setEnabled(false);

    wpa = new Wpa;

    dynamic_cast<QVBoxLayout *>(layout())->setStretchFactor(scrollArea, 1);
    connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)), this,
            SLOT(focusChanged(QWidget*, QWidget*)));
    connect(wpa, SIGNAL(status(const QString&)), this,
            SLOT(statusChanged(const QString&)));
    connect(wpa, SIGNAL(deviceFound(Device&)), devicesModel,
            SLOT(addDevice(Device&)));
    connect(wpa, SIGNAL(connectFails(int)), this,
            SLOT(connectionFails(int)));
    connect(wpa, SIGNAL(groupStarted(bool)), this,
            SLOT(groupStarted(bool)));
    connect(wpa, SIGNAL(groupFinished()), this,
            SLOT(groupStopped()));
    connect(wpa, SIGNAL(enabled(bool)), this,
            SLOT(setWifiDirectEnabled(bool)));
    connect(listView, SIGNAL(doubleClicked(const QModelIndex&)), this,
            SLOT(deviceSelected(const QModelIndex&)));
    connect(startGroupButton, SIGNAL(clicked()), this,
            SLOT(startGroupClicked()));
    connect(disconnectButton, SIGNAL(clicked()), this,
            SLOT(disconnectClicked()));
    // connect(intentSlider, SIGNAL(valueChanged(int)), wpa,
    //         SLOT(setIntent(int)));
    // connect(channelSlider, SIGNAL(sliderReleased()), this,
    //         SLOT(channelReleased()));

    if (wpa->isEnabled()) {
        wifiDirectCheckBox->setCheckState(Qt::Checked);
        wpa->getPeers();

        statusChanged(wpa->getStatus());
    }
}
예제 #4
0
QDispatchGroup::QDispatchGroup ()
    : d( new Private() )
{
    connect( d.data(), SIGNAL( groupFinished() ), this, SIGNAL( allFinished() ) );
}