[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasma-addons (silent)
From: Tobias Koenig <tokoe () kde ! org>
Date: 2008-10-29 18:07:54
Message-ID: 1225303674.907387.16952.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 877521 by tokoe:
SVN_SILENT: coding style fixes
M +11 -10 applets/comic/comic.cpp
M +6 -5 applets/comic/comic.h
M +9 -9 applets/comic/configwidget.cpp
M +1 -1 dataengines/comic/comicprovider.cpp
M +32 -32 dataengines/comic/comicproviderwrapper.cpp
M +2 -2 dataengines/comic/comicproviderwrapper.h
D dataengines/comic/pics (directory)
--- trunk/KDE/kdeplasma-addons/applets/comic/comic.cpp #877520:877521
@@ -23,18 +23,18 @@
#include <QtCore/QTimer>
#include <QtGui/QAction>
+#include <QtGui/QGraphicsLinearLayout>
#include <QtGui/QGraphicsSceneMouseEvent>
#include <QtGui/QLabel>
#include <QtGui/QPainter>
#include <QtGui/QVBoxLayout>
-#include <QtGui/QGraphicsLinearLayout>
#include <KConfigDialog>
-#include <KPushButton>
#include <KDatePicker>
#include <KFileDialog>
#include <KIO/NetAccess>
#include <knuminput.h>
+#include <KPushButton>
#include <KRun>
#include <KTemporaryFile>
@@ -55,7 +55,8 @@
class ChooseStripNumDialog : public KDialog
{
public:
- ChooseStripNumDialog( QWidget *parent, int current, int max ) : KDialog( \
parent ) + ChooseStripNumDialog( QWidget *parent, int current, int max )
+ : KDialog( parent )
{
setCaption( i18n( "Go to Strip" ) );
setButtons( Ok | Cancel );
@@ -121,9 +122,9 @@
loadConfig();
- mSvg = new Plasma::Svg(this);
- mSvg->setImagePath("widgets/arrows");
- mSvg->setContainsMultipleImages(true);
+ mSvg = new Plasma::Svg( this );
+ mSvg->setImagePath( "widgets/arrows" );
+ mSvg->setContainsMultipleImages( true );
mCurrentDay = QDate::currentDate();
mDateChangedTimer = new QTimer( this );
@@ -583,15 +584,15 @@
mFrame = new Plasma::Frame( this );
QGraphicsLinearLayout *l = new QGraphicsLinearLayout();
mPrevButton = new Plasma::PushButton( mFrame );
- mPrevButton->nativeWidget()->setIcon( KIcon("arrow-left") );
+ mPrevButton->nativeWidget()->setIcon( KIcon( "arrow-left" ) );
mPrevButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum \
);
- mPrevButton->setMaximumSize( IconSize(KIconLoader::MainToolbar), \
IconSize(KIconLoader::MainToolbar) ); + mPrevButton->setMaximumSize( \
IconSize( KIconLoader::MainToolbar ), IconSize( \
KIconLoader::MainToolbar ) );
connect( mPrevButton, SIGNAL( clicked() ), this , SLOT( \
slotPreviousDay() ) ); l->addItem( mPrevButton );
mNextButton = new Plasma::PushButton( mFrame );
- mNextButton->nativeWidget()->setIcon( KIcon("arrow-right") );
+ mNextButton->nativeWidget()->setIcon( KIcon( "arrow-right" ) );
mNextButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum \
);
- mNextButton->setMaximumSize( IconSize(KIconLoader::MainToolbar), \
IconSize(KIconLoader::MainToolbar) ); + mNextButton->setMaximumSize( \
IconSize( KIconLoader::MainToolbar ), IconSize( \
KIconLoader::MainToolbar ) );
connect( mNextButton, SIGNAL( clicked() ), this , SLOT( slotNextDay() ) \
); l->addItem( mNextButton );
mFrame->setLayout( l );
--- trunk/KDE/kdeplasma-addons/applets/comic/comic.h #877520:877521
@@ -31,14 +31,15 @@
#include <solid/networking.h>
class ConfigWidget;
+class FadingItem;
class FullViewWidget;
class QTimer;
class QAction;
-class FadingItem;
+
namespace Plasma {
- class Frame;
- class PushButton;
- class Svg;
+class Frame;
+class PushButton;
+class Svg;
}
class ComicApplet : public Plasma::Applet
@@ -123,6 +124,6 @@
bool mArrowsOnHover;
};
-K_EXPORT_PLASMA_APPLET(comic, ComicApplet)
+K_EXPORT_PLASMA_APPLET( comic, ComicApplet )
#endif
--- trunk/KDE/kdeplasma-addons/applets/comic/configwidget.cpp #877520:877521
@@ -22,17 +22,17 @@
#include <QtCore/QAbstractListModel>
#include <QtCore/QTimer>
-#include <QtGui/QSortFilterProxyModel>
#include <QtGui/QCheckBox>
#include <QtGui/QComboBox>
#include <QtGui/QGridLayout>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
+#include <QtGui/QSortFilterProxyModel>
#include <KLocale>
#include <KIcon>
+#include <KNS/Engine>
#include <KServiceTypeTrader>
-#include <KNS/Engine>
class ComicModel : public QAbstractListModel
{
@@ -40,7 +40,7 @@
ComicModel( const Plasma::DataEngine::Data &comics, QObject *parent = 0 )
: QAbstractListModel( parent )
{
- setComics(comics);
+ setComics( comics );
}
void setComics( const Plasma::DataEngine::Data &comics )
@@ -64,7 +64,7 @@
if ( role == Qt::DisplayRole ) {
return mComics[ mComics.keys()[ index.row() ] ].toStringList()[ 0 ];
} else if ( role == Qt::DecorationRole ) {
- return KIcon(mComics[ mComics.keys()[ index.row() ] \
].toStringList()[ 1 ]); + return KIcon( mComics[ mComics.keys()[ \
index.row() ] ].toStringList()[ 1 ] ); } else if ( role == Qt::UserRole ) {
return mComics.keys()[ index.row() ];
} else {
@@ -92,9 +92,9 @@
mShowComicUrl = new QCheckBox( i18n( "Show Comic Url" ), this );
mShowComicIdentifier = new QCheckBox( i18n( "Show Comic Identifier" ), this );
mShowArrowsOnHover = new QCheckBox( i18n( "Show Arrows Only on Hover" ), this );
- mNewStuff = new QPushButton(this);
- mNewStuff->setToolTip(i18n("Download new comics"));
- mNewStuff->setText(i18n("Get New Comics..."));
+ mNewStuff = new QPushButton( this );
+ mNewStuff->setToolTip( i18n( "Download new comics" ) );
+ mNewStuff->setText( i18n( "Get New Comics..." ) );
connect( mNewStuff, SIGNAL( clicked() ), this, SLOT( getNewStuff() ) );
layout->addWidget( label, 0, 0 );
@@ -110,7 +110,7 @@
mModel = new ComicModel( mEngine->query( "providers" ), this );
mProxyModel = new QSortFilterProxyModel( this );
mProxyModel->setSourceModel( mModel );
- mProxyModel->sort(0, Qt::AscendingOrder);
+ mProxyModel->sort( 0, Qt::AscendingOrder );
mComicIdentifier->setModel( mProxyModel );
if ( mModel->rowCount() < 1 ) {
QTimer::singleShot( 0, this, SLOT( getNewStuff() ) );
@@ -126,7 +126,7 @@
KNS::Engine engine( this );
if ( engine.init( "comic.knsrc" ) ) {
KNS::Entry::List entries = engine.downloadDialogModal( this );
- if (entries.size() > 0) {
+ if ( entries.size() > 0 ) {
mModel->setComics( mEngine->query( "providers" ) );
}
}
--- trunk/KDE/kdeplasma-addons/dataengines/comic/comicprovider.cpp #877520:877521
@@ -29,7 +29,7 @@
: mParent( parent ),
mIsCurrent( false ),
mFirstStripNumber( 1 ),
- mComicDescription(service)
+ mComicDescription( service )
{
}
--- trunk/KDE/kdeplasma-addons/dataengines/comic/comicproviderwrapper.cpp \
#877520:877521 @@ -86,7 +86,7 @@
return QDate::fromString( variant.toString(), Qt::ISODate );
} else {
DateWrapper* dw = qobject_cast<DateWrapper*>( variant.value<QObject*>() );
- if (dw) {
+ if ( dw ) {
return dw->date();
}
}
@@ -255,7 +255,7 @@
void ComicProviderWrapper::init()
{
const QString path = KStandardDirs::locate( "data", "plasma/comics/" + \
mProvider->pluginName() + "/" );
- if (!path.isEmpty()) {
+ if ( !path.isEmpty() ) {
Plasma::PackageStructure::Ptr structure = \
ComicProviderKross::packageStructure(); structure->setPath( path );
mPackage = new Plasma::Package( path, structure );
@@ -327,7 +327,7 @@
return mKrossImage.image();
}
-QVariant ComicProviderWrapper::identifierToScript(const QVariant &identifier)
+QVariant ComicProviderWrapper::identifierToScript( const QVariant &identifier )
{
if ( identifierType() == ComicProvider::DateIdentifier && identifier.type() != \
QVariant::Bool ) {
return QVariant::fromValue( qobject_cast<QObject*>( new DateWrapper( this, \
identifier.toDate() ) ) ); @@ -479,7 +479,7 @@
{
switch ( identifierType() ) {
case DateIdentifier:
- mProvider->setFirstStripDate( DateWrapper::fromVariant(firstIdentifier) );
+ mProvider->setFirstStripDate( DateWrapper::fromVariant( firstIdentifier ) );
break;
case NumberIdentifier:
mProvider->setFirstStripNumber( firstIdentifier.toInt() );
@@ -640,17 +640,17 @@
int height = 0;
int width = 0;
- switch (position) {
- case Top:
- case Bottom:
- height = header.height() + comic.height();
- width = ( header.width() >= comic.width() ) ? header.width() : \
comic.width();
- break;
- case Left:
- case Right:
- height = ( header.height() >= comic.height() ) ? header.height() : \
comic.height();
- width = header.width() + comic.width();
- break;
+ switch ( position ) {
+ case Top:
+ case Bottom:
+ height = header.height() + comic.height();
+ width = ( header.width() >= comic.width() ) ? header.width() : \
comic.width(); + break;
+ case Left:
+ case Right:
+ height = ( header.height() >= comic.height() ) ? header.height() : \
comic.height(); + width = header.width() + comic.width();
+ break;
}
QImage image = QImage( QSize( width, height ), QImage::Format_RGB32 );
@@ -662,23 +662,23 @@
QPoint headerPos;
QPoint comicPos;
- switch (position) {
- case Top:
- headerPos = QPoint( ( ( width - header.width() ) / 2 ), 0 );
- comicPos = QPoint( ( ( width - comic.width() ) / 2 ), header.height() );
- break;
- case Bottom:
- headerPos = QPoint( ( ( width - header.width() ) / 2 ), comic.height() );
- comicPos = QPoint( ( ( width - comic.width() ) / 2 ), 0 );
- break;
- case Left:
- headerPos = QPoint( 0, ( ( height - header.height() ) / 2 ) );
- comicPos = QPoint( header.width(), ( ( height - comic.height() ) / 2 ) );
- break;
- case Right:
- headerPos = QPoint( comic.width(), ( ( height - header.height() ) / 2 ) );
- comicPos = QPoint( 0, ( ( height - comic.height() ) / 2 ) );
- break;
+ switch ( position ) {
+ case Top:
+ headerPos = QPoint( ( ( width - header.width() ) / 2 ), 0 );
+ comicPos = QPoint( ( ( width - comic.width() ) / 2 ), header.height() );
+ break;
+ case Bottom:
+ headerPos = QPoint( ( ( width - header.width() ) / 2 ), comic.height() \
); + comicPos = QPoint( ( ( width - comic.width() ) / 2 ), 0 );
+ break;
+ case Left:
+ headerPos = QPoint( 0, ( ( height - header.height() ) / 2 ) );
+ comicPos = QPoint( header.width(), ( ( height - comic.height() ) / 2 ) \
); + break;
+ case Right:
+ headerPos = QPoint( comic.width(), ( ( height - header.height() ) / 2 ) \
); + comicPos = QPoint( 0, ( ( height - comic.height() ) / 2 ) );
+ break;
}
painter.drawImage( headerPos, header );
painter.drawImage( comicPos, comic );
--- trunk/KDE/kdeplasma-addons/dataengines/comic/comicproviderwrapper.h \
#877520:877521 @@ -192,8 +192,8 @@
QVariant callFunction( const QString &name, const QVariantList &args = \
QVariantList() ); const QStringList& extensions() const;
bool functionCalled() const;
- QVariant identifierToScript(const QVariant &identifier);
- QVariant identifierFromScript(const QVariant &identifier) const;
+ QVariant identifierToScript( const QVariant &identifier );
+ QVariant identifierFromScript( const QVariant &identifier ) const;
void setIdentifierToDefault();
void checkIdentifier( QVariant *identifier );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic