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

GrassHopper menu. Save and load env.

parent 4b867291
...@@ -22,7 +22,36 @@ ...@@ -22,7 +22,36 @@
"windows": [ "windows": [
{ "role": "main", "icon": "grasshopper" }, { "role": "main", "icon": "grasshopper" },
{ "role": "pult", "icon": "grasshopper-rc" } { "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": { "settings": {
"BackgroundColor": { "BackgroundColor": {
......
...@@ -34,6 +34,9 @@ GrasshopperModule::GrasshopperModule(ExtensionSystem::KPlugin * parent) ...@@ -34,6 +34,9 @@ GrasshopperModule::GrasshopperModule(ExtensionSystem::KPlugin * parent)
: GrasshopperModuleBase(parent) : GrasshopperModuleBase(parent)
{ {
kuznec=new KumKuznec(myResourcesDir()); 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 // Module constructor, called once on plugin load
// TODO implement me // TODO implement me
} }
......
...@@ -2191,6 +2191,7 @@ void KumKuznec::LoadFromFileActivated() ...@@ -2191,6 +2191,7 @@ void KumKuznec::LoadFromFileActivated()
QString VodFileN=QFileDialog::getOpenFileName(this, QString::fromUtf8 ("Открыть файл"), curDir, "(*.kz)"); QString VodFileN=QFileDialog::getOpenFileName(this, QString::fromUtf8 ("Открыть файл"), curDir, "(*.kz)");
if(VodFileN.isEmpty())return;
sett.setValue("Last", VodFileN); sett.setValue("Last", VodFileN);
if(LoadFromFile(VodFileN)>0){ if(LoadFromFile(VodFileN)>0){
......
...@@ -475,7 +475,7 @@ void DrawNet(); ...@@ -475,7 +475,7 @@ void DrawNet();
void SetLineColor(int LRed, int LGreen, int LBlue); void SetLineColor(int LRed, int LGreen, int LBlue);
bool SetColorString(QString Color); bool SetColorString(QString Color);
//void ShowInfo(); //void ShowInfo();
;
void CreatePen(void); void CreatePen(void);
bool moving; bool moving;
//void DestroyPen(void); //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