void BtInstallPage::initConnections() { qDebug("void BtInstallPage::initConnections() start"); QObject::connect(m_pathCombo, SIGNAL(activated(const QString&)), this , SLOT(slotPathChanged(const QString&))); QObject::connect(m_configurePathButton, SIGNAL(clicked()), this, SLOT(slotEditPaths())); QObject::connect(m_installButton, SIGNAL(clicked()), m_sourceWidget, SLOT(slotInstall()) ); QObject::connect(CPointers::backend(), SIGNAL(sigSwordSetupChanged(CSwordBackend::SetupChangedReason)), this, SLOT(slotSwordSetupChanged())); //source widget has its own connections, not here }
KNewStuff2Download::KNewStuff2Download() : QWidget() { m_engine = NULL; m_activefeed = NULL; m_activeentry = NULL; resize(800, 600); setWindowTitle("KNewStuff2 Download Dialog Test"); QPushButton *installbutton = new QPushButton("Install"); connect(installbutton, SIGNAL(clicked()), SLOT(slotInstall())); QPushButton *closebutton = new QPushButton("Close"); connect(closebutton, SIGNAL(clicked()), SLOT(close())); m_providerlist = new QListWidget(); m_providerlist->setFixedWidth(200); m_feeds = new QTabWidget(); #if 0 frame = new QFrame(this); frame->setFrameStyle(QFrame::StyledPanel | QFrame::Plain); QPalette palette = this->palette(); palette.setColor(backgroundRole(), palette.color(QPalette::Base)); frame->setPalette(palette); frame->setLineWidth(1); frame->setMidLineWidth(0); recentButton = new KNSButton(frame); recentButton->setIcon(KIcon("alarmclock")); recentButton->setText("Most recent"); estimatedButton = new KNSButton(frame); estimatedButton->setIcon(KIcon("favorites")); estimatedButton->setText("Most estimated"); wantedButton = new KNSButton(frame); wantedButton->setIcon(KIcon("kget")); wantedButton->setText("Most wanted"); connect(recentButton, SIGNAL(toggled(bool)), this, SLOT(buttonToggled(bool))); connect(estimatedButton, SIGNAL(toggled(bool)), this, SLOT(buttonToggled(bool))); connect(wantedButton, SIGNAL(toggled(bool)), this, SLOT(buttonToggled(bool))); frame->setMinimumHeight(40); recentButton->setChecked(true); #endif QHBoxLayout *hbox = new QHBoxLayout(); hbox->addWidget(m_providerlist); hbox->addWidget(m_feeds); QVBoxLayout *vbox = new QVBoxLayout(); setLayout(vbox); vbox->addLayout(hbox); vbox->addWidget(installbutton); vbox->addWidget(closebutton); show(); }