QDBusObjectPath JobViewServer::requestView(const QString &appName, const QString &appIconName, int capabilities) { QString objectPath = QString("/JobViewServer/JobView_%1").arg(++lastID); JobView* jobview = new JobView(objectPath, appName, appIconName, capabilities); Plasma::Meter* meter = new Plasma::Meter(); meter->setMeterType(Plasma::Meter::BarMeterHorizontal); meter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); activeMeters.insert(jobview->objectPath(), meter); activeJobViews.insert(jobview->objectPath(), jobview); meterLayout->addItem(meter); jobViewLayout->addItem(jobview); connect(jobview, SIGNAL(progressChanged(uint)), this, SLOT(updateMeter(uint))); connect(jobview, SIGNAL(terminated()), this, SLOT(jobViewTerminated())); updateStatusIndicators(); return QDBusObjectPath(objectPath); }