]> rtime.felk.cvut.cz Git - sojka/tekpic.git/commitdiff
Initial import.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 9 Nov 2006 16:56:43 +0000 (17:56 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 9 Nov 2006 16:56:43 +0000 (17:56 +0100)
darcs-hash:20061109165643-f2ef6-1206dad5960f0cd36ceef9e159e4774be8b8fc59.gz

13 files changed:
README [new file with mode: 0644]
src/main.ui [new file with mode: 0644]
src/mainwindow.cpp [new file with mode: 0644]
src/mainwindow.h [new file with mode: 0644]
src/osccommthread.cpp [new file with mode: 0644]
src/osccommthread.h [new file with mode: 0644]
src/serial.cpp [new file with mode: 0644]
src/serial.h [new file with mode: 0644]
src/src.pro [new file with mode: 0644]
src/tekpic.cpp [new file with mode: 0644]
tekpic.pro [new file with mode: 0644]
templates/cpp [new file with mode: 0644]
templates/h [new file with mode: 0644]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..183a111
--- /dev/null
+++ b/README
@@ -0,0 +1,18 @@
+This is a very stupid QT4 based program that is able to read pictures
+from Tektronix oscilloscope through serial line. Currently, there are
+no configuration options. The configuration is hardcoded in sources
+and is:
+
+Serial line: /dev/ttyS0
+Speed: 19200
+No handshake
+Image format: TIFF
+
+The osciloscope must be setup to the same format.
+
+If you want the program to display images and copy them to clipboard
+automatically, TIFF image plugin for QT must be installed. There is
+one available at http://artis.imag.fr/Software/TiffIO/.
+
+
+Author: Michal Sojka <sojkam1@fel.cvut.cz>
diff --git a/src/main.ui b/src/main.ui
new file mode 100644 (file)
index 0000000..8944c4e
--- /dev/null
@@ -0,0 +1,146 @@
+<ui version="4.0" >
+ <class>MainWin</class>
+ <widget class="QDialog" name="MainWin" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>430</width>
+    <height>352</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>TekPic</string>
+  </property>
+  <layout class="QHBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QVBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QScrollArea" name="scrollArea" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>5</hsizetype>
+         <vsizetype>5</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="frameShape" >
+        <enum>QFrame::StyledPanel</enum>
+       </property>
+       <property name="frameShadow" >
+        <enum>QFrame::Sunken</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QProgressBar" name="progressBar" >
+       <property name="value" >
+        <number>24</number>
+       </property>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="label_2" >
+       <property name="text" >
+        <string>&amp;File name prefix:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>prefixLine</cstring>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="prefixLine" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>1</hsizetype>
+         <vsizetype>0</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text" >
+        <string>osc-</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_3" >
+       <property name="text" >
+        <string>Full file &amp;name:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>fileLine</cstring>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="fileLine" />
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>201</width>
+         <height>71</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="saveButton" >
+       <property name="text" >
+        <string>&amp;Save</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="quitButton" >
+       <property name="text" >
+        <string>&amp;Quit</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>QScrollArea</class>
+   <extends>QFrame</extends>
+   <header>QScrollArea</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
new file mode 100644 (file)
index 0000000..6895675
--- /dev/null
@@ -0,0 +1,99 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka   *
+ *   sojkam1@fel.cvut.cz   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#include "mainwindow.h"
+#include <QTextStream>
+#include <QDataStream>
+#include <QFile>
+#include <QClipboard>
+
+MainWindow::MainWindow(const string &tty)
+ : QDialog(), m_commThread(tty), m_fileNum(0), m_image()
+{
+     ui.setupUi(this);
+     
+     imageLabel = new QLabel;
+     ui.scrollArea->setWidget(imageLabel);
+     ui.progressBar->setValue(0);
+     ui.progressBar->setMaximum(15000);
+     ui.saveButton->setDisabled(true);
+     
+     connect(ui.quitButton, SIGNAL(clicked()), this, SLOT(close()));
+     connect(&m_commThread, SIGNAL(bytesReceived(int)), ui.progressBar, SLOT(setValue(int)));
+     connect(&m_commThread, SIGNAL(imageAvailable(OscImage*)), this, SLOT(processImage(OscImage*)));
+     connect(ui.prefixLine, SIGNAL(textChanged(const QString&)), this, SLOT(generateFileName(const QString&)));
+     connect(ui.saveButton, SIGNAL(clicked()), this, SLOT(saveImage()));
+     
+     m_commThread.start();
+}
+
+
+MainWindow::~MainWindow()
+{
+}
+
+void MainWindow::processImage( OscImage * img )
+{
+        bool ret;
+        ui.saveButton->setEnabled(true);
+        ui.progressBar->setMaximum(img->size());
+        ui.progressBar->setValue(img->size());
+        ui.progressBar->update();
+        
+        m_fileNum++;
+        generateFileName( ui.prefixLine->text());
+        
+        if (m_image) delete m_image;
+        m_image = img;
+        
+        QPixmap pixmap;
+        ret = pixmap.loadFromData(*m_image);
+        if (!ret) cerr << "Can't display image!"<<endl;
+        QApplication::clipboard()->setPixmap(pixmap);
+        imageLabel->setPixmap(pixmap);
+        imageLabel->adjustSize();
+}
+
+
+
+void MainWindow::resetFileCounter( )
+{
+        m_fileNum = 0;
+}
+
+void MainWindow::generateFileName( const QString & prefix )
+{
+        QString fname;
+        QTextStream ts(&fname);
+        
+        ts.setFieldWidth(3); 
+        ts.setPadChar('0') ;
+        ts << prefix << m_fileNum << ".tif";
+        ui.fileLine->setText(fname);
+}
+
+void MainWindow::saveImage()
+{
+        QFile file(ui.fileLine->text());
+        QDataStream ds(&file);
+
+        file.open(QIODevice::WriteOnly);
+        ds.writeRawData(m_image->data(), m_image->size());
+        file.close();
+}
diff --git a/src/mainwindow.h b/src/mainwindow.h
new file mode 100644 (file)
index 0000000..0d42c6f
--- /dev/null
@@ -0,0 +1,54 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka   *
+ *   sojkam1@fel.cvut.cz   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <qdialog.h>
+#include "ui_main.h"
+#include "osccommthread.h"
+#include <string>
+#include "mainwindow.h"
+
+using namespace std;
+/**
+       @author Michal Sojka <sojkam1@fel.cvut.cz>
+*/
+class MainWindow : public QDialog
+{
+        Q_OBJECT
+public:
+        MainWindow(const string &tty);
+
+        ~MainWindow();
+private:
+        Ui::MainWin ui;
+        OscCommThread m_commThread;
+        int m_fileNum;
+        OscImage *m_image;
+        QLabel *imageLabel;
+private slots:
+        void processImage(OscImage *img);
+        void saveImage();
+        void resetFileCounter();
+        void generateFileName(const QString& prefix);
+
+};
+
+#endif
diff --git a/src/osccommthread.cpp b/src/osccommthread.cpp
new file mode 100644 (file)
index 0000000..e1056d2
--- /dev/null
@@ -0,0 +1,123 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka   *
+ *   sojkam1@fel.cvut.cz   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#include "osccommthread.h"
+#include <termios.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <poll.h>
+#include <iomanip>
+#include <iostream>
+using namespace std;
+
+ostream& operator<<(ostream& s, OscImage& im)
+{
+        int i;
+        ios::fmtflags f;
+        
+        s << "Size: " << im.size() << " Data " << (void *)im.data() << ": ";
+        f = s.flags();
+        s << hex;
+        for (i=0; i<(im.size() > 32 ? 32 : im.size()); i++)
+                  s << setw(2) << setfill('0') << (unsigned int)(unsigned char)im.at(i) << ' ';
+        s.flags(f);
+        if (im.size() >= i) s << "...";
+        return s;
+}
+
+OscCommThread::OscCommThread( const string &tty)
+{
+        m_fd = open(tty.c_str(), O_RDWR);
+        if (m_fd<0) {
+                perror(tty.c_str());
+                exit(1);
+        }                                
+        m_img = new OscImage;
+
+        struct termios ts;
+
+        /* Flush input and output queues. */
+        if (tcflush(m_fd, TCIOFLUSH) != 0) {
+                cerr << "Error in tcflush" << endl;
+                exit(1);
+        }
+
+        /* Fetch the current terminal parameters. */
+        if (tcgetattr(m_fd, &ts) != 0) {
+                cerr << "Error in tcfgetattr" << endl;
+                exit(1);
+        }
+
+        /* Sets hardware control flags:                              */
+        /* 8 data bits                                               */
+        /* Enable receiver                                           */
+        /* Ignore CD (local connection)                              */
+        ts.c_cflag = CS8 | CREAD | CLOCAL;
+        //ts.c_cflag |= CRTSCTS; /* CCTS_OFLOW | CRTS_IFLOW */
+        ts.c_iflag = 0;
+        ts.c_oflag = NL0 | CR0 | TAB0 | BS0 | VT0 | FF0;
+        ts.c_lflag = 0;
+
+        cfsetispeed (&ts, B19200);
+        cfsetospeed (&ts, B19200);
+        
+        /* Sets the new terminal parameters. */
+        if (tcsetattr(m_fd, TCSANOW, &ts) != 0) {
+                cerr << "Error in tcsetattr" << endl;
+                exit(1);
+        }
+}
+
+
+OscCommThread::~OscCommThread()
+{}
+
+/*!
+    \fn OscCommThread::run()
+ */
+void OscCommThread::run()
+{
+        char buf[100];
+        int n;
+        struct pollfd pfd;
+        int ret;
+        
+        pfd.fd = m_fd;
+        pfd.events = POLLIN;
+        
+        while (1) {
+                ret = poll(&pfd, 1, 1000/*ms*/);
+                if (ret>0) {
+                        n = read(m_fd, buf, sizeof(buf)-1);
+                        QByteArray ba = QByteArray::fromRawData(buf, n);
+                        m_img->append(ba);
+                        bytesReceived( m_img->size() );
+                } else if (ret==0) {
+                        if (m_img->size()) {
+                                processImage();
+                        }
+                }
+        }
+}
+
+void OscCommThread::processImage()
+{
+        imageAvailable( m_img );
+        m_img = new OscImage;
+}
diff --git a/src/osccommthread.h b/src/osccommthread.h
new file mode 100644 (file)
index 0000000..4ab2a1a
--- /dev/null
@@ -0,0 +1,68 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka   *
+ *   sojkam1@fel.cvut.cz   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#ifndef OSCCOMMTHREAD_H
+#define OSCCOMMTHREAD_H
+
+#include <QThread>
+#include <serial.h>
+#include <string>
+#include <iostream>
+#include <ext/stdio_filebuf.h>
+#include <vector>
+#include <QByteArray>
+using namespace std;
+
+class OscImage : public QByteArray
+{
+public:
+       OscImage()       
+       {
+//                cout << "Img created" << (void*)this->data() << endl;
+               reserve(1000);
+       }
+       virtual ~OscImage() {
+//                cout << "Img destroyed" << this << endl;
+       }
+};
+
+ostream& operator<<(ostream& s, OscImage& im);
+
+
+/**
+       @author Michal Sojka <sojkam1@fel.cvut.cz>
+*/
+class OscCommThread : public QThread
+{
+        Q_OBJECT
+public:
+        OscCommThread(const string &tty);
+        ~OscCommThread();
+private:
+        int m_fd;
+        OscImage *m_img;
+
+        void run();
+        void processImage();
+signals:
+        void imageAvailable(OscImage *img);
+        void bytesReceived(int bytes);
+};
+
+#endif
diff --git a/src/serial.cpp b/src/serial.cpp
new file mode 100644 (file)
index 0000000..81bdb58
--- /dev/null
@@ -0,0 +1,34 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka   *
+ *   sojkam1@fel.cvut.cz   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#include "serial.h"
+
+Serial::Serial(QObject *parent)
+ : QIODevice(parent)
+{
+}
+
+
+Serial::~Serial()
+{
+}
+
+
+
+
diff --git a/src/serial.h b/src/serial.h
new file mode 100644 (file)
index 0000000..bb5f48f
--- /dev/null
@@ -0,0 +1,38 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka   *
+ *   sojkam1@fel.cvut.cz   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+#ifndef SERIAL_H
+#define SERIAL_H
+
+#include <QIODevice>
+
+/**
+       @author Michal Sojka <sojkam1@fel.cvut.cz>
+*/
+class Serial : public QIODevice
+{
+Q_OBJECT
+public:
+    Serial(QObject *parent = 0);
+
+    ~Serial();
+
+};
+
+#endif
diff --git a/src/src.pro b/src/src.pro
new file mode 100644 (file)
index 0000000..e8b107f
--- /dev/null
@@ -0,0 +1,17 @@
+# File generated by kdevelop's qmake manager. 
+# ------------------------------------------- 
+# Subdir relative project main directory: ./src
+# Target is an application:  ../bin/tekpic
+
+TARGET = ../bin/tekpic 
+CONFIG += debug \
+          warn_on 
+TEMPLATE = app 
+FORMS += main.ui 
+HEADERS += mainwindow.h \
+           serial.h \
+           osccommthread.h 
+SOURCES += tekpic.cpp \
+           mainwindow.cpp \
+           serial.cpp \
+           osccommthread.cpp 
diff --git a/src/tekpic.cpp b/src/tekpic.cpp
new file mode 100644 (file)
index 0000000..008da2f
--- /dev/null
@@ -0,0 +1,38 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka   *
+ *   sojkam1@fel.cvut.cz   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "mainwindow.h"
+#include <string>
+
+int main(int argc, char *argv[])
+{
+        QApplication app(argc, argv);
+        MainWindow *window = new MainWindow(string("/dev/ttyS0"));
+
+        window->show();
+        return app.exec();
+}
diff --git a/tekpic.pro b/tekpic.pro
new file mode 100644 (file)
index 0000000..8feb4aa
--- /dev/null
@@ -0,0 +1,2 @@
+TEMPLATE=subdirs
+SUBDIRS=src
diff --git a/templates/cpp b/templates/cpp
new file mode 100644 (file)
index 0000000..7eb98e9
--- /dev/null
@@ -0,0 +1,19 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka                                    *
+ *   sojkam1@fel.cvut.cz                                                   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
diff --git a/templates/h b/templates/h
new file mode 100644 (file)
index 0000000..7eb98e9
--- /dev/null
@@ -0,0 +1,19 @@
+/***************************************************************************
+ *   Copyright (C) 2006 by Michal Sojka                                    *
+ *   sojkam1@fel.cvut.cz                                                   *
+ *                                                                         *
+ *   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  *
+ *   the Free Software Foundation; either version 2 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, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/