Commit 78779fc2 authored by Denis Khachko's avatar Denis Khachko

Revert "Course Manager"

This reverts commit 12a97e2d.
parents 12a97e2d 55c8d227
#include "coursemanager_plugin.h"
#include <dataformats/kumfile.h>
#include "task/mainwindow.h"
namespace CourseManager {
......@@ -15,9 +14,7 @@ Plugin::Plugin()
courseMenu=new QMenu(trUtf8("Практикум"));
MenuList.append(courseMenu);
MW=new MainWindowTask();
MW->setup();
mainWindow_=MW;
}
QList<QMenu*> Plugin::menus()const
{
......@@ -31,15 +28,8 @@ 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_;
......@@ -101,13 +91,6 @@ 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){};
bool startNewTask(QStringList isps);
void setPreProgram(QVariant param);
int startNewTask(QStringList isps){return 0;};
void setPreProgram(QVariant param){qDebug()<<"setPreProgram! NOT IMPLEMENTED!!";};
void startProgram(QVariant param){qDebug()<<"startProgram! NOT IMPLEMENTED!!";};
public slots:
void setEnabled(bool value);
......
......@@ -69,13 +69,12 @@ isTeacher=false;
//ui->textBrowser->setVisible(false);
};
QList<QAction*> MainWindowTask::getActions()
QList<QAction*> MainWindowTask::getActions()const
{
QList<QAction*> toRet;
toRet.append(ui->loadCurs);
toRet.append(ui->checkTask);
toRet.append(ui->actionReset);
return toRet;
toRet.append(ui->actionReset);
}
MainWindowTask::~MainWindowTask()
{
......
......@@ -72,7 +72,7 @@ public:
void setup();
QString getFileName(QString fileName);
void setTeacher(bool mode);
QList<QAction*> getActions();
QList<QAction*> getActions()const;
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