aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpaster/cpasterplugin.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-04-21 15:21:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-04-21 15:21:50 +0200
commit5001aec7cefc6a13d5c1d4790dfe9c7f7aa709a5 (patch)
tree90805f88449845fa6bfd93621c3df128467eaf24 /src/plugins/cpaster/cpasterplugin.h
parent9b97f9a66e2f6a2eb77857d20d7ae9303c458ad7 (diff)
CodePaster: Provide service for soft-dependent plugins.
Offer 'Paste' in VCSBase-Diff-Editor context menu. Make new protocol the default one if user changes it in view/paste dialogs.
Diffstat (limited to 'src/plugins/cpaster/cpasterplugin.h')
-rw-r--r--src/plugins/cpaster/cpasterplugin.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/plugins/cpaster/cpasterplugin.h b/src/plugins/cpaster/cpasterplugin.h
index 887f478ba46..beab63b088e 100644
--- a/src/plugins/cpaster/cpasterplugin.h
+++ b/src/plugins/cpaster/cpasterplugin.h
@@ -48,6 +48,18 @@ class CustomPoster;
struct Settings;
class Protocol;
+class CodePasterService : public QObject
+{
+ Q_OBJECT
+public:
+ explicit CodePasterService(QObject *parent = 0);
+
+public slots:
+ void postText(const QString &text, const QString &mimeType);
+ void postCurrentEditor();
+ void postClipboard();
+};
+
class CodepasterPlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
@@ -60,6 +72,8 @@ public:
virtual void extensionsInitialized();
virtual ShutdownFlag aboutToShutdown();
+ static CodepasterPlugin *instance();
+
public slots:
void postEditor();
void postClipboard();
@@ -69,9 +83,10 @@ public slots:
const QString &content,
bool error);
-private:
void post(QString data, const QString &mimeType);
+private:
+ static CodepasterPlugin *m_instance;
const QSharedPointer<Settings> m_settings;
QAction *m_postEditorAction;
QAction *m_postClipboardAction;