too tired to do much of anything else, i figured i could fix some ebn issues

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690173
This commit is contained in:
Aaron J. Seigo 2007-07-20 08:06:27 +00:00
parent d692c9f3d5
commit af043ca588
15 changed files with 42 additions and 19 deletions

View File

@ -109,14 +109,14 @@ void Animator::frameAppear(qreal frame, QGraphicsItem* item, const QRegion& draw
Q_UNUSED(drawable)
}
void Animator::slideIn(qreal progress, QGraphicsItem* item, QPoint destination)
void Animator::slideIn(qreal progress, QGraphicsItem *item, const QPoint &destination)
{
kDebug()<<k_funcinfo<<endl;
Q_UNUSED(progress);
item->translate(-destination.x(),-destination.y());
}
void Animator::slideOut(qreal progress, QGraphicsItem* item, QPoint destination)
void Animator::slideOut(qreal progress, QGraphicsItem *item, const QPoint &destination)
{
Q_UNUSED(progress);
//kDebug()<<k_funcinfo<<endl;

View File

@ -42,7 +42,7 @@ public:
explicit Animator(QObject *parent = 0, const QStringList& list = QStringList());
~Animator();
// Parameter defintions
// Parameter definitions
virtual int framesPerSecond(Plasma::Phase::Animation);
virtual int framesPerSecond(Plasma::Phase::Movement);
virtual int framesPerSecond(Plasma::Phase::ElementAnimation);
@ -61,8 +61,8 @@ public:
virtual void activate(qreal progress, QGraphicsItem* item);
// Item movements
virtual void slideIn(qreal progress, QGraphicsItem* item, QPoint destination);
virtual void slideOut(qreal progress, QGraphicsItem* item, QPoint destination);
virtual void slideIn(qreal progress, QGraphicsItem* item, const QPoint &destination);
virtual void slideOut(qreal progress, QGraphicsItem* item, const QPoint &destination);
// Rendering
virtual void renderBackground(QImage& background);

View File

@ -172,7 +172,7 @@ KConfigGroup Applet::config() const
KConfigGroup Applet::config(const QString& group) const
{
KConfigGroup cg = config();
cg.changeGroup(instanceName() + "-" + group);
cg.changeGroup(instanceName() + '-' + group);
return cg;
}
@ -296,7 +296,7 @@ QString visibleFailureText(const QString& reason)
if (reason.isEmpty()) {
text = i18n("This object could not be created.");
} else {
text = i18n("This object could not be created for the following reason:<p>%1", reason);
text = i18n("This object could not be created for the following reason:<p>%1</p>", reason);
}
return text;

View File

@ -285,7 +285,7 @@ class PLASMA_EXPORT Applet : public QObject, public Widget
/**
* Sets whether or not this applet is immutable or not.
*
* @arg immutable true if this applet should not be changable
* @arg immutable true if this applet should not be changeable
**/
void setImmutable(bool immutable);

View File

@ -45,7 +45,7 @@ public:
~Corona();
/**
* The applets and Corona surface are changable or not
* The applets and Corona surface are changeable or not
**/
bool immutable() const;

View File

@ -16,8 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef PLASMA_ENGINE_MANAGER_H
#define PLASMA_ENGINE_MANAGER_H
#ifndef PLASMA_DATAENGINEMANAGER_H
#define PLASMA_DATAENGINEMANAGER_H
#include <QtCore/QHash>
#include <plasma/dataengine.h>

View File

@ -1,3 +1,20 @@
/*
* Copyright 2007 Jani Huhtanen <jani.huhtanen@tut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License version 2 as
* published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <cmath>

View File

@ -17,6 +17,8 @@
* Boston, MA 02110-1301, USA. *
*******************************************************************************/
#include "package.h"
#include <QDir>
#include <QFile>
@ -30,7 +32,6 @@
#include <KTemporaryFile>
#include <KZip>
#include "package.h"
#include "packagemetadata.h"
#include "packagestructure.h"

View File

@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA. *
*******************************************************************************/
#include <KLocale>
#include "packages_p.h"
#include <KLocale>
namespace Plasma
{

View File

@ -215,7 +215,7 @@ void Phase::animateItem(QGraphicsItem* item, Animation animation)
}
}
void Phase::moveItem(QGraphicsItem* item, Movement movement, QPoint destination)
void Phase::moveItem(QGraphicsItem* item, Movement movement, const QPoint &destination)
{
//kDebug()<<k_funcinfo<<endl;
QMap<QGraphicsItem*, MovementState*>::iterator it = d->movingItems.find(item);

View File

@ -83,7 +83,7 @@ public:
~Phase();
void animateItem(QGraphicsItem* item, Animation anim);
void moveItem(QGraphicsItem* item, Movement movement, QPoint destination);
void moveItem(QGraphicsItem* item, Movement movement, const QPoint &destination);
void render(QGraphicsItem* item, QImage& image, RenderOp op);
AnimId animateElement(QGraphicsItem *obj, ElementAnimation);

View File

@ -156,7 +156,7 @@ QSizeF LineEdit::sizeHint() const
return document()->size();
}
void LineEdit::setDefaultText(QString text)
void LineEdit::setDefaultText(const QString &text)
{
d->defaultText = text.simplified();
d->defaultText = QString("<font color=\"gray\">") + d->defaultText + QString("</font>");

View File

@ -62,7 +62,7 @@ class PLASMA_EXPORT LineEdit : public QGraphicsTextItem, public LayoutItem
void setGeometry(const QRectF& geometry);
QSizeF sizeHint() const;
void setDefaultText(QString text);
void setDefaultText(const QString &text);
const QString toHtml();
const QString toPlainText();

View File

@ -247,4 +247,9 @@ QRect PushButton::geometry() const
return boundingRect().toRect();
}
bool PushButton::isEmpty() const
{
return false;
}
} // namespace Plasma

View File

@ -83,7 +83,7 @@ class PLASMA_EXPORT PushButton : public QObject, public QGraphicsItem, public QL
virtual Qt::Orientations expandingDirections() const;
virtual void setGeometry(const QRect& r);
virtual QRect geometry() const ;
virtual bool isEmpty() const {return false;}
virtual bool isEmpty() const;
Q_SIGNALS:
void clicked();