Merged Airr/jade into master

This commit is contained in:
kryton9 2013-11-09 20:32:26 -05:00
commit 5858aa28b7
6 changed files with 311 additions and 3 deletions

3
QT4/TinyTimes/build.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env sh
qmake -project && qmake && make

View File

@ -0,0 +1,53 @@
#include "../../jade.h"
#include "ui_tinytimes.h"
/* Needed for Center() Method */
#include <QStyle>
#include <QDesktopWidget>
class TT: public QMainWindow {
Q_OBJECT //REQUIRED!
public:
CONSTRUCTOR TT();
void Center();
private:
Ui::MainWindow ui;
private slots:
void BuildTable(QAbstractButton *button);
};
#include "tinytimes.moc" //REQUIRED!
CONSTRUCTOR TT::TT() :QMainWindow() DO
ui.setupUi(this);
ENDCONSTRUCTOR
SUB TT::Center() DO
this->setGeometry(QStyle::alignedRect(Qt::LeftToRight,Qt::AlignCenter,this->size(),qApp->desktop()->availableGeometry()));
ENDSUB
SUB TT::BuildTable(QAbstractButton *button) DO
DIM AS INT I;
DIM AS QString buf;
ui.listWidget->clear();
FOR (I = 1 TO I<11 STEP I++) DO
buf = QString("%1 %2 %3 %4 %5").arg(button->text()).arg(" X ").arg(QString::number(I)).arg(" = ").arg(QString::number(I*button->text().toInt()));
ui.listWidget->addItem(new QListWidgetItem(buf));
END
ENDSUB
MAIN
DIM AS QApplication app(argc, argv);
DIM AS TT *TinyTimes = new TT;
TinyTimes->Center();
TinyTimes->show();
RETURN app.exec();
ENDMAIN

233
QT4/TinyTimes/tinytimes.ui Normal file
View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>405</width>
<height>359</height>
</rect>
</property>
<property name="windowTitle">
<string>Tiny Times Table - Qt4</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>290</x>
<y>20</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>1</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>290</x>
<y>50</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>2</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_3">
<property name="geometry">
<rect>
<x>290</x>
<y>80</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>3</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_4">
<property name="geometry">
<rect>
<x>290</x>
<y>110</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>4</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_5">
<property name="geometry">
<rect>
<x>290</x>
<y>140</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>5</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_6">
<property name="geometry">
<rect>
<x>290</x>
<y>170</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>6</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_7">
<property name="geometry">
<rect>
<x>290</x>
<y>200</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>7</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_8">
<property name="geometry">
<rect>
<x>290</x>
<y>230</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>8</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_9">
<property name="geometry">
<rect>
<x>290</x>
<y>260</y>
<width>101</width>
<height>32</height>
</rect>
</property>
<property name="text">
<string>9</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QPushButton" name="pushButton_10">
<property name="geometry">
<rect>
<x>290</x>
<y>290</y>
<width>101</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>10</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>256</width>
<height>291</height>
</rect>
</property>
<property name="font">
<font>
<family>Monospace</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>405</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonGroup</sender>
<signal>buttonClicked(QAbstractButton*)</signal>
<receiver>MainWindow</receiver>
<slot>BuildTable(QAbstractButton*)</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>204</x>
<y>177</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>BuildTable(QAbstractButton*)</slot>
</slots>
<buttongroups>
<buttongroup name="buttonGroup"/>
</buttongroups>
</ui>

9
SDL2/pong/Makefile Normal file
View File

@ -0,0 +1,9 @@
all:pong
CC = g++
LDFLAGS = $(shell sdl2-config --libs --cflags) -ldl
pong:
$(CC) $@.cpp $(LDFLAGS) -o $@

View File

@ -33,7 +33,7 @@
#define ENDFUNCTION }
#define DIM
#define AS
#define SUB void
#define SUB void
#define ENDSUB }
#define BEGIN {
#define END }
@ -44,7 +44,6 @@
#define ADDR &
#define INCR ++
#define DECR --
#define NEXT ++
#define PRIOR --
#define BYREF *
#define NOT not
@ -78,6 +77,17 @@
#define BREAK break;
#define SHORT short
#define LPCHAR char*
#define CLASS class
#define ENDCLASS };
#define CONSTRUCTOR
#define ENDCONSTRUCTOR }
#define DO {
#define NEXT }
#ifndef TRUE
#define TRUE 1

View File

@ -86,7 +86,7 @@ ENDFUNCTION
FUNCTION CSTRING MCASE$ (CSTRING S) BEGIN
DIM AS CSTRING tmpStr(S);
DIM AS bool capFlag;
DIM AS bool capFlag = FALSE;
DIM AS register size_t i;