PreProcessingPagePriv() { progressPix = KPixmapSequence("process-working", KIconLoader::SizeSmallMedium); progressCount = 0; progressTimer = 0; progressLabel = 0, mngr = 0; title = 0; detailsBtn = 0; }
PreProcessingPagePriv() : progressCount(0), progressLabel(0), progressTimer(0), canceled(false), title(0), celesteCheckBox(0), detailsBtn(0), mngr(0) { progressPix = KPixmapSequence("process-working", KIconLoader::SizeSmallMedium); }
OptimizePagePriv() : progressCount(0), progressLabel(0), progressTimer(0), canceled(false), title(0), horizonCheckbox(0), projectionAndSizeCheckbox(0), detailsBtn(0), mngr(0) { progressPix = KPixmapSequence("process-working", KIconLoader::SizeSmallMedium); }
PackageWidget::PackageWidget(QWidget *parent) : QWidget(parent) , m_backend(0) , m_headerLabel(0) , m_searchEdit(0) , m_packagesType(0) , m_stop(false) { m_watcher = new QFutureWatcher<QList<QApt::Package*> >(this); connect(m_watcher, SIGNAL(finished()), this, SLOT(setSortedPackages())); m_model = new PackageModel(this); PackageDelegate *delegate = new PackageDelegate(this); m_proxyModel = new PackageProxyModel(this); m_proxyModel->setSourceModel(m_model); QVBoxLayout *topVBox = new QVBoxLayout; topVBox->setContentsMargins(0, 0, 0, 0); topVBox->setSpacing(0); m_headerLabel = new QLabel; m_headerLabel->setTextFormat(Qt::RichText); topVBox->addWidget(m_headerLabel); m_searchTimer = new QTimer(this); m_searchTimer->setInterval(300); m_searchTimer->setSingleShot(true); connect(m_searchTimer, SIGNAL(timeout()), this, SLOT(startSearch())); setupActions(); m_searchEdit = new QLineEdit; m_searchEdit->setEnabled(false); m_searchEdit->setPlaceholderText(i18nc("@label Line edit click message", "Search")); m_searchEdit->setClearButtonEnabled(true); m_searchEdit->hide(); // Off by default, use showSearchEdit() to show topVBox->addWidget(m_searchEdit); m_packageView = new PackageView; m_packageView->setModel(m_proxyModel); m_packageView->setItemDelegate(delegate); m_packageView->header()->setSectionResizeMode(0, QHeaderView::Stretch); for (int i = 3; i < NUM_COLUMNS; ++i) { m_packageView->header()->setSectionHidden(i, true); } topVBox->addWidget(m_packageView); m_detailsWidget = new DetailsWidget; connect(m_detailsWidget, SIGNAL(setInstall(QApt::Package*)), this, SLOT(setInstall(QApt::Package*))); connect(m_detailsWidget, SIGNAL(setRemove(QApt::Package*)), this, SLOT(setRemove(QApt::Package*))); connect(m_detailsWidget, SIGNAL(setUpgrade(QApt::Package*)), this, SLOT(setUpgrade(QApt::Package*))); connect(m_detailsWidget, SIGNAL(setReInstall(QApt::Package*)), this, SLOT(setReInstall(QApt::Package*))); connect(m_detailsWidget, SIGNAL(setKeep(QApt::Package*)), this, SLOT(setKeep(QApt::Package*))); connect(m_detailsWidget, SIGNAL(setPurge(QApt::Package*)), this, SLOT(setPurge(QApt::Package*))); m_busyWidget = new KPixmapSequenceOverlayPainter(this); m_busyWidget->setSequence(KPixmapSequence("process-working", KIconLoader::SizeSmallMedium)); m_busyWidget->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); m_busyWidget->setWidget(m_packageView->viewport()); QApplication::setOverrideCursor(Qt::WaitCursor); m_busyWidget->start(); connect(m_packageView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuRequested(QPoint))); connect(m_packageView, SIGNAL(currentPackageChanged(QModelIndex)), this, SLOT(packageActivated(QModelIndex))); connect(m_packageView, SIGNAL(selectionEmpty()), m_detailsWidget, SLOT(hide())); connect(m_packageView, SIGNAL(selectionMulti()), m_detailsWidget, SLOT(emitHideButtons())); connect(m_packageView->header(), SIGNAL(sectionClicked(int)), this, SLOT(sectionClicked(int))); connect(m_searchEdit, SIGNAL(textChanged(QString)), m_searchTimer, SLOT(start())); QWidget* topWidget = new QWidget; topWidget->setLayout(topVBox); QSplitter *splitter = new QSplitter; splitter->setOrientation(Qt::Vertical); splitter->addWidget(topWidget); splitter->addWidget(m_detailsWidget); setLayout(new QVBoxLayout); layout()->setContentsMargins(0, 0, 0, 0); layout()->addWidget(splitter); }