Commit cd457bad authored by Victor Yacovlev's avatar Victor Yacovlev

INTERFACES: Added cousre support interfaces

parent 05041564
#ifndef COURSESINTERFACE_H
#define COURSESINTERFACE_H
#include <QtCore>
#include <QWidget>
namespace Shared
{
class CoursesInterface
{
Q_ENUMS(ProgramRunStatus)
public:
enum ProgramRunStatus {
SuccessfullyFinished,
UserTerminated,
AbortedOnError
};
virtual QWidget* mainWindow() const = 0;
virtual QAction* actionPerformCheck() const = 0;
public /*slots*/:
virtual void setEnabled(bool value) = 0;
virtual void setTestingResult(ProgramRunStatus status, int value) = 0;
};
}
#endif // COURSESINTERFACE_H
#ifndef GUIINTERFACE_H
#define GUIINTERFACE_H
#include <dataformats/kumfile.h>
#include <QtCore>
#include <QWidget>
namespace Shared
{
class GuiInterface
{
Q_ENUMS(Shared::GuiInterface::ProgramSourceText::Language)
public:
struct ProgramSourceText {
enum Language { Kumir, Pascal, etc = 255 };
Language language;
QDateTime saved;
QDateTime changed;
KumFile::Data content;
QString title;
};
public /*slots*/:
virtual void setProgramSource(const ProgramSourceText &source) = 0;
virtual ProgramSourceText programSource() const = 0;
virtual void startTesting() = 0;
};
}
Q_DECLARE_METATYPE(Shared::GuiInterface::ProgramSourceText)
Q_DECLARE_INTERFACE(Shared::GuiInterface, "kumir2.Gui")
#endif // GUIINTERFACE_H
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