summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-09-07 22:23:07 +0200
committerMontel Laurent <[email protected]>2015-09-07 22:23:07 +0200
commitb8b913653b1f9719271c76a0960383b0d89256b3 (patch)
treec89bfe592b578c21c15380b9a2fca8fc5ed81465
parent7d680b459b9e1725854b321bcc8e667976124012 (diff)
improve plugin support
-rw-r--r--messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.cpp5
-rw-r--r--messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.h1
-rw-r--r--messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.cpp6
-rw-r--r--messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.h3
-rw-r--r--messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.cpp5
-rw-r--r--messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.h1
-rw-r--r--messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.cpp2
-rw-r--r--messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.h2
-rw-r--r--messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.cpp5
-rw-r--r--messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.h1
-rw-r--r--messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.cpp2
-rw-r--r--messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.h2
-rw-r--r--messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.cpp5
-rw-r--r--messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.h1
-rw-r--r--messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.cpp2
-rw-r--r--messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.h2
-rw-r--r--messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp5
-rw-r--r--messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h1
-rw-r--r--messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.cpp2
-rw-r--r--messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.h2
-rw-r--r--messageviewer/header/headerstyleplugin.cpp2
-rw-r--r--messageviewer/header/headerstyleplugin.h3
22 files changed, 47 insertions, 13 deletions
diff --git a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.cpp b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.cpp
index 63caf56..4e35f5c 100644
--- a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.cpp
+++ b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.cpp
@@ -29,3 +29,8 @@ BriefHeaderStyleInterface::~BriefHeaderStyleInterface()
}
+KToggleAction *BriefHeaderStyleInterface::action() const
+{
+ return Q_NULLPTR;
+}
+
diff --git a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.h b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.h
index 45c647e..c7a21c4 100644
--- a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.h
+++ b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleinterface.h
@@ -30,6 +30,7 @@ public:
explicit BriefHeaderStyleInterface(MessageViewer::HeaderStyle *headerStyle, MessageViewer::HeaderStrategy *headerStrategy, QObject *parent = Q_NULLPTR);
~BriefHeaderStyleInterface();
+ KToggleAction *action() const Q_DECL_OVERRIDE;
};
}
diff --git a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.cpp b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.cpp
index 5a096a5..2dd873e 100644
--- a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.cpp
+++ b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.cpp
@@ -16,6 +16,7 @@
*/
#include "briefheaderstyleplugin.h"
+#include "briefheaderstyleinterface.h"
#include "header/briefheaderstyle.h"
//Temporary
#include "header/headerstrategy_p.h"
@@ -46,10 +47,11 @@ HeaderStrategy *BriefHeaderStylePlugin::headerStrategy() const
return mHeaderStrategy;
}
-KToggleAction *BriefHeaderStylePlugin::createAction(KActionCollection *ac)
+MessageViewer::HeaderStyleInterface *BriefHeaderStylePlugin::createView(KActionCollection *ac)
{
+ MessageViewer::BriefHeaderStyleInterface *view = new MessageViewer::BriefHeaderStyleInterface(mHeaderStyle, mHeaderStrategy);
//TODO
- return Q_NULLPTR;
+ return view;
}
#include "briefheaderstyleplugin.moc"
diff --git a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.h b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.h
index acbbf5f..d140dca 100644
--- a/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.h
+++ b/messageviewer/header/briefheaderstyleplugin/briefheaderstyleplugin.h
@@ -24,6 +24,7 @@
namespace MessageViewer
{
+class HeaderStyleInterface;
class BriefHeaderStylePlugin : public MessageViewer::HeaderStylePlugin
{
Q_OBJECT
@@ -33,7 +34,7 @@ public:
HeaderStyle *headerStyle() const Q_DECL_OVERRIDE;
HeaderStrategy *headerStrategy() const Q_DECL_OVERRIDE;
- KToggleAction *createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ HeaderStyleInterface *createView(KActionCollection *ac) Q_DECL_OVERRIDE;
private:
HeaderStyle *mHeaderStyle;
HeaderStrategy *mHeaderStrategy;
diff --git a/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.cpp b/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.cpp
index 59f30ba..dde70b3 100644
--- a/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.cpp
+++ b/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.cpp
@@ -29,3 +29,8 @@ CustomHeaderStyleInterface::~CustomHeaderStyleInterface()
}
+KToggleAction *CustomHeaderStyleInterface::action() const
+{
+ return Q_NULLPTR;
+}
+
diff --git a/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.h b/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.h
index 12f1625..1596c9e 100644
--- a/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.h
+++ b/messageviewer/header/customheaderstyleplugin/customheaderstyleinterface.h
@@ -29,6 +29,7 @@ class CustomHeaderStyleInterface : public MessageViewer::HeaderStyleInterface
public:
explicit CustomHeaderStyleInterface(MessageViewer::HeaderStyle *headerStyle, MessageViewer::HeaderStrategy *headerStrategy, QObject *parent = Q_NULLPTR);
~CustomHeaderStyleInterface();
+ KToggleAction *action() const Q_DECL_OVERRIDE;
};
diff --git a/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.cpp b/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.cpp
index 04c5867..1adbeb8 100644
--- a/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.cpp
+++ b/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.cpp
@@ -46,7 +46,7 @@ HeaderStrategy *CustomHeaderStylePlugin::headerStrategy() const
return mHeaderStrategy;
}
-KToggleAction *CustomHeaderStylePlugin::createAction(KActionCollection *ac)
+HeaderStyleInterface *CustomHeaderStylePlugin::createView(KActionCollection *ac)
{
//TODO
return Q_NULLPTR;
diff --git a/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.h b/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.h
index f5060c1..45fb435 100644
--- a/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.h
+++ b/messageviewer/header/customheaderstyleplugin/customheaderstyleplugin.h
@@ -33,7 +33,7 @@ public:
HeaderStyle *headerStyle() const Q_DECL_OVERRIDE;
HeaderStrategy *headerStrategy() const Q_DECL_OVERRIDE;
- KToggleAction *createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ HeaderStyleInterface *createView(KActionCollection *ac) Q_DECL_OVERRIDE;
private:
HeaderStyle *mHeaderStyle;
HeaderStrategy *mHeaderStrategy;
diff --git a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.cpp b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.cpp
index 55ff70e..19ea0b0 100644
--- a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.cpp
+++ b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.cpp
@@ -29,3 +29,8 @@ EnterpriseHeaderStyleInterface::~EnterpriseHeaderStyleInterface()
}
+KToggleAction *EnterpriseHeaderStyleInterface::action() const
+{
+ return Q_NULLPTR;
+}
+
diff --git a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.h b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.h
index d1f912b..9ad9b11 100644
--- a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.h
+++ b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleinterface.h
@@ -30,6 +30,7 @@ public:
explicit EnterpriseHeaderStyleInterface(MessageViewer::HeaderStyle *headerStyle, MessageViewer::HeaderStrategy *headerStrategy, QObject *parent = Q_NULLPTR);
~EnterpriseHeaderStyleInterface();
+ KToggleAction *action() const Q_DECL_OVERRIDE;
};
}
diff --git a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.cpp b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.cpp
index e2f8c53..09265b1 100644
--- a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.cpp
+++ b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.cpp
@@ -46,7 +46,7 @@ HeaderStrategy *EnterpriseHeaderStylePlugin::headerStrategy() const
return mHeaderStrategy;
}
-KToggleAction *EnterpriseHeaderStylePlugin::createAction(KActionCollection *ac)
+HeaderStyleInterface *EnterpriseHeaderStylePlugin::createView(KActionCollection *ac)
{
//TODO
return Q_NULLPTR;
diff --git a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.h b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.h
index 593a683..dc1f2e0 100644
--- a/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.h
+++ b/messageviewer/header/enterpriseheaderstyleplugin/enterpriseheaderstyleplugin.h
@@ -33,7 +33,7 @@ public:
HeaderStyle *headerStyle() const Q_DECL_OVERRIDE;
HeaderStrategy *headerStrategy() const Q_DECL_OVERRIDE;
- KToggleAction *createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ HeaderStyleInterface *createView(KActionCollection *ac) Q_DECL_OVERRIDE;
private:
HeaderStyle *mHeaderStyle;
HeaderStrategy *mHeaderStrategy;
diff --git a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.cpp b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.cpp
index 0ff93c7..7bbd3e2 100644
--- a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.cpp
+++ b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.cpp
@@ -29,3 +29,8 @@ FancyHeaderStyleInterface::~FancyHeaderStyleInterface()
}
+KToggleAction *FancyHeaderStyleInterface::action() const
+{
+ return Q_NULLPTR;
+}
+
diff --git a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.h b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.h
index 55b1c46..e0ce219 100644
--- a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.h
+++ b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleinterface.h
@@ -30,6 +30,7 @@ public:
explicit FancyHeaderStyleInterface(MessageViewer::HeaderStyle *headerStyle, MessageViewer::HeaderStrategy *headerStrategy, QObject *parent = Q_NULLPTR);
~FancyHeaderStyleInterface();
+ KToggleAction *action() const Q_DECL_OVERRIDE;
};
}
diff --git a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.cpp b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.cpp
index 9e37f55..07b4cc3 100644
--- a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.cpp
+++ b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.cpp
@@ -46,7 +46,7 @@ HeaderStrategy *FancyHeaderStylePlugin::headerStrategy() const
return mHeaderStrategy;
}
-KToggleAction *FancyHeaderStylePlugin::createAction(KActionCollection *ac)
+HeaderStyleInterface *FancyHeaderStylePlugin::createView(KActionCollection *ac)
{
//TODO
return Q_NULLPTR;
diff --git a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.h b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.h
index dfd224c..e1e9c61 100644
--- a/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.h
+++ b/messageviewer/header/fancyheaderstyleplugin/fancyheaderstyleplugin.h
@@ -33,7 +33,7 @@ public:
HeaderStyle *headerStyle() const Q_DECL_OVERRIDE;
HeaderStrategy *headerStrategy() const Q_DECL_OVERRIDE;
- KToggleAction *createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ HeaderStyleInterface *createView(KActionCollection *ac) Q_DECL_OVERRIDE;
private:
HeaderStyle *mHeaderStyle;
HeaderStrategy *mHeaderStrategy;
diff --git a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp
index 576bd02..8bb2a28 100644
--- a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp
+++ b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.cpp
@@ -29,3 +29,8 @@ GrantleeHeaderStyleInterface::~GrantleeHeaderStyleInterface()
}
+KToggleAction *GrantleeHeaderStyleInterface::action() const
+{
+ return Q_NULLPTR;
+}
+
diff --git a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h
index c7a004e..4db8929 100644
--- a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h
+++ b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleinterface.h
@@ -30,6 +30,7 @@ public:
explicit GrantleeHeaderStyleInterface(MessageViewer::HeaderStyle *headerStyle, MessageViewer::HeaderStrategy *headerStrategy, QObject *parent = Q_NULLPTR);
~GrantleeHeaderStyleInterface();
+ KToggleAction *action() const Q_DECL_OVERRIDE;
};
}
diff --git a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.cpp b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.cpp
index 6355b64..6a40d37 100644
--- a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.cpp
+++ b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.cpp
@@ -46,7 +46,7 @@ HeaderStrategy *GrantleeHeaderStylePlugin::headerStrategy() const
return mHeaderStrategy;
}
-KToggleAction *GrantleeHeaderStylePlugin::createAction(KActionCollection *ac)
+HeaderStyleInterface *GrantleeHeaderStylePlugin::createView(KActionCollection *ac)
{
//TODO
return Q_NULLPTR;
diff --git a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.h b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.h
index ce015f0..52b8ba9 100644
--- a/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.h
+++ b/messageviewer/header/grantleeheaderstyleplugin/grantleeheaderstyleplugin.h
@@ -33,7 +33,7 @@ public:
HeaderStyle *headerStyle() const Q_DECL_OVERRIDE;
HeaderStrategy *headerStrategy() const Q_DECL_OVERRIDE;
- KToggleAction *createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ HeaderStyleInterface *createView(KActionCollection *ac) Q_DECL_OVERRIDE;
private:
HeaderStyle *mHeaderStyle;
HeaderStrategy *mHeaderStrategy;
diff --git a/messageviewer/header/headerstyleplugin.cpp b/messageviewer/header/headerstyleplugin.cpp
index ed23657..3a6d52b 100644
--- a/messageviewer/header/headerstyleplugin.cpp
+++ b/messageviewer/header/headerstyleplugin.cpp
@@ -15,7 +15,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "headerstyleplugin.h"Z
+#include "headerstyleplugin.h"
using namespace MessageViewer;
class MessageViewer::HeaderStylePluginPrivate
diff --git a/messageviewer/header/headerstyleplugin.h b/messageviewer/header/headerstyleplugin.h
index 89450d1..8d08e99 100644
--- a/messageviewer/header/headerstyleplugin.h
+++ b/messageviewer/header/headerstyleplugin.h
@@ -28,6 +28,7 @@ namespace MessageViewer
class HeaderStyle;
class HeaderStrategy;
class HeaderStylePluginPrivate;
+class HeaderStyleInterface;
class MESSAGEVIEWER_EXPORT HeaderStylePlugin : public QObject
{
Q_OBJECT
@@ -37,7 +38,7 @@ public:
virtual HeaderStyle *headerStyle() const = 0;
virtual HeaderStrategy *headerStrategy() const = 0;
- virtual KToggleAction *createAction(KActionCollection *ac) = 0;
+ virtual HeaderStyleInterface *createView(KActionCollection *ac) = 0;
private:
HeaderStylePluginPrivate *const d;