Commit 6d33598d authored by Denis Khachko's avatar Denis Khachko

GrassHopper menu. Save and load env.

parent 4b867291
......@@ -22,7 +22,36 @@
"windows": [
{ "role": "main", "icon": "grasshopper" },
{ "role": "pult", "icon": "grasshopper-rc" }
]
],
"menus": [
{
"title": { "ascii": "Grasshopper", "ru_RU": "Кузнечик" },
"items": [
{
"title": {
"ascii": "New Environment...",
"ru_RU": "Новое задание..."
},
"icon": "file-new"
},
{ "title": {
"ascii": "Load Environment...",
"ru_RU": "Загрузить задание..."
},
"icon": "file-open"
},
{
"title": {
"ascii": "Save",
"ru_RU": "Сохранить..."
}
}
]
}
]
},
"settings": {
"BackgroundColor": {
......
......@@ -34,6 +34,9 @@ GrasshopperModule::GrasshopperModule(ExtensionSystem::KPlugin * parent)
: GrasshopperModuleBase(parent)
{
kuznec=new KumKuznec(myResourcesDir());
connect(m_actionGrasshopperNewEnvironment,SIGNAL(triggered()) ,kuznec , SLOT(ClearPicture()));
connect(m_actionGrasshopperLoadEnvironment,SIGNAL(triggered()) ,kuznec , SLOT(LoadFromFileActivated()));
connect(m_actionGrasshopperSave,SIGNAL(triggered()) ,kuznec , SLOT(SaveToFileActivated()));
// Module constructor, called once on plugin load
// TODO implement me
}
......
......@@ -2191,6 +2191,7 @@ void KumKuznec::LoadFromFileActivated()
QString VodFileN=QFileDialog::getOpenFileName(this, QString::fromUtf8 ("Открыть файл"), curDir, "(*.kz)");
if(VodFileN.isEmpty())return;
sett.setValue("Last", VodFileN);
if(LoadFromFile(VodFileN)>0){
......
......@@ -475,7 +475,7 @@ void DrawNet();
void SetLineColor(int LRed, int LGreen, int LBlue);
bool SetColorString(QString Color);
//void ShowInfo();
;
void CreatePen(void);
bool moving;
//void DestroyPen(void);
......
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