Read external tools from resources and show them in menu.

This commit is contained in:
con
2010-11-11 15:47:23 +01:00
parent e07e914514
commit 371478ffb9
6 changed files with 128 additions and 11 deletions

View File

@@ -30,6 +30,9 @@
#ifndef EXTERNALTOOL_H
#define EXTERNALTOOL_H
#include "icore.h"
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/QStringList>
@@ -58,7 +61,7 @@ public:
QString arguments() const;
QString workingDirectory() const;
static ExternalTool *createFromXml(const QString &xml, QString *errorMessage = 0, const QString &locale = QString());
static ExternalTool *createFromXml(const QByteArray &xml, QString *errorMessage = 0, const QString &locale = QString());
private:
QString m_id;
@@ -72,6 +75,24 @@ private:
OutputHandling m_outputHandling;
};
class ExternalToolManager : public QObject
{
Q_OBJECT
public:
ExternalToolManager(Core::ICore *core);
~ExternalToolManager();
void initialize();
private slots:
void menuActivated();
private:
Core::ICore *m_core;
QMap<QString, ExternalTool *> m_tools;
};
} // Internal
} // Core