Commit 581165bc authored by Denis Khachko's avatar Denis Khachko

Course manager icons

parent 909fb735
#ifndef COURSE_MODEL_H
#define COURSE_MODEL_H
#include <QAbstractItemModel>
#include <QApplication>
#include <QFile>
#include <QDebug>
#include <QStringList>
#include <QFont>
#include <QDomDocument>
#include <QIcon>
#include <QUrl>
class KumTask
{
public:
......@@ -98,20 +100,56 @@ public:
markIcons.append(QIcon(":/folder_open.png"));
return;
#endif
markIcons.append(QIcon(":/out_stand.svg"));
markIcons.append(QIcon(":/1.png"));
markIcons.append(QIcon(":/2.png"));
markIcons.append(QIcon(":/3.png"));
markIcons.append(QIcon(":/4.png"));
markIcons.append(QIcon(":/5.png"));
markIcons.append(QIcon(":/6.png"));
markIcons.append(QIcon(":/7.png"));
markIcons.append(QIcon(":/8.png"));
markIcons.append(QIcon(":/9.png"));
markIcons.append(QIcon(":/10.png"));
QUrl::fromLocalFile(qApp->property("sharePath").toString()+
"/coursemanager/out_stand.svg"
);
markIcons.append(QIcon( qApp->property("sharePath").toString()+
"/coursemanager/out_stand.svg"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/1.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/2.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/3.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/4.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/5.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/6.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/7.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/8.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/9.png"
));
markIcons.append(QIcon(qApp->property("sharePath").toString()+
"/coursemanager/10.png"
));
markIcons.append(QIcon(":/m.png"));
markIcons.append(QIcon(":/folder_close.svg"));
markIcons.append(QIcon( qApp->property("sharePath").toString()+
"/coursemanager/folder_close.png"
));
markIcons.append(QIcon(":/folder_1.png "));
markIcons.append(QIcon(":/folder_2.svg"));
markIcons.append(QIcon(":/folder_3.svg"));
......
......@@ -29,7 +29,7 @@ QString Plugin::getText()
{
GI * gui = ExtensionSystem::PluginManager::instance()->findPlugin<GI>();
gui->programSource();
return gui->programSource().content.visibleText+'\n'+gui->programSource().content.hiddenText;
return gui->programSource().content.visibleText+QChar('\n')+gui->programSource().content.hiddenText;
}
void Plugin::setPreProgram(QVariant param)
{
......@@ -66,7 +66,11 @@ QWidget* Plugin::mainWindow() const
{
return mainWindow_;
}
void Plugin::startProgram(QVariant param)
{
GI * gui = ExtensionSystem::PluginManager::instance()->findPlugin<GI>();
gui->startTesting();
};
QAction* Plugin::actionPerformCheck() const
{
return actionPerformCheck_;
......@@ -97,7 +101,7 @@ void Plugin::setEnabled(bool value)
void Plugin::setTestingResult(ProgramRunStatus status, int value)
{
qDebug()<<"Set testing results";
}
void Plugin::saveSession() const
......@@ -118,7 +122,8 @@ void Plugin::changeCurrentDirectory(const QString &path)
void Plugin::changeGlobalState(ExtensionSystem::GlobalState old,
ExtensionSystem::GlobalState current)
{
if(current==ExtensionSystem::GlobalState::GS_Running)MW->lockControls();
if(current==ExtensionSystem::GlobalState::GS_Observe)MW->unlockControls();
}
QString Plugin::initialize(const QStringList &arguments)
......
......@@ -30,7 +30,7 @@ public:
void setParam(QString paramname,QString param){};
bool startNewTask(QStringList isps);
void setPreProgram(QVariant param);
void startProgram(QVariant param){qDebug()<<"startProgram! NOT IMPLEMENTED!!";};
void startProgram(QVariant param);
public slots:
void setEnabled(bool value);
void setTestingResult(ProgramRunStatus status, int value);
......
......@@ -436,16 +436,26 @@ if(!cursWorkFile.exists()){
saveCourse();
};
course->setMark(curTaskIdx.internalId(),0);
ui->splitter->setEnabled(false);
ui->checkTask->setEnabled(false);
ui->loadCurs->setEnabled(false);
interface->startProgram(QVariant("TODO LOAD SCRIPT"));
//ui->loadCurs->setEnabled(false);
};
void MainWindowTask::lockControls()
{
ui->splitter->setEnabled(false);
ui->checkTask->setEnabled(false);
ui->loadCurs->setEnabled(false);
};
void MainWindowTask::unlockControls()
{
ui->splitter->setEnabled(true);
ui->checkTask->setEnabled(true);
ui->loadCurs->setEnabled(true);
};
void MainWindowTask::setMark(int mark)
{
......
......@@ -103,6 +103,8 @@ public slots:
void newKurs();
void endRootEdit();
void cancelRootEdit();
void lockControls();
void unlockControls();
protected:
void changeEvent(QEvent *e);
......
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