void mainWin::ProgramInit(QString ch, QString ip) { // Set any warden directories groupDetails->setVisible(false); doingUpdate=false; lastError=""; wDir = ch; wIP = ip; if ( ! wDir.isEmpty() ) setWindowTitle(tr("Updates for Jail:") + " " + wIP ); //Grab the username //username = QString::fromLocal8Bit(getenv("LOGNAME")); connect(buttonRescan, SIGNAL(clicked()), this, SLOT(slotRescanUpdates())); connect(pushInstallUpdates, SIGNAL(clicked()), this, SLOT(slotInstallClicked())); connect(pushClose, SIGNAL(clicked()), this, SLOT(slotCloseClicked())); connect(checkAll, SIGNAL(clicked()), this, SLOT(slotSelectAllClicked())); connect(listViewUpdates, SIGNAL(itemClicked(QListWidgetItem *)),this,SLOT(slotListClicked())); connect(listViewUpdates, SIGNAL(itemActivated(QListWidgetItem *)),this,SLOT(slotListClicked())); connect(listViewUpdates, SIGNAL(itemChanged(QListWidgetItem *)),this,SLOT(slotListClicked())); connect(listViewUpdates, SIGNAL(itemPressed(QListWidgetItem *)),this,SLOT(slotListClicked())); connect(listViewUpdates, SIGNAL(itemDoubleClicked(QListWidgetItem *)),this,SLOT(slotListDoubleClicked(QListWidgetItem *))); progressUpdate->setHidden(true); QTimer::singleShot(100, this, SLOT(slotRescanUpdates() ) ); }
void UserMenuDialog::slotSaveClicked() { if ( saveClicked() ) { m_modified = false; if ( m_currentXmlInstalled ) { slotInstallClicked(); // includes all updates } else { setXmlFile(m_currentXmlFile,false); } updateDialogButtons(); } }
bool UserMenuDialog::okClicked() { if ( m_currentXmlFile.isEmpty() ) { return !saveAsClicked().isEmpty(); } if ( ! saveClicked() ) { return false; } if ( m_currentXmlInstalled ) { m_modified = false; slotInstallClicked(); } return true; }
QList<QWidget*> ItemsViewDelegate::createItemWidgets() const { QList<QWidget*> list; QLabel * infoLabel = new QLabel(); infoLabel->setOpenExternalLinks(true); list << infoLabel; QToolButton * installButton = new QToolButton(); list << installButton; setBlockedEventTypes(installButton, QList<QEvent::Type>() << QEvent::MouseButtonPress << QEvent::MouseButtonRelease << QEvent::MouseButtonDblClick); connect(installButton, SIGNAL(triggered(QAction*)), this, SLOT(slotActionTriggered(QAction*))); connect(installButton, SIGNAL(clicked()), this, SLOT(slotInstallClicked())); QLabel * ratingLabel = new QLabel(); list << ratingLabel; return list; }