Moved engine from yat to konsole and refactored the project. Not everything works yet.

This commit is contained in:
Filippo Scognamiglio
2014-03-20 11:29:29 +01:00
parent 36e755ea70
commit 926ce767f8
199 changed files with 29957 additions and 14929 deletions

63
app/ColorButton.qml Normal file
View File

@@ -0,0 +1,63 @@
/*******************************************************************************
* 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.Dialogs 1.1
Item {
property color button_color;
ColorDialog {
id: colorDialog
title: qsTr("Choose a color")
modality: Qt.ApplicationModal
visible: false
//This is a workaround to a Qt 5.2 bug.
onCurrentColorChanged: colorDialog.color = colorDialog.currentColor;
onAccepted: button_color = color;
}
Rectangle{
radius: 10
anchors.fill: parent
color: button_color
Text{
id: text_color
anchors.centerIn: parent
z: 1.1
text: button_color
}
Rectangle{
anchors.centerIn: parent
width: text_color.width * 1.4
height: text_color.height * 1.4
radius: 10
border.color: "black"
border.width: 2
color: "white"
}
}
MouseArea{
anchors.fill: parent
onClicked: colorDialog.visible = true;
}
}

98
app/HighlightArea.qml Normal file
View File

@@ -0,0 +1,98 @@
/*******************************************************************************
* Copyright (c) 2013 Jørgen Lind
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
import QtQuick 2.0
Item {
id: highlightArea
property real characterWidth: 0
property real characterHeight: 0
property int screenWidth: width / characterWidth
property point start
property point end
property color color: "grey"
width: parent.width
height: parent.height
opacity: 0.8
Rectangle {
id: begginning_rectangle
color: parent.color
opacity: parent.opacity
y:0
height: characterHeight
}
Rectangle {
id: middle_rectangle
color: parent.color
opacity: parent.opacity
width: parent.width
x: 0
anchors.top: begginning_rectangle.bottom
}
Rectangle {
id: end_rectangle
color: parent.color
opacity: parent.opacity
x: 0
height: characterHeight
anchors.top: middle_rectangle.bottom
}
onCharacterWidthChanged: calculateRectangles();
onCharacterHeightChanged: calculateRectangles();
onScreenWidthChanged: calculateRectangles();
onStartChanged: calculateRectangles();
onEndChanged: calculateRectangles();
function calculateRectangles() {
highlightArea.y = start.y * characterHeight;
begginning_rectangle.x = start.x * characterWidth;
if (start.y === end.y) {
middle_rectangle.visible = false;
end_rectangle.visible = false
begginning_rectangle.width = (end.x - start.x) * characterWidth;
} else {
begginning_rectangle.width = (screenWidth - start.x) * characterWidth;
if (start.y === end.y - 1) {
middle_rectangle.height = 0;
middle_rectangle.visible = false;
}else {
middle_rectangle.visible = true;
middle_rectangle.height = (end.y - start.y - 1) * characterHeight;
}
end_rectangle.visible = true;
end_rectangle.width = end.x * characterWidth;
}
}
}

60
app/SettingComponent.qml Normal file
View File

@@ -0,0 +1,60 @@
/*******************************************************************************
* 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.Controls 1.1
import QtQuick.Layouts 1.1
RowLayout {
property string name
property double value: (check.checked) ? _value : 0.0
property double _value: 0.0
property double min_value: 0.0
property double max_value: 1.0
id: setting_component
anchors.left: parent.left
anchors.right: parent.right
spacing: 10
CheckBox{
id: check
implicitWidth: 150
text: name
Component.onCompleted: checked = (_value !== 0);
}
Slider{
id: slider
stepSize: 0.01
minimumValue: min_value
maximumValue: max_value
onValueChanged: setting_component._value = slider.value;
Layout.fillWidth: true
enabled: check.checked
value: setting_component._value
Component.onCompleted: slider.value = setting_component._value
}
Text{
id: textfield
text: Math.round(((_value - min_value) / (max_value - min_value)) * 100) + "%"
}
}

170
app/SettingsWindow.qml Normal file
View File

@@ -0,0 +1,170 @@
/*******************************************************************************
* 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.Controls 1.0
import QtQuick.Window 2.1
import QtQuick.Layouts 1.0
import QtQuick.Dialogs 1.1
ApplicationWindow {
id: settings_window
title: qsTr("Settings")
width: 640
height: 300
visible: true
modality: Qt.ApplicationModal
TabView{
anchors.fill: parent
Tab{
title: qsTr("Appearance")
anchors.margins: 20
anchors.top: parent.top
GridLayout{
anchors.fill: parent
columns: 2
GroupBox{
Layout.columnSpan: 2
Layout.fillWidth: true
title: qsTr("Profile")
ComboBox{
anchors.fill: parent
model: shadersettings.profiles_list
onCurrentIndexChanged: {
shadersettings.loadProfile(shadersettings.profiles_list.get(currentIndex).obj_name);
}
}
}
GroupBox{
id: fontbox
title: qsTr("Font")
Layout.fillWidth: true
Layout.fillHeight:true
GridLayout{
anchors.fill: parent
columns: 2
Text{text: qsTr("Font style:")}
ComboBox{
Layout.fillWidth: true
model: shadersettings.fonts_list
currentIndex: shadersettings.font_index
onCurrentIndexChanged: shadersettings.font_index = currentIndex
}
Text{text: qsTr("Font scaling:")}
SpinBox{
Layout.fillWidth: true
decimals: 1
stepSize: 0.1
value: shadersettings.font_scaling
minimumValue: 0.5
maximumValue: 1.5
onValueChanged: shadersettings.font_scaling = value;
}
Item{Layout.fillHeight: true}
ColorButton{
height: 50
Layout.fillWidth: true
Layout.columnSpan: 2
onButton_colorChanged: shadersettings.font_color = button_color;
Component.onCompleted: button_color = shadersettings.font_color;
}
}
}
GroupBox{
title: qsTr("Background")
Layout.fillWidth: true
Layout.fillHeight:true
GridLayout{
anchors.fill: parent
columns: 2
Text{text: "Frame texture"}
ComboBox{
Layout.fillWidth: true
model: shadersettings.frames_list
currentIndex: shadersettings.frames_index
onCurrentIndexChanged: shadersettings.frames_index = currentIndex
}
Item{Layout.fillHeight: true}
ColorButton{
height: 50
Layout.fillWidth: true
Layout.columnSpan: 2
onButton_colorChanged: shadersettings.background_color= button_color
Component.onCompleted: button_color = shadersettings.background_color;
}
}
}
}
}
Tab{
title: qsTr("Eye-candy")
anchors.fill: parent
anchors.margins: 20
GroupBox{
title: qsTr("Effects")
anchors.fill: parent
ColumnLayout{
anchors.fill: parent
CheckBox{
text: "Scanlines"
checked: shadersettings.scanlines
onCheckedChanged: shadersettings.scanlines = checked;
}
SettingComponent{
name: "Noise"
onValueChanged: shadersettings.noise_strength = value
_value: shadersettings.noise_strength
}
SettingComponent{
name: "Glow"
onValueChanged: shadersettings.glowing_line_strength = value;
_value: shadersettings.glowing_line_strength
}
SettingComponent{
name: "Ambient light"
onValueChanged: shadersettings.ambient_light = value;
_value: shadersettings.ambient_light
}
SettingComponent{
name: "Screen distortion"
onValueChanged: shadersettings.screen_distortion = value;
_value: shadersettings.screen_distortion;
}
SettingComponent{
name: "Screen flickering"
onValueChanged: shadersettings.screen_flickering = value;
_value: shadersettings.screen_flickering;
}
}
}
}
}
}

174
app/ShaderManager.qml Normal file
View File

@@ -0,0 +1,174 @@
/*******************************************************************************
* 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
ShaderEffect {
property color font_color: shadersettings.font_color
property color background_color: shadersettings.background_color
property variant source: theSource
property size txt_Size: Qt.size(terminal.width, terminal.height)
property real time: 0
property real noise_strength: shadersettings.noise_strength
property real screen_distorsion: shadersettings.screen_distortion
property real glowing_line_strength: shadersettings.glowing_line_strength
property real brightness: 1.0
property real scanlines: shadersettings.scanlines ? 1.0 : 0.0
Behavior on brightness {
NumberAnimation{
duration: 250
onRunningChanged:
if(!running) shadercontainer.brightness = 1.0;
}
}
Behavior on horizontal_distortion {
NumberAnimation{
duration: 150
onRunningChanged:
if(!running) shadercontainer.horizontal_distortion = 0.0;
}
}
Loader{
active: shadersettings.screen_flickering !== 0
sourceComponent: Timer{
property real randval
id: flickertimer
interval: 500
onTriggered: {
randval = Math.random();
if(randval < shadersettings.screen_flickering){
shadercontainer.horizontal_distortion = Math.random() * shadersettings.screen_flickering;
}
randval = Math.random();
if(randval < shadersettings.screen_flickering)
shadercontainer.brightness = Math.random() * 0.5 + 0.5;
}
repeat: true
running: true
}
}
property real deltay: 3 / terminal.height
property real deltax: 3 / terminal.width
property real horizontal_distortion: 0.0
//property real faulty_screen_prob: shadersettings.faulty_screen_prob
NumberAnimation on time{
from: -1
to: 100
duration: 5000
loops: Animation.Infinite
}
fragmentShader: "
uniform sampler2D source;
uniform highp float qt_Opacity;
uniform highp float time;
uniform highp vec2 txt_Size;
varying highp vec2 qt_TexCoord0;
uniform highp vec4 font_color;
uniform highp vec4 background_color;
uniform highp float deltax;
uniform highp float deltay;" +
(noise_strength !== 0 ? "uniform highp float noise_strength;" : "") +
(screen_distorsion !== 0 ? "uniform highp float screen_distorsion;" : "")+
(glowing_line_strength !== 0 ? "uniform highp float glowing_line_strength;" : "")+
"uniform highp float brightness;" +
(scanlines != 0 ? "uniform highp float scanlines;" : "") +
(shadersettings.screen_flickering !== 0 ? "uniform highp float horizontal_distortion;" : "") +
"float rand(vec2 co, float time){
return fract(sin(dot(co.xy ,vec2(0.37898 * time ,0.78233))) * 437.5875453);
}
float stepNoise(vec2 p){
vec2 newP = p * txt_Size*0.25;
return rand(floor(newP), time);
}
float getScanlineIntensity(vec2 pos){
return abs(sin(pos.y * txt_Size.y)) * 0.5;
}" +
(screen_distorsion !== 0 ?
"vec2 distortCoordinates(vec2 coords){
vec2 cc = coords - vec2(0.5);
float dist = dot(cc, cc) * screen_distorsion ;
return (coords + cc * (1.0 + dist) * dist);
}" : "") +
(glowing_line_strength !== 0 ?
"float randomPass(vec2 coords){
return fract(smoothstep(-0.2, 0.0, coords.y - time * 0.03)) * glowing_line_strength;
}" : "") +
"vec4 blurredColor(sampler2D source, vec2 coords){
vec4 sum = vec4(0.0);
sum += texture2D(source, coords - vec2(-deltax, -deltay)) * 0.11;
sum += texture2D(source, coords - vec2(-deltax, 0.0)) * 0.11;
sum += texture2D(source, coords - vec2(-deltax, +deltay)) * 0.11;
sum += texture2D(source, coords - vec2(0.0, -deltay)) * 0.11;
sum += texture2D(source, coords - vec2(0.0, 0.0)) * 0.11;
sum += texture2D(source, coords - vec2(0.0, +deltay)) * 0.11;
sum += texture2D(source, coords - vec2(+deltax, -deltay)) * 0.11;
sum += texture2D(source, coords - vec2(+deltax, 0.0)) * 0.11;
sum += texture2D(source, coords - vec2(+deltax, +deltay)) * 0.11;
return sum;
}" +
"void main() {" +
(screen_distorsion !== 0 ? "vec2 coords = distortCoordinates(qt_TexCoord0);" : "vec2 coords = qt_TexCoord0;") +
(horizontal_distortion !== 0 ?
"float distortion = (sin(coords.y * 20.0 * fract(time * 0.1) + sin(fract(time * 0.2))) + sin(time * 0.05));
coords.x = coords.x + distortion * 0.3 * horizontal_distortion; " : "") +
"float color = (blurredColor(source, coords).r + texture2D(source, coords).r) * 0.5;" +
(scanlines !== 0 ?
"float scanline_alpha = getScanlineIntensity(coords);" : "float scanline_alpha = 0.0;") +
(noise_strength !== 0 ?
"color += stepNoise(coords) * noise_strength;" : "") +
(glowing_line_strength !== 0 ?
"color += randomPass(coords) * glowing_line_strength;" : "") +
"vec3 finalColor = mix(background_color, font_color, color).rgb;
finalColor = mix(finalColor, vec3(0.0), scanline_alpha);" +
(brightness !== 1.0 ?
"finalColor = finalColor * brightness;" : "") +
"gl_FragColor = vec4(finalColor, 1.0);
}"
}

173
app/ShaderSettings.qml Normal file
View File

@@ -0,0 +1,173 @@
/*******************************************************************************
* 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
Item{
property bool fullscreen: false
property real ambient_light: 0.2
property string background_color: "#002200"
property string font_color: "#00ff00"
property real screen_flickering: 0.05
property real noise_strength: 0.1
property real screen_distortion: 0.15
property real glowing_line_strength: 0.4
property bool scanlines: true
property string frame_source: frames_list.get(frames_index).source
property int frames_index: 2
property var frames_list: framelist
property real font_scaling: 1.0
property var font: currentfont
property real fontSize: currentfont.pixelSize * font_scaling
property int font_index: 0
property var fonts_list: fontlist
property var profiles_list: profileslist
onFont_indexChanged: handleFontChanged();
onFont_scalingChanged: handleFontChanged();
function handleFontChanged(){
terminalwindowloader.source = "";
currentfont.source = fontlist.get(font_index).source;
currentfont.pixelSize = fontlist.get(font_index).pixelSize;
terminalwindowloader.source = "TerminalWindow.qml";
}
FontLoader{
property int pixelSize: fontlist.get(font_index).pixelSize
id: currentfont
source: fontlist.get(font_index).source
}
ListModel{
id: framelist
ListElement{text: "No frame"; source: "./frames/NoFrame.qml"}
ListElement{text: "Simple white frame"; source: "./frames/WhiteSimpleFrame.qml"}
ListElement{text: "Rough black frame"; source: "./frames/BlackRoughFrame.qml"}
}
ListModel{
id: fontlist
ListElement{
text: "Commodore PET (1977)"
source: "fonts/CommodorePET/COMMODORE_PET.ttf"
pixelSize: 20
}
ListElement{
text: "Atari 8bit (1979)"
source: "./fonts/Atari8bit/ATARI400800_original.TTF"
pixelSize: 20
}
ListElement{
text: "Commodore 64 (1982)"
source: "./fonts/Commodore64/C64_User_Mono_v1.0-STYLE.ttf"
pixelSize: 20
}
ListElement{
text: "IBM DOS (1985)"
source: "./fonts/Dos/Perfect DOS VGA 437.ttf"
pixelSize: 32
}
}
Storage{id: storage}
function loadProfile(profilename){
var settings = storage.getSetting(profilename);
if(!settings) return;
settings = JSON.parse(settings);
ambient_light = settings.ambient_light ? settings.ambient_light : ambient_light;
background_color = settings.background_color ? settings.background_color : background_color;
font_color = settings.font_color ? settings.font_color : font_color;
screen_flickering = settings.screen_flickering ? settings.screen_flickering : screen_flickering;
noise_strength = settings.noise_strength ? settings.noise_strength : noise_strength;
screen_distortion = settings.screen_distortion ? settings.screen_distortion : screen_distortion;
glowing_line_strength = settings.glowing_line_strength ? settings.glowing_line_strength : glowing_line_strength;
scanlines = settings.scanlines ? settings.scanlines : scanlines;
frames_index = settings.frames_index ? settings.frames_index : frames_index;
font_index = settings.font_index ? settings.font_index : font_index;
font_scaling = settings.font_scaling ? settings.font_scaling: font_scaling;
}
function storeCurrentSettings(){
var settings = {
ambient_light : ambient_light,
background_color: background_color,
font_color: font_color,
screen_flickering: screen_flickering,
noise_strength: noise_strength,
screen_distortion: screen_distortion,
glowing_line_strength: glowing_line_strength,
scanlines: scanlines,
frames_index: frames_index,
font_index: font_index,
font_scaling: font_scaling
}
console.log(JSON.stringify(settings));
storage.setSetting("CURRENT_SETTINGS", JSON.stringify(settings));
}
Component.onCompleted: {
//Save all the profiles into local storage
for(var i=0; i<profileslist.count; i++){
var temp = profileslist.get(i);
storage.setSetting(temp.obj_name, temp.obj_string);
}
loadProfile("CURRENT_SETTINGS");
}
Component.onDestruction: {
storeCurrentSettings();
storage.dropSettings();
}
ListModel{
id: profileslist
ListElement{
text: "Default"
obj_name: "DEFAULT"
obj_string: '{"ambient_light":0.3,"background_color":"#000000","font_color":"#00ff3b","font_index":0,"font_scaling":1,"frames_index":2,"glowing_line_strength":0.4,"noise_strength":0.1,"scanlines":true,"screen_distortion":0.15,"screen_flickering":0.07}'
}
ListElement{
text: "Commodore 64"
obj_name: "COMMODORE64"
obj_string: '{"ambient_light":0.2,"background_color":"#5048b2","font_color":"#8bcad1","font_index":2,"font_scaling":1,"frames_index":1,"glowing_line_strength":0.2,"noise_strength":0.05,"scanlines":false,"screen_distortion":0.1,"screen_flickering":0.03}'
}
ListElement{
text: "IBM Dos"
obj_name: "IBMDOS"
obj_string: '{"ambient_light":0.4,"background_color":"#000000","font_color":"#ffffff","font_index":3,"font_scaling":1,"frames_index":1,"glowing_line_strength":0,"noise_strength":0,"scanlines":false,"screen_distortion":0.05,"screen_flickering":0.00}'
}
}
}

82
app/Storage.qml Normal file
View File

@@ -0,0 +1,82 @@
/*******************************************************************************
* 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.LocalStorage 2.0
Item {
property bool initialized: false
function getDatabase() {
return LocalStorage.openDatabaseSync("coololdterm", "1.0", "StorageDatabase", 100000);
}
function initialize() {
var db = getDatabase();
db.transaction(
function(tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS settings(setting TEXT UNIQUE, value TEXT)');
});
initialized = true;
}
function setSetting(setting, value) {
if(!initialized) initialize();
var db = getDatabase();
var res = "";
db.transaction(function(tx) {
var rs = tx.executeSql('INSERT OR REPLACE INTO settings VALUES (?,?);', [setting,value]);
//console.log(rs.rowsAffected)
if (rs.rowsAffected > 0) {
res = "OK";
} else {
res = "Error";
}
}
);
// The function returns “OK” if it was successful, or “Error” if it wasn't
return res;
}
function getSetting(setting) {
if(!initialized) initialize();
var db = getDatabase();
var res="";
db.transaction(function(tx) {
var rs = tx.executeSql('SELECT value FROM settings WHERE setting=?;', [setting]);
if (rs.rows.length > 0) {
res = rs.rows.item(0).value;
} else {
res = undefined;
}
})
return res
}
function dropSettings(){
var db = getDatabase();
db.transaction(
function(tx) {
tx.executeSql('DROP TABLE settings');
});
}
}

137
app/TerminalWindow.qml Normal file
View File

@@ -0,0 +1,137 @@
/*******************************************************************************
* 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.Window 2.0
import QtQuick.Controls 1.0
import QtGraphicalEffects 1.0
import org.kde.konsole 0.1
ApplicationWindow{
id: terminalWindow
width: 1024
height: 768
title: qsTr("Terminal")
Action {
id: fullscreenAction
text: "&Fullscreen"
shortcut: "Alt+F11"
onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen;
}
Action {
id: quitAction
text: "&Quit"
shortcut: "Ctrl+Q"
onTriggered: terminalWindow.close();
}
Action{
id: showsettingsAction
text: "&Settings"
onTriggered: settingswindow.show();
}
menuBar: MenuBar {
id: menubar
Menu {
title: qsTr("File")
visible: shadersettings.fullscreen ? false : true
MenuItem {action: quitAction}
}
Menu {
title: qsTr("Edit")
visible: shadersettings.fullscreen ? false : true
MenuItem {action: showsettingsAction}
MenuItem {action: fullscreenAction}
}
}
visible: true
visibility: shadersettings.fullscreen ? Window.FullScreen : Window.Windowed
Item{
id: maincontainer
anchors.fill: parent
clip: true
ShaderEffectSource{
id: theSource
sourceItem: terminal
sourceRect: frame.sourceRect
}
ShaderManager{
id: shadercontainer
anchors.fill: terminal
blending: true
z: 1.9
}
Loader{
property rect sourceRect: item.sourceRect
id: frame
anchors.fill: parent
z: 2.1
source: shadersettings.frame_source
}
KTerminal {
id: terminal
font.pointSize: 15
font.family: "Pet Me"
colorScheme: "WhiteOnBlack"
width: parent.width
height: parent.height
session: KSession {
id: ksession
kbScheme: "linux"
onFinished: {
Qt.quit()
}
}
Component.onCompleted: {
font.pointSize = 15;
font.family = "Pet Me";
}
}
RadialGradient{
id: ambientreflection
z: 2.0
anchors.fill: parent
cached: true
opacity: shadersettings.ambient_light * 0.66
gradient: Gradient{
GradientStop{position: 0.0; color: "white"}
GradientStop{position: 0.7; color: "#00000000"}
}
}
}
}

139
app/app.qmlproject.user Normal file
View File

@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.0, 2014-01-19T22:57:55. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.2.0 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.2.0 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.520.gcc_64.essentials_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Scene</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.QmlScene</value>
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QByteArray">{76aa359f-2663-43c5-a318-565e5b679f49}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">15</value>
</data>
</qtcreator>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,317 @@
{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fmodern\fprq1 Atari Classic Chunky;}{\f3\froman Times New Roman;}{\f4\fswiss\fprq2 Arial;}}
{\colortbl\red0\green0\blue0;\red0\green0\blue255;}
\deflang1033\pard\plain\f2\fs24\cf1 Atari Classic TrueType Fonts \plain\f2\fs24\cf0
\par \plain\f4\fs16\cf0 (Windows Version 1.1)
\par Created by Mark Simonson (v.1.0-1998, v.1.1-2001)
\par marksim@bitstream.net
\par Website: Mac/Atari Fusion--Atari Home Computer Resources for Mac Users
\par http://www2.bitstream.net/~marksim/atarimac/
\par Macintosh version also available.
\par
\par With these fonts installed, you can view and print Atari text files in any text editor that allows you to change fonts (WordPad, for example). Tip: In order to get the correct line breaks, you will need to change the ATASCII return character (155) to the DOS LF character. (In the Character Map accessory, the ATASCII return is the blank character that comes just before the inverse up-arrow.)
\par
\par There are three different fonts. \plain\f4\fs16\cf0\b Atari Classic Chunky \plain\f4\fs16\cf0 is a pixel-for-pixel copy of the original ATASCII character set. \plain\f4\fs16\cf0\b Atari Classic Smooth \plain\f4\fs16\cf0 interprets the pixel aliasing (stair steps) as diagonal lines. \plain\f4\fs16\cf0\b Atari Classic Extrasmooth \plain\f4\fs16\cf0 refines this idea further with the addition of curves. \plain\f4\fs16\cf0\b Smooth\plain\f4\fs16\cf0 and \plain\f4\fs16\cf0\b Extrasmooth\plain\f4\fs16\cf0 were designed for better appearance and legibility at larger sizes and on print-outs. Use the one that looks best to you.
\par
\par These fonts will tend to look uneven at font sizes that do not correspond to the 8-by-8 pixel grid that the characters are based on. Because Windows assumes 96ppi screen resolution, they will look best in a font size that is a multiple of 6 (i.e., 6pt, 12pt, 18pt, etc.). (In Windows, 6 points = 8 pixels.)
\par
\par The Atari Classic TrueType fonts duplicate the ATASCII character set on a low-level basis. Unlike a normal Windows font, ATASCII utilizes all character codes from $00 to $FF (0 to 255). The lower half are normal characters; the upper half are inverse versions of the lower half. The basic ASCII characters ($00 to $7F) correspond fairly closely except for the first 32, which don't normally contain characters in a Windows font.
\par
\par Due to differences between the way Windows and the Atari use character codes, not all characters will display properly in Windows. In fact, some characters will not display at all (though they do exist in the font). Unfortunately, this is due to certain character codes being reserved in Windows and there doesn't appear to be any way to work around it. The character codes affected are: $00-$1F (0-31), $7F-$81 (127-129), $8D-$90 (141-144), $9D (157), and $9F (158).
\par
\par Not all characters can be typed from the keyboard. You can however copy characters as needed from this document (see tables below). The Character Map desk accessory can help also.
\par
\par \plain\f4\fs16\cf0\b ATASCII CHARACTER SET TABLES
\par \plain\f4\fs16\cf0
\par In order to see the ATASCII character set with these tables, the Atari Classic TrueType fonts must be installed. Characters that are not displayed properly are due to character code usage differences between ATASCII and Windows (see above).
\par
\par
\par \plain\f4\fs16\cf0\b TABLE 1: ATASCII Character Dump Block
\par \plain\f4\fs16\cf0
\par All characters (ATASCII $00 thru $FF) 16 characters per
\par line.
\par
\par
\par \plain\f2\fs12\cf0 \'01\'02\'03\'04\'05\'06\'07\'08\tab
\par \'0b\'0c
\par \'0e\'0f
\par \'10\'11\'12\'13\'14\'15\'16\'17\'18\'19\'1a\'1b\'1c\'1d\'1e\'1f
\par !"#$%&'()*+,-./
\par 0123456789:;<=>?
\par @ABCDEFGHIJKLMNO
\par PQRSTUVWXYZ[\\]^_
\par `abcdefghijklmno
\par pqrstuvwxyz\{|\}~
\par \'80\'81\'82\'83\'84\'85\'86\'87\'88\'89\'8a\'8b\'8c\'8d\'8e\'8f
\par \'90''""\bullet \endash \emdash \'98\'99\'9a \'9c\'9d\'9e\'9f
\par \~\'a1\'a2\'a3\'a4\'a5\'a6\'a7\'a8\'a9\'aa\'ab\'ac\'ad\'ae\'af
\par \'b0\'b1\'b2\'b3\'b4\'b5\'b6\'b7\'b8\'b9\'ba\'bb\'bc\'bd\'be\'bf
\par \'c0\'c1\'c2\'c3\'c4\'c5\'c6\'c7\'c8\'c9\'ca\'cb\'cc\'cd\'ce\'cf
\par \'d0\'d1\'d2\'d3\'d4\'d5\'d6\'d7\'d8\'d9\'da\'db\'dc\'dd\'de\'df
\par \'e0\'e1\'e2\'e3\'e4\'e5\'e6\'e7\'e8\'e9\'ea\'eb\'ec\'ed\'ee\'ef
\par \'f0\'f1\'f2\'f3\'f4\'f5\'f6\'f7\'f8\'f9\'fa\'fb\'fc\'fd\'fe\'ff
\par \plain\f4\fs16\cf0
\par
\par \plain\f4\fs16\cf0\b TABLE 2: ATASCII Character Dump List
\par \plain\f4\fs16\cf0
\par All characters (ATASCII $00 thru $FF) one character per
\par line with hexadecimal value indicated on the left.
\par
\par \plain\f2\fs12\cf0 00=
\par 01=\'01
\par 02=\'02
\par 03=\'03
\par 04=\'04
\par 05=\'05
\par 06=\'06
\par 07=\'07
\par 08=\'08
\par 09=\tab
\par 0A=
\par
\par 0B=\'0b
\par 0C=\'0c
\par 0D=
\par 0E=\'0e
\par 0F=\'0f
\par 10=\'10
\par 11=\'11
\par 12=\'12
\par 13=\'13
\par 14=\'14
\par 15=\'15
\par 16=\'16
\par 17=\'17
\par 18=\'18
\par 19=\'19
\par 1A=\'1a
\par 1B=\'1b
\par 1C=\'1c
\par 1D=\'1d
\par 1E=\'1e
\par 1F=\'1f
\par 20=
\par 21=!
\par 22="
\par 23=#
\par 24=$
\par 25=%
\par 26=&
\par 27='
\par 28=(
\par 29=)
\par 2A=*
\par 2B=+
\par 2C=,
\par 2D=-
\par 2E=.
\par 2F=/
\par 30=0
\par 31=1
\par 32=2
\par 33=3
\par 34=4
\par 35=5
\par 36=6
\par 37=7
\par 38=8
\par 39=9
\par 3A=:
\par 3B=;
\par 3C=<
\par 3D==
\par 3E=>
\par 3F=?
\par 40=@
\par 41=A
\par 42=B
\par 43=C
\par 44=D
\par 45=E
\par 46=F
\par 47=G
\par 48=H
\par 49=I
\par 4A=J
\par 4B=K
\par 4C=L
\par 4D=M
\par 4E=N
\par 4F=O
\par 50=P
\par 51=Q
\par 52=R
\par 53=S
\par 54=T
\par 55=U
\par 56=V
\par 57=W
\par 58=X
\par 59=Y
\par 5A=Z
\par 5B=[
\par 5C=\\
\par 5D=]
\par 5E=^
\par 5F=_
\par 60=`
\par 61=a
\par 62=b
\par 63=c
\par 64=d
\par 65=e
\par 66=f
\par 67=g
\par 68=h
\par 69=i
\par 6A=j
\par 6B=k
\par 6C=l
\par 6D=m
\par 6E=n
\par 6F=o
\par 70=p
\par 71=q
\par 72=r
\par 73=s
\par 74=t
\par 75=u
\par 76=v
\par 77=w
\par 78=x
\par 79=y
\par 7A=z
\par 7B=\{
\par 7C=|
\par 7D=\}
\par 7E=~
\par 7F=
\par 80=\'80
\par 81=\'81
\par 82=\'82
\par 83=\'83
\par 84=\'84
\par 85=\'85
\par 86=\'86
\par 87=\'87
\par 88=\'88
\par 89=\'89
\par 8A=\'8a
\par 8B=\'8b
\par 8C=\'8c
\par 8D=\'8d
\par 8E=\'8e
\par 8F=\'8f
\par 90=\'90
\par 91='
\par 92='
\par 93="
\par 94="
\par 95=\bullet
\par 96=\endash
\par 97=\emdash
\par 98=\'98
\par 99=\'99
\par 9A=\'9a
\par 9B=
\par 9C=\'9c
\par 9D=\'9d
\par 9E=\'9e
\par 9F=\'9f
\par A0=\~
\par A1=\'a1
\par A2=\'a2
\par A3=\'a3
\par A4=\'a4
\par A5=\'a5
\par A6=\'a6
\par A7=\'a7
\par A8=\'a8
\par A9=\'a9
\par AA=\'aa
\par AB=\'ab
\par AC=\'ac
\par AD=\'ad
\par AE=\'ae
\par AF=\'af
\par B0=\'b0
\par B1=\'b1
\par B2=\'b2
\par B3=\'b3
\par B4=\'b4
\par B5=\'b5
\par B6=\'b6
\par B7=\'b7
\par B8=\'b8
\par B9=\'b9
\par BA=\'ba
\par BB=\'bb
\par BC=\'bc
\par BD=\'bd
\par BE=\'be
\par BF=\'bf
\par C0=\'c0
\par C1=\'c1
\par C2=\'c2
\par C3=\'c3
\par C4=\'c4
\par C5=\'c5
\par C6=\'c6
\par C7=\'c7
\par C8=\'c8
\par C9=\'c9
\par CA=\'ca
\par CB=\'cb
\par CC=\'cc
\par CD=\'cd
\par CE=\'ce
\par CF=\'cf
\par D0=\'d0
\par D1=\'d1
\par D2=\'d2
\par D3=\'d3
\par D4=\'d4
\par D5=\'d5
\par D6=\'d6
\par D7=\'d7
\par D8=\'d8
\par D9=\'d9
\par DA=\'da
\par DB=\'db
\par DC=\'dc
\par DD=\'dd
\par DE=\'de
\par DF=\'df
\par E0=\'e0
\par E1=\'e1
\par E2=\'e2
\par E3=\'e3
\par E4=\'e4
\par E5=\'e5
\par E6=\'e6
\par E7=\'e7
\par E8=\'e8
\par E9=\'e9
\par EA=\'ea
\par EB=\'eb
\par EC=\'ec
\par ED=\'ed
\par EE=\'ee
\par EF=\'ef
\par F0=\'f0
\par F1=\'f1
\par F2=\'f2
\par F3=\'f3
\par F4=\'f4
\par F5=\'f5
\par F6=\'f6
\par F7=\'f7
\par F8=\'f8
\par F9=\'f9
\par FA=\'fa
\par FB=\'fb
\par FC=\'fc
\par FD=\'fd
\par FE=\'fe
\par FF=\'ff
\par }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,6 @@
Fonts in this package are (c) 2010 Style.
You MAY NOT: sell this font; include/redistribute this font in any font collection regardless of pricing; provide the font for direct download from any web site. You MAY: link to "http://style64.org/c64-truetype" in order for others to download and install the font; embed this font or its .eot and .woff variants without any modification and using the same filename it was provided with for display on any web site using @font-face rules; use this font in static images and vector art; include this font without any modification and using the same filename it was provided with as part of a software package but ONLY if said software package is freely provided to end users. You may also contact us to negotiate a (possibly commercial) license for your use outside of these guidelines at "http://style64.org/contact-style".
At all times the most recent version of this license can be found at "http://style64.org/c64-truetype/license".

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,20 @@
KREATIVE SOFTWARE RELAY FONTS FREE USE LICENSE
version 1.2f
Permission is hereby granted, free of charge, to any person or entity (the "User") obtaining a copy of the included font files (the "Software") produced by Kreative Software, to utilize, display, embed, or redistribute the Software, subject to the following conditions:
1. The User may not sell copies of the Software for a fee.
1a. The User may give away copies of the Software free of charge provided this license and any documentation is included verbatim and credit is given to Kreative Korporation or Kreative Software.
2. The User may not modify, reverse-engineer, or create any derivative works of the Software.
3. Any Software carrying the following font names or variations thereof is not covered by this license and may not be used under the terms of this license: Jewel Hill, Miss Diode n Friends, This is Beckie's font!
3a. Any Software carrying a font name ending with the string "Pro CE" is not covered by this license and may not be used under the terms of this license.
4. This license becomes null and void if any of the above conditions are not met.
5. Kreative Software reserves the right to change this license at any time without notice.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE SOFTWARE OR FROM OTHER DEALINGS IN THE SOFTWARE.

Binary file not shown.

Binary file not shown.

72
app/fonts/Dos/dos437.txt Normal file
View File

@@ -0,0 +1,72 @@
/
/(_____________ ____
\ /______)\ | |
:\ | / \:| |:::::::::: : .. . : .. . . :. .
\_____| / | \| |______
___ / ________ \... . . .
\______________ \ | | /.. . . . . .
\ |__| /
--x--x-----x----\______ |-/_____/-x--x-xx--x-- - -x -- - - -- - - -
. . . . . . . . . . . .\____|. . . . . .
-------------------------------------------------------------------------------
>> perfect dos vga 437 - general information >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-------------------------------------------------------------------------------
"Perfect DOS VGA 437" and "Perfect DOS VGA 437 Win" are truetype fonts
designed to emulate the MS-DOS/Text mode standard font, used on VGA monitors,
with the 437 Codepage (standard US/International). This is a "bitmap" font,
meaning it emulates a bitmap font and can only be used at a given size (8 or
multiples of it like 16, 24, 32, etc). It's optimized for Flash too, so it
won't produce antialias if used at round positions.
There are two fonts available. "Perfect DOS VGA 437" uses the original DOS
codepage 437. It should be used, for example, if you're opening DOS ASCII
files on notepad or another windows-based editor. Since it's faithful to the
original DOS codes, it won't accent correctly in windows ("<22>" would produce
something different, not an "e" with an acute).
There's also "Perfect DOS VGA 437 Win" which is the exactly same font adapted
to a windows codepage. This should use accented characters correctly but won't
work if you're opening a DOS-based text file.
UPDATE: this is a new version, updated in august/2008. It has fixed leading
metrics for Mac systems.
-------------------------------------------------------------------------------
>> perfect dos vga 437 - creation process >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-------------------------------------------------------------------------------
This font was created to be used on a Flash-based ANSi viewer I'm working. To
create it, I created a small Quick Basic program to write all characters on
screen,
CLS
FOR l = 0 TO 255
charWrite 1 + (l MOD 20), 1 + (l \ 20) * 6 + (l MOD 2), LTRIM$(RTRIM$(STR$(l))) + CHR$(l)
NEXT
SUB charWrite (lin, col, char$)
DEF SEG = &HB800
FOR i = 1 TO LEN(char$)
POKE ((lin - 1) * 160) + ((col - 2 + i) * 2), ASC(MID$(char$, i, 1))
IF (i = LEN(char$)) THEN POKE ((lin - 1) * 160) + ((col - 2 + i) * 2) + 1, 113
NEXT
END SUB
Then captured the text screen using SCREEN THIEF (a very, very old screen
capture TSR program which converts text screens to images accurately). I then
recreated the font polygon by polygon on Fontlab, while looking at the image
on Photoshop. No conversion took place.
-------------------------------------------------------------------------------
>> author >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-------------------------------------------------------------------------------
zeh fernando remembers the old days. SMASH DAH FUCKING ENTAH.
http://www.fatorcaos.com.br
rorshack ^ maiden brazil
-------------------------------------------------------------------------------
^zehPULLSdahTRICK^kudosOUTtoWHOkeepsITreal^smashDAHfuckingENTAH!!!^lowres4ever^
-------------------------------------------------------------------------------

View File

@@ -0,0 +1,20 @@
import QtQuick 2.1
import "utils"
import QtGraphicalEffects 1.0
TerminalFrame{
id: frame
z: 2.1
anchors.fill: parent
addedWidth: 200
addedHeight: 370
borderLeft: 148
borderRight: 148
borderTop: 232
borderBottom: 232
imageSource: "../images/black-frame.png"
normalsSource: "../images/black-frame-normals.png"
sourceRect: Qt.rect(-80, -90, terminal.width + 160, terminal.height + 180)
shaderString: "WhiteFrameShader.qml"
}

18
app/frames/NoFrame.qml Normal file
View File

@@ -0,0 +1,18 @@
import QtQuick 2.0
import "utils"
TerminalFrame{
id: frame
z: 2.1
anchors.fill: parent
addedWidth: 190
addedHeight: 190
borderLeft: 116
borderRight: 116
borderTop: 116
borderBottom: 116
imageSource: "../images/screen-frame.png"
sourceRect: Qt.rect(-65, -75, terminal.width + 130, terminal.height + 150)
shaderString: "NoFrameShader.qml"
}

View File

@@ -0,0 +1,19 @@
import QtQuick 2.0
import "utils"
TerminalFrame{
id: frame
z: 2.1
anchors.fill: parent
addedWidth: 140
addedHeight: 140
borderLeft: 116
borderRight: 116
borderTop: 116
borderBottom: 116
imageSource: "../images/screen-frame.png"
normalsSource: "../images/screen-frame-normals.png"
sourceRect: Qt.rect(-65, -75, terminal.width + 130, terminal.height + 150)
shaderString: "WhiteFrameShader.qml"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB

View File

@@ -0,0 +1,23 @@
import QtQuick 2.1
ShaderEffect{
property variant source: framesource
property real screen_distorsion: shadersettings.screen_distortion
fragmentShader: "
uniform sampler2D source;
uniform highp float screen_distorsion;
varying highp vec2 qt_TexCoord0;
vec2 distortCoordinates(vec2 coords){
vec2 cc = coords - vec2(0.5);
float dist = dot(cc, cc) * screen_distorsion;
return (coords + cc * (1.0 + dist) * dist);
}
void main(){
vec2 coords = distortCoordinates(qt_TexCoord0);
float inside = texture2D(source, coords).a;
gl_FragColor = vec4(vec3(0.0), inside);
}"
}

View File

@@ -0,0 +1,58 @@
import QtQuick 2.1
Item{
id: framecontainer
property int addedWidth
property int addedHeight
property int borderLeft
property int borderRight
property int borderTop
property int borderBottom
property string imageSource
property string normalsSource
property rect sourceRect
property string shaderString
BorderImage{
id: frameimage
anchors.centerIn: parent
width: parent.width + addedWidth
height: parent.height + addedHeight
border.bottom: borderBottom
border.top: borderTop
border.left: borderLeft
border.right: borderRight
source: imageSource
horizontalTileMode: BorderImage.Stretch
verticalTileMode: BorderImage.Stretch
}
BorderImage{
id: framenormals
anchors.fill: frameimage
border.bottom: borderBottom
border.top: borderTop
border.left: borderLeft
border.right: borderRight
source: normalsSource
horizontalTileMode: BorderImage.Stretch
verticalTileMode: BorderImage.Stretch
}
ShaderEffectSource{
id: framesource
sourceItem: frameimage
hideSource: true
}
ShaderEffectSource{
id: framesourcenormals
sourceItem: framenormals
hideSource: true
}
Loader{
anchors.fill: frameimage
source: shaderString
}
}

View File

@@ -0,0 +1,40 @@
import QtQuick 2.1
ShaderEffect{
property variant source: framesource
property variant normals: framesourcenormals
property real screen_distorsion: shadersettings.screen_distortion
property real ambient_light: shadersettings.ambient_light
property color font_color: shadersettings.font_color
property color background_color: shadersettings.background_color
property real brightness: shadercontainer.brightness
fragmentShader: "
uniform sampler2D source;
uniform sampler2D normals;
uniform highp float screen_distorsion;
uniform highp float ambient_light;
uniform highp vec4 font_color;
uniform highp vec4 background_color;
uniform highp float brightness;
varying highp vec2 qt_TexCoord0;
vec2 distortCoordinates(vec2 coords){
vec2 cc = coords - vec2(0.5);
float dist = dot(cc, cc) * screen_distorsion;
return (coords + cc * (1.0 + dist) * dist);
}
void main(){
vec2 coords = distortCoordinates(qt_TexCoord0);
vec4 txt_color = texture2D(source, coords);
vec4 normala = texture2D(normals, coords);
vec3 normal = normalize(normala.rgb) * txt_color.a;
float reflection = dot(normal, vec3(1.0, 1.0, 0.0)) * 0.4 * brightness;
vec3 reflection_color = mix(font_color, background_color, 0.7).rgb * reflection;
vec3 final_color = mix(txt_color.rgb, reflection_color, 1.0 - ambient_light);
gl_FragColor = vec4(final_color, txt_color.a);
}"
}

41
app/main.qml Normal file
View File

@@ -0,0 +1,41 @@
/*******************************************************************************
* 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.Window 2.0
import QtQuick.Controls 1.0
import org.kde.konsole 0.1
Item{
ShaderSettings{
id: shadersettings
Component.onCompleted: terminalwindowloader.source = "TerminalWindow.qml"
}
Loader{
id: terminalwindowloader
}
SettingsWindow{
id: settingswindow
visible: false
}
}