Commit bf7b829d authored by Denis Khachko's avatar Denis Khachko

Merge branches 'master' and 'master' of gitorious.org:kumir2/kumir2

Conflicts:
	src/plugins/coursemanager/task/mainwindow.cpp
parent 78779fc2
#include "coursemanager_plugin.h"
#include <dataformats/kumfile.h>
#include "task/mainwindow.h"
namespace CourseManager {
......@@ -14,7 +15,9 @@ Plugin::Plugin()
courseMenu=new QMenu(trUtf8("Практикум"));
MenuList.append(courseMenu);
MW=new MainWindowTask();
MW->setup();
mainWindow_=MW;
}
QList<QMenu*> Plugin::menus()const
{
......@@ -28,8 +31,15 @@ QString Plugin::getText()
gui->programSource();
return QString();
}
void Plugin::setPreProgram(QVariant param)
{
GI * gui = ExtensionSystem::PluginManager::instance()->findPlugin<GI>();
Shared::GuiInterface::ProgramSourceText text;
text.content=KumFile::fromString(param.toString());
gui->setProgramSource(text);
}
bool Plugin::startNewTask(QStringList isps)
{return true;};
QWidget* Plugin::mainWindow() const
{
return mainWindow_;
......@@ -91,6 +101,13 @@ void Plugin::changeGlobalState(ExtensionSystem::GlobalState old,
QString Plugin::initialize(const QStringList &arguments)
{
QList<QAction*> actions;
actions=MW->getActions();
for(int i=0;i<actions.count();i++)
{
courseMenu->addAction(actions.at(i));
}
MW->setCS(trUtf8("Кумир"));
qRegisterMetaType<Shared::CoursesInterface::ProgramRunStatus>
("CourseManager.ProgramRunStatus");
QString error;
......
......@@ -28,8 +28,8 @@ public:
QList<QMenu*> menus() const;
QString getText();
void setParam(QString paramname,QString param){};
int startNewTask(QStringList isps){return 0;};
void setPreProgram(QVariant param){qDebug()<<"setPreProgram! NOT IMPLEMENTED!!";};
bool startNewTask(QStringList isps);
void setPreProgram(QVariant param);
void startProgram(QVariant param){qDebug()<<"startProgram! NOT IMPLEMENTED!!";};
public slots:
void setEnabled(bool value);
......
......@@ -69,12 +69,13 @@ isTeacher=false;
//ui->textBrowser->setVisible(false);
};
QList<QAction*> MainWindowTask::getActions()const
QList<QAction*> MainWindowTask::getActions()
{
QList<QAction*> toRet;
toRet.append(ui->loadCurs);
toRet.append(ui->checkTask);
toRet.append(ui->actionReset);
toRet.append(ui->actionReset);
return toRet;
}
MainWindowTask::~MainWindowTask()
{
......
......@@ -72,7 +72,7 @@ public:
void setup();
QString getFileName(QString fileName);
void setTeacher(bool mode);
QList<QAction*> getActions()const;
QList<QAction*> getActions();
public slots:
void aboutToQuit ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment