//Xolotl Studio
//Created by Ymmanuel Flores on 2018
//Copyright 2018 Crowdorchestra SAPI de CV. All rights reserved.
//hhconnect v 1.0.0.4


import QtQuick 2.7
import Painter 1.0


PainterPlugin{

	tickIntervalMS: -1
	jsonServerPort: -1

	SettingsWindow{
		id: window
	}

	Component.onCompleted: {
			var vers = alg.version.painter.split('.')[0]

			if(vers > 2017){
				var qmlToolbar = alg.ui.addWidgetToPluginToolBar("toolbar.qml");
				qmlToolbar.settings = window
			}else{
				var qmlToolbar = alg.ui.addToolBarWidget("toolbar.qml");
				qmlToolbar.settings = window
			}
	}


	onNewProjectCreated:{
		window.refreshInterface()
	}

	onProjectOpened:{
		window.refreshInterface()
	}

	onProjectAboutToClose:{
		window.refreshInterface()
	}

}
