void Lvk::FE::ConnectionWidget::connectSignals() { connect(ui->connectButton, SIGNAL(clicked()), SLOT(onConnectPressed())); connect(ui->disconnectButton, SIGNAL(clicked()), SLOT(onDisconnectPressed())); connect(ui->changeAccountButton, SIGNAL(clicked()), SLOT(onChangeAccountPressed())); connect(ui->passwordText, SIGNAL(returnPressed()), SLOT(onConnectPressed())); connect(ui->rosterWidget, SIGNAL(selectionChanged()), SIGNAL(rosterSelectionChanged())); connect(ui->verifactionWidget, SIGNAL(accountOk()), SLOT(onAccountOk())); connect(ui->verifactionWidget, SIGNAL(verificationCanceled()), SLOT(onChangeCanceled())); connect(ui->verifactionWidget, SIGNAL(accountError(int,QString)), SIGNAL(changeAccountError(int,QString))); }
ConnectionManager::ConnectionManager(Internal::MainWindow *mainWindow, QTabWidget *modeStack) : QWidget(mainWindow), // Pip m_availableDevList(0), m_connectBtn(0), m_ioDev(NULL), m_mainWindow(mainWindow) { // Q_UNUSED(mainWindow); /* QVBoxLayout *top = new QVBoxLayout; top->setSpacing(0); top->setMargin(0);*/ QHBoxLayout *layout = new QHBoxLayout; layout->setSpacing(5); layout->setContentsMargins(5,5,5,5); layout->addWidget(new QLabel(tr("Connections:"))); m_availableDevList = new QComboBox; //m_availableDevList->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_availableDevList->setMinimumWidth(100); m_availableDevList->setMaximumWidth(150); m_availableDevList->setContextMenuPolicy(Qt::CustomContextMenu); layout->addWidget(m_availableDevList); m_connectBtn = new QPushButton(tr("Connect")); m_connectBtn->setEnabled(false); layout->addWidget(m_connectBtn); /* Utils::StyledBar *bar = new Utils::StyledBar; bar->setLayout(layout); top->addWidget(bar);*/ setLayout(layout); // modeStack->insertCornerWidget(modeStack->cornerWidgetCount()-1, this); modeStack->setCornerWidget(this, Qt::TopRightCorner); QObject::connect(m_connectBtn, SIGNAL(pressed()), this, SLOT(onConnectPressed())); }