mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 22:54:21 +00:00 
			
		
		
		
	Added GPL headers.
This commit is contained in:
		
							
								
								
									
										20
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								main.cpp
									
									
									
									
									
								
							| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| #include <QApplication> | #include <QApplication> | ||||||
| #include <QQmlApplicationEngine> | #include <QQmlApplicationEngine> | ||||||
| #include <QQuickWindow> | #include <QQuickWindow> | ||||||
|   | |||||||
| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
| import QtQuick.Dialogs 1.1 | import QtQuick.Dialogs 1.1 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
| import QtQuick.Controls 1.1 | import QtQuick.Controls 1.1 | ||||||
| import QtQuick.Layouts 1.1 | import QtQuick.Layouts 1.1 | ||||||
|   | |||||||
| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
| import QtQuick.Controls 1.0 | import QtQuick.Controls 1.0 | ||||||
| import QtQuick.Window 2.1 | import QtQuick.Window 2.1 | ||||||
|   | |||||||
| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| import QtQuick 2.0 | import QtQuick 2.0 | ||||||
|  |  | ||||||
| ShaderEffect { | ShaderEffect { | ||||||
|   | |||||||
| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
|  |  | ||||||
| Item{ | Item{ | ||||||
|   | |||||||
| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
| import QtQuick.LocalStorage 2.0 | import QtQuick.LocalStorage 2.0 | ||||||
|  |  | ||||||
| @@ -8,25 +28,19 @@ Item { | |||||||
|          return LocalStorage.openDatabaseSync("coololdterm", "1.0", "StorageDatabase", 100000); |          return LocalStorage.openDatabaseSync("coololdterm", "1.0", "StorageDatabase", 100000); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // At the start of the application, we can initialize the tables we need if they haven't been created yet |  | ||||||
|     function initialize() { |     function initialize() { | ||||||
|         var db = getDatabase(); |         var db = getDatabase(); | ||||||
|         db.transaction( |         db.transaction( | ||||||
|             function(tx) { |             function(tx) { | ||||||
|                 // Create the settings table if it doesn't already exist |  | ||||||
|                 // If the table exists, this is skipped |  | ||||||
|                 tx.executeSql('CREATE TABLE IF NOT EXISTS settings(setting TEXT UNIQUE, value TEXT)'); |                 tx.executeSql('CREATE TABLE IF NOT EXISTS settings(setting TEXT UNIQUE, value TEXT)'); | ||||||
|           }); |           }); | ||||||
|  |  | ||||||
|         initialized = true; |         initialized = true; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // This function is used to write a setting into the database |  | ||||||
|     function setSetting(setting, value) { |     function setSetting(setting, value) { | ||||||
|        if(!initialized) initialize(); |        if(!initialized) initialize(); | ||||||
|  |  | ||||||
|        // setting: string representing the setting name (eg: “username”) |  | ||||||
|        // value: string representing the value of the setting (eg: “myUsername”) |  | ||||||
|        var db = getDatabase(); |        var db = getDatabase(); | ||||||
|        var res = ""; |        var res = ""; | ||||||
|        db.transaction(function(tx) { |        db.transaction(function(tx) { | ||||||
| @@ -42,7 +56,7 @@ Item { | |||||||
|       // The function returns “OK” if it was successful, or “Error” if it wasn't |       // The function returns “OK” if it was successful, or “Error” if it wasn't | ||||||
|       return res; |       return res; | ||||||
|     } |     } | ||||||
|     // This function is used to retrieve a setting from the database |  | ||||||
|     function getSetting(setting) { |     function getSetting(setting) { | ||||||
|        if(!initialized) initialize(); |        if(!initialized) initialize(); | ||||||
|        var db = getDatabase(); |        var db = getDatabase(); | ||||||
| @@ -55,8 +69,6 @@ Item { | |||||||
|              res = undefined; |              res = undefined; | ||||||
|          } |          } | ||||||
|       }) |       }) | ||||||
|       // The function returns “Unknown” if the setting was not found in the database |  | ||||||
|       // For more advanced projects, this should probably be handled through error codes |  | ||||||
|       return res |       return res | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,3 +1,23 @@ | |||||||
|  | /******************************************************************************* | ||||||
|  | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  | * https://github.com/Swordifish90/cool-old-term | ||||||
|  | * | ||||||
|  | * This file is part of cool-old-term. | ||||||
|  | * | ||||||
|  | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  | * it under the terms of the GNU General Public License as published by | ||||||
|  | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  | * (at your option) any later version. | ||||||
|  | * | ||||||
|  | * This program is distributed in the hope that it will be useful, | ||||||
|  | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  | * GNU General Public License for more details. | ||||||
|  | * | ||||||
|  | * You should have received a copy of the GNU General Public License | ||||||
|  | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  | *******************************************************************************/ | ||||||
|  |  | ||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
| import QtQuick.Window 2.0 | import QtQuick.Window 2.0 | ||||||
| import QtQuick.Controls 1.0 | import QtQuick.Controls 1.0 | ||||||
|   | |||||||
| @@ -1,28 +1,22 @@ | |||||||
| /**************************************************************************** | /******************************************************************************* | ||||||
|  * This file is part of Terminal. | * Copyright (c) 2013 "Filippo Scognamiglio" | ||||||
|  * | * https://github.com/Swordifish90/cool-old-term | ||||||
|  * Copyright (C) 2013 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | * | ||||||
|  * | * This file is part of cool-old-term. | ||||||
|  * Author(s): | * | ||||||
|  *    Pier Luigi Fiorini | * cool-old-term is free software: you can redistribute it and/or modify | ||||||
|  * | * it under the terms of the GNU General Public License as published by | ||||||
|  * $BEGIN_LICENSE:GPL2+$ | * the Free Software Foundation, either version 3 of the License, or | ||||||
|  * | * (at your option) any later version. | ||||||
|  * This program is free software: you can redistribute it and/or modify | * | ||||||
|  * it under the terms of the GNU General Public License as published by | * This program is distributed in the hope that it will be useful, | ||||||
|  * the Free Software Foundation, either version 2 of the License, or | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  * (at your option) any later version. | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
|  * | * GNU General Public License for more details. | ||||||
|  * This program is distributed in the hope that it will be useful, | * | ||||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | * You should have received a copy of the GNU General Public License | ||||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  * GNU General Public License for more details. | *******************************************************************************/ | ||||||
|  * |  | ||||||
|  * You should have received a copy of the GNU General Public License |  | ||||||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>. |  | ||||||
|  * |  | ||||||
|  * $END_LICENSE$ |  | ||||||
|  ***************************************************************************/ |  | ||||||
|  |  | ||||||
| import QtQuick 2.1 | import QtQuick 2.1 | ||||||
| import QtQuick.Window 2.0 | import QtQuick.Window 2.0 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user