[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kipi-plugins] debianscreenshots: use dedicated namespace
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2012-03-31 17:18:05
Message-ID: 20120331171805.3A08AA60A9 () git ! kde ! org
[Download RAW message or body]
Git commit b9ad38711d31e828d3e6a20f66f4401e4f761e78 by Gilles Caulier.
Committed on 31/03/2012 at 19:17.
Pushed by cgilles into branch 'master'.
use dedicated namespace
M +12 -16 debianscreenshots/plugin_debianscreenshots.cpp
M +11 -21 debianscreenshots/plugin_debianscreenshots.h
http://commits.kde.org/kipi-plugins/b9ad38711d31e828d3e6a20f66f4401e4f761e78
diff --git a/debianscreenshots/plugin_debianscreenshots.cpp \
b/debianscreenshots/plugin_debianscreenshots.cpp index 3c3ff4b..5e7588e 100644
--- a/debianscreenshots/plugin_debianscreenshots.cpp
+++ b/debianscreenshots/plugin_debianscreenshots.cpp
@@ -50,13 +50,15 @@
// Local includes
#include "dswindow.h"
-//#include "dsjob.h"
+
+namespace KIPIDebianScreenshotsPlugin
+{
K_PLUGIN_FACTORY( DebianScreenshotsFactory, \
registerPlugin<Plugin_DebianScreenshots>(); ) K_EXPORT_PLUGIN ( \
DebianScreenshotsFactory("kipiplugin_debianscreenshots") )
-Plugin_DebianScreenshots::Plugin_DebianScreenshots(QObject* parent, const \
QVariantList& /*args*/)
- : KIPI::Plugin(DebianScreenshotsFactory::componentData(),
+Plugin_DebianScreenshots::Plugin_DebianScreenshots(QObject* const parent, const \
QVariantList&) + : Plugin(DebianScreenshotsFactory::componentData(),
parent, "Debian Screenshots Export")
{
kDebug(AREA_CODE_LOADING) << "Plugin_DebianScreenshots plugin loaded";
@@ -66,7 +68,7 @@ void Plugin_DebianScreenshots::setup(QWidget* widget)
{
m_dlgExport = 0;
- KIPI::Plugin::setup(widget);
+ Plugin::setup(widget);
KIconLoader::global()->addAppDir("kipiplugin_debianscreenshots");
@@ -80,7 +82,7 @@ void Plugin_DebianScreenshots::setup(QWidget* widget)
addAction(m_actionExport);
- KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent());
+ Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!";
@@ -97,7 +99,7 @@ Plugin_DebianScreenshots::~Plugin_DebianScreenshots()
void Plugin_DebianScreenshots::slotExport()
{
- KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent());
+ Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!";
@@ -110,7 +112,7 @@ void Plugin_DebianScreenshots::slotExport()
if (!m_dlgExport)
{
// We clean it up in the close button
- m_dlgExport = new KIPIDebianScreenshotsPlugin::DsWindow(interface, tmp, \
kapp->activeWindow()); + m_dlgExport = new DsWindow(interface, tmp, \
kapp->activeWindow()); }
else
{
@@ -123,15 +125,9 @@ void Plugin_DebianScreenshots::slotExport()
m_dlgExport->reactivate();
}
-KIPI::Category Plugin_DebianScreenshots::category( KAction* /* action */ ) const
+Category Plugin_DebianScreenshots::category(KAction*) const
{
- return KIPI::ExportPlugin;
+ return ExportPlugin;
}
-/*
-KJob* Plugin_DebianScreenshots::exportFiles(const QString& album)
-{
- KIPI::Interface* interface = dynamic_cast<KIPI::Interface*>(parent());
- return new KIPIDebianScreenshotsPlugin::DebianScreenshotsJob(album, \
interface->currentSelection().images());
-}
-*/
+} // namespace KIPIDebianScreenshotsPlugin
\ No newline at end of file
diff --git a/debianscreenshots/plugin_debianscreenshots.h \
b/debianscreenshots/plugin_debianscreenshots.h index 9f6029e..81067a0 100644
--- a/debianscreenshots/plugin_debianscreenshots.h
+++ b/debianscreenshots/plugin_debianscreenshots.h
@@ -31,38 +31,26 @@
#include <libkipi/plugin.h>
-//#if KDE_IS_VERSION(4,3,60)
-//#include <libkipi/exportinterface.h>
-//#endif
-
class KAction;
+using namespace KIPI;
+
namespace KIPIDebianScreenshotsPlugin
{
- class DsWindow;
-}
-class KJob;
+class DsWindow;
-class Plugin_DebianScreenshots
- : public KIPI::Plugin
-//#if KDE_IS_VERSION(4,3,60)
-// , public KIPI::ExportInterface
-//#endif
+class Plugin_DebianScreenshots : public Plugin
{
-Q_OBJECT
-//#if KDE_IS_VERSION(4,3,60)
-//Q_INTERFACES( KIPI::ExportInterface )
-//#endif
+ Q_OBJECT
public:
- Plugin_DebianScreenshots(QObject* parent, const QVariantList& args);
+ Plugin_DebianScreenshots(QObject* const parent, const QVariantList& args);
~Plugin_DebianScreenshots();
- KIPI::Category category(KAction* action) const;
+ Category category(KAction* action) const;
void setup(QWidget*);
-// virtual KJob* exportFiles(const QString& album);
public Q_SLOTS:
@@ -70,8 +58,10 @@ public Q_SLOTS:
private:
- KAction* m_actionExport;
- KIPIDebianScreenshotsPlugin::DsWindow* m_dlgExport;
+ KAction* m_actionExport;
+ DsWindow* m_dlgExport;
};
+} // namespace KIPIDebianScreenshotsPlugin
+
#endif // PLUGIN_DEBIANSCREENSHOTS_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic