/** Constructor */ GeneralPage::GeneralPage(QWidget *parent) : ConfigPage(parent, "General") { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); /* Create settings objects */ _vidaliaSettings = new VidaliaSettings; _torSettings = new TorSettings; /* Bind event to actions */ connect(ui.btnBrowseTorExecutable, SIGNAL(clicked()), this, SLOT(browseTorExecutable())); connect(ui.btnBrowseProxyExecutable, SIGNAL(clicked()), this, SLOT(browseProxyExecutable())); connect(ui.btnUpdateNow, SIGNAL(clicked()), this, SLOT(updateNow())); #if !defined(Q_OS_WIN32) /* Hide platform specific features */ ui.chkRunVidaliaAtSystemStartup->setVisible(false); ui.lineHorizontalSeparator->setVisible(false); #endif #if !defined(USE_AUTOUPDATE) ui.grpSoftwareUpdates->setVisible(false); #endif if (_vidaliaSettings->getBrowserExecutable().length() > 0) { ui.lineHorizontalSeparator->setVisible(false); ui.chkRunVidaliaAtSystemStartup->setVisible(false); } }
bool QDXWidget::event(QEvent *event) { if (event->type() == QEvent::UpdateRequest) { m_updatePending = false; updateNow(); return true; } else { return QWidget::event(event); } }
SFP::SFP(const std::string &n, volatile unsigned char *reg) :mrf::ObjectInst<SFP>(n) ,base(reg) ,buffer(SFPMEM_SIZE) ,valid(false) { updateNow(); /* Check for SFP with LC connector */ if(valid) fprintf(stderr, "Found SFP EEPROM\n"); else fprintf(stderr, "Found SFP Strangeness %02x%02x%02x%02x\n", buffer[0],buffer[1],buffer[2],buffer[3]); }
void KPCMCIAInfo::prepareCards() { if (!_pcmcia) { // FIXME: display error return; } for (int i = 0; i < _pcmcia->getCardCount(); i++) { TQString tabname = i18n("Card Slot %1"); KPCMCIAInfoPage *tp = new KPCMCIAInfoPage(_pcmcia->getCard(i), _mainTab); connect(this, TQT_SIGNAL(updateNow()), tp, TQT_SLOT(update())); connect(tp, TQT_SIGNAL(setStatusBar(const TQString&)), this, TQT_SLOT(slotTabSetStatus(const TQString&))); tp->resize(_mainTab->sizeHint()); _mainTab->addTab(tp, tabname.arg(i+1)); _pages.insert(i, tp); } }
void KPCMCIAInfo::update() { emit updateNow(); }