use the plasma debug area (1209); i considered wrapping this in Plasma::debug() but that seems overkill ;)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758415
This commit is contained in:
parent
b03a2588d2
commit
12ef6308cb
@ -138,7 +138,7 @@ AbstractRunner::List AbstractRunner::loadRunners(QObject* parent, const QStringL
|
||||
if( whitelist.empty() || whitelist.contains( service->name() ) ) {
|
||||
AbstractRunner* runner = service->createInstance<AbstractRunner>(parent, QVariantList(), &error);
|
||||
if (runner) {
|
||||
//kDebug() << "loaded runner : " << service->name();
|
||||
//kDebug(1209) << "loaded runner : " << service->name();
|
||||
QString phase = service->property("X-Plasma-RunnerPhase").toString();
|
||||
if (phase == "last") {
|
||||
lastRunners.append(runner);
|
||||
@ -149,7 +149,7 @@ AbstractRunner::List AbstractRunner::loadRunners(QObject* parent, const QStringL
|
||||
}
|
||||
}
|
||||
else {
|
||||
kDebug() << "failed to load runner : " << service->name() << ". error reported: " << error;
|
||||
kDebug(1209) << "failed to load runner : " << service->name() << ". error reported: " << error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ void Animator::slideIn(qreal progress, QGraphicsItem *item, const QPoint &start,
|
||||
|
||||
void Animator::slideOut(qreal progress, QGraphicsItem *item, const QPoint &start, const QPoint &destination)
|
||||
{
|
||||
//kDebug();
|
||||
//kDebug(1209);
|
||||
double x = start.x() + (destination.x() - start.x()) * progress;
|
||||
double y = start.y() + (destination.y() - start.y()) * progress;
|
||||
item->setPos(x, y);
|
||||
|
44
applet.cpp
44
applet.cpp
@ -137,7 +137,7 @@ public:
|
||||
appletDescription.pluginName(), appletDescription.name()));
|
||||
} else {
|
||||
// create the package and see if we have something real
|
||||
//kDebug() << "trying for" << path;
|
||||
//kDebug(1209) << "trying for" << path;
|
||||
package = new Package(path, PlasmoidStructure());
|
||||
if (package->isValid()) {
|
||||
// now we try and set up the script engine.
|
||||
@ -345,7 +345,7 @@ public:
|
||||
Q_ASSERT(asContainment);
|
||||
|
||||
KConfigGroup containmentConfig;
|
||||
//kDebug() << "got a corona, baby?" << (QObject*)asContainment->corona();
|
||||
//kDebug(1209) << "got a corona, baby?" << (QObject*)asContainment->corona();
|
||||
if (asContainment->corona()) {
|
||||
containmentConfig = KConfigGroup(asContainment->corona()->config(), "Containments");
|
||||
} else {
|
||||
@ -457,7 +457,7 @@ void Applet::save(KConfigGroup* group) const
|
||||
group->writeEntry("plugin", pluginName());
|
||||
//FIXME: for containments, we need to have some special values here w/regards to
|
||||
// screen affinity (e.g. "bottom of screen 0")
|
||||
//kDebug() << pluginName() << "geometry is" << geometry() << "pos is" << pos() << "bounding rect is" << boundingRect();
|
||||
//kDebug(1209) << pluginName() << "geometry is" << geometry() << "pos is" << pos() << "bounding rect is" << boundingRect();
|
||||
group->writeEntry("geometry", geometry());
|
||||
|
||||
if (transform() == QTransform()) {
|
||||
@ -517,7 +517,7 @@ KConfigGroup Applet::globalConfig() const
|
||||
|
||||
void Applet::destroy()
|
||||
{
|
||||
//kDebug() << "???????????????? DESTROYING APPLET" << name() << " ???????????????????????????";
|
||||
//kDebug(1209) << "???????????????? DESTROYING APPLET" << name() << " ???????????????????????????";
|
||||
if (d->configXml) {
|
||||
d->configXml->setDefaults();
|
||||
}
|
||||
@ -566,7 +566,7 @@ void Applet::updateConstraints(Plasma::Constraints constraints)
|
||||
void Applet::constraintsUpdated(Plasma::Constraints constraints)
|
||||
{
|
||||
Q_UNUSED(constraints)
|
||||
//kDebug() << constraints << "constraints are FormFactor: " << formFactor() << ", Location: " << location();
|
||||
//kDebug(1209) << constraints << "constraints are FormFactor: " << formFactor() << ", Location: " << location();
|
||||
}
|
||||
|
||||
QString Applet::name() const
|
||||
@ -780,7 +780,7 @@ void Applet::flushUpdatedConstraints()
|
||||
return;
|
||||
}
|
||||
|
||||
//kDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
|
||||
//kDebug(1209) << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
|
||||
Plasma::Constraints c = d->pendingConstraints;
|
||||
d->pendingConstraints = NoConstraint;
|
||||
|
||||
@ -819,7 +819,7 @@ QRectF Applet::boundingRect() const
|
||||
d->getBorderSize(left,top,right,bottom);
|
||||
|
||||
|
||||
//kDebug() << "Background , Border size" << d->background << left << top << right << bottom;
|
||||
//kDebug(1209) << "Background , Border size" << d->background << left << top << right << bottom;
|
||||
|
||||
return rect.adjusted(-left,-top,right,bottom);
|
||||
}
|
||||
@ -834,14 +834,14 @@ QSizeF Applet::sizeHint() const
|
||||
d->getBorderSize(left, top, right, bottom);
|
||||
QSizeF borderSize = QSizeF(left + right, top + bottom);
|
||||
|
||||
//kDebug() << "Applet content size hint: " << contentSizeHint() << "plus our borders" << left << right << top << bottom;
|
||||
//kDebug(1209) << "Applet content size hint: " << contentSizeHint() << "plus our borders" << left << right << top << bottom;
|
||||
|
||||
return contentSizeHint() + QSizeF(left + right, top + bottom);
|
||||
}
|
||||
|
||||
QList<QAction*> Applet::contextActions()
|
||||
{
|
||||
kDebug() << "empty context actions";
|
||||
kDebug(1209) << "empty context actions";
|
||||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
{
|
||||
Q_UNUSED(widget)
|
||||
if (d->shadow && d->shadow->shadowedSize() != boundingRect().size()) {
|
||||
//kDebug() << "sizes are " << d->shadow->shadowedSize() << boundingRect().size();
|
||||
//kDebug(1209) << "sizes are " << d->shadow->shadowedSize() << boundingRect().size();
|
||||
d->shadow->generate();
|
||||
}
|
||||
|
||||
@ -892,7 +892,7 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
}
|
||||
|
||||
if (d->background) {
|
||||
//kDebug() << "option rect is" << option->rect;
|
||||
//kDebug(1209) << "option rect is" << option->rect;
|
||||
d->paintBackground(painter, this, option->rect);
|
||||
}
|
||||
|
||||
@ -906,7 +906,7 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti
|
||||
}
|
||||
}
|
||||
|
||||
//kDebug() << "paint interface of" << (QObject*) this;
|
||||
//kDebug(1209) << "paint interface of" << (QObject*) this;
|
||||
paintInterface(painter, option, QRect(QPoint(0,0), d->contentSize(this).toSize()));
|
||||
}
|
||||
|
||||
@ -921,7 +921,7 @@ void Applet::paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *o
|
||||
if (d->scriptEngine) {
|
||||
d->scriptEngine->paintInterface(painter, option, contentsRect);
|
||||
} else {
|
||||
//kDebug() << "Applet::paintInterface() default impl";
|
||||
//kDebug(1209) << "Applet::paintInterface() default impl";
|
||||
}
|
||||
}
|
||||
|
||||
@ -965,8 +965,8 @@ QSizeF Applet::contentSize() const
|
||||
int top, left, right, bottom;
|
||||
d->getBorderSize(left, top, right, bottom);
|
||||
|
||||
// kDebug() << "Geometry size: " << geometry().size();
|
||||
// kDebug() << "Borders: " << left << top << right << bottom;
|
||||
// kDebug(1209) << "Geometry size: " << geometry().size();
|
||||
// kDebug(1209) << "Borders: " << left << top << right << bottom;
|
||||
|
||||
return (geometry().size() - QSizeF(left + right, top + bottom)).expandedTo(QSizeF(0, 0));
|
||||
}
|
||||
@ -1152,14 +1152,14 @@ KPluginInfo::List Applet::knownApplets(const QString &category,
|
||||
}
|
||||
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
|
||||
//kDebug() << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
|
||||
//kDebug(1209) << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
|
||||
return KPluginInfo::fromServices(offers);
|
||||
}
|
||||
|
||||
KPluginInfo::List Applet::knownAppletsForMimetype(const QString &mimetype)
|
||||
{
|
||||
QString constraint = QString("'%1' in MimeTypes").arg(mimetype);
|
||||
//kDebug() << "knownAppletsForMimetype with" << mimetype << constraint;
|
||||
//kDebug(1209) << "knownAppletsForMimetype with" << mimetype << constraint;
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
|
||||
return KPluginInfo::fromServices(offers);
|
||||
}
|
||||
@ -1183,7 +1183,7 @@ QStringList Applet::knownCategories(const QString &parentApp, bool visibleOnly)
|
||||
continue;
|
||||
}
|
||||
|
||||
//kDebug() << " and we have " << appletCategory;
|
||||
//kDebug(1209) << " and we have " << appletCategory;
|
||||
if (appletCategory.isEmpty()) {
|
||||
if (!categories.contains(i18n("Miscellaneous"))) {
|
||||
categories << i18n("Miscellaneous");
|
||||
@ -1209,10 +1209,10 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QVari
|
||||
if (offers.isEmpty()) {
|
||||
//TODO: what would be -really- cool is offer to try and download the applet
|
||||
// from the network at this point
|
||||
kDebug() << "Applet::loadApplet: offers is empty for \"" << appletName << "\"";
|
||||
kDebug(1209) << "Applet::loadApplet: offers is empty for \"" << appletName << "\"";
|
||||
return 0;
|
||||
} /* else if (offers.count() > 1) {
|
||||
kDebug() << "hey! we got more than one! let's blindly take the first one";
|
||||
kDebug(1209) << "hey! we got more than one! let's blindly take the first one";
|
||||
} */
|
||||
|
||||
KService::Ptr offer = offers.first();
|
||||
@ -1222,7 +1222,7 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QVari
|
||||
}
|
||||
|
||||
if (!offer->property("X-Plasma-Language").toString().isEmpty()) {
|
||||
kDebug() << "we have a script in the language of" << offer->property("X-Plasma-Language").toString();
|
||||
kDebug(1209) << "we have a script in the language of" << offer->property("X-Plasma-Language").toString();
|
||||
Applet *applet = new Applet(0, offer->storageId(), appletId);
|
||||
return applet;
|
||||
}
|
||||
@ -1233,7 +1233,7 @@ Applet* Applet::loadApplet(const QString& appletName, uint appletId, const QVari
|
||||
Applet* applet = offer->createInstance<Plasma::Applet>(0, allArgs, &error);
|
||||
|
||||
if (!applet) {
|
||||
kDebug() << "Couldn't load applet \"" << appletName << "\"! reason given: " << error;
|
||||
kDebug(1209) << "Couldn't load applet \"" << appletName << "\"! reason given: " << error;
|
||||
}
|
||||
|
||||
return applet;
|
||||
|
@ -80,7 +80,7 @@ void AppletBrowserWidget::Private::initFilters()
|
||||
if (!rx.exactMatch(i.key())) {
|
||||
continue;
|
||||
}
|
||||
//kDebug() << "These are the key/vals in rc file " << rx.cap(1) << "\n";
|
||||
//kDebug(1209) << "These are the key/vals in rc file " << rx.cap(1) << "\n";
|
||||
|
||||
QString id = rx.cap(1);
|
||||
QString caption = configGroup.readEntry("recommended." + id + ".caption");
|
||||
@ -118,7 +118,7 @@ void AppletBrowserWidget::Private::updateRunningApplets()
|
||||
foreach (QString key, runningApplets.uniqueKeys()) {
|
||||
appCount[key]=runningApplets.count(key);
|
||||
}
|
||||
kDebug() << appCount;
|
||||
kDebug(1209) << appCount;
|
||||
itemModel.setRunningApplets(appCount);
|
||||
}
|
||||
|
||||
@ -184,14 +184,14 @@ void AppletBrowserWidget::init()
|
||||
void AppletBrowserWidget::initRunningApplets()
|
||||
{
|
||||
//get applets from corona, count them, send results to model
|
||||
kDebug() << d->runningApplets.count();
|
||||
kDebug(1209) << d->runningApplets.count();
|
||||
QHash<QString,int> appCount;
|
||||
Plasma::Corona *c = d->containment->corona();
|
||||
|
||||
//we've tried our best to get a corona
|
||||
//we don't want just one containment, we want them all
|
||||
if (!c) {
|
||||
kDebug() << "can't happen";
|
||||
kDebug(1209) << "can't happen";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ void AppletBrowserWidget::initRunningApplets()
|
||||
appCount[applet->name()]++;
|
||||
}
|
||||
}
|
||||
kDebug() << appCount;
|
||||
kDebug(1209) << appCount;
|
||||
d->itemModel.setRunningApplets(appCount);
|
||||
}
|
||||
|
||||
@ -232,14 +232,14 @@ QString AppletBrowserWidget::application()
|
||||
|
||||
void AppletBrowserWidget::addApplet()
|
||||
{
|
||||
kDebug() << "Button ADD clicked";
|
||||
kDebug(1209) << "Button ADD clicked";
|
||||
if (!d->containment) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (AbstractItem *item, d->appletList->selectedItems()) {
|
||||
PlasmaAppletItem *selectedItem = (PlasmaAppletItem *) item;
|
||||
kDebug() << "Adding applet " << selectedItem->name() << "to containment";
|
||||
kDebug(1209) << "Adding applet " << selectedItem->name() << "to containment";
|
||||
d->containment->addApplet(selectedItem->pluginName(), selectedItem->arguments());
|
||||
}
|
||||
}
|
||||
@ -247,7 +247,7 @@ void AppletBrowserWidget::addApplet()
|
||||
void AppletBrowserWidget::appletAdded(Plasma::Applet* applet)
|
||||
{
|
||||
QString name = applet->name();
|
||||
kDebug() << name;
|
||||
kDebug(1209) << name;
|
||||
d->runningApplets.insert(name, applet);
|
||||
d->appletNames.insert(applet, name);
|
||||
connect(applet, SIGNAL(destroyed(QObject*)), this, SLOT(appletDestroyed(QObject*)));
|
||||
@ -256,7 +256,7 @@ void AppletBrowserWidget::appletAdded(Plasma::Applet* applet)
|
||||
|
||||
void AppletBrowserWidget::appletDestroyed(QObject* applet)
|
||||
{
|
||||
kDebug() << applet;
|
||||
kDebug(1209) << applet;
|
||||
Plasma::Applet* a = (Plasma::Applet*)applet; //don't care if it's valid, just need the address
|
||||
QString name = d->appletNames.take(a);
|
||||
//if !name, was the applet not found or was the name actually ""?
|
||||
@ -278,7 +278,7 @@ void AppletBrowserWidget::destroyApplets(QString name)
|
||||
void AppletBrowserWidget::downloadApplets()
|
||||
{
|
||||
//TODO: implement
|
||||
kDebug() << "GHNS button clicked";
|
||||
kDebug(1209) << "GHNS button clicked";
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ void CustomDragTreeView::startDrag ( Qt::DropActions supportedActions )
|
||||
off = (MAX_OFFSET * MAX_COUNT) / indexes.count();
|
||||
}
|
||||
|
||||
kDebug() << "Size: " << size << " Off: " << off << "\n";
|
||||
kDebug(1209) << "Size: " << size << " Off: " << off << "\n";
|
||||
|
||||
QPixmap pixmap(size, size);
|
||||
pixmap.fill(QColor(255, 255, 255, 0)); // TODO: Transparent. Now it flickers when it's transparent
|
||||
|
@ -114,7 +114,7 @@ void KCategorizedItemsView::setItemModel(QStandardItemModel * model)
|
||||
|
||||
void KCategorizedItemsView::searchTermChanged(const QString & text)
|
||||
{
|
||||
kDebug() << "EVENT\n" << text;
|
||||
kDebug(1209) << "EVENT\n" << text;
|
||||
if (m_modelFilterItems) {
|
||||
m_modelFilterItems->setSearch(text);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ void KCategorizedItemsViewDelegate::paint(QPainter *painter,
|
||||
paintColRemove(painter, option, item);
|
||||
break;
|
||||
default:
|
||||
kDebug() << "unexpected column";
|
||||
kDebug(1209) << "unexpected column";
|
||||
}
|
||||
|
||||
// Dividing line
|
||||
@ -311,7 +311,7 @@ KCategorizedItemsViewModels::AbstractItem * KCategorizedItemsViewDelegate::getIt
|
||||
|
||||
KCategorizedItemsViewFilterDelegate::KCategorizedItemsViewFilterDelegate(QObject *parent)
|
||||
: QItemDelegate(parent) {
|
||||
kDebug() << "KCategorizedItemsViewFilterDelegate(QObject *parent)\n";
|
||||
kDebug(1209) << "KCategorizedItemsViewFilterDelegate(QObject *parent)\n";
|
||||
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ bool DefaultItemFilterProxyModel::filterAcceptsRow(int sourceRow,
|
||||
QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||
|
||||
AbstractItem * item = (AbstractItem *) model->itemFromIndex(index);
|
||||
//kDebug() << "ITEM " << (item ? "IS NOT " : "IS") << " NULL\n";
|
||||
//kDebug(1209) << "ITEM " << (item ? "IS NOT " : "IS") << " NULL\n";
|
||||
|
||||
return (m_filter.first.isEmpty() || item->passesFiltering(m_filter))
|
||||
&&(m_searchPattern.isEmpty() || item->matches(m_searchPattern));
|
||||
|
@ -104,7 +104,7 @@ PlasmaAppletItemModel::PlasmaAppletItemModel(KConfigGroup configGroup, QObject *
|
||||
void PlasmaAppletItemModel::populateModel()
|
||||
{
|
||||
clear();
|
||||
//kDebug() << "populating model, our application is" << m_application;
|
||||
//kDebug(1209) << "populating model, our application is" << m_application;
|
||||
|
||||
// Recommended emblems and filters
|
||||
QRegExp rx("recommended[.]([0-9A-Za-z]+)[.]plugins");
|
||||
@ -121,14 +121,14 @@ void PlasmaAppletItemModel::populateModel()
|
||||
}
|
||||
|
||||
//TODO: get recommended, favorite, used, etc out of knownApplets()
|
||||
//kDebug() << "number of applets is" << Plasma::Applet::knownApplets(QString(), m_application).count();
|
||||
//kDebug(1209) << "number of applets is" << Plasma::Applet::knownApplets(QString(), m_application).count();
|
||||
foreach (const KPluginInfo& info, Plasma::Applet::knownApplets(QString(), m_application)) {
|
||||
//kDebug() << info.pluginName() << "NoDisplay" << info.property("NoDisplay").toBool();
|
||||
//kDebug(1209) << info.pluginName() << "NoDisplay" << info.property("NoDisplay").toBool();
|
||||
if (info.property("NoDisplay").toBool()) {
|
||||
// we don't want to show the hidden category
|
||||
continue;
|
||||
}
|
||||
//kDebug() << info.pluginName() << " is the name of the plugin\n";
|
||||
//kDebug(1209) << info.pluginName() << " is the name of the plugin\n";
|
||||
|
||||
if (info.pluginName() == "skapplet") {
|
||||
// If there is the SuperKaramba applet,
|
||||
@ -183,7 +183,7 @@ QStringList PlasmaAppletItemModel::mimeTypes() const
|
||||
|
||||
QMimeData* PlasmaAppletItemModel::mimeData(const QModelIndexList & indexes) const
|
||||
{
|
||||
kDebug() << "GETTING MIME DATA\n";
|
||||
kDebug(1209) << "GETTING MIME DATA\n";
|
||||
if (indexes.count() <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -315,8 +315,8 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
// add the applet to the new containment
|
||||
// and take it from the old one
|
||||
QPointF scenePosition = scenePos();
|
||||
kDebug() << "moving to other containment with position" << pos() << event->scenePos();
|
||||
kDebug() << "position before reparenting" << pos() << scenePos();
|
||||
kDebug(1209) << "moving to other containment with position" << pos() << event->scenePos();
|
||||
kDebug(1209) << "position before reparenting" << pos() << scenePos();
|
||||
m_containment = containments[i];
|
||||
//m_containment->addChild(m_applet);
|
||||
//setParentItem(containments[i]);
|
||||
@ -434,14 +434,14 @@ QVariant AppletHandle::itemChange(GraphicsItemChange change, const QVariant &val
|
||||
void AppletHandle::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
//kDebug() << "hover enter";
|
||||
//kDebug(1209) << "hover enter";
|
||||
startFading(FadeIn);
|
||||
}
|
||||
|
||||
void AppletHandle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
//kDebug() << "hover leave";
|
||||
//kDebug(1209) << "hover leave";
|
||||
startFading(FadeOut);
|
||||
}
|
||||
|
||||
|
@ -249,14 +249,14 @@ bool ConfigXmlHandler::startElement(const QString &namespaceURI, const QString &
|
||||
Q_UNUSED(namespaceURI)
|
||||
Q_UNUSED(qName)
|
||||
|
||||
// kDebug() << "ConfigXmlHandler::startElement(" << localName << qName;
|
||||
// kDebug(1209) << "ConfigXmlHandler::startElement(" << localName << qName;
|
||||
int numAttrs = attrs.count();
|
||||
QString tag = localName.toLower();
|
||||
if (tag == "group") {
|
||||
for (int i = 0; i < numAttrs; ++i) {
|
||||
QString name = attrs.localName(i).toLower();
|
||||
if (name == "name") {
|
||||
kDebug() << "set group to " << attrs.value(i);
|
||||
kDebug(1209) << "set group to " << attrs.value(i);
|
||||
m_config->setCurrentGroup(attrs.value(i));
|
||||
}
|
||||
}
|
||||
@ -298,7 +298,7 @@ bool ConfigXmlHandler::endElement(const QString &namespaceURI, const QString &lo
|
||||
Q_UNUSED(namespaceURI)
|
||||
Q_UNUSED(qName)
|
||||
|
||||
// kDebug() << "ConfigXmlHandler::endElement(" << localName << qName;
|
||||
// kDebug(1209) << "ConfigXmlHandler::endElement(" << localName << qName;
|
||||
QString tag = localName.toLower();
|
||||
if (tag == "entry") {
|
||||
addItem();
|
||||
|
@ -135,11 +135,11 @@ void Containment::init()
|
||||
|
||||
void Containment::loadConstraints(KConfigGroup* group)
|
||||
{
|
||||
/*kDebug() << "!!!!!!!!!!!!initConstraints" << group->name() << containmentType();
|
||||
kDebug() << " location:" << group->readEntry("location", (int)d->location);
|
||||
kDebug() << " geom:" << group->readEntry("geometry", geometry());
|
||||
kDebug() << " formfactor:" << group->readEntry("formfactor", (int)d->formFactor);
|
||||
kDebug() << " screen:" << group->readEntry("screen", d->screen);*/
|
||||
/*kDebug(1209) << "!!!!!!!!!!!!initConstraints" << group->name() << containmentType();
|
||||
kDebug(1209) << " location:" << group->readEntry("location", (int)d->location);
|
||||
kDebug(1209) << " geom:" << group->readEntry("geometry", geometry());
|
||||
kDebug(1209) << " formfactor:" << group->readEntry("formfactor", (int)d->formFactor);
|
||||
kDebug(1209) << " screen:" << group->readEntry("screen", d->screen);*/
|
||||
setGeometry(group->readEntry("geometry", geometry()));
|
||||
setLocation((Plasma::Location)group->readEntry("location", (int)d->location));
|
||||
setFormFactor((Plasma::FormFactor)group->readEntry("formfactor", (int)d->formFactor));
|
||||
@ -156,7 +156,7 @@ void Containment::saveConstraints(KConfigGroup* group) const
|
||||
|
||||
void Containment::containmentConstraintsUpdated(Plasma::Constraints constraints)
|
||||
{
|
||||
//kDebug() << "got containmentConstraintsUpdated" << constraints << (QObject*)d->toolbox;
|
||||
//kDebug(1209) << "got containmentConstraintsUpdated" << constraints << (QObject*)d->toolbox;
|
||||
if (d->toolbox) {
|
||||
if (constraints & Plasma::ScreenConstraint) {
|
||||
d->toolbox->setPos(geometry().width() - d->toolbox->boundingRect().width(), 0);
|
||||
@ -201,7 +201,7 @@ Corona* Containment::corona() const
|
||||
|
||||
void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
||||
{
|
||||
//kDebug() << "let's see if we manage to get a context menu here, huh";
|
||||
//kDebug(1209) << "let's see if we manage to get a context menu here, huh";
|
||||
if (!scene() || !KAuthorized::authorizeKAction("desktop_contextmenu")) {
|
||||
Applet::contextMenuEvent(event);
|
||||
return;
|
||||
@ -225,10 +225,10 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
||||
}
|
||||
|
||||
KMenu desktopMenu;
|
||||
//kDebug() << "context menu event " << (QObject*)applet;
|
||||
//kDebug(1209) << "context menu event " << (QObject*)applet;
|
||||
if (!applet) {
|
||||
if (!scene() || (static_cast<Corona*>(scene())->isImmutable() && !KAuthorized::authorizeKAction("unlock_desktop"))) {
|
||||
//kDebug() << "immutability";
|
||||
//kDebug(1209) << "immutability";
|
||||
Applet::contextMenuEvent(event);
|
||||
return;
|
||||
}
|
||||
@ -238,7 +238,7 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
||||
QList<QAction*> actions = contextActions();
|
||||
|
||||
if (actions.count() < 1) {
|
||||
//kDebug() << "no applet, but no actions";
|
||||
//kDebug(1209) << "no applet, but no actions";
|
||||
Applet::contextMenuEvent(event);
|
||||
return;
|
||||
}
|
||||
@ -280,13 +280,13 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
||||
|
||||
if (!hasEntries) {
|
||||
Applet::contextMenuEvent(event);
|
||||
kDebug() << "no entries";
|
||||
kDebug(1209) << "no entries";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
event->accept();
|
||||
//kDebug() << "executing at" << event->screenPos();
|
||||
//kDebug(1209) << "executing at" << event->screenPos();
|
||||
desktopMenu.exec(event->screenPos());
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ void Containment::setFormFactor(FormFactor formFactor)
|
||||
return;
|
||||
}
|
||||
|
||||
//kDebug() << "switching FF to " << formFactor;
|
||||
//kDebug(1209) << "switching FF to " << formFactor;
|
||||
d->formFactor = formFactor;
|
||||
Layout *lay = layout();
|
||||
setLayout(0);
|
||||
@ -333,7 +333,7 @@ void Containment::setFormFactor(FormFactor formFactor)
|
||||
//FIXME: need a layout type here!
|
||||
break;
|
||||
default:
|
||||
kDebug() << "This can't be happening! Or... can it? ;)" << d->formFactor;
|
||||
kDebug(1209) << "This can't be happening! Or... can it? ;)" << d->formFactor;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -396,7 +396,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
|
||||
}
|
||||
|
||||
if (!applet) {
|
||||
kDebug() << "Applet" << name << "could not be loaded.";
|
||||
kDebug(1209) << "Applet" << name << "could not be loaded.";
|
||||
applet = new Applet;
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
|
||||
addApplet(applet);
|
||||
prepareApplet(applet, delayInit);
|
||||
|
||||
//kDebug() << "adding applet" << applet->name() << "with a default geometry of" << appletGeometry << appletGeometry.isValid();
|
||||
//kDebug(1209) << "adding applet" << applet->name() << "with a default geometry of" << appletGeometry << appletGeometry.isValid();
|
||||
if (appletGeometry.isValid()) {
|
||||
applet->setGeometry(appletGeometry);
|
||||
} else if (appletGeometry.x() != -1 && appletGeometry.y() != -1) {
|
||||
@ -469,7 +469,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
|
||||
}
|
||||
}
|
||||
|
||||
//kDebug() << applet->name() << "sizehint:" << applet->sizeHint() << "geometry:" << applet->geometry();
|
||||
//kDebug(1209) << applet->name() << "sizehint:" << applet->sizeHint() << "geometry:" << applet->geometry();
|
||||
|
||||
Corona *c = corona();
|
||||
if (c) {
|
||||
@ -626,19 +626,19 @@ void Containment::setScreen(int screen)
|
||||
if (screen > -1 && containmentType() == DesktopContainment && corona()) {
|
||||
Containment* currently = corona()->containmentForScreen(screen);
|
||||
if (currently && currently != this) {
|
||||
//kDebug() << "currently is on screen" << currently->screen() << "and is" << currently->name() << (QObject*)currently << (QObject*)this;
|
||||
//kDebug(1209) << "currently is on screen" << currently->screen() << "and is" << currently->name() << (QObject*)currently << (QObject*)this;
|
||||
currently->setScreen(-1);
|
||||
}
|
||||
}
|
||||
|
||||
//kDebug() << "setting screen to" << screen << "and we are a" << containmentType();
|
||||
//kDebug(1209) << "setting screen to" << screen << "and we are a" << containmentType();
|
||||
QDesktopWidget *desktop = QApplication::desktop();
|
||||
int numScreens = desktop->numScreens();
|
||||
if (screen < -1) {
|
||||
screen = -1;
|
||||
}
|
||||
|
||||
//kDebug() << "setting screen to " << screen << "and type is" << containmentType();
|
||||
//kDebug(1209) << "setting screen to " << screen << "and type is" << containmentType();
|
||||
if (screen < numScreens && screen > -1) {
|
||||
QRect r = desktop->screenGeometry(screen);
|
||||
|
||||
@ -666,10 +666,10 @@ void Containment::setScreen(int screen)
|
||||
// FIXME: positioning at this x,y will break if we switch between containments for a
|
||||
// given screen! we should change the pos() on new containment setup.
|
||||
setGeometry(r);
|
||||
//kDebug() << "setting geometry to" << desktop->screenGeometry(screen) << r << geometry();
|
||||
//kDebug(1209) << "setting geometry to" << desktop->screenGeometry(screen) << r << geometry();
|
||||
} else if (containmentType() == PanelContainment) {
|
||||
QRect r = desktop->screenGeometry(screen);
|
||||
//kDebug() << "we are a panel on" << r << ", let's move ourselves to a negative coordinate system" << -(r.y() * 2) - r.height() - INTER_CONTAINMENT_MARGIN;
|
||||
//kDebug(1209) << "we are a panel on" << r << ", let's move ourselves to a negative coordinate system" << -(r.y() * 2) - r.height() - INTER_CONTAINMENT_MARGIN;
|
||||
// panels are moved into negative coords; we double the x() so that each screen get's
|
||||
// it's own area for panels
|
||||
int vertOffset = (r.y() * 2) + r.height() + INTER_CONTAINMENT_MARGIN;
|
||||
@ -709,21 +709,21 @@ KPluginInfo::List Containment::knownContainments(const QString &category,
|
||||
}
|
||||
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint);
|
||||
//kDebug() << "constraint was" << constraint << "which got us" << offers.count() << "matches";
|
||||
//kDebug(1209) << "constraint was" << constraint << "which got us" << offers.count() << "matches";
|
||||
return KPluginInfo::fromServices(offers);
|
||||
}
|
||||
|
||||
KPluginInfo::List Containment::knownContainmentsForMimetype(const QString &mimetype)
|
||||
{
|
||||
QString constraint = QString("'%1' in MimeTypes").arg(mimetype);
|
||||
//kDebug() << "knownContainmentsForMimetype with" << mimetype << constraint;
|
||||
//kDebug(1209) << "knownContainmentsForMimetype with" << mimetype << constraint;
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Containment", constraint);
|
||||
return KPluginInfo::fromServices(offers);
|
||||
}
|
||||
|
||||
void Containment::dropEvent(QGraphicsSceneDragDropEvent *event)
|
||||
{
|
||||
//kDebug() << "drop event:" << event->mimeData()->text();
|
||||
//kDebug(1209) << "drop event:" << event->mimeData()->text();
|
||||
|
||||
QString mimetype(static_cast<Corona*>(scene())->appletMimeType());
|
||||
|
||||
@ -741,7 +741,7 @@ void Containment::dropEvent(QGraphicsSceneDragDropEvent *event)
|
||||
QRectF geom(event->scenePos(), QSize(0, 0));
|
||||
QVariantList args;
|
||||
args << url.url();
|
||||
// kDebug() << mimeName;
|
||||
// kDebug(1209) << mimeName;
|
||||
KPluginInfo::List appletList = Applet::knownAppletsForMimetype(mimeName);
|
||||
|
||||
if (appletList.isEmpty()) {
|
||||
@ -783,7 +783,7 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
|
||||
//QEvent::GraphicsSceneHoverEnter
|
||||
|
||||
// Otherwise we're watching something we shouldn't be...
|
||||
//kDebug() << "got sceneEvent";
|
||||
//kDebug(1209) << "got sceneEvent";
|
||||
Q_ASSERT(applet!=0);
|
||||
if (!d->applets.contains(applet)) {
|
||||
return false;
|
||||
@ -791,9 +791,9 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
|
||||
|
||||
switch (event->type()) {
|
||||
case QEvent::GraphicsSceneHoverEnter:
|
||||
//kDebug() << "got hoverenterEvent" << isImmutable << " " << applet->isImmutable();
|
||||
//kDebug(1209) << "got hoverenterEvent" << isImmutable << " " << applet->isImmutable();
|
||||
if (!isImmutable() && !applet->isImmutable() && !d->handles.contains(applet)) {
|
||||
//kDebug() << "generated applet handle";
|
||||
//kDebug(1209) << "generated applet handle";
|
||||
//TODO: there should be a small delay on showing these. they pop up too quickly/easily
|
||||
// right now
|
||||
AppletHandle *handle = new AppletHandle(this, applet);
|
||||
@ -819,7 +819,7 @@ void Containment::handleDisappeared(AppletHandle *handle)
|
||||
|
||||
void Containment::emitLaunchActivated()
|
||||
{
|
||||
kDebug();
|
||||
kDebug(1209);
|
||||
emit launchActivated();
|
||||
}
|
||||
|
||||
|
24
corona.cpp
24
corona.cpp
@ -211,7 +211,7 @@ void Corona::loadApplets(const QString& configName)
|
||||
}
|
||||
|
||||
int cid = group.toUInt();
|
||||
//kDebug() << "got a containment in the config, trying to make a" << containmentConfig.readEntry("plugin", QString()) << "from" << group;
|
||||
//kDebug(1209) << "got a containment in the config, trying to make a" << containmentConfig.readEntry("plugin", QString()) << "from" << group;
|
||||
Containment *c = addContainment(containmentConfig.readEntry("plugin", QString()), QVariantList(),
|
||||
cid, true);
|
||||
if (!c) {
|
||||
@ -222,14 +222,14 @@ void Corona::loadApplets(const QString& configName)
|
||||
c->init();
|
||||
c->loadConstraints(&containmentConfig);
|
||||
c->flushUpdatedConstraints();
|
||||
//kDebug() << "Containment" << c->id() << "geometry is" << c->geometry().toRect() << "config'd with" << appletConfig.name();
|
||||
//kDebug(1209) << "Containment" << c->id() << "geometry is" << c->geometry().toRect() << "config'd with" << appletConfig.name();
|
||||
KConfigGroup applets(&containmentConfig, "Applets");
|
||||
|
||||
// Sort the applet configs in order of geometry to ensure that applets
|
||||
// are added from left to right or top to bottom for a panel containment
|
||||
QList<KConfigGroup> appletConfigs;
|
||||
foreach (const QString &appletGroup, applets.groupList()) {
|
||||
//kDebug() << "reading from applet group" << appletGroup;
|
||||
//kDebug(1209) << "reading from applet group" << appletGroup;
|
||||
KConfigGroup appletConfig(&applets, appletGroup);
|
||||
appletConfigs.append(appletConfig);
|
||||
}
|
||||
@ -237,7 +237,7 @@ void Corona::loadApplets(const QString& configName)
|
||||
|
||||
foreach (KConfigGroup appletConfig, appletConfigs) {
|
||||
int appId = appletConfig.name().toUInt();
|
||||
//kDebug() << "the name is" << appletConfig.name();
|
||||
//kDebug(1209) << "the name is" << appletConfig.name();
|
||||
QString plugin = appletConfig.readEntry("plugin", QString());
|
||||
|
||||
if (plugin.isEmpty()) {
|
||||
@ -301,14 +301,14 @@ void Corona::loadDefaultSetup()
|
||||
//FIXME: implement support for system-wide defaults
|
||||
QDesktopWidget *desktop = QApplication::desktop();
|
||||
int numScreens = desktop->numScreens();
|
||||
kDebug() << "number of screens is" << numScreens;
|
||||
kDebug(1209) << "number of screens is" << numScreens;
|
||||
int topLeftScreen = 0;
|
||||
QPoint topLeftCorner = desktop->screenGeometry(0).topLeft();
|
||||
|
||||
// create a containment for each screen
|
||||
for (int i = 0; i < numScreens; ++i) {
|
||||
QRect g = desktop->screenGeometry(i);
|
||||
kDebug() << " screen " << i << "geometry is" << g;
|
||||
kDebug(1209) << " screen " << i << "geometry is" << g;
|
||||
Containment* c = addContainment("desktop");
|
||||
c->setScreen(i);
|
||||
c->setFormFactor(Plasma::Planar);
|
||||
@ -392,7 +392,7 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
|
||||
Containment* containment = 0;
|
||||
Applet* applet = 0;
|
||||
|
||||
//kDebug() << "Loading" << name << args << id;
|
||||
//kDebug(1209) << "Loading" << name << args << id;
|
||||
|
||||
if (pluginName.isEmpty()) {
|
||||
// default to the desktop containment
|
||||
@ -403,7 +403,7 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
|
||||
}
|
||||
|
||||
if (!containment) {
|
||||
kDebug() << "loading of containment" << name << "failed.";
|
||||
kDebug(1209) << "loading of containment" << name << "failed.";
|
||||
|
||||
// in case we got a non-Containment from Applet::loadApplet or a null containment was requested
|
||||
delete applet;
|
||||
@ -446,7 +446,7 @@ void Corona::destroyContainment(Containment *c)
|
||||
|
||||
void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
|
||||
{
|
||||
// kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
|
||||
// kDebug(1209) << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
|
||||
if (event->mimeData()->hasFormat(d->mimetype) ||
|
||||
KUrl::List::canDecode(event->mimeData())) {
|
||||
event->acceptProposedAction();
|
||||
@ -463,7 +463,7 @@ void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
|
||||
|
||||
void Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
|
||||
{
|
||||
// kDebug() << "Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent* event)";
|
||||
// kDebug(1209) << "Corona::dragLeaveEvent(QGraphicsSceneDragDropEvent* event)";
|
||||
//TODO If an established Applet is dragged out of the Corona, remove it and
|
||||
// create a QDrag type thing to keep the Applet's settings
|
||||
|
||||
@ -475,7 +475,7 @@ void Corona::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
|
||||
QGraphicsScene::dragMoveEvent(event);
|
||||
|
||||
event->accept();
|
||||
//kDebug() << "Corona::dragMoveEvent(QDragMoveEvent* event)";
|
||||
//kDebug(1209) << "Corona::dragMoveEvent(QDragMoveEvent* event)";
|
||||
}
|
||||
|
||||
void Corona::containmentDestroyed(QObject* obj)
|
||||
@ -539,7 +539,7 @@ void Corona::setImmutable(bool immutable)
|
||||
return;
|
||||
}
|
||||
|
||||
kDebug() << "setting immutability to" << immutable;
|
||||
kDebug(1209) << "setting immutability to" << immutable;
|
||||
d->immutable = immutable;
|
||||
d->updateContainmentImmutability();
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ void DataContainer::checkUsage()
|
||||
|
||||
void DataContainer::connectVisualization(QObject* visualization, uint updateInterval, Plasma::IntervalAlignment alignment)
|
||||
{
|
||||
// kDebug() << "connecting visualization" << (void*)visualization << "at interval of" << updateInterval;
|
||||
// kDebug(1209) << "connecting visualization" << (void*)visualization << "at interval of" << updateInterval;
|
||||
QMap<QObject *, SignalRelay *>::iterator objIt = d->relayObjects.find(visualization);
|
||||
bool connected = objIt != d->relayObjects.end();
|
||||
if (connected) {
|
||||
@ -120,12 +120,12 @@ void DataContainer::connectVisualization(QObject* visualization, uint updateInte
|
||||
d->relays.remove(relay->m_interval);
|
||||
delete relay;
|
||||
}
|
||||
// kDebug() << " already connected, but to a relay";
|
||||
// kDebug(1209) << " already connected, but to a relay";
|
||||
} else if (updateInterval < 1) {
|
||||
// the visualization was connected already, but not to a relay
|
||||
// and it still doesn't want to connect to a relay, so we have
|
||||
// nothing to do!
|
||||
//kDebug() << " already connected, nothing to do";
|
||||
//kDebug(1209) << " already connected, nothing to do";
|
||||
return;
|
||||
} else {
|
||||
disconnect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
|
||||
@ -141,11 +141,11 @@ void DataContainer::connectVisualization(QObject* visualization, uint updateInte
|
||||
d->relayObjects[visualization] = 0;
|
||||
|
||||
if (updateInterval < 1) {
|
||||
// kDebug() << " connecting directly";
|
||||
// kDebug(1209) << " connecting directly";
|
||||
connect(this, SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
|
||||
visualization, SLOT(dataUpdated(QString,Plasma::DataEngine::Data)));
|
||||
} else {
|
||||
// kDebug() << " connecting to a relay";
|
||||
// kDebug(1209) << " connecting to a relay";
|
||||
connect(d->signalRelay(this, visualization, updateInterval, alignment),
|
||||
SIGNAL(dataUpdated(QString,Plasma::DataEngine::Data)),
|
||||
visualization, SLOT(dataUpdated(QString,Plasma::DataEngine::Data)));
|
||||
|
@ -71,7 +71,7 @@ class DataEngine::Private
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*kDebug() << "DataEngine " << engine->objectName()
|
||||
/*kDebug(1209) << "DataEngine " << engine->objectName()
|
||||
<< ": could not find DataContainer " << sourceName
|
||||
<< ", creating" << endl;*/
|
||||
DataContainer* s = new DataContainer(engine);
|
||||
@ -90,7 +90,7 @@ class DataEngine::Private
|
||||
void connectSource(DataContainer* s, QObject* visualization, uint updateInterval,
|
||||
Plasma::IntervalAlignment align, bool immediateCall = true)
|
||||
{
|
||||
//kDebug() << "connect source called with interval" << updateInterval;
|
||||
//kDebug(1209) << "connect source called with interval" << updateInterval;
|
||||
if (updateInterval > 0) {
|
||||
// never more frequently than allowed, never more than 20 times per second
|
||||
uint min = qMax(50, minUpdateInterval); // for qMin below
|
||||
@ -115,12 +115,12 @@ class DataEngine::Private
|
||||
*newSource = false;
|
||||
}
|
||||
|
||||
//kDebug() << "requesting source " << sourceName;
|
||||
//kDebug(1209) << "requesting source " << sourceName;
|
||||
DataContainer* s = source(sourceName, false);
|
||||
|
||||
if (!s) {
|
||||
// we didn't find a data source, so give the engine an opportunity to make one
|
||||
/*kDebug() << "DataEngine " << engine->objectName()
|
||||
/*kDebug(1209) << "DataEngine " << engine->objectName()
|
||||
<< ": could not find DataContainer " << sourceName
|
||||
<< " will create on request" << endl;*/
|
||||
if (engine->sourceRequested(sourceName)) {
|
||||
@ -182,7 +182,7 @@ DataEngine::DataEngine(QObject* parent)
|
||||
|
||||
DataEngine::~DataEngine()
|
||||
{
|
||||
//kDebug() << objectName() << ": bye bye birdy! ";
|
||||
//kDebug(1209) << objectName() << ": bye bye birdy! ";
|
||||
delete d;
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ QStringList DataEngine::sources() const
|
||||
void DataEngine::connectSource(const QString& source, QObject* visualization,
|
||||
uint updateInterval, Plasma::IntervalAlignment intervalAlignment) const
|
||||
{
|
||||
//kDebug() << "connectSource" << source;
|
||||
//kDebug(1209) << "connectSource" << source;
|
||||
bool newSource;
|
||||
DataContainer* s = d->requestSource(source, &newSource);
|
||||
|
||||
@ -203,7 +203,7 @@ void DataEngine::connectSource(const QString& source, QObject* visualization,
|
||||
// don't request delayed updates (we want to do an immediate update in that case so they
|
||||
// don't have to wait for the first time out)
|
||||
d->connectSource(s, visualization, updateInterval, intervalAlignment, !newSource || updateInterval > 0);
|
||||
//kDebug() << " ==> source connected";
|
||||
//kDebug(1209) << " ==> source connected";
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ void DataEngine::internalUpdateSource(DataContainer* source)
|
||||
// skip updating this source; it's been too soon
|
||||
//TODO: should we queue an update in this case? return to this
|
||||
// once we see the results in real world usage
|
||||
//kDebug() << "internal update source is delaying" << source->timeSinceLastUpdate() << d->minUpdateInterval;
|
||||
//kDebug(1209) << "internal update source is delaying" << source->timeSinceLastUpdate() << d->minUpdateInterval;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ void DataEngine::internalUpdateSource(DataContainer* source)
|
||||
|
||||
void DataEngine::init()
|
||||
{
|
||||
// kDebug() << "DataEngine::init() called ";
|
||||
// kDebug(1209) << "DataEngine::init() called ";
|
||||
// default implementation does nothing. this is for engines that have to
|
||||
// start things in motion external to themselves before they can work
|
||||
}
|
||||
@ -279,7 +279,7 @@ bool DataEngine::sourceRequested(const QString &name)
|
||||
bool DataEngine::updateSource(const QString& source)
|
||||
{
|
||||
Q_UNUSED(source);
|
||||
//kDebug() << "updateSource source" << endl;
|
||||
//kDebug(1209) << "updateSource source" << endl;
|
||||
return false; //TODO: should this be true to trigger, even needless, updates on every tick?
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ void DataEngine::addSource(DataContainer* source)
|
||||
{
|
||||
SourceDict::const_iterator it = d->sources.find(source->objectName());
|
||||
if (it != d->sources.constEnd()) {
|
||||
kDebug() << "source named \"" << source->objectName() << "\" already exists.";
|
||||
kDebug(1209) << "source named \"" << source->objectName() << "\" already exists.";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -385,7 +385,7 @@ void DataEngine::updateInterval()
|
||||
|
||||
void DataEngine::removeSource(const QString& source)
|
||||
{
|
||||
//kDebug() << "removing source " << source;
|
||||
//kDebug(1209) << "removing source " << source;
|
||||
SourceDict::iterator it = d->sources.find(source);
|
||||
if (it != d->sources.end()) {
|
||||
emit sourceRemoved(it.key());
|
||||
|
@ -121,13 +121,13 @@ Plasma::DataEngine* DataEngineManager::loadDataEngine(const QString& name)
|
||||
QString error;
|
||||
|
||||
if (offers.isEmpty()) {
|
||||
kDebug() << "offers are empty for " << name << " with constraint " << constraint;
|
||||
kDebug(1209) << "offers are empty for " << name << " with constraint " << constraint;
|
||||
} else {
|
||||
engine = offers.first()->createInstance<Plasma::DataEngine>(0, QVariantList(), &error);
|
||||
}
|
||||
|
||||
if (!engine) {
|
||||
kDebug() << "Couldn't load engine \"" << name << "\". Error given: " << error;
|
||||
kDebug(1209) << "Couldn't load engine \"" << name << "\". Error given: " << error;
|
||||
return d->nullEngine();
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ void DesktopToolbox::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
continue;
|
||||
}
|
||||
|
||||
//kDebug() << "let's show and move" << tool << tool->boundingRect();
|
||||
//kDebug(1209) << "let's show and move" << tool << tool->boundingRect();
|
||||
tool->show();
|
||||
phase->moveItem(tool, Plasma::Phase::SlideIn, QPoint(x, y));
|
||||
//x += 0;
|
||||
@ -166,7 +166,7 @@ void DesktopToolbox::animate(qreal progress)
|
||||
m_animFrame = static_cast<int>(m_size * (1.0 - progress));
|
||||
}
|
||||
|
||||
//kDebug() << "animating at" << progress << "for" << m_animFrame;
|
||||
//kDebug(1209) << "animating at" << progress << "for" << m_animFrame;
|
||||
|
||||
if (progress >= 1) {
|
||||
m_animId = 0;
|
||||
@ -177,7 +177,7 @@ void DesktopToolbox::animate(qreal progress)
|
||||
|
||||
void DesktopToolbox::toolMoved(QGraphicsItem *item)
|
||||
{
|
||||
//kDebug() << "geometry is now " << static_cast<Plasma::Widget*>(item)->geometry();
|
||||
//kDebug(1209) << "geometry is now " << static_cast<Plasma::Widget*>(item)->geometry();
|
||||
if (!m_showing &&
|
||||
QGraphicsItem::children().indexOf(static_cast<Plasma::Widget*>(item)) != -1) {
|
||||
item->hide();
|
||||
@ -200,7 +200,7 @@ void DesktopToolbox::addTool(QGraphicsItem *tool, const QString &name)
|
||||
|
||||
void DesktopToolbox::enableTool(const QString &toolName, bool visible)
|
||||
{
|
||||
//kDebug() << (visible? "enabling" : "disabling") << "tool" << toolName;
|
||||
//kDebug(1209) << (visible? "enabling" : "disabling") << "tool" << toolName;
|
||||
QGraphicsItem *t = tool(toolName);
|
||||
|
||||
if (t) {
|
||||
@ -222,9 +222,9 @@ bool DesktopToolbox::isToolEnabled(const QString &toolName) const
|
||||
QGraphicsItem* DesktopToolbox::tool(const QString &toolName) const
|
||||
{
|
||||
foreach (QGraphicsItem *child, QGraphicsItem::children()) {
|
||||
//kDebug() << "checking tool" << child << child->data(ToolName);
|
||||
//kDebug(1209) << "checking tool" << child << child->data(ToolName);
|
||||
if (child->data(ToolName).toString() == toolName) {
|
||||
//kDebug() << "tool found!";
|
||||
//kDebug(1209) << "tool found!";
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ void Dialog::position(QGraphicsView * view,const QRectF boundingRect,QPointF sce
|
||||
globalPos.rx()-=((globalPos.rx() + width())-view->width());
|
||||
}
|
||||
move(globalPos);
|
||||
kDebug() << globalPos;
|
||||
kDebug(1209) << globalPos;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,11 +111,11 @@ QRectF FreeLayout::geometry() const
|
||||
QSizeF FreeLayout::sizeHint() const
|
||||
{
|
||||
if (parent()) {
|
||||
//kDebug() << "returning size hint from freelayout of" << parent()->geometry().size();
|
||||
//kDebug(1209) << "returning size hint from freelayout of" << parent()->geometry().size();
|
||||
return parent()->geometry().size();
|
||||
}
|
||||
|
||||
//kDebug() << "returning size hint from freelayout of" << maximumSize();
|
||||
//kDebug(1209) << "returning size hint from freelayout of" << maximumSize();
|
||||
return maximumSize();
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ qreal LayoutItem::widthForHeight(qreal h) const
|
||||
void LayoutItem::setLayout(Layout* layout)
|
||||
{
|
||||
if (d->layout && layout) {
|
||||
kDebug() << "already have a layout.";
|
||||
kDebug(1209) << "already have a layout.";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ void LayoutItem::setLayout(Layout* layout)
|
||||
// and we are without layout; we should tell our
|
||||
// children about this, but LayoutItem doesn't know
|
||||
// about children =/
|
||||
kDebug() << "layout removed from under us. expect crashes";
|
||||
kDebug(1209) << "layout removed from under us. expect crashes";
|
||||
}
|
||||
|
||||
d->layout = layout;
|
||||
|
36
phase.cpp
36
phase.cpp
@ -145,11 +145,11 @@ class Phase::Private
|
||||
{
|
||||
switch (state->movement) {
|
||||
case Phase::SlideIn:
|
||||
//kDebug() << "performMovement, SlideIn";
|
||||
//kDebug(1209) << "performMovement, SlideIn";
|
||||
animator->slideIn(amount, state->item, state->start, state->destination);
|
||||
break;
|
||||
case Phase::SlideOut:
|
||||
//kDebug() << "performMovement, SlideOut";
|
||||
//kDebug(1209) << "performMovement, SlideOut";
|
||||
animator->slideOut(amount, state->item, state->start, state->destination);
|
||||
break;
|
||||
}
|
||||
@ -230,7 +230,7 @@ void Phase::customAnimReceiverDestroyed(QObject* o)
|
||||
|
||||
void Phase::animateItem(QGraphicsItem* item, Animation animation)
|
||||
{
|
||||
//kDebug();
|
||||
//kDebug(1209);
|
||||
// get rid of any existing animations on this item.
|
||||
//TODO: shoudl we allow multiple anims per item?
|
||||
QMap<QGraphicsItem*, AnimationState*>::iterator it = d->animatedItems.find(item);
|
||||
@ -269,7 +269,7 @@ void Phase::animateItem(QGraphicsItem* item, Animation animation)
|
||||
|
||||
void Phase::moveItem(QGraphicsItem* item, Movement movement, const QPoint &destination)
|
||||
{
|
||||
//kDebug();
|
||||
//kDebug(1209);
|
||||
QMap<QGraphicsItem*, MovementState*>::iterator it = d->movingItems.find(item);
|
||||
if (it != d->movingItems.end()) {
|
||||
delete it.value();
|
||||
@ -347,12 +347,12 @@ void Phase::stopCustomAnimation(AnimId id)
|
||||
delete it.value();
|
||||
d->customAnims.erase(it);
|
||||
}
|
||||
//kDebug() << "stopCustomAnimation(AnimId " << id << ") done";
|
||||
//kDebug(1209) << "stopCustomAnimation(AnimId " << id << ") done";
|
||||
}
|
||||
|
||||
Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animation)
|
||||
{
|
||||
//kDebug() << "startElementAnimation(AnimId " << animation << ")";
|
||||
//kDebug(1209) << "startElementAnimation(AnimId " << animation << ")";
|
||||
ElementAnimationState *state = new ElementAnimationState;
|
||||
state->item = item;
|
||||
state->curve = d->animator->curve(animation);
|
||||
@ -365,7 +365,7 @@ Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animat
|
||||
state->currentInterval = state->interval;
|
||||
state->id = ++d->animId;
|
||||
|
||||
//kDebug() << "animateElement " << animation << ", interval: " << state->interval << ", frames: " << state->frames;
|
||||
//kDebug(1209) << "animateElement " << animation << ", interval: " << state->interval << ", frames: " << state->frames;
|
||||
bool needTimer = true;
|
||||
if (state->frames < 1) {
|
||||
state->frames = 1;
|
||||
@ -383,7 +383,7 @@ Phase::AnimId Phase::animateElement(QGraphicsItem *item, ElementAnimation animat
|
||||
state->item->update();
|
||||
}
|
||||
|
||||
//kDebug() << "startElementAnimation(AnimId " << animation << ") returning " << state->id;
|
||||
//kDebug(1209) << "startElementAnimation(AnimId " << animation << ") returning " << state->id;
|
||||
if (needTimer && !d->timerId) {
|
||||
// start a 20fps timer;
|
||||
//TODO: should be started at the maximum frame rate needed only?
|
||||
@ -400,7 +400,7 @@ void Phase::stopElementAnimation(AnimId id)
|
||||
delete it.value();
|
||||
d->animatedElements.erase(it);
|
||||
}
|
||||
//kDebug() << "stopElementAnimation(AnimId " << id << ") done";
|
||||
//kDebug(1209) << "stopElementAnimation(AnimId " << id << ") done";
|
||||
}
|
||||
|
||||
void Phase::setAnimationPixmap(AnimId id, const QPixmap &pixmap)
|
||||
@ -408,7 +408,7 @@ void Phase::setAnimationPixmap(AnimId id, const QPixmap &pixmap)
|
||||
QMap<AnimId, ElementAnimationState*>::iterator it = d->animatedElements.find(id);
|
||||
|
||||
if (it == d->animatedElements.end()) {
|
||||
kDebug() << "Phase::setAnimationPixmap(" << id << ") found no entry for it!";
|
||||
kDebug(1209) << "Phase::setAnimationPixmap(" << id << ") found no entry for it!";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -420,16 +420,16 @@ QPixmap Phase::animationResult(AnimId id)
|
||||
QMap<AnimId, ElementAnimationState*>::const_iterator it = d->animatedElements.find(id);
|
||||
|
||||
if (it == d->animatedElements.constEnd()) {
|
||||
//kDebug() << "Phase::animationResult(" << id << ") found no entry for it!";
|
||||
//kDebug(1209) << "Phase::animationResult(" << id << ") found no entry for it!";
|
||||
return QPixmap();
|
||||
}
|
||||
|
||||
ElementAnimationState* state = it.value();
|
||||
qreal progress = state->frames;
|
||||
//kDebug() << "Phase::animationResult(" << id << " at " << progress;
|
||||
//kDebug(1209) << "Phase::animationResult(" << id << " at " << progress;
|
||||
progress = state->currentFrame / progress;
|
||||
progress = qMin(qreal(1.0), qMax(qreal(0.0), progress));
|
||||
//kDebug() << "Phase::animationResult(" << id << " at " << progress;
|
||||
//kDebug(1209) << "Phase::animationResult(" << id << " at " << progress;
|
||||
|
||||
switch (state->animation) {
|
||||
case ElementAppear:
|
||||
@ -452,7 +452,7 @@ void Phase::timerEvent(QTimerEvent *event)
|
||||
elapsed = d->time.elapsed();
|
||||
}
|
||||
d->time.restart();
|
||||
//kDebug() << "timeEvent, elapsed time: " << elapsed;
|
||||
//kDebug(1209) << "timeEvent, elapsed time: " << elapsed;
|
||||
|
||||
foreach (AnimationState* state, d->animatedItems) {
|
||||
if (state->currentInterval <= elapsed) {
|
||||
@ -502,7 +502,7 @@ void Phase::timerEvent(QTimerEvent *event)
|
||||
|
||||
foreach (ElementAnimationState* state, d->animatedElements) {
|
||||
if (state->currentFrame == state->frames) {
|
||||
//kDebug() << "skipping" << state->id << "as its already at frame" << state->currentFrame << "of" << state->frames;
|
||||
//kDebug(1209) << "skipping" << state->id << "as its already at frame" << state->currentFrame << "of" << state->frames;
|
||||
// since we keep element animations around until they are
|
||||
// removed, we will end up with finished animations in the queue;
|
||||
// just skip them
|
||||
@ -512,7 +512,7 @@ void Phase::timerEvent(QTimerEvent *event)
|
||||
|
||||
if (state->currentInterval <= elapsed) {
|
||||
// we need to step forward!
|
||||
/*kDebug() << "stepping forwards element anim " << state->id << " from " << state->currentFrame
|
||||
/*kDebug(1209) << "stepping forwards element anim " << state->id << " from " << state->currentFrame
|
||||
<< " by " << qMax(1, elapsed / state->interval) << " to "
|
||||
<< state->currentFrame + qMax(1, elapsed / state->interval) << endl;*/
|
||||
state->currentFrame += qMax(1, elapsed / state->interval);
|
||||
@ -541,7 +541,7 @@ void Phase::timerEvent(QTimerEvent *event)
|
||||
if (state->currentInterval <= elapsed) {
|
||||
// advance the frame
|
||||
state->currentFrame += qMax(1, elapsed / state->interval);
|
||||
/*kDebug() << "custom anim for" << state->receiver << "to slot" << state->slot
|
||||
/*kDebug(1209) << "custom anim for" << state->receiver << "to slot" << state->slot
|
||||
<< "with interval of" << state->interval << "at frame" << state->currentFrame;*/
|
||||
|
||||
if (state->currentFrame < state->frames) {
|
||||
@ -585,7 +585,7 @@ void Phase::init()
|
||||
QString error;
|
||||
d->animator = offers.first()->createInstance<Plasma::Animator>(0, QVariantList(), &error);
|
||||
if (!d->animator) {
|
||||
kDebug() << "Could not load requested animator " << offers.first() << ". Error given: " << error;
|
||||
kDebug(1209) << "Could not load requested animator " << offers.first() << ". Error given: " << error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ const Package* ScriptEngine::package() const
|
||||
QStringList ScriptEngine::knownLanguages()
|
||||
{
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine");
|
||||
//kDebug() << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
|
||||
//kDebug(1209) << "Applet::knownApplets constraint was '" << constraint << "' which got us " << offers.count() << " matches";
|
||||
|
||||
QStringList languages;
|
||||
foreach (KService::Ptr service, offers) {
|
||||
@ -127,7 +127,7 @@ ScriptEngine* ScriptEngine::load(const QString &language, Applet *applet)
|
||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint);
|
||||
|
||||
if (offers.isEmpty()) {
|
||||
kDebug() << "ScriptEngine::load: no offers for \"" << language << "\"";
|
||||
kDebug(1209) << "ScriptEngine::load: no offers for \"" << language << "\"";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ ScriptEngine* ScriptEngine::load(const QString &language, Applet *applet)
|
||||
break;
|
||||
}
|
||||
|
||||
kDebug() << "Couldn't load script engine for language " << language << "! error reported: " << error;
|
||||
kDebug(1209) << "Couldn't load script engine for language " << language << "! error reported: " << error;
|
||||
}
|
||||
|
||||
if (!engine) {
|
||||
|
22
svg.cpp
22
svg.cpp
@ -53,7 +53,7 @@ class SharedSvgRenderer : public KSvgRenderer, public QSharedData
|
||||
|
||||
~SharedSvgRenderer()
|
||||
{
|
||||
//kDebug() << "leaving this world for a better one.";
|
||||
//kDebug(1209) << "leaving this world for a better one.";
|
||||
}
|
||||
};
|
||||
|
||||
@ -83,7 +83,7 @@ class Svg::Private
|
||||
path = imagePath;
|
||||
|
||||
if (!QFile::exists(path)) {
|
||||
kDebug() << "Plasma::Svg: file '" << path << "' does not exist!";
|
||||
kDebug(1209) << "Plasma::Svg: file '" << path << "' does not exist!";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -108,13 +108,13 @@ class Svg::Private
|
||||
if (!elementId.isEmpty()) {
|
||||
id.append(elementId);
|
||||
}
|
||||
//kDebug() << "id is " << id;
|
||||
//kDebug(1209) << "id is " << id;
|
||||
|
||||
if (QPixmapCache::find(id, p)) {
|
||||
//kDebug() << "found cached version of " << id;
|
||||
//kDebug(1209) << "found cached version of " << id;
|
||||
return;
|
||||
} else {
|
||||
//kDebug() << "didn't find cached version of " << id << ", so re-rendering";
|
||||
//kDebug(1209) << "didn't find cached version of " << id << ", so re-rendering";
|
||||
}
|
||||
|
||||
// we have to re-render this puppy
|
||||
@ -124,7 +124,7 @@ class Svg::Private
|
||||
} else {
|
||||
s = elementSize(elementId);
|
||||
}
|
||||
//kDebug() << "size for " << elementId << " is " << s;
|
||||
//kDebug(1209) << "size for " << elementId << " is " << s;
|
||||
|
||||
p = QPixmap(s);
|
||||
p.fill(Qt::transparent);
|
||||
@ -139,7 +139,7 @@ class Svg::Private
|
||||
renderPainter.end();
|
||||
|
||||
if (!QPixmapCache::insert( id, p )) {
|
||||
kDebug() << "pixmap cache is too small for inserting" << id << "of size" << s;
|
||||
kDebug(1209) << "pixmap cache is too small for inserting" << id << "of size" << s;
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ class Svg::Private
|
||||
QHash<QString, SharedSvgRenderer::Ptr>::const_iterator it = renderers.find(path);
|
||||
|
||||
if (it != renderers.end()) {
|
||||
//kDebug() << "gots us an existing one!";
|
||||
//kDebug(1209) << "gots us an existing one!";
|
||||
renderer = it.value();
|
||||
} else {
|
||||
renderer = new SharedSvgRenderer(path);
|
||||
@ -236,7 +236,7 @@ void Svg::paint(QPainter* painter, const QPointF& point, const QString& elementI
|
||||
{
|
||||
QPixmap pix;
|
||||
d->findInCache(pix, elementID);
|
||||
//kDebug() << "pix size is " << pix.size();
|
||||
//kDebug(1209) << "pix size is " << pix.size();
|
||||
painter->drawPixmap(QRectF(point, pix.size()), pix, QRectF(QPointF(0,0), pix.size()));
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ void Svg::paint(QPainter* painter, const QRectF& rect, const QString& elementID)
|
||||
{
|
||||
QPixmap pix;
|
||||
d->findInCache(pix, elementID);
|
||||
//kDebug() << "pix size is " << pix.size();
|
||||
//kDebug(1209) << "pix size is " << pix.size();
|
||||
painter->drawPixmap(rect, pix, QRectF(QPointF(0,0), pix.size()));
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ QString Svg::elementAtPoint(const QPoint &point) const
|
||||
QSizeF naturalSize = d->renderer->defaultSize();
|
||||
qreal dx = d->size.width() / naturalSize.width();
|
||||
qreal dy = d->size.height() / naturalSize.height();
|
||||
//kDebug() << point << "is really" << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy);
|
||||
//kDebug(1209) << point << "is really" << QPoint(point.x() *dx, naturalSize.height() - point.y() * dy);
|
||||
|
||||
return QString(); // d->renderer->elementAtPoint(QPoint(point.x() *dx, naturalSize.height() - point.y() * dy));
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ QString Theme::image( const QString& name ) const
|
||||
}
|
||||
|
||||
if (path.isEmpty()) {
|
||||
kDebug() << "Theme says: bad image path " << name
|
||||
kDebug(1209) << "Theme says: bad image path " << name
|
||||
<< "; looked in: " << search << endl;
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void Flash::setFont( const QFont &font )
|
||||
|
||||
void Flash::flash( const QString &text, int duration, const QTextOption &option)
|
||||
{
|
||||
kDebug() << duration;
|
||||
kDebug(1209) << duration;
|
||||
d->type = Private::Text;
|
||||
d->duration = (duration == 0) ? d->defaultDuration : duration;
|
||||
d->text = text;
|
||||
|
@ -189,7 +189,7 @@ bool IconAction::event(QEvent::Type type, const QPointF &pos)
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneMouseRelease: {
|
||||
// kDebug() << "IconAction::event got a QEvent::MouseButtonRelease, " << isSelected();
|
||||
// kDebug(1209) << "IconAction::event got a QEvent::MouseButtonRelease, " << isSelected();
|
||||
bool wasSelected = isSelected();
|
||||
setSelected(false);
|
||||
if (wasSelected) {
|
||||
@ -287,7 +287,7 @@ void Icon::addAction(QAction *action)
|
||||
{
|
||||
int count = d->cornerActions.count();
|
||||
if (count > 3) {
|
||||
kDebug() << "Icon::addAction(QAction*) no more room for more actions!";
|
||||
kDebug(1209) << "Icon::addAction(QAction*) no more room for more actions!";
|
||||
}
|
||||
|
||||
IconAction* iconAction = new IconAction(this, action);
|
||||
|
@ -142,7 +142,7 @@ qreal LineEdit::heightForWidth(qreal w) const
|
||||
QTextDocument* doc = document();
|
||||
doc->setTextWidth(w);
|
||||
qreal height = doc->size().height();
|
||||
kDebug() << "LineEdit::heightForWidth(" << w << ") is " << height;
|
||||
kDebug(1209) << "LineEdit::heightForWidth(" << w << ") is " << height;
|
||||
return height;
|
||||
}
|
||||
|
||||
|
@ -358,14 +358,14 @@ void Widget::addChild(Widget *w)
|
||||
|
||||
w->setParentItem(this);
|
||||
|
||||
//kDebug() << "Added Child Widget" << (QObject*)w << "our geom is" << geometry();
|
||||
//kDebug(1209) << "Added Child Widget" << (QObject*)w << "our geom is" << geometry();
|
||||
|
||||
if (layout()) {
|
||||
layout()->addItem(w);
|
||||
}
|
||||
|
||||
updateGeometry();
|
||||
//kDebug() << "after the item is added our geom is now" << geometry();
|
||||
//kDebug(1209) << "after the item is added our geom is now" << geometry();
|
||||
}
|
||||
|
||||
void Widget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
Loading…
Reference in New Issue
Block a user