[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdeplasma-addons] applets/comic: comic plasmoid ported to QML
From: Reza Shah <rshah0385 () kireihana ! com>
Date: 2012-11-12 22:33:12
Message-ID: 20121112223312.EBE00A6091 () git ! kde ! org
[Download RAW message or body]
Git commit c6cdb8379bc5bb9d307cc2b0e5a18c5281c3646c by Reza Shah.
Committed on 13/11/2012 at 08:29.
Pushed by rshah into branch 'master'.
comic plasmoid ported to QML
REVIEW: 107192
FEATURE:
M +3 -5 applets/comic/CMakeLists.txt
A +63 -0 applets/comic/activecomicmodel.cpp [License: GPL (v2+)]
A +49 -0 applets/comic/activecomicmodel.h [License: GPL (v2+)]
M +57 -118 applets/comic/appearanceSettings.ui
D +0 -136 applets/comic/arrowwidget.cpp
D +0 -81 applets/comic/arrowwidget.h
D +0 -108 applets/comic/buttonbar.cpp
D +0 -98 applets/comic/buttonbar.h
M +226 -366 applets/comic/comic.cpp
M +73 -39 applets/comic/comic.h
D +0 -124 applets/comic/comicwidgets.h
M +0 -1 applets/comic/configwidget.cpp
M +0 -1 applets/comic/configwidget.h
D +0 -106 applets/comic/fullviewwidget.cpp
D +0 -47 applets/comic/fullviewwidget.h
D +0 -236 applets/comic/imagewidget.cpp
D +0 -73 applets/comic/imagewidget.h
A +74 -0 applets/comic/package/contents/ui/ButtonBar.qml [License: GPL \
(v2+)] A +116 -0 applets/comic/package/contents/ui/ComicBottomInfo.qml \
[License: GPL (v2+)] A +87 -0 \
applets/comic/package/contents/ui/ComicCentralView.qml [License: GPL (v2+)] A \
+85 -0 applets/comic/package/contents/ui/FullViewWidget.qml [License: GPL \
(v2+)] A +136 -0 applets/comic/package/contents/ui/ImageWidget.qml [License: \
GPL (v2+)] A +228 -0 applets/comic/package/contents/ui/main.qml [License: \
GPL (v2+)] A +126 -0 applets/comic/package/metadata.desktop
http://commits.kde.org/kdeplasma-addons/c6cdb8379bc5bb9d307cc2b0e5a18c5281c3646c
diff --git a/applets/comic/CMakeLists.txt b/applets/comic/CMakeLists.txt
index 91fa29f..55735b3 100644
--- a/applets/comic/CMakeLists.txt
+++ b/applets/comic/CMakeLists.txt
@@ -9,17 +9,14 @@ set(comic_SRCS
comic.cpp
comicmodel.cpp
configwidget.cpp
- fullviewwidget.cpp
- imagewidget.cpp
- arrowwidget.cpp
comicarchivejob.cpp
comicarchivedialog.cpp
checknewstrips.cpp
comicdata.cpp
- buttonbar.cpp
comicinfo.cpp
comicsaver.cpp
stripselector.cpp
+ activecomicmodel.cpp
)
kde4_add_ui_files(comic_SRCS
@@ -30,7 +27,7 @@ kde4_add_ui_files(comic_SRCS
)
kde4_add_plugin(plasma_applet_comic ${comic_SRCS})
-target_link_libraries(plasma_applet_comic ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} \
${KDE4_SOLID_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KNEWSTUFF3_LIBS} ) \
+target_link_libraries(plasma_applet_comic ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} \
${KDE4_SOLID_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KNEWSTUFF3_LIBS} \
${QT_QTDECLARATIVE_LIBRARY})
if(HAVE_NEPOMUK)
target_link_libraries(plasma_applet_comic ${NEPOMUK_LIBRARIES} \
${NEPOMUK_UTILS_LIBRARIES} ${SOPRANO_LIBRARIES}) @@ -40,3 +37,4 @@ install(TARGETS \
plasma_applet_comic DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES \
plasma-comic-default.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES comic.knsrc DESTINATION ${CONFIG_INSTALL_DIR})
+install(DIRECTORY package/ DESTINATION \
${DATA_INSTALL_DIR}/plasma/packages/org.kde.comic) \ No newline at end of file
diff --git a/applets/comic/activecomicmodel.cpp b/applets/comic/activecomicmodel.cpp
new file mode 100644
index 0000000..84992ac
--- /dev/null
+++ b/applets/comic/activecomicmodel.cpp
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "activecomicmodel.h"
+
+ActiveComicModel::ActiveComicModel(QObject *parent)
+ : QStandardItemModel(0, 1, parent)
+{
+ QHash<int, QByteArray> newRoleNames = roleNames();
+ newRoleNames[ComicKeyRole] = "key";
+ newRoleNames[ComicTitleRole] = "title";
+ newRoleNames[ComicIconRole] = "icon";
+ newRoleNames[ComicHighlightRole] = "highlight";
+
+ setRoleNames(newRoleNames);
+ connect(this, SIGNAL(modelReset()),
+ this, SIGNAL(countChanged()));
+ connect(this, SIGNAL(rowsInserted(QModelIndex, int, int)),
+ this, SIGNAL(countChanged()));
+ connect(this, SIGNAL(rowsRemoved(QModelIndex, int, int)),
+ this, SIGNAL(countChanged()));
+}
+
+void ActiveComicModel::addComic(const QString &key, const QString &title, const \
QString &iconPath, bool highlight) +{
+ QList<QStandardItem *> newRow;
+ QStandardItem *item = new QStandardItem(title);
+
+ item->setData(key, ComicKeyRole);
+ item->setData(title, ComicTitleRole);
+ item->setData(iconPath, ComicIconRole);
+ item->setData(highlight, ComicHighlightRole);
+
+ newRow << item;
+ appendRow(newRow);
+}
+
+QVariantHash ActiveComicModel::get(int row) const
+{
+ QModelIndex idx = index(row, 0);
+ QVariantHash hash;
+
+ QHash<int, QByteArray>::const_iterator i;
+ for (i = roleNames().constBegin(); i != roleNames().constEnd(); ++i) {
+ hash[i.value()] = data(idx, i.key());
+ }
+
+ return hash;
+}
diff --git a/applets/comic/activecomicmodel.h b/applets/comic/activecomicmodel.h
new file mode 100644
index 0000000..848a98b
--- /dev/null
+++ b/applets/comic/activecomicmodel.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ACTIVE_COMIC_MODEL_H
+#define ACTIVE_COMIC_MODEL_H
+
+#include <QtGui/QtGui>
+#include <QtCore/QtCore>
+
+class ActiveComicModel : public QStandardItemModel
+{
+ Q_OBJECT
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+
+public:
+ enum Roles {
+ ComicKeyRole = Qt::UserRole+1,
+ ComicTitleRole = Qt::UserRole+2,
+ ComicIconRole = Qt::UserRole+3,
+ ComicHighlightRole = Qt::UserRole+4
+ };
+
+ ActiveComicModel(QObject *parent = 0);
+
+ void addComic(const QString &key, const QString &title, const QString &iconPath, \
bool highlight = true); +
+ int count() { return rowCount(QModelIndex()); }
+
+ Q_INVOKABLE QVariantHash get(int i) const;
+
+Q_SIGNALS:
+ void countChanged();
+};
+
+#endif
\ No newline at end of file
diff --git a/applets/comic/appearanceSettings.ui \
b/applets/comic/appearanceSettings.ui index a153bf2..5dc1144 100644
--- a/applets/comic/appearanceSettings.ui
+++ b/applets/comic/appearanceSettings.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>444</width>
- <height>346</height>
+ <width>280</width>
+ <height>182</height>
</rect>
</property>
<property name="minimumSize">
@@ -20,6 +20,38 @@
<string notr="true"/>
</property>
<layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item row="0" column="1">
<layout class="QFormLayout" name="formLayout_2">
<property name="sizeConstraint">
@@ -51,60 +83,8 @@
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QPushButton" name="pushButton_Size">
- <property name="text">
- <string>Maximum &Size of Widget</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>5</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
- <item row="0" column="2">
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="0">
- <spacer name="verticalSpacer_4">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>5</height>
- </size>
- </property>
- </spacer>
- </item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_3">
<property name="font">
@@ -220,49 +200,7 @@
</item>
</layout>
</item>
- <item row="4" column="0">
- <spacer name="verticalSpacer_5">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>5</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_2">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Tabbar</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="6" column="1">
+ <item row="4" column="1">
<widget class="KButtonGroup" name="kbuttongroup">
<property name="title">
<string/>
@@ -275,32 +213,34 @@
<number>0</number>
</property>
<item>
- <widget class="QRadioButton" name="radioButton_1">
- <property name="text">
- <string comment="Tabbar will show text only">Text only</string>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButton_2">
- <property name="text">
- <string comment="Tabbar will show icons only">Icons only</string>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
</property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioButton_3">
- <property name="text">
- <string comment="Tabbar will show both text and icons">Text and \
Icons</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
+ </spacer>
</item>
</layout>
</widget>
</item>
+ <item row="0" column="2">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<customwidgets>
@@ -313,7 +253,6 @@
</customwidgets>
<tabstops>
<tabstop>checkBox_arrows</tabstop>
- <tabstop>pushButton_Size</tabstop>
<tabstop>checkBox_title</tabstop>
<tabstop>checkBox_identifier</tabstop>
<tabstop>checkBox_author</tabstop>
diff --git a/applets/comic/arrowwidget.cpp b/applets/comic/arrowwidget.cpp
deleted file mode 100644
index 72d48ed..0000000
--- a/applets/comic/arrowwidget.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2009 Matthias Fuchs <mat69@gmx.net> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 "arrowwidget.h"
-
-#include <QtGui/QGraphicsLinearLayout>
-#include <QtGui/QGraphicsSceneMouseEvent>
-#include <QtGui/QPainter>
-
-#include <Plasma/Svg>
-
-const int Arrow::HEIGHT = 28;
-const int Arrow::WIDTH = 28;
-
-Arrow::Arrow( QGraphicsItem *parent, Qt::WindowFlags wFlags )
- : QGraphicsWidget( parent, wFlags ),
- mDirection( Plasma::Left )
-{
- setCacheMode( DeviceCoordinateCache );
-
- mArrow = new Plasma::Svg( this );
- mArrow->setImagePath( "widgets/arrows" );
- mArrow->setContainsMultipleImages( true );
- setDirection( mDirection );
-}
-
-Arrow::~Arrow()
-{
-}
-
-QSizeF Arrow::sizeHint( Qt::SizeHint which, const QSizeF &constraint ) const
-{
- Q_UNUSED( which )
- Q_UNUSED( constraint )
-
- return QSizeF( WIDTH, HEIGHT );
-}
-
-Plasma::Direction Arrow::direction() const
-{
- return mDirection;
-}
-
-void Arrow::setDirection(Plasma::Direction direction)
-{
- mDirection = direction;
- if ( mDirection == Plasma::Left ) {
- mArrowName = "left-arrow";
- } else if ( mDirection == Plasma::Right ) {
- mArrowName = "right-arrow";
- } else if ( mDirection == Plasma::Down ) {
- mArrowName = "down-arrow";
- } else if ( mDirection == Plasma::Up ) {
- mArrowName = "up-arrow";
- }
-}
-
-void Arrow::paint( QPainter *p, const QStyleOptionGraphicsItem *, QWidget* )
-{
- p->setRenderHint( QPainter::Antialiasing );
-
- mArrow->paint( p, 0, 0, WIDTH, HEIGHT, mArrowName );
-}
-
-ArrowWidget::ArrowWidget( QGraphicsItem *parent, Qt::WindowFlags wFlags )
- : QGraphicsWidget( parent, wFlags )
-{
- QGraphicsLinearLayout *layout = new QGraphicsLinearLayout( Qt::Vertical );
- layout->setContentsMargins( 1, 1, 1, 1 );
- layout->addStretch();
- mArrow = new Arrow( this );
- layout->addItem( mArrow );
- layout->addStretch();
-
- setLayout( layout );
-}
-
-ArrowWidget::~ArrowWidget()
-{
-}
-
-void ArrowWidget::setDirection( Plasma::Direction direction )
-{
- mArrow->setDirection( direction );
-}
-
-Plasma::Direction ArrowWidget::direction() const
-{
- return mArrow->direction();
-}
-
-void ArrowWidget::mousePressEvent ( QGraphicsSceneMouseEvent *event )
-{
- if ( event->button() == Qt::LeftButton ) {
- emit clicked();
- }
-}
-
-QSizeF ArrowWidget::sizeHint( Qt::SizeHint which, const QSizeF &constraint ) const
-{
- if ( !isVisible() ) {
- return QSizeF( 0, 0 );
- }
-
- return QGraphicsWidget::sizeHint( which, constraint );
-}
-
-void ArrowWidget::hideEvent( QHideEvent *event )
-{
- updateGeometry();
- QGraphicsWidget::hideEvent( event );
-}
-
-void ArrowWidget::showEvent(QShowEvent* event)
-{
- updateGeometry();
- QGraphicsWidget::showEvent( event );
-}
-
-#include "arrowwidget.moc"
diff --git a/applets/comic/arrowwidget.h b/applets/comic/arrowwidget.h
deleted file mode 100644
index 64b1b36..0000000
--- a/applets/comic/arrowwidget.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2009 Matthias Fuchs <mat69@gmx.net> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 . *
- ***************************************************************************/
-
-#ifndef ARROWWIDGET_H
-#define ARROWWIDGET_H
-
-#include <QGraphicsWidget>
-
-#include <Plasma/Plasma>
-
-class QGraphicsSceneMouseEvent;
-
-namespace Plasma {
-class Svg;
-}
-
-class Arrow : public QGraphicsWidget
-{
- Q_OBJECT
-
- public:
- Arrow( QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0 );
- ~Arrow();
-
- void paint( QPainter *p, const QStyleOptionGraphicsItem *, QWidget* widget = \
0 );
- void setDirection( Plasma::Direction direction );
- Plasma::Direction direction() const;
-
- protected:
- QSizeF sizeHint( Qt::SizeHint which, const QSizeF &constraint = QSizeF() ) \
const;
-
- private:
- Plasma::Svg *mArrow;
- Plasma::Direction mDirection;
- QString mArrowName;
-
- static const int HEIGHT;
- static const int WIDTH;
-};
-
-class ArrowWidget : public QGraphicsWidget
-{
- Q_OBJECT
-
- public:
- ArrowWidget ( QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0 );
- ~ArrowWidget();
-
- void setDirection( Plasma::Direction direction );
- Plasma::Direction direction() const;
-
- Q_SIGNALS:
- void clicked();
-
- protected:
- void mousePressEvent( QGraphicsSceneMouseEvent *event );
- QSizeF sizeHint( Qt::SizeHint which, const QSizeF &constraint = QSizeF() ) \
const;
- void hideEvent( QHideEvent *event );
- void showEvent( QShowEvent *event );
-
- private:
- Arrow *mArrow;
-};
-
-#endif
diff --git a/applets/comic/buttonbar.cpp b/applets/comic/buttonbar.cpp
deleted file mode 100644
index bb4dbef..0000000
--- a/applets/comic/buttonbar.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2008-2012 Matthias Fuchs <mat69@gmx.net> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 "buttonbar.h"
-
-#include <KIconLoader>
-#include <KLocale>
-#include <KPushButton>
-
-#include <Plasma/Frame>
-#include <Plasma/PushButton>
-
-#include <QtGui/QGraphicsLinearLayout>
-#include <QtCore/QPropertyAnimation>
-
-ButtonBar::ButtonBar(QGraphicsWidget *parent)
- : QObject(parent)
-{
- mFrame = new Plasma::Frame(parent);
- mFrame->setZValue(10);
- QGraphicsLinearLayout *l = new QGraphicsLinearLayout();
- mPrev = new Plasma::PushButton(mFrame);
- mPrev->nativeWidget()->setIcon(KIcon("arrow-left"));
- mPrev->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- mPrev->setMaximumSize(IconSize(KIconLoader::MainToolbar), \
IconSize(KIconLoader::MainToolbar));
- connect(mPrev, SIGNAL(clicked()), this , SIGNAL(prevClicked()));
- l->addItem(mPrev);
-
- mZoom = new Plasma::PushButton(mFrame);
- mZoom->nativeWidget()->setIcon(KIcon("zoom-original"));
- mZoom->nativeWidget()->setToolTip(i18n("Show at actual size in a different view. \
Alternatively, click with the middle mouse button on the comic."));
- mZoom->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- mZoom->setMaximumSize(IconSize(KIconLoader::MainToolbar), \
IconSize(KIconLoader::MainToolbar));
- connect(mZoom, SIGNAL(clicked()), this, SIGNAL(zoomClicked()));
- l->addItem(mZoom);
-
- mNext = new Plasma::PushButton(mFrame);
- mNext->nativeWidget()->setIcon(KIcon("arrow-right"));
- mNext->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- mNext->setMaximumSize(IconSize(KIconLoader::MainToolbar), \
IconSize(KIconLoader::MainToolbar));
- connect(mNext, SIGNAL(clicked()), this , SIGNAL(nextClicked()));
- l->addItem(mNext);
- mFrame->setLayout(l);
- mFrame->setFrameShadow(Plasma::Frame::Raised);
- // To get correct frame size in constraintsEvent
- l->activate();
- mFrame->setOpacity(0.0);
-
- mFrameAnim = new QPropertyAnimation(mFrame, "opacity", mFrame);
- mFrameAnim->setDuration(100);
- mFrameAnim->setStartValue(0.0);
- mFrameAnim->setEndValue(1.0);
-}
-
-ButtonBar::~ButtonBar()
-{
-}
-
-QSizeF ButtonBar::size() const
-{
- return mFrame->size();
-}
-
-void ButtonBar::setPos(const QPointF &pos)
-{
- mFrame->setPos(pos);
-}
-
-void ButtonBar::show()
-{
- mFrameAnim->setDirection(QAbstractAnimation::Forward);
- mFrameAnim->start();
-}
-
-void ButtonBar::hide()
-{
- mFrameAnim->setDirection(QAbstractAnimation::Backward);
- mFrameAnim->start();
-}
-
-
-void ButtonBar::setNextEnabled(bool enabled)
-{
- mNext->setEnabled(enabled);
-}
-
-void ButtonBar::setPrevEnabled(bool enabled)
-{
- mPrev->setEnabled(enabled);
-}
-
-#include "buttonbar.moc"
diff --git a/applets/comic/buttonbar.h b/applets/comic/buttonbar.h
deleted file mode 100644
index d4020bb..0000000
--- a/applets/comic/buttonbar.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2008-2012 Matthias Fuchs <mat69@gmx.net> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 . *
- ***************************************************************************/
-
-#ifndef BUTTON_BAR_H
-#define BUTTON_BAR_H
-
-#include <QtCore/QObject>
-#include <QtCore/QSizeF>
-
-class QPointF;
-class QPropertyAnimation;
-class QGraphicsWidget;
-
-namespace Plasma {
- class Frame;
- class PushButton;
-}
-
-/**
- * ButtonBar is a container holding a next and previous button
- * as well as a zoom button.
- * It utilizes a Plasma::Frame to hold all the content
- */
-class ButtonBar : public QObject
-{
- Q_OBJECT
-
- public:
- /**
- * Creates a ButtonBar
- * @note the button bar is hidden by default and has no
- * position associated with it
- */
- explicit ButtonBar(QGraphicsWidget *parent);
- ~ButtonBar();
-
- QSizeF size() const;
-
- /**
- * Sets the position of the frame
- * @param pos the position the frame should be placed at
- */
- void setPos(const QPointF &pos);
-
- /**
- * Will fade in the button bar
- */
- void show();
-
- /**
- * Will fade out the button bar
- */
- void hide();
-
- /**
- * Enables the next button
- * @param enabled true if the button should be enabled
- * @note disabled by default
- */
- void setNextEnabled(bool enabled);
-
- /**
- * Enables the previous button
- * @param enabled true if the button should be enabled
- * @note disabled by default
- */
- void setPrevEnabled(bool enabled);
-
- signals:
- void nextClicked();
- void prevClicked();
- void zoomClicked();
-
- private:
- Plasma::Frame *mFrame;
- QPropertyAnimation *mFrameAnim;
- Plasma::PushButton *mPrev;
- Plasma::PushButton *mNext;
- Plasma::PushButton *mZoom;
-};
-
-#endif
diff --git a/applets/comic/comic.cpp b/applets/comic/comic.cpp
index 3753eac..b8dbd34 100644
--- a/applets/comic/comic.cpp
+++ b/applets/comic/comic.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 2007 by Tobias Koenig <tokoe@kde.org> *
* Copyright (C) 2008 by Marco Martin <notmart@gmail.com> *
* Copyright (C) 2008-2011 Matthias Fuchs <mat69@gmx.net> *
+ * Copyright (C) 2012 Reza Fatahilah Shah <rshah0385@kireihana.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -24,8 +25,6 @@
#include "comicarchivejob.h"
#include "checknewstrips.h"
#include "stripselector.h"
-#include "comicwidgets.h"
-#include "buttonbar.h"
#include "comicsaver.h"
#include <QtCore/QTimer>
@@ -35,6 +34,8 @@
#include <QtGui/QGraphicsSceneMouseEvent>
#include <QtGui/QGraphicsSceneWheelEvent>
#include <QtGui/QSortFilterProxyModel>
+#include <QtDeclarative/QDeclarativeEngine>
+#include <QtDeclarative/QDeclarativeContext>
#include <KAction>
#include <KConfigDialog>
@@ -45,13 +46,11 @@
#include <KStandardShortcut>
#include <Plasma/Containment>
-#include <plasma/tooltipmanager.h>
+#include <Plasma/DeclarativeWidget>
+#include <Plasma/Package>
-#include "arrowwidget.h"
#include "comicmodel.h"
#include "configwidget.h"
-#include "fullviewwidget.h"
-#include "imagewidget.h"
K_GLOBAL_STATIC( ComicUpdater, globalComicUpdater )
@@ -60,8 +59,6 @@ const int ComicApplet::CACHE_LIMIT = 20;
ComicApplet::ComicApplet( QObject *parent, const QVariantList &args )
: Plasma::PopupApplet( parent, args ),
mDifferentComic( true ),
- mShowPreviousButton( false ),
- mShowNextButton( false ),
mShowComicUrl( false ),
mShowComicAuthor( false ),
mShowComicTitle( false ),
@@ -70,37 +67,36 @@ ComicApplet::ComicApplet( QObject *parent, const QVariantList \
&args ) mArrowsOnHover( true ),
mMiddleClick( true ),
mCheckNewStrips( 0 ),
- mMainWidget( 0 ),
- mCentralLayout( 0 ),
- mBottomLayout( 0 ),
- mFullViewWidget( 0 ),
+ mDeclarativeWidget( 0 ),
mActionShop( 0 ),
mEngine( 0 ),
- mTabAdded( false ),
- mButtonBar(0),
- mSavingDir(0)
+ mSavingDir(0),
+ mActiveComicModel(parent)
{
setHasConfigurationInterface( true );
resize( 600, 250 );
setAspectRatioMode( Plasma::IgnoreAspectRatio );
setPopupIcon( "face-smile-big" );
-
- graphicsWidget();
}
void ComicApplet::init()
{
- connect(this, SIGNAL(appletTransformedByUser()), this, SLOT(slotSizeChanged()));
-
- Plasma::ToolTipManager::self()->registerWidget( this );
-
globalComicUpdater->init( globalConfig() );
mSavingDir = new SavingDir(config());
configChanged();
-
- buttonBar();
+ //QML
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(this);
+ mDeclarativeWidget = new Plasma::DeclarativeWidget(this);
+ layout->addItem(mDeclarativeWidget);
+
+ mDeclarativeWidget->engine()->rootContext()->setContextProperty("comicApplet", \
this); +
+ Plasma::PackageStructure::Ptr structure = \
Plasma::PackageStructure::load("Plasma/Generic"); + Plasma::Package \
package(QString(), "org.kde.comic", structure); + \
mDeclarativeWidget->setQmlPath(package.filePath("mainscript")); + //End of QML
mEngine = dataEngine( "comic" );
mModel = new ComicModel( mEngine->query( "providers" ), mTabIdentifier, this );
@@ -131,7 +127,7 @@ void ComicApplet::init()
mActionNextNewStripTab->setShortcut( KStandardShortcut::openNew() );
addAction( "next new strip" , mActionNextNewStripTab );
mActions.append( mActionNextNewStripTab );
- connect( mActionNextNewStripTab, SIGNAL(triggered(bool)), this, \
SLOT(slotNextNewStrip()) ); + connect( mActionNextNewStripTab, \
SIGNAL(triggered(bool)), this, SIGNAL(showNextNewStrip()) );
mActionGoFirst = new QAction( KIcon( "go-first" ), i18n( "Jump to &first Strip" \
), this ); mActions.append( mActionGoFirst );
@@ -185,107 +181,12 @@ void ComicApplet::init()
ComicApplet::~ComicApplet()
{
- delete mFullViewWidget;
delete mSavingDir;
}
QGraphicsWidget *ComicApplet::graphicsWidget()
{
- if ( !mMainWidget ) {
- mMainWidget = new QGraphicsWidget( this );
- mMainWidget->setMinimumSize( 150, 60 );
- mMainWidget->setAcceptHoverEvents( true );
- mMainWidget->installEventFilter( this );
-
- QGraphicsLinearLayout *layout = new QGraphicsLinearLayout;
- layout->setContentsMargins( 0, 0, 0, 0 );
- layout->setSpacing( 0 );
-
- mCentralLayout = new QGraphicsLinearLayout;
- mCentralLayout->setOrientation( Qt::Vertical );
- mCentralLayout->setContentsMargins( 0, 0, 0, 0 );
- mCentralLayout->setSpacing( 0 );
-
- mBottomLayout = new QGraphicsLinearLayout;
- mBottomLayout->setContentsMargins( 0, 2, 0, 0 );
- mBottomLayout->setSpacing( 0 );
-
- mTabBar = new ComicTabBar( mMainWidget );
- mTabBar->nativeWidget()->setSizePolicy( QSizePolicy::Expanding, \
QSizePolicy::Fixed );
- mTabBar->hide();
- connect( mTabBar, SIGNAL(currentChanged(int)), this, \
SLOT(slotTabChanged(int)) );
-
- mLabelTop = new ComicLabel( mMainWidget );
- mLabelTop->setMinimumWidth( 0 );
- mLabelTop->nativeWidget()->setWordWrap( false );
- mLabelTop->nativeWidget()->setSizePolicy( QSizePolicy( \
QSizePolicy::Preferred, QSizePolicy::Fixed ) );
- mLabelTop->setAlignment( Qt::AlignCenter );
- mLabelTop->hide();
- mCentralLayout->addItem( mLabelTop );
-
- mImageWidget = new ImageWidget( mMainWidget );
- mImageWidget->setZValue( 0 );
- mImageWidget->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, \
QSizePolicy::Expanding ) );
- mCentralLayout->addItem( mImageWidget );
-
- mLabelId = new ComicLabel( mMainWidget );
- mLabelId->setMinimumWidth( 0 );
- mLabelId->nativeWidget()->setWordWrap( false );
- mLabelId->nativeWidget()->setCursor( Qt::PointingHandCursor );
- mLabelId->nativeWidget()->setToolTip( i18n( "Jump to Strip ..." ) );
- mLabelId->nativeWidget()->setSizePolicy( QSizePolicy( \
QSizePolicy::Preferred, QSizePolicy::Fixed ) );
- mLabelId->hide();
- mBottomLayout->addItem( mLabelId );
- mBottomLayout->addStretch( 1 );
-
- mLabelUrl = new ComicLabel( mMainWidget );
- mLabelUrl->setMinimumWidth( 0 );
- mLabelUrl->nativeWidget()->setWordWrap( false );
- if ( hasAuthorization( "LaunchApp" ) ) {
- mLabelUrl->nativeWidget()->setCursor( Qt::PointingHandCursor );
- mLabelUrl->nativeWidget()->setToolTip( i18n( "Visit the comic website" ) \
);
- }
- mLabelUrl->nativeWidget()->setSizePolicy( QSizePolicy( \
QSizePolicy::Preferred, QSizePolicy::Fixed ) );
- mLabelUrl->hide();
- mBottomLayout->addItem( mLabelUrl );
- mCentralLayout->addItem( mBottomLayout );
-
- mLeftArrow = new ArrowWidget( mMainWidget );
- mLeftArrow->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, \
QSizePolicy::Expanding ) );
- mLeftArrow->setCursor( Qt::PointingHandCursor );
- mLeftArrow->hide();
- connect( mLeftArrow, SIGNAL(clicked()), this, SLOT(slotPreviousDay()) );
- layout->addItem( mLeftArrow );
- layout->addItem( mCentralLayout );
-
- mRightArrow = new ArrowWidget( mMainWidget );
- mRightArrow->setDirection( Plasma::Right );
- mRightArrow->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, \
QSizePolicy::Expanding ) );
- mRightArrow->setCursor( Qt::PointingHandCursor );
- mRightArrow->hide();
- connect( mRightArrow, SIGNAL(clicked()), this, SLOT(slotNextDay()) );
- layout->addItem( mRightArrow );
-
- mMainWidget->setLayout( layout );
- }
-
- return mMainWidget;
-}
-
-void ComicApplet::setTabBarVisible( bool isVisible )
-{
- if ( !mCentralLayout ) {
- return;
- }
-
- mTabBar->setVisible( isVisible );
- if ( !mTabAdded && isVisible ) {
- mCentralLayout->insertItem( 0, mTabBar );
- mTabAdded = true;
- } else if ( mTabAdded && !isVisible ) {
- mCentralLayout->removeItem( mTabBar );
- mTabAdded = false;
- }
+ return mDeclarativeWidget;
}
void ComicApplet::dataUpdated( const QString &source, const Plasma::DataEngine::Data \
&data ) @@ -315,37 +216,17 @@ void ComicApplet::dataUpdated( const QString &source, \
const Plasma::DataEngine::
setAssociatedApplicationUrls(mCurrent.websiteUrl());
- // get the text at top
- QString tempTop;
- if ( mShowComicTitle ) {
- tempTop = mCurrent.title();
- tempTop += ( ( !mCurrent.stripTitle().isEmpty() && \
!mCurrent.title().isEmpty() ) ? " - " : "" ) + mCurrent.stripTitle();
- }
-
- if ( mShowComicAuthor && !mCurrent.author().isEmpty() ) {
- tempTop = ( !tempTop.isEmpty() ? mCurrent.author() + ": " + tempTop : \
mCurrent.author() );
- }
-
//looking at the last index, thus not mark it as new
KConfigGroup cg = config();
if (!mCurrent.hasNext() && mCheckNewComicStripsIntervall) {
- const int index = mTabBar->currentIndex();
- mTabBar->setTabHighlighted( index, false );
- mActionNextNewStripTab->setEnabled( mTabBar->hasHighlightedTabs() );
+ setTabHighlighted( mCurrent.id(), false );
+ mActionNextNewStripTab->setEnabled( hasHighlightedTabs() );
}
//call the slot to check if the position needs to be saved
slotStorePosition();
- mLabelTop->setText( tempTop );
- mImageWidget->setImage(mCurrent.image());
- mImageWidget->setIsLeftToRight( data[ "isLeftToRight" ].toBool() );
- mImageWidget->setIsTopToBottom( data[ "isTopToBottom" ].toBool() );
- mLabelId->setText( mCurrent.currentReadable() );
- mLabelUrl->setText( mCurrent.websiteUrl().host() );
- mImageWidget->setScaled( !mCurrent.scaleComic() );
-
- //disconnect if there is either no error, or an error that can not be fixed \
automatically + //disconnect if there is either no error, or an error that can \
not be fixed automatically if ( !errorAutoFixable ) {
mEngine->disconnectSource( source, this );
}
@@ -363,37 +244,13 @@ void ComicApplet::dataUpdated( const QString &source, const \
Plasma::DataEngine:: }
updateView();
+
+ refreshComicData();
}
void ComicApplet::updateView()
{
- const bool tabsVisible = (mTabIdentifier.count() > 1);
- setTabBarVisible( tabsVisible );
- mLabelTop->setVisible( ( mShowComicAuthor || mShowComicTitle ) && \
!mLabelTop->text().isEmpty() );
- mLabelId->setVisible( mShowComicIdentifier && !mLabelId->text().isEmpty() );
- mLabelUrl->setVisible( mShowComicUrl && !mLabelUrl->text().isEmpty() );
- const int spacing = ( mLabelTop->isVisible() ? 2 : 0 );
- const int id = ( tabsVisible ? 1 : 0 );
- mCentralLayout->setItemSpacing( id, spacing );
- if ( mLabelId->isVisible() || mLabelUrl->isVisible() ) {
- mBottomLayout->setContentsMargins( 0, 2, 0, 0 );
- } else {
- mBottomLayout->setContentsMargins( 0, 0, 0, 0 );
- }
-
- updateButtons();
updateContextMenu();
-
- Plasma::ToolTipContent toolTipData;
- if ( !mCurrent.additionalText().isEmpty() ) {
- toolTipData = Plasma::ToolTipContent( mCurrent.additionalText(), QString() \
);
- toolTipData.setAutohide( false );
- }
- Plasma::ToolTipManager::self()->setContent( mMainWidget, toolTipData );
-
- if (mCurrent.hasImage()) {
- QTimer::singleShot( 1, this, SLOT(updateSize()) );//HACK
- }
}
void ComicApplet::createConfigurationInterface( KConfigDialog *parent )
@@ -406,7 +263,6 @@ void ComicApplet::createConfigurationInterface( KConfigDialog \
*parent ) mConfigWidget->setShowErrorPicture( mShowErrorPicture );
mConfigWidget->setArrowsOnHover( mArrowsOnHover );
mConfigWidget->setMiddleClick( mMiddleClick );
- mConfigWidget->setTabView( mTabView - 1);//-1 because counting starts at 0, yet \
we use flags that start at 1
mConfigWidget->setCheckNewComicStripsIntervall( mCheckNewComicStripsIntervall );
//not storing this value, since other applets might have changed it inbetween
@@ -421,7 +277,6 @@ void ComicApplet::createConfigurationInterface( KConfigDialog \
*parent )
parent->addPage( mConfigWidget->appearanceSettings, i18n( "Appearance" ), \
"image" );
parent->addPage( mConfigWidget->advancedSettings, i18n( "Advanced" ), \
"system-run" );
- connect( mConfigWidget, SIGNAL(maxSizeClicked()), this, SLOT(slotShowMaxSize()) \
); connect( parent, SIGNAL(applyClicked()), this, SLOT(applyConfig()) );
connect( parent, SIGNAL(okClicked()), this, SLOT(applyConfig()) );
connect(mConfigWidget, SIGNAL(enableApply()), parent, SLOT(settingsModified()));
@@ -429,14 +284,13 @@ void ComicApplet::createConfigurationInterface( KConfigDialog \
*parent )
void ComicApplet::applyConfig()
{
- mShowComicUrl = mConfigWidget->showComicUrl();
- mShowComicAuthor = mConfigWidget->showComicAuthor();
- mShowComicTitle = mConfigWidget->showComicTitle();
- mShowComicIdentifier = mConfigWidget->showComicIdentifier();
- mShowErrorPicture = mConfigWidget->showErrorPicture();
- mArrowsOnHover = mConfigWidget->arrowsOnHover();
- mMiddleClick = mConfigWidget->middleClick();
- mTabView = mConfigWidget->tabView() + 1;//+1 because counting starts at 0, yet \
we use flags that start at 1 + setShowComicUrl(mConfigWidget->showComicUrl());
+ setShowComicAuthor(mConfigWidget->showComicAuthor());
+ setShowComicTitle(mConfigWidget->showComicTitle());
+ setShowComicIdentifier(mConfigWidget->showComicIdentifier());
+ setShowErrorPicture(mConfigWidget->showErrorPicture());
+ setArrowsOnHover(mConfigWidget->arrowsOnHover());
+ setMiddleClick(mConfigWidget->middleClick());
mCheckNewComicStripsIntervall = mConfigWidget->checkNewComicStripsIntervall();
//not storing this value, since other applets might have changed it inbetween
@@ -453,7 +307,6 @@ void ComicApplet::applyConfig()
updateUsedComics();
saveConfig();
- buttonBar();
//make sure that tabs etc. are displayed even if the comic strip in the first \
tab does not work updateView();
@@ -480,7 +333,8 @@ void ComicApplet::changeComic( bool differentComic )
void ComicApplet::updateUsedComics()
{
const QString oldIdentifier = mCurrent.id();
- mTabBar->removeAllTabs();
+
+ mActiveComicModel.clear();
mTabIdentifier.clear();
mCurrent = ComicData();
@@ -501,21 +355,14 @@ void ComicApplet::updateUsedComics()
mCurrent.setTitle(title);
}
- QIcon icon;
- QString name;
+ const QString name = data.data().toString();
const QString identifier = data.data( Qt::UserRole ).toString();
- if ( mTabView & ShowText ) {
- name = data.data().toString();
- }
- if ( mTabView & ShowIcon ) {
- icon = data.data( Qt::DecorationRole ).value<QIcon>();
- }
-
- mTabBar->addTab( icon, name );
-
+ const QString iconPath = data.data( Qt::DecorationRole \
).value<QIcon>().name(); //found a newer strip last time, which was not visited
if ( mCheckNewComicStripsIntervall && !cg.readEntry( "lastStripVisited_" \
+ identifier, true ) ) {
- mTabBar->setTabHighlighted( tab, true );
+ mActiveComicModel.addComic(identifier, name, iconPath, true);
+ } else {
+ mActiveComicModel.addComic(identifier, name, iconPath);
}
mTabIdentifier << identifier;
@@ -524,7 +371,7 @@ void ComicApplet::updateUsedComics()
}
mActionNextNewStripTab->setVisible( mCheckNewComicStripsIntervall );
- mActionNextNewStripTab->setEnabled( mTabBar->hasHighlightedTabs() );
+ mActionNextNewStripTab->setEnabled( hasHighlightedTabs() );
delete mCheckNewStrips;
mCheckNewStrips = 0;
@@ -532,17 +379,15 @@ void ComicApplet::updateUsedComics()
mCheckNewStrips = new CheckNewStrips( mTabIdentifier, mEngine, \
mCheckNewComicStripsIntervall, this );
connect( mCheckNewStrips, SIGNAL(lastStrip(int,QString,QString)), this, \
SLOT(slotFoundLastStrip(int,QString,QString)) ); }
+
+ emit comicModelChanged();
}
-void ComicApplet::slotTabChanged( int newIndex )
+void ComicApplet::slotTabChanged(const QString &identifier)
{
- if ( newIndex >= mTabIdentifier.count() ) {
- return;
- }
-
- bool differentComic = (mCurrent.id() != mTabIdentifier.at(newIndex));
+ bool differentComic = (mCurrent.id() != identifier);
mCurrent = ComicData();
- mCurrent.init(mTabIdentifier.at(newIndex), config());
+ mCurrent.init(identifier, config());
changeComic( differentComic );
}
@@ -577,8 +422,6 @@ void ComicApplet::configChanged()
mMaxSize = cg.readEntry( "maxSize", tempMaxSize );
mLastSize = mMaxSize;
- mTabView = cg.readEntry( "tabView", ShowText | ShowIcon );
-
globalComicUpdater->load();
}
@@ -594,7 +437,6 @@ void ComicApplet::saveConfig()
cg.writeEntry( "arrowsOnHover", mArrowsOnHover );
cg.writeEntry( "middleClick", mMiddleClick );
cg.writeEntry( "tabIdentifier", mTabIdentifier );
- cg.writeEntry( "tabView", mTabView );
cg.writeEntry( "checkNewComicStripsIntervall", mCheckNewComicStripsIntervall );
globalComicUpdater->save();
@@ -625,23 +467,11 @@ void ComicApplet::slotFoundLastStrip( int index, const QString \
&identifier, cons KConfigGroup cg = config();
if ( suffix != cg.readEntry( "lastStrip_" + identifier, QString() ) ) {
kDebug() << identifier << "has a newer strip.";
- mTabBar->setTabHighlighted( index, true );
+ setTabHighlighted( identifier, true );
cg.writeEntry( "lastStripVisited_" + identifier, false );
}
- mActionNextNewStripTab->setEnabled( mTabBar->hasHighlightedTabs() );
-}
-
-void ComicApplet::slotReload()
-{
- int index = mTabBar->currentIndex();
- int newIndex = ( index + 1 ) % mTabBar->count();
-
- if ( index == newIndex ) {
- changeComic( false );
- } else {
- mTabBar->setCurrentIndex( newIndex );
- }
+ mActionNextNewStripTab->setEnabled( hasHighlightedTabs() );
}
void ComicApplet::slotGoJump()
@@ -652,43 +482,11 @@ void ComicApplet::slotGoJump()
selector->select(mCurrent);
}
-void ComicApplet::slotNextNewStrip()
-{
- const int index = mTabBar->currentIndex();
- mTabBar->setCurrentIndex( mTabBar->nextHighlightedTab( index ) );
-}
-
void ComicApplet::slotStorePosition()
{
mCurrent.storePosition(mActionStorePosition->isChecked());
}
-void ComicApplet::slotSizeChanged()
-{
- // if the applet was resized manually by the user
- if ( isInPanel() ) {
- if ( mMainWidget->size() != mLastSize ) {
- mMaxSize = mMainWidget->size();
- updateSize();
-
- KConfigGroup cg = config();
- cg.writeEntry( "maxSize", mMaxSize );
- }
- } else if ( this->geometry().size() != mLastSize ) {
- mMaxSize = this->geometry().size();
- updateSize();
-
- KConfigGroup cg = config();
- cg.writeEntry( "maxSize", mMaxSize );
- }
-}
-
-void ComicApplet::slotShowMaxSize()
-{
- resize( mMaxSize );
- emit appletTransformedItself();
-}
-
void ComicApplet::slotShop()
{
KRun::runUrl(mCurrent.shopUrl(), "text/html", 0);
@@ -699,33 +497,6 @@ bool ComicApplet::isInPanel() const
return ( this->geometry().width() < 70 ) || ( this->geometry().height() < 50 );
}
-void ComicApplet::updateSize()
-{
- if ( configurationRequired() ) {
- return;
- }
-
- QSizeF notAvailableSize;
- if ( isInPanel() ) {
- notAvailableSize = mMainWidget->geometry().size() - mImageWidget->size();
- } else {
- notAvailableSize = this->geometry().size() - mImageWidget->size();
- }
- QSizeF availableSize = mMaxSize - notAvailableSize;
- mImageWidget->setAvailableSize( availableSize );
- mLastSize = mImageWidget->preferredSize() + notAvailableSize;
-
- if ( isInPanel() ) {
- mMainWidget->resize( mLastSize );
- } else {
- resize( mLastSize );
- mLastSize = this->size();//NOTE the applet won't be smaller than the minimum \
size of the MainWidget, thus the result of the resize might not correspond with \
mLastSize
- emit sizeHintChanged( Qt::PreferredSize );
- emit appletTransformedItself();
- }
- mImageWidget->update();
-}
-
void ComicApplet::createComicBook()
{
ComicArchiveDialog *dialog = new ComicArchiveDialog(mCurrent.id(), \
mCurrent.title(), mCurrent.type(), mCurrent.current(), @@ -813,20 +584,6 @@ void \
ComicApplet::updateComic( const QString &identifierSuffix ) }
}
-void ComicApplet::updateButtons()
-{
- mShowNextButton = mCurrent.hasNext();
- mShowPreviousButton = mCurrent.hasPrev();
-
- mLeftArrow->setVisible(!mArrowsOnHover && mShowPreviousButton);
- mRightArrow->setVisible(!mArrowsOnHover && mShowNextButton);
-
- if (mButtonBar) {
- mButtonBar->setNextEnabled(mShowNextButton);
- mButtonBar->setPrevEnabled(mShowPreviousButton);
- }
-}
-
void ComicApplet::updateContextMenu()
{
mActionGoFirst->setVisible(mCurrent.hasFirst());
@@ -843,102 +600,205 @@ void ComicApplet::slotSaveComicAs()
saver.save(mCurrent);
}
-bool ComicApplet::eventFilter( QObject *receiver, QEvent *event )
+void ComicApplet::slotScaleToContent()
{
- if ( receiver != mMainWidget ) {
- return Plasma::PopupApplet::eventFilter( receiver, event );
- }
+ setShowActualSize(mActionScaleContent->isChecked());
+}
- switch (event->type()) {
- case QEvent::GraphicsSceneHoverLeave:
- if (mArrowsOnHover && mButtonBar) {
- mButtonBar->hide();
- }
+//QML
+QObject *ComicApplet::comicsModel()
+{
+ return &mActiveComicModel;
+}
- break;
- case QEvent::GraphicsSceneHoverEnter:
- if (!configurationRequired() && mArrowsOnHover && mButtonBar) {
- mButtonBar->show();
- }
+bool ComicApplet::showComicUrl() const
+{
+ return mShowComicUrl;
+}
- break;
- case QEvent::GraphicsSceneMousePress:
- {
- QGraphicsSceneMouseEvent *e = static_cast<QGraphicsSceneMouseEvent \
*>( event );
- if ( e->button() == Qt::LeftButton ) {
- if ( mLabelUrl->isUnderMouse() ) {
- if ( hasAuthorization( "LaunchApp" ) ) {
- // link clicked
- KRun::runUrl( mCurrent.websiteUrl(), "text/html", 0 );
- return true;
- }
- } else if ( mLabelId->isUnderMouse() ) {
- // identifierSuffix clicked clicked
- slotGoJump();
- return true;
- } else if ( mImageWidget->isUnderMouse() && ( \
mMainWidget->geometry().size() != mLastSize ) ) {
- // only update the size by clicking on the image-rect if the \
user manual resized the applet
- updateSize();
- return true;
- }
- } else if ( ( e->button() == Qt::MidButton ) && mMiddleClick ) { // \
handle full view
- fullView();
- return true;
- }
- }
- break;
- case QEvent::GraphicsSceneResize:
- if (mButtonBar) {
- QPointF buttons((mMainWidget->size().width() - \
mButtonBar->size().width()) / 2,
- mMainWidget->contentsRect().bottom() - \
mButtonBar->size().height() - 5);
- mButtonBar->setPos(buttons);
- }
+void ComicApplet::setShowComicUrl(bool show)
+{
+ if (show == mShowComicUrl)
+ return;
- break;
- default:
- break;
- }
+ mShowComicUrl = show;
- return false;
+ emit showComicUrlChanged();
}
-void ComicApplet::slotScaleToContent()
+bool ComicApplet::showComicAuthor() const
+{
+ return mShowComicAuthor;
+}
+
+void ComicApplet::setShowComicAuthor(bool show)
+{
+ if (show == mShowComicAuthor)
+ return;
+
+ mShowComicAuthor = show;
+
+ emit showComicAuthorChanged();
+}
+
+bool ComicApplet::showComicTitle() const
+{
+ return mShowComicTitle;
+}
+
+void ComicApplet::setShowComicTitle(bool show)
+{
+ if (show == mShowComicTitle)
+ return;
+
+ mShowComicTitle = show;
+
+ emit showComicTitleChanged();
+}
+
+bool ComicApplet::showComicIdentifier() const
+{
+ return mShowComicIdentifier;
+}
+
+void ComicApplet::setShowComicIdentifier(bool show)
+{
+ if (show == mShowComicIdentifier)
+ return;
+
+ mShowComicIdentifier = show;
+
+ emit showComicIdentifierChanged();
+}
+
+bool ComicApplet::showErrorPicture() const
+{
+ return mShowErrorPicture;
+}
+
+void ComicApplet::setShowErrorPicture(bool show)
+{
+ if (show == mShowErrorPicture)
+ return;
+
+ mShowErrorPicture = show;
+
+ emit showErrorPictureChanged();
+}
+
+bool ComicApplet::arrowsOnHover() const
+{
+ return mArrowsOnHover;
+}
+
+void ComicApplet::setArrowsOnHover(bool show)
+{
+ if (show == mArrowsOnHover)
+ return;
+
+ mArrowsOnHover = show;
+
+ emit arrowsOnHoverChanged();
+}
+
+bool ComicApplet::middleClick() const
+{
+ return mMiddleClick;
+}
+
+void ComicApplet::setMiddleClick(bool show)
+{
+ if (show == mMiddleClick)
+ return;
+
+ mMiddleClick = show;
+
+ emit middleClickChanged();
+}
+
+QVariantHash ComicApplet::comicData()
+{
+ return mComicData;
+}
+
+void ComicApplet::refreshComicData()
{
- mCurrent.setScaleComic(mActionScaleContent->isChecked());
- mImageWidget->setScaled(!mCurrent.scaleComic());
+ mComicData["image"] = mCurrent.image();
+ mComicData["prev"] = mCurrent.prev();
+ mComicData["next"] = mCurrent.next();
+ mComicData["additionalText"] = mCurrent.additionalText();
+
+ mComicData["websiteUrl"] = mCurrent.websiteUrl().prettyUrl();
+ mComicData["websiteHost"] = mCurrent.websiteUrl().host();
+ mComicData["imageUrl"] = mCurrent.websiteUrl().prettyUrl();
+ mComicData["shopUrl"] = mCurrent.websiteUrl().prettyUrl();
+ mComicData["first"] = mCurrent.first();
+ mComicData["stripTitle"] = mCurrent.stripTitle();
+ mComicData["author"] = mCurrent.author();
+ mComicData["title"] = mCurrent.title();
+
+ mComicData["suffixType"] = "Date";
+ mComicData["current"] = mCurrent.current();
+ //mComicData["last"] = mCurrent.last();
+ mComicData["currentReadable"] = mCurrent.currentReadable();
+ mComicData["firstStripNum"] = mCurrent.firstStripNum();
+ mComicData["maxStripNum"] = mCurrent.maxStripNum();
+ mComicData["isLeftToRight"] = mCurrent.isLeftToRight();
+ mComicData["isTopToBottom"] = mCurrent.isTopToBottom();
- updateSize();
+ emit comicDataChanged();
+}
+
+bool ComicApplet::showActualSize() const
+{
+ return mCurrent.scaleComic();
}
-void ComicApplet::buttonBar()
+void ComicApplet::setShowActualSize(bool show)
+{
+ if (show == mCurrent.scaleComic())
+ return;
+
+ mCurrent.setScaleComic(show);
+
+ emit showActualSizeChanged();
+}
+//Endof QML
+void ComicApplet::setTabHighlighted(const QString &id, bool highlight)
{
- if (mArrowsOnHover) {
- if (!mButtonBar) {
- mButtonBar = new ButtonBar(mMainWidget);
- connect(mButtonBar, SIGNAL(prevClicked()), this, \
SLOT(slotPreviousDay()));
- connect(mButtonBar, SIGNAL(nextClicked()), this, SLOT(slotNextDay()));
- connect(mButtonBar, SIGNAL(zoomClicked()), this, SLOT(fullView()));
+ //Search for matching id
+ for (int index = 0; index < mActiveComicModel.rowCount(); ++index) {
+ QStandardItem * item = mActiveComicModel.item(index);
- // Set frame position
- constraintsEvent(Plasma::SizeConstraint);
+ QString currentId = item->data(ActiveComicModel::ComicKeyRole).toString();
+ if (id == currentId){
+ if (highlight != \
item->data(ActiveComicModel::ComicHighlightRole).toBool()) { + \
item->setData(highlight, ActiveComicModel::ComicHighlightRole); + emit \
tabHighlightRequest(id, highlight); + }
}
- } else {
- delete mButtonBar;
- mButtonBar = 0;
}
}
-void ComicApplet::fullView()
+bool ComicApplet::hasHighlightedTabs()
{
- if (!mFullViewWidget) {
- mFullViewWidget = new FullViewWidget;
+ for (int i = 0; i < mActiveComicModel.rowCount(); ++i) {
+ if (isTabHighlighted(i)) {
+ return true;
+ }
}
- if (!mFullViewWidget->isVisible()) {
- mFullViewWidget->setImage(mCurrent.image());
- mFullViewWidget->adaptPosition(mMainWidget->mapToScene( \
mMainWidget->pos()).toPoint(), containment()->screen());
- mFullViewWidget->show();
- }
+ return false;
}
+bool ComicApplet::isTabHighlighted(int index) const
+{
+ if (index < 0 || index >= mActiveComicModel.rowCount()) {
+ return false;
+ }
+
+ QStandardItem * item = mActiveComicModel.item(index);
+
+ return item->data(ActiveComicModel::ComicHighlightRole).toBool();
+}
#include "comic.moc"
diff --git a/applets/comic/comic.h b/applets/comic/comic.h
index f5919df..d460b11 100644
--- a/applets/comic/comic.h
+++ b/applets/comic/comic.h
@@ -2,6 +2,7 @@
* Copyright (C) 2007 by Tobias Koenig <tokoe@kde.org> *
* Copyright (C) 2008 by Marco Martin <notmart@gmail.com> *
* Copyright (C) 2008-2010 Matthias Fuchs <mat69@gmx.net> *
+ * Copyright (C) 2012 Reza Fatahilah Shah <rshah0385@kireihana.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -30,15 +31,15 @@
#include <Plasma/DataEngine>
#include <Plasma/PopupApplet>
-class ArrowWidget;
-class ButtonBar;
+#include "activecomicmodel.h"
+
+namespace Plasma {
+ class DeclarativeWidget;
+}
+
class CheckNewStrips;
-class ComicLabel;
class ComicModel;
-class ComicTabBar;
class ConfigWidget;
-class FullViewWidget;
-class ImageWidget;
class KAction;
class KJob;
class QAction;
@@ -50,6 +51,16 @@ class SavingDir;
class ComicApplet : public Plasma::PopupApplet
{
Q_OBJECT
+ Q_PROPERTY(QObject * comicsModel READ comicsModel NOTIFY comicModelChanged)
+ Q_PROPERTY(bool showComicUrl READ showComicUrl WRITE setShowComicUrl NOTIFY \
showComicUrlChanged) + Q_PROPERTY(bool showComicAuthor READ showComicAuthor WRITE \
setShowComicAuthor NOTIFY showComicAuthorChanged) + Q_PROPERTY(bool showComicTitle \
READ showComicTitle WRITE setShowComicTitle NOTIFY showComicTitleChanged) + \
Q_PROPERTY(bool showComicIdentifier READ showComicIdentifier WRITE \
setShowComicIdentifier NOTIFY showComicIdentifierChanged) + Q_PROPERTY(bool \
showErrorPicture READ showErrorPicture WRITE setShowErrorPicture NOTIFY \
showErrorPictureChanged) + Q_PROPERTY(bool arrowsOnHover READ arrowsOnHover WRITE \
setArrowsOnHover NOTIFY arrowsOnHoverChanged) + Q_PROPERTY(bool middleClick READ \
middleClick WRITE setMiddleClick NOTIFY middleClickChanged) + \
Q_PROPERTY(QVariantHash comicData READ comicData NOTIFY comicDataChanged) + \
Q_PROPERTY(bool showActualSize READ showActualSize WRITE setShowActualSize NOTIFY \
showActualSizeChanged)
public:
ComicApplet( QObject *parent, const QVariantList &args );
@@ -60,57 +71,100 @@ class ComicApplet : public Plasma::PopupApplet
QGraphicsWidget *graphicsWidget();
+ //For QML
+ QObject *comicsModel();
+ QVariantHash comicData();
+
+ bool showComicUrl() const;
+ void setShowComicUrl(bool show);
+
+ bool showComicAuthor() const;
+ void setShowComicAuthor(bool show);
+
+ bool showComicTitle() const;
+ void setShowComicTitle(bool show);
+
+ bool showComicIdentifier() const;
+ void setShowComicIdentifier(bool show);
+
+ bool showErrorPicture() const;
+ void setShowErrorPicture(bool show);
+
+ bool arrowsOnHover() const;
+ void setArrowsOnHover(bool show);
+
+ bool middleClick() const;
+ void setMiddleClick(bool show);
+
+ bool showActualSize() const;
+ void setShowActualSize(bool show);
+
+ Q_INVOKABLE bool checkAuthorization(const QString &permissionName) { return \
hasAuthorization(permissionName); } + //End for QML
+Q_SIGNALS:
+ void comicModelChanged();
+ void showComicUrlChanged();
+ void showComicAuthorChanged();
+ void showComicTitleChanged();
+ void showComicIdentifierChanged();
+ void showErrorPictureChanged();
+ void arrowsOnHoverChanged();
+ void middleClickChanged();
+ void comicDataChanged();
+ void tabHighlightRequest(const QString &id, bool highlight);
+ void showNextNewStrip();
+ void showActualSizeChanged();
+
public Q_SLOTS:
void dataUpdated( const QString &name, const Plasma::DataEngine::Data &data \
); void createConfigurationInterface( KConfigDialog *parent );
private Q_SLOTS:
- void slotTabChanged( int newIndex );
+ void slotTabChanged( const QString &newIdentifier );
void slotNextDay();
void slotPreviousDay();
void slotFirstDay();
void slotCurrentDay();
void slotFoundLastStrip( int index, const QString &identifier, const QString \
&suffix ); void slotGoJump();
- void slotNextNewStrip();
- void slotReload();
void slotSaveComicAs();
void slotScaleToContent();
void slotShop();
void slotStorePosition();
- void slotSizeChanged();
- void slotShowMaxSize();
void applyConfig();
void checkDayChanged();
- void buttonBar();
- void fullView();
- void updateSize();
void createComicBook();
void slotArchive( int archiveType, const KUrl &dest, const QString \
&fromIdentifier, const QString &toIdentifier ); void slotArchiveFinished( KJob *job \
);
public slots:
void configChanged();
- void updateComic(const QString &identifierSuffix = QString());
+ Q_INVOKABLE void updateComic(const QString &identifierSuffix = QString());
+ Q_INVOKABLE void goJump() { slotGoJump();}
+ Q_INVOKABLE void shop() { slotShop();}
+ Q_INVOKABLE void tabChanged(const QString &newIdentifier) { \
slotTabChanged(newIdentifier);}
protected:
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) \
const;
- bool eventFilter( QObject *receiver, QEvent *event );
private:
void changeComic( bool differentComic );
void updateUsedComics();
- void updateButtons();
void updateContextMenu();
void updateView();
void saveConfig();
bool isInPanel() const;
- void setTabBarVisible( bool isVisible );//HACK what was in 4.4 does not seem \
to work anymore, so this was added + void refreshComicData();
+ void setTabHighlighted(const QString &id, bool highlight);
+ bool hasHighlightedTabs();
+ bool isTabHighlighted(int index) const;
private:
static const int CACHE_LIMIT;
ComicModel *mModel;
QSortFilterProxyModel *mProxy;
+ ActiveComicModel mActiveComicModel;
+ QVariantHash mComicData;
QDate mCurrentDay;
@@ -118,8 +172,6 @@ class ComicApplet : public Plasma::PopupApplet
QString mOldSource;
ConfigWidget *mConfigWidget;
bool mDifferentComic;
- bool mShowPreviousButton;
- bool mShowNextButton;
bool mShowComicUrl;
bool mShowComicAuthor;
bool mShowComicTitle;
@@ -131,10 +183,7 @@ class ComicApplet : public Plasma::PopupApplet
CheckNewStrips *mCheckNewStrips;
QTimer *mDateChangedTimer;
QList<QAction*> mActions;
- QGraphicsWidget *mMainWidget;
- QGraphicsLinearLayout *mCentralLayout;
- QGraphicsLinearLayout *mBottomLayout;
- FullViewWidget *mFullViewWidget;
+ Plasma::DeclarativeWidget *mDeclarativeWidget;
QAction *mActionGoFirst;
QAction *mActionGoLast;
QAction *mActionGoJump;
@@ -146,27 +195,12 @@ class ComicApplet : public Plasma::PopupApplet
QSizeF mLastSize;
QSizeF mIdealSize;
Plasma::DataEngine *mEngine;
- ComicLabel *mLabelId;
- ComicLabel *mLabelTop;
- ComicLabel *mLabelUrl;
-
- ImageWidget *mImageWidget;
- ArrowWidget *mLeftArrow;
- ArrowWidget *mRightArrow;
//Tabs
bool mTabAdded;
- ComicTabBar *mTabBar;
QStringList mTabIdentifier;
- enum TabView {
- ShowText = 0x1,
- ShowIcon = 0x2
- };
- int mTabView;
-
ComicData mCurrent;
- ButtonBar *mButtonBar;
SavingDir *mSavingDir;
};
diff --git a/applets/comic/comicwidgets.h b/applets/comic/comicwidgets.h
deleted file mode 100644
index 4320c58..0000000
--- a/applets/comic/comicwidgets.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2008-2012 Matthias Fuchs <mat69@gmx.net> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 . *
- ***************************************************************************/
-
-#ifndef COMIC_WIDGETS_H
-#define COMIC_WIDGETS_H
-
-#include <Plasma/Label>
-#include <Plasma/TabBar>
-
-/**
- * The following classes are helper classes adpated to the desired
- * handling of the comic applet.
- */
-
-
-//Helper class, sets the sizeHint to 0 if the TabBar is hidden
-class ComicTabBar : public Plasma::TabBar
-{
- public:
- ComicTabBar(QGraphicsWidget *parent = 0) : TabBar(parent) {}
- ~ComicTabBar() {}
-
- void removeAllTabs()
- {
- while (count()) {
- removeTab(0);
- }
- }
-
- bool hasHighlightedTabs() const
- {
- for (int i = 0; i < count(); ++i) {
- if (isTabHighlighted(i)) {
- return true;
- }
- }
-
- return false;
- }
-
- int nextHighlightedTab(int index) const
- {
- int firstHighlighted = -1;
- for (int i = 0; i < count(); ++i) {
- if (isTabHighlighted(i)) {
- if (i > index) {
- return i;
- } else if (firstHighlighted == -1) {
- firstHighlighted = i;
- }
- }
- }
-
- return (firstHighlighted != -1 ? firstHighlighted : index);
- }
-
- protected:
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) \
const
- {
- if (!isVisible()) {
- return QSizeF(0, 0);
- }
- return QGraphicsWidget::sizeHint(which, constraint);
- }
-
- void hideEvent(QHideEvent *event)
- {
- updateGeometry();
- QGraphicsWidget::hideEvent(event);
- }
-
- void showEvent(QShowEvent*event)
- {
- updateGeometry();
- QGraphicsWidget::showEvent(event);
- }
-};
-
-//Helper class, sets the sizeHint to 0 if the Label is hidden
-class ComicLabel : public Plasma::Label
-{
- public:
- ComicLabel(QGraphicsWidget *parent = 0) : Plasma::Label(parent) {}
- ~ComicLabel() {}
-
- protected:
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) \
const
- {
- if (!isVisible()) {
- return QSizeF(0, 0);
- }
- return QGraphicsProxyWidget::sizeHint(which, constraint);
- }
-
- void hideEvent(QHideEvent *event)
- {
- updateGeometry();
- QGraphicsProxyWidget::hideEvent(event);
- }
-
- void showEvent(QShowEvent *event)
- {
- updateGeometry();
- QGraphicsProxyWidget::showEvent(event);
- }
-};
-
-#endif
diff --git a/applets/comic/configwidget.cpp b/applets/comic/configwidget.cpp
index baddd45..105d5ea 100644
--- a/applets/comic/configwidget.cpp
+++ b/applets/comic/configwidget.cpp
@@ -111,7 +111,6 @@ ConfigWidget::ConfigWidget( Plasma::DataEngine *engine, \
ComicModel *model, QSort advancedSettings = new QWidget();
advancedUi.setupUi( advancedSettings );
- connect( appearanceUi.pushButton_Size, SIGNAL(clicked()), this, \
SIGNAL(maxSizeClicked()) );
connect( comicUi.pushButton_GHNS, SIGNAL(clicked()), this, SLOT(getNewStuff()) \
);
comicUi.listView_comic->setModel( mProxyModel );
diff --git a/applets/comic/configwidget.h b/applets/comic/configwidget.h
index e9d63c8..0bf450f 100644
--- a/applets/comic/configwidget.h
+++ b/applets/comic/configwidget.h
@@ -36,7 +36,6 @@ class KConfigDialog;
class QCheckBox;
class QComboBox;
class QSortFilterProxyModel;
-class QPushButton;
namespace KNS3 {
class DownloadDialog;
diff --git a/applets/comic/fullviewwidget.cpp b/applets/comic/fullviewwidget.cpp
deleted file mode 100644
index fc78ba6..0000000
--- a/applets/comic/fullviewwidget.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2008 by Tobias Koenig <tokoe@kde.org> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 "fullviewwidget.h"
-
-#include <QtGui/QDesktopWidget>
-#include <QtGui/QPainter>
-#include <QWheelEvent>
-
-FullViewWidget::FullViewWidget()
- : QWidget( 0, Qt::Popup )
-{
-}
-
-FullViewWidget::~FullViewWidget()
-{
-}
-
-void FullViewWidget::setImage( const QImage &image )
-{
- mImage = image;
- resize( mImage.size() );
-}
-
-void FullViewWidget::adaptPosition( const QPoint &pos, int screenId )
-{
- if ( !mDesktopSize.isValid() ) {
- const QDesktopWidget desktop;
- mDesktopSize = desktop.screenGeometry( screenId );
- }
-
- const bool contains = mDesktopSize.contains( pos, true );
- int x = ( contains ? pos.x() : mDesktopSize.left() );
- int y = ( contains ? pos.y() : mDesktopSize.top() );
-
- //left() and top() needed for multiple screens
- const int neededX = x - mDesktopSize.left() + width();
- const int neededY = y - mDesktopSize.top() + height();
-
- if ( neededX > mDesktopSize.width() ) {
- x = mDesktopSize.left();
- }
- if ( neededY > mDesktopSize.height() ) {
- y = mDesktopSize.top();
- }
-
- move( x, y );
-}
-
-void FullViewWidget::paintEvent( QPaintEvent* )
-{
- QPainter p( this );
- p.drawImage( 0, 0, mImage );
-}
-
-void FullViewWidget::mousePressEvent( QMouseEvent* )
-{
- hide();
-}
-
-void FullViewWidget::wheelEvent( QWheelEvent *event )
-{
- const int numDegrees = event->delta() / 8;
- const int numSteps = numDegrees / 15;
- const int scroll = numSteps * 30;
-
- QPoint futurePos = this->pos();
-
- //vertical
- if ( ( mImage.height() > mDesktopSize.height() ) && ( event->modifiers() != \
Qt::AltModifier ) ) {
- futurePos += QPoint( 0, scroll );
- if ( ( scroll > 0 ) && ( futurePos.y() > mDesktopSize.top() ) ) {
- futurePos.setY( mDesktopSize.top() );
- } else if ( ( scroll < 0 ) && ( futurePos.y() + height() < \
mDesktopSize.bottom() ) ) {
- futurePos.setY( mDesktopSize.bottom() - height() );
- }
- //horizontal
- } else if ( mImage.width() > mDesktopSize.width() ) {
- futurePos += QPoint( scroll, 0 );
- if ( ( scroll > 0 ) && ( futurePos.x() > mDesktopSize.left() ) ) {
- futurePos.setX( mDesktopSize.left() );
- } else if ( ( scroll < 0 ) && ( futurePos.x() + width() < \
mDesktopSize.right() ) ) {
- futurePos.setX( mDesktopSize.right() - width() );
- }
- }
-
- move( futurePos );
-
- QWidget::wheelEvent( event );
-}
diff --git a/applets/comic/fullviewwidget.h b/applets/comic/fullviewwidget.h
deleted file mode 100644
index c0a1aff..0000000
--- a/applets/comic/fullviewwidget.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2008 by Tobias Koenig <tokoe@kde.org> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 . *
- ***************************************************************************/
-
-#ifndef FULLVIEWWIDGET_H
-#define FULLVIEWWIDGET_H
-
-#include <QtGui/QImage>
-#include <QtGui/QWidget>
-
-class QWheelEvent;
-
-class FullViewWidget : public QWidget
-{
- public:
- FullViewWidget();
- ~FullViewWidget();
-
- void setImage( const QImage &image );
- void adaptPosition( const QPoint &pos, int screenId );
-
- protected:
- virtual void paintEvent( QPaintEvent* );
- virtual void mousePressEvent( QMouseEvent* );
- virtual void wheelEvent( QWheelEvent* );
-
- private:
- QImage mImage;
- QRect mDesktopSize;
-};
-
-#endif
diff --git a/applets/comic/imagewidget.cpp b/applets/comic/imagewidget.cpp
deleted file mode 100644
index 9d36034..0000000
--- a/applets/comic/imagewidget.cpp
+++ /dev/null
@@ -1,236 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2009 Matthias Fuchs <mat69@gmx.net> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 "imagewidget.h"
-
-#include <QtGui/QGraphicsSceneMouseEvent>
-#include <QtGui/QPainter>
-#include <QtGui/QStyleOptionGraphicsItem>
-
-#include <Plasma/ScrollBar>
-
-ImageWidget::ImageWidget( QGraphicsItem *parent, Qt::WindowFlags wFlags )
- : QGraphicsWidget( parent, wFlags ), mIsScaled( true ), mDifferentImage( true ),
- mIsLeftToRight( true ), mIsTopToBottom( true ), mLastSize( QSizeF( 200, 200 ) \
)
-{
- setCacheMode( ItemCoordinateCache );//TODO change back to DeviceCoordinateCache, \
when that works with Dashboard
- mScrollBarHoriz = new Plasma::ScrollBar( this );
- mScrollBarHoriz->setOrientation( Qt::Horizontal );
- mScrollBarHoriz->setSingleStep( 80 );
- mScrollBarHoriz->nativeWidget()->setSizePolicy( QSizePolicy( \
QSizePolicy::MinimumExpanding, QSizePolicy::Maximum ) );
- mScrollBarHoriz->hide();
- connect( mScrollBarHoriz, SIGNAL(valueChanged(int)), this, SLOT(slotScroll()) );
-
- mScrollBarVert = new Plasma::ScrollBar( this );
- mScrollBarVert->setSingleStep( 80 );
- mScrollBarVert->nativeWidget()->setSizePolicy( QSizePolicy( \
QSizePolicy::Maximum, QSizePolicy::MinimumExpanding ) );
- mScrollBarVert->hide();
- connect( mScrollBarVert, SIGNAL(valueChanged(int)), this, SLOT(slotScroll()) );
-}
-
-ImageWidget::~ImageWidget()
-{
-}
-
-void ImageWidget::slotScroll()
-{
- update( this->rect() );
-}
-
-void ImageWidget::updateScrollBars()
-{
- if ( !mIsScaled ) {
- QSizeF temp = this->size();
- const int scrollWidthSpace = mScrollBarVert->preferredSize().width();
- const int scrollHeightSpace = mScrollBarHoriz->preferredSize().height();
-
- bool hasScrollBarHoriz = mImage.width() > temp.width();
- bool hasScrollBarVert = mImage.height() + hasScrollBarHoriz * \
scrollHeightSpace > temp.height();
- hasScrollBarHoriz = mImage.width() + hasScrollBarVert * scrollWidthSpace > \
temp.width();
-
- mScrollBarVert->setVisible( hasScrollBarVert );
- mScrollBarVert->setRange( 0, mImage.height() - mImageRect.height() );
- mScrollBarVert->setPageStep( mImageRect.height() );
-
- mScrollBarHoriz->setVisible( hasScrollBarHoriz );
- mScrollBarHoriz->setRange( 0, mImage.width() - mImageRect.width() );
- mScrollBarHoriz->setPageStep( mImageRect.width() );
- }
-}
-
-void ImageWidget::paint( QPainter *p, const QStyleOptionGraphicsItem *option, \
QWidget* )
-{
- QRectF exposed = option->exposedRect;
- QRectF contentRect = this->rect();
- mImageRect = contentRect;
-
- if ( !mIsScaled ) {
- //check for scrollbars and calculate where they should be
- const int scrollBarWidth = mScrollBarVert->preferredSize().width();
- const int scrollBarHeight = mScrollBarHoriz->preferredSize().height();
- if ( mScrollBarVert->isVisible() ) {
- QRect rectScroll = QRect( contentRect.right() - scrollBarWidth,
- contentRect.top(),
- scrollBarWidth,
- contentRect.height() - \
mScrollBarHoriz->isVisible() * scrollBarHeight );
-
- mScrollBarVert->setGeometry( rectScroll );
- mImageRect.setRight( mImageRect.right() - scrollBarWidth );
- }
- if ( mScrollBarHoriz->isVisible() ) {
- QRect rectScroll = QRect( contentRect.left(),
- contentRect.bottom() - scrollBarHeight,
- contentRect.width() - \
mScrollBarVert->isVisible() * scrollBarWidth,
- scrollBarHeight );
-
- mScrollBarHoriz->setGeometry( rectScroll );
- mImageRect.setBottom( mImageRect.bottom() - scrollBarHeight );
- }
- updateScrollBars();
-
- //adapt the exposed rect to only draw the parts of the image that are really \
needed
- if ( ( exposed.left() >= mImageRect.right() ) || ( exposed.top() >= \
mImageRect.bottom() ) ) {
- return;
- }
- if ( exposed.right() > mImageRect.right() ) {
- exposed.setRight( mImageRect.right() );
- }
- if ( exposed.bottom() > mImageRect.bottom() ) {
- exposed.setBottom( mImageRect.bottom() );
- }
-
- //the displayed image has changed -- either a new one has been set, or it \
was just set to not scaled
- if ( mDifferentImage ) {
- mScaledImage = mImage;
- }
- } else if ( mDifferentImage || ( mScaledImage.size() != mImageRect.size() ) ) {
- mScaledImage = mImage.scaled( mImageRect.size().toSize(), \
Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
- mDifferentImage = false;
- }
-
- QPoint scrollPos = mIsScaled ? QPoint() : QPoint( mScrollBarHoriz->value(), \
mScrollBarVert->value() );
- QRectF shownImageRect = QRectF( scrollPos + exposed.topLeft(), exposed.size() );
- p->drawImage( exposed, mScaledImage, shownImageRect );
-}
-
-void ImageWidget::resetScrollBars()
-{
- mScrollBarVert->hide();
- mScrollBarHoriz->hide();
- int vertical = mIsTopToBottom ? 0 : mImage.height() - mImageRect.height();
- int horizontal = mIsLeftToRight ? 0 : mImage.width() - mImageRect.width();
- mScrollBarVert->setValue( vertical );
- mScrollBarHoriz->setValue( horizontal );
-}
-
-void ImageWidget::wheelEvent( QGraphicsSceneWheelEvent *event )
-{
- const int numDegrees = event->delta() / 8;
- const int numSteps = numDegrees / 15;
-
- if ( mScrollBarVert->isVisible() && ( event->modifiers() == Qt::NoModifier ) &&
- !mScrollBarHoriz->isUnderMouse() ) {
- const int scroll = mScrollBarVert->singleStep();
- mScrollBarVert->setValue( mScrollBarVert->value() - numSteps * scroll );
-
- event->accept();
- update( this->rect() );
- } else if ( mScrollBarHoriz->isVisible() &&
- ( ( event->modifiers() == Qt::AltModifier ) || ( event->modifiers() \
== Qt::NoModifier ) ) ) {
- const int scroll = mScrollBarHoriz->singleStep();
- mScrollBarHoriz->setValue( mScrollBarHoriz->value() - numSteps * scroll );
-
- event->accept();
- update( this->rect() );
- }
- QGraphicsItem::wheelEvent( event );
-}
-
-void ImageWidget::setImage( const QImage &image )
-{
- mImage = image;
- mDifferentImage = true;
-}
-
-void ImageWidget::setScaled( bool isScaled )
-{
- mIsScaled = isScaled;
- resetScrollBars();
- if ( !mIsScaled ) {
- mDifferentImage = true;
- updateScrollBars();
- update();
- }
-}
-
-void ImageWidget::setAvailableSize( const QSizeF &available )
-{
- mAvailableSize = available;
-
- if ( !mImage.isNull() && mImage.size().width() > 0 ) {
- qreal finalWidth = mAvailableSize.width();
- qreal finalHeight = mAvailableSize.height();
-
- resetScrollBars();
-
- // uses the mIdealSize, as long as it is not larger, than the maximum size
- if ( mIsScaled ) {
- qreal aspectRatio = qreal( mImage.size().height() ) / \
mImage.size().width();
- qreal imageHeight = aspectRatio * mAvailableSize.width();
-
- // set height (width) for given width (height) keeping image aspect \
ratio
- if ( imageHeight <= mAvailableSize.height() ) {
- finalHeight = imageHeight;
- } else {
- finalWidth = mAvailableSize.height() / aspectRatio;
- }
-
- mLastSize = QSizeF( finalWidth, finalHeight );
- } else {
- const int scrollWidthSpace = mScrollBarVert->preferredSize().width();
- const int scrollHeightSpace = mScrollBarHoriz->preferredSize().height();
-
- bool hasScrollBarHoriz = mImage.width() > mAvailableSize.width();
- bool hasScrollBarVert = mImage.height() + hasScrollBarHoriz * \
scrollHeightSpace > mAvailableSize.height();
- hasScrollBarHoriz = mImage.width() + hasScrollBarVert * scrollWidthSpace \
> mAvailableSize.width();
-
- mScrollBarHoriz->setVisible( hasScrollBarHoriz );
- mScrollBarVert->setVisible( hasScrollBarVert );
-
- finalWidth = hasScrollBarHoriz ? mAvailableSize.width() : mImage.width() \
+ hasScrollBarVert * scrollWidthSpace;
- finalHeight = hasScrollBarVert ? mAvailableSize.height() : \
mImage.height() + hasScrollBarHoriz * scrollHeightSpace;
-
- mLastSize = QSizeF( finalWidth, finalHeight );
- }
-
- setPreferredSize( mLastSize.toSize() );//works better with values in integer
- }
-}
-
-void ImageWidget::setIsLeftToRight( bool ltr )
-{
- mIsLeftToRight = ltr;
-}
-
-void ImageWidget::setIsTopToBottom( bool ttb )
-{
- mIsTopToBottom = ttb;
-}
-
-#include "imagewidget.moc"
diff --git a/applets/comic/imagewidget.h b/applets/comic/imagewidget.h
deleted file mode 100644
index 0825cfc..0000000
--- a/applets/comic/imagewidget.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2009 Matthias Fuchs <mat69@gmx.net> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * 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 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 . *
- ***************************************************************************/
-
-#ifndef IMAGEWIDGET_H
-#define IMAGEWIDGET_H
-
-#include <QtGui/QImage>
-#include <QGraphicsWidget>
-
-class QGraphicsSceneWheelEvent;
-
-namespace Plasma {
-class ScrollBar;
-}
-
-
-class ImageWidget : public QGraphicsWidget
-{
- Q_OBJECT
-
- public:
- ImageWidget ( QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0 );
- ~ImageWidget();
-
- void paint( QPainter *p, const QStyleOptionGraphicsItem *, QWidget* widget = \
0 );
- void setScaled( bool isScaled );
- void setImage( const QImage &image );
- void setAvailableSize( const QSizeF &size );
- void setIsLeftToRight( bool ltr );
- void setIsTopToBottom( bool ttb );
-
- public Q_SLOTS:
- void updateScrollBars();
-
- protected:
- void wheelEvent( QGraphicsSceneWheelEvent* );
-
- private Q_SLOTS:
- void slotScroll();
-
- private:
- void resetScrollBars();
-
- bool mIsScaled;
- bool mDifferentImage;
- bool mIsLeftToRight;
- bool mIsTopToBottom;
- Plasma::ScrollBar *mScrollBarVert;
- Plasma::ScrollBar *mScrollBarHoriz;
- QImage mImage;
- QImage mScaledImage;
- QRectF mImageRect;
- QSizeF mAvailableSize;
- QSizeF mLastSize;
-};
-
-#endif
diff --git a/applets/comic/package/contents/ui/ButtonBar.qml \
b/applets/comic/package/contents/ui/ButtonBar.qml new file mode 100644
index 0000000..b1a34c4
--- /dev/null
+++ b/applets/comic/package/contents/ui/ButtonBar.qml
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.components 0.1 as PlasmaComponents
+
+Item {
+ id: root
+
+ implicitWidth: rowButton.width + 20
+ implicitHeight: rowButton.height + 20
+
+ signal prevClicked
+ signal nextClicked
+ signal zoomClicked
+
+ PlasmaCore.FrameSvgItem {
+ id: background
+
+ anchors.fill: parent
+
+ imagePath: "widgets/viewitem"
+ prefix: "hover"
+ }
+
+ Row {
+ id: rowButton
+
+ anchors.centerIn: parent
+
+ spacing: 4
+ //ToolButton or Button in C++ use PushButton?
+ PlasmaComponents.Button {
+ id: prevButton
+
+ iconSource: "arrow-left"
+ enabled: (comicData.prev != undefined && comicData.prev.length > 0)
+ }
+
+ PlasmaComponents.Button {
+ id: zoomButton
+
+ iconSource: "zoom-original"
+ }
+
+ PlasmaComponents.Button {
+ id: nextButton
+
+ iconSource: "arrow-right"
+ enabled: (comicData.next != undefined && comicData.next.length > 0)
+ }
+ }
+
+ Component.onCompleted: {
+ prevButton.clicked.connect(root.prevClicked);
+ nextButton.clicked.connect(root.nextClicked);
+ zoomButton.clicked.connect(root.zoomClicked);
+ }
+}
\ No newline at end of file
diff --git a/applets/comic/package/contents/ui/ComicBottomInfo.qml \
b/applets/comic/package/contents/ui/ComicBottomInfo.qml new file mode 100644
index 0000000..ac7e074
--- /dev/null
+++ b/applets/comic/package/contents/ui/ComicBottomInfo.qml
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.qtextracomponents 0.1
+
+Item {
+ id: root
+
+ implicitWidth: 10
+ implicitHeight: comicIdentifier.height
+
+ property bool showUrl: false
+ property bool showIdentifier: false
+ property variant comicData
+
+ visible: (comicIdentifier.text.length > 0 || comicUrl.text.length > 0)
+
+ PlasmaComponents.Label {
+ id: comicIdentifier
+
+ anchors {
+ left: root.left
+ top: root.top
+ bottom: root.bottom
+ right: comicUrl.left
+ leftMargin: 2
+ }
+
+ color: theme.textColor
+ visible: (showIdentifier && comicIdentifier.text.length > 0)
+ text: (showIdentifier && comicData.currentReadable != undefined) ? \
comicData.currentReadable : "" +
+ MouseArea {
+ id: idLabelArea
+
+ anchors.fill: parent
+
+ hoverEnabled: true
+
+ onEntered: {
+ parent.color = theme.highlightColor;
+ }
+
+ onExited: {
+ parent.color = theme.textColor;
+ }
+
+ onClicked: {
+ comicApplet.goJump();
+ }
+
+ PlasmaCore.ToolTip {
+ target: idLabelArea
+ mainText: i18n( "Jump to Strip ..." )
+ }
+ }
+ }
+
+ PlasmaComponents.Label {
+ id:comicUrl
+
+ anchors {
+ top: root.top
+ bottom: root.bottom
+ right: root.right
+ rightMargin: 2
+ }
+
+ color: theme.textColor
+ visible: (showUrl && comicUrl.text.length > 0)
+ text: (showUrl && comicData.websiteHost.length > 0) ? comicData.websiteHost \
: "" +
+ MouseArea {
+ id: idUrlLabelArea
+
+ anchors.fill: parent
+
+ hoverEnabled: true
+ visible: comicApplet.checkAuthorization("LaunchApp")
+
+ onEntered: {
+ parent.color = theme.highlightColor;
+ }
+
+ onExited: {
+ parent.color = theme.textColor;
+ }
+
+ onClicked: {
+ comicApplet.shop();
+ }
+
+ PlasmaCore.ToolTip {
+ target: idUrlLabelArea
+ mainText: i18n( "Visit the comic website" )
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/applets/comic/package/contents/ui/ComicCentralView.qml \
b/applets/comic/package/contents/ui/ComicCentralView.qml new file mode 100644
index 0000000..33fc886
--- /dev/null
+++ b/applets/comic/package/contents/ui/ComicCentralView.qml
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.qtextracomponents 0.1
+
+Item {
+ id: root
+
+ width: 10
+ height: 10
+
+ property variant comicData
+
+ PlasmaComponents.ToolButton {
+ id: arrowLeft
+
+ anchors {
+ left: root.left
+ verticalCenter: root.verticalCenter
+ }
+
+ iconSource: "go-previous"
+ visible: (!comicApplet.arrowsOnHover && (comicData.prev !== undefined))
+
+ onClicked: {
+ comicApplet.updateComic(comicData.prev);
+ }
+ }
+
+ ImageWidget {
+ id: comicImage
+
+ anchors {
+ left: arrowLeft.visible ? arrowLeft.right : root.left
+ right: arrowRight.visible ? arrowRight.left : root.right
+ leftMargin: arrowLeft.visible ? 4 : 0
+ rightMargin: arrowRight.visible ? 4 : 0
+ top: root.top
+ bottom: root.bottom
+ }
+
+ image: comicApplet.comicData.image
+ tooltipText: comicApplet.comicData.additionalText
+ actualSize: comicApplet.showActualSize
+ isLeftToRight: comicApplet.comicData.isLeftToRight
+ isTopToBottom: comicApplet.comicData.isTopToBottom
+ }
+
+ PlasmaComponents.ToolButton {
+ id: arrowRight
+
+ anchors {
+ right: root.right
+ verticalCenter: root.verticalCenter
+ }
+
+ iconSource: "go-next"
+ visible: (!comicApplet.arrowsOnHover && (comicData.next !== undefined))
+
+ onClicked: {
+ comicApplet.updateComic(comicData.next);
+ }
+ }
+
+ FullViewWidget {
+ id: fullDialog
+
+ image: comicApplet.comicData.image
+ }
+}
diff --git a/applets/comic/package/contents/ui/FullViewWidget.qml \
b/applets/comic/package/contents/ui/FullViewWidget.qml new file mode 100644
index 0000000..f76bd4c
--- /dev/null
+++ b/applets/comic/package/contents/ui/FullViewWidget.qml
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.plasma.extras 0.1 as PlasmaExtras
+import org.kde.qtextracomponents 0.1
+
+PlasmaCore.Dialog {
+ id: root
+
+ property alias image: comicPicture.image
+
+ windowFlags: Qt.Popup
+ visible: false
+
+ function open()
+ {
+ var pos = root.popupPosition(null, Qt.AlignCenter);
+
+ root.x = pos.x;
+ root.y = pos.y;
+
+ root.visible = true;
+ root.activateWindow();
+ }
+
+ function close() {
+ root.visible = false;
+ }
+
+ mainItem: PlasmaExtras.ScrollArea {
+ id: mainScrollArea
+
+ anchors.fill: parent
+
+ width: comicPicture.nativeWidth
+ height: comicPicture.nativeHeight
+
+ Flickable {
+ id: viewContainer
+
+ anchors.fill:parent
+
+ contentWidth: comicPicture.nativeWidth
+ contentHeight: comicPicture.nativeHeight
+
+ //clip: true
+
+ QImageItem {
+ id: comicPicture
+
+ anchors.fill: parent
+
+ smooth: true
+ fillMode: QImageItem.PreserveAspectFit
+
+ MouseArea {
+ id: dialogMouseArea
+
+ anchors.fill: comicPicture
+
+ onClicked: {
+ root.close();
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/applets/comic/package/contents/ui/ImageWidget.qml \
b/applets/comic/package/contents/ui/ImageWidget.qml new file mode 100644
index 0000000..56bcc0b
--- /dev/null
+++ b/applets/comic/package/contents/ui/ImageWidget.qml
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.plasma.extras 0.1 as PlasmaExtras
+import org.kde.qtextracomponents 0.1
+
+PlasmaExtras.ScrollArea {
+ id: root
+
+ width: comicPicture.nativeWidth
+ height: comicPicture.nativeHeight
+
+ property bool actualSize: false
+ property bool isLeftToRight: true
+ property bool isTopToBottom: true
+
+ property alias image: comicPicture.image
+ property alias tooltipText: tooltip.mainText
+
+ function calculateContentWidth() {
+ return actualSize ? (comicPicture.nativeWidth > viewContainer.width ? \
comicPicture.nativeWidth : viewContainer.width) : viewContainer.width; + }
+
+ function calculateContentHeight() {
+ return actualSize ? (comicPicture.nativeHeight > viewContainer.height ? \
comicPicture.nativeHeight : viewContainer.height) : viewContainer.height; + }
+
+ Flickable {
+ id: viewContainer
+
+ anchors.fill:parent
+
+ contentWidth: comicPictureHolder.width
+ contentHeight: comicPictureHolder.height
+
+ clip: true
+
+ Item {
+ id: comicPictureHolder
+
+ width: Math.max(comicPicture.width, viewContainer.width);
+ height: Math.max(comicPicture.height, viewContainer.height);
+
+ QImageItem {
+ id: comicPicture
+
+ anchors.centerIn: parent
+
+ width: actualSize ? comicPicture.nativeWidth : viewContainer.width
+ height: actualSize ? comicPicture.nativeHeight : \
viewContainer.height +
+ onImageChanged: {
+ viewContainer.contentX = (root.isLeftToRight) ? 0 : ( \
viewContainer.contentWidth - viewContainer.width); + \
viewContainer.contentY = (root.isTopToBottom) ? 0 : ( viewContainer.contentHeight - \
viewContainer.height); + }
+
+ smooth: true
+ fillMode: QImageItem.PreserveAspectFit
+ }
+
+ MouseArea {
+ id:mouseArea
+
+ anchors.fill: parent
+
+ hoverEnabled: true
+ preventStealing: false
+ acceptedButtons: Qt.LeftButton | Qt.MiddleButton
+
+ onClicked: {
+ if (mouse.button == Qt.MiddleButton && comicApplet.middleClick) \
{ + fullDialog.open();
+ }
+ }
+
+ PlasmaCore.ToolTip {
+ id: tooltip
+ //target: root
+ }
+
+ ButtonBar {
+ id: buttonBar
+
+ pos {
+ y: viewContainer.height - buttonBar.height + \
viewContainer.contentY + x: (viewContainer.width - \
buttonBar.width)/2 + viewContainer.contentX + }
+
+ visible: (comicApplet.arrowsOnHover && (mouseArea.containsMouse \
|| (mouseArea.containsMouse && buttonBar.visible)) ) + opacity: 0
+
+ onPrevClicked: {
+ //busyIndicator.visible = true;
+ comicApplet.updateComic(comicData.prev);
+ }
+
+ onNextClicked: {
+ //busyIndicator.visible = true;
+ comicApplet.updateComic(comicData.next);
+ }
+
+ onZoomClicked: {
+ fullDialog.open();
+ }
+
+ states: State {
+ name: "show"; when: (comicApplet.arrowsOnHover && \
mouseArea.containsMouse) + PropertyChanges { target: \
buttonBar; opacity: 1; } + }
+
+ transitions: Transition {
+ from: ""; to: "show"; reversible: true
+ NumberAnimation { properties: "opacity"; duration: 250; \
easing.type: Easing.InOutQuad } + }
+ }
+ }
+ }
+ }
+}
diff --git a/applets/comic/package/contents/ui/main.qml \
b/applets/comic/package/contents/ui/main.qml new file mode 100644
index 0000000..ed31e92
--- /dev/null
+++ b/applets/comic/package/contents/ui/main.qml
@@ -0,0 +1,228 @@
+/*
+ * Copyright 2012 Reza Fatahilah Shah <rshah0385@kireihana.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.qtextracomponents 0.1
+
+Item {
+ id: mainWindow
+
+ width: 500
+ height: 300
+
+ property int minimumWidth: 500
+ property int minimumHeight: 300
+ property bool showComicAuthor: comicApplet.showComicAuthor
+ property bool showComicTitle: comicApplet.showComicTitle
+ property bool showErrorPicture: comicApplet.showErrorPicture
+ property bool middleClick: comicApplet.middleClick
+
+ Connections {
+ target: comicApplet
+
+ onComicsModelChanged: {
+ comicTabbar.currentTab = comicTabbar.layout.children[1];
+ }
+
+ onTabHighlightRequest: {
+ for (var i = 0; i < comicTabbar.layout.children.length; ++i) {
+ var button = comicTabbar.layout.children[i];
+
+ if (button.key !== undefined && button.key == id) {
+ button.highlighted = highlight;
+ }
+ }
+ }
+
+ onShowNextNewStrip: {
+ var firstButton = undefined;
+
+ for (var i = 0; i < comicTabbar.layout.children.length; ++i) {
+ var button = comicTabbar.layout.children[i];
+ if (button.key !== undefined && button.highlighted == true) {
+ //key is ordered
+ if (button.key > comicTabbar.currentTab.key) {
+ comicTabbar.currentTab = button;
+ return;
+ } else if (firstButton === undefined){
+ firstButton = button;
+ }
+ }
+ }
+
+ if (firstButton !== undefined) {
+ comicTabbar.currentTab = firstButton;
+ }
+ }
+ }
+
+ PlasmaCore.Theme {
+ id: theme
+ }
+
+ PlasmaCore.Svg {
+ id: arrowsSvg
+ imagePath: "widgets/arrows"
+ }
+
+ PlasmaComponents.TabBar{
+ id: comicTabbar
+
+ anchors {
+ left: parent.left
+ right: parent.right
+ }
+
+ visible: (comicApplet.comicsModel.count > 1)
+
+ onCurrentTabChanged: {
+ console.log("onCurrentTabChanged:" + comicTabbar.currentTab.key);
+ comicApplet.tabChanged(comicTabbar.currentTab.key);
+ }
+
+ Repeater {
+ model: comicApplet.comicsModel
+ delegate: PlasmaComponents.TabButton {
+ id: tabButton
+
+ property string key: model.key
+ property bool highlighted: model.highlight
+
+ text: model.title
+ iconSource: model.icon
+
+ Rectangle {
+ id: highlightMask
+
+ anchors {
+ bottom: parent.bottom
+ left: parent.left
+ }
+
+ width: Math.max(theme.smallIconSize, tabButton.height)
+ height: Math.max(theme.smallIconSize, tabButton.height)
+
+ color: "white"
+ opacity: model.highlight ? 0 : 0.5
+ }
+ }
+ }
+ }
+
+ PlasmaComponents.Label {
+ id: topInfo
+
+ anchors {
+ top: comicTabbar.visible ? comicTabbar.bottom : mainWindow.top
+ left: mainWindow.left
+ right: mainWindow.right
+ }
+
+ visible: (topInfo.text.length > 0)
+ horizontalAlignment: Text.AlignHCenter
+ text: (showComicAuthor || showComicTitle) ? getTopInfo() : ""
+
+ function getTopInfo() {
+ var tempTop = "";
+
+ if ( showComicTitle ) {
+ tempTop = comicApplet.comicData.title;
+ tempTop += ( ( (comicApplet.comicData.stripTitle.length > 0) && \
(comicApplet.comicData.title.length > 0) ) ? " - " : "" ) + \
comicApplet.comicData.stripTitle; + }
+
+ if ( showComicAuthor &&
+ (comicApplet.comicData.author != undefined || \
comicApplet.comicData.author.length > 0) ) { + tempTop = ( \
tempTop.length > 0 ? comicApplet.comicData.author + ": " + tempTop : \
comicApplet.comicData.author ); + }
+
+ return tempTop;
+ }
+ }
+
+ ComicCentralView {
+ id: centerLayout
+
+ anchors {
+ left: mainWindow.left
+ right: mainWindow.right
+ bottom: (bottomInfo.visible) ? bottomInfo.top : mainWindow.bottom
+ top: (topInfo.visible) ? topInfo.bottom : (comicTabbar.visible ? \
comicTabbar.bottom : mainWindow.top) + topMargin: (comicTabbar.visible) ? \
3 : 0 + }
+
+ comicData: comicApplet.comicData
+ }
+
+ ComicBottomInfo {
+ id:bottomInfo
+
+ anchors {
+ left: mainWindow.left
+ right: mainWindow.right
+ bottom: mainWindow.bottom
+ }
+
+ comicData: comicApplet.comicData
+ showUrl: comicApplet.showComicUrl
+ showIdentifier: comicApplet.showComicIdentifier
+ }
+
+ PlasmaComponents.BusyIndicator {
+ id: busyIndicator
+ anchors.centerIn: parent
+ running: visible
+ visible: false
+ }
+
+ states: [
+ State {
+ name: "topInfoVisible"
+ when: topInfo.visible && !bottomInfo.visible
+ AnchorChanges {
+ target: centerLayout
+ anchors.top: topInfo.bottom
+ }
+ },
+ State {
+ name: "bottomInfoVisible"
+ when: bottomInfo.visible && !topInfo.visible
+ AnchorChanges {
+ target: centerLayout
+ anchors.bottom: bottomInfo.top
+ }
+ },
+ State {
+ name: "topBottomInfoVisible"
+ when: bottomInfo.visible && topInfo.visible
+ AnchorChanges {
+ target: centerLayout
+ anchors.top: topInfo.bottom
+ anchors.bottom: bottomInfo.top
+ }
+ }
+ ]
+
+ transitions:
+ Transition {
+ AnchorAnimation {
+ duration: 500
+ easing.type: Easing.InOutQuad
+ }
+ }
+}
diff --git a/applets/comic/package/metadata.desktop \
b/applets/comic/package/metadata.desktop new file mode 100644
index 0000000..f6b0605
--- /dev/null
+++ b/applets/comic/package/metadata.desktop
@@ -0,0 +1,126 @@
+[Desktop Entry]
+Name=Comic Strip
+Name[ar]=شريط هزلي
+Name[ast]=Tira de cómic
+Name[bs]=stripovi
+Name[ca]=Tira còmica
+Name[ca@valencia]=Tira còmica
+Name[cs]=Komiksový proužek
+Name[csb]=Kòmiksowi sztrépk
+Name[da]=Tegneseriestribe
+Name[de]=Comic
+Name[el]=Σειρά κόμικ
+Name[en_GB]=Comic Strip
+Name[es]=Tira de cómic
+Name[et]=Koomiks
+Name[eu]=Komiki zerrenda
+Name[fi]=Sarjakuvastrippi
+Name[fr]=Bande dessinée
+Name[ga]=Stiallchartún
+Name[gl]=Banda deseñada
+Name[he]=קומיקס
+Name[hr]=Strip
+Name[hu]=Képregény
+Name[is]=Myndasögur
+Name[it]=Striscia di fumetti
+Name[ja]=コミック・ストリップ
+Name[kk]=Комикс
+Name[km]=យកកំប្លែងចេញ
+Name[ko]=만화 조각
+Name[ku]=Pirtûka Qerfî
+Name[lv]=Komikss
+Name[nb]=Comic Strip
+Name[nds]=Comic
+Name[nl]=Stripboek
+Name[nn]=Teikneserie
+Name[pa]=ਧੂਮਕੇਤੂ ਪੱਟੀ
+Name[pl]=Komiks
+Name[pt]=Banda Desenhada
+Name[pt_BR]=Tirinha
+Name[ro]=Benzi desenate
+Name[ru]=Комиксы
+Name[sk]=Komiks
+Name[sl]=Smešen strip
+Name[sr]=стрипови
+Name[sr@ijekavian]=стрипови
+Name[sr@ijekavianlatin]=stripovi
+Name[sr@latin]=stripovi
+Name[sv]=Tecknad serie
+Name[th]=ดูหนังสือการ์ตูน
+Name[tr]=Çizgi Roman
+Name[uk]=Комічна стрічка
+Name[wa]=Binde d' imådje
+Name[x-test]=xxComic Stripxx
+Name[zh_CN]=连环画
+Name[zh_TW]=漫畫
+Comment=View comic strips from the Internet
+Comment[ar]=اعرض شرائط هزلية من الإنترنت
+Comment[ast]=Amuesa tires de cómic d'Internet
+Comment[bs]=Pogledajte stripove sa Interneta
+Comment[ca]=Mostra una tira còmica des d'Internet
+Comment[ca@valencia]=Mostra una tira còmica des d'Internet
+Comment[cs]=Ukáže komiksový proužek z internetu
+Comment[da]=Se tegneseriestriber fra internettet.
+Comment[de]=Comics aus dem Internet anzeigen
+Comment[el]=Εμφάνιση σειρών κόμικ από το διαδίκτυο
+Comment[en_GB]=View comic strips from the Internet
+Comment[es]=Muestra tiras de cómic de Internet
+Comment[et]=Internetist hangitud koomiksite näitamine
+Comment[eu]=Interneteko komiki zerrendak ikusi
+Comment[fi]=Katso sarjakuvia internetistä
+Comment[fr]=Affiche une bande dessinée provenant d'Internet
+Comment[ga]=Taispeáin stiallchartún ón Idirlíon
+Comment[gl]=Mostra bandas deseñadas de internet
+Comment[he]=מציג קומיקסים בחרים מהאי טר ט
+Comment[hr]=Prikaži stripove na Internetu
+Comment[hu]=Képregények megjelenítése az internetről
+Comment[is]=Skoða myndasögur af netinu
+Comment[it]=Vedi una striscia di fumetti da Internet.
+Comment[ja]=インターネット上のコミック・ストリップを表示します
+Comment[kk]=Интернеттен комиксті қарау
+Comment[km]=មើលរឿងកំប្លែងពីអ៊ីនធឺណិត
+Comment[ko]=인터넷 만화 보기
+Comment[ku]=Ji Torê pirtûkên qerfî bibîne
+Comment[lv]=Rāda komiksus no interneta
+Comment[nb]=Vis tegneserier fra Internett
+Comment[nds]=Comics ut dat Internet ankieken
+Comment[nl]=Toont stripboeken van het internet
+Comment[nn]=Vis teikneseriar frå Internett
+Comment[pa]=ਇੰਟਰਨੈੱਟ ਤੋਂ ਧੂਮਕੇਤੂ ਪੱਟੀ \
ਵੇਖੋ +Comment[pl]=Pokazuje komiks z Internetu
+Comment[pt]=Mostra bandas desenhadas da Internet
+Comment[pt_BR]=Exibe uma tirinha da Internet
+Comment[ro]=Afișează benzi desenate din Internet
+Comment[ru]=Просмотр комиксов из Интернета
+Comment[sk]=Zobrazenie komiksov z internetu
+Comment[sl]=Oglejte si smešne stripe s spleta
+Comment[sr]=Погледајте стрипове са Интернета
+Comment[sr@ijekavian]=Погледајте стрипове са Интернета
+Comment[sr@ijekavianlatin]=Pogledajte stripove sa Interneta
+Comment[sr@latin]=Pogledajte stripove sa Interneta
+Comment[sv]=Visa tecknade serier från Internet
+Comment[th]=ดูหนังสือการ์ตูนผ่านทางอินเทอร์เน็ต
+Comment[tr]=İnternet'ten çizgi roman karikatürleri göster
+Comment[uk]=Показує стрічку з жартами з Інтернету
+Comment[wa]=Vey ene binde d' imådje di l' Etrernet
+Comment[x-test]=xxView comic strips from the Internetxx
+Comment[zh_CN]=查看来自互联网的连环画
+Comment[zh_TW]=從網路上顯示漫畫
+Icon=face-smile-big
+Type=Service
+X-KDE-ServiceTypes=Plasma/Applet
+
+X-Plasma-API=declarativeappletscript
+X-Plasma-MainScript=ui/main.qml
+X-Plasma-DefaultSize=600,250
+X-KDE-PluginInfo-Author=Reza Fatahilah Shah
+X-KDE-PluginInfo-Email=rshah0385@kireihana.com
+X-KDE-PluginInfo-Name=comic
+X-KDE-PluginInfo-Version=1.0
+X-KDE-PluginInfo-Website=http://plasma.kde.org/
+X-KDE-PluginInfo-Category=Graphics
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=true
+X-Plasma-Requires-FileDialog=Optional
+X-Plasma-Requires-LaunchApp=Optional
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic