[hamradio-commits] [linpsk] 15/25: Imported Upstream version 1.2.5~rc1

Iain R. Learmonth irl at moszumanska.debian.org
Fri Apr 15 14:02:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

irl pushed a commit to branch master
in repository linpsk.

commit 40fc6e3b029ce696e42316a6dc6138f3d8195a80
Author: Iain R. Learmonth <irl at debian.org>
Date:   Thu Apr 14 11:49:56 2016 +0100

    Imported Upstream version 1.2.5~rc1
---
 .gitignore                              |   2 +
 ChangeLog                               |  28 +
 README                                  |  24 +-
 data/linpsk.appdata.xml                 |  31 ++
 data/linpsk.desktop                     |  11 +
 gui/activatemacros.cpp                  | 102 ++++
 gui/{deletemacro.h => activatemacros.h} |  41 +-
 gui/activatemacros.ui                   | 228 ++++++++
 gui/addmacro.cpp                        |   2 +-
 gui/addmacro.h                          |   2 +-
 gui/addrxwindow.cpp                     |   2 +-
 gui/addrxwindow.h                       |   2 +-
 gui/controlpanel.cpp                    |  14 +-
 gui/controlpanel.h                      |   4 +-
 gui/ctxdisplay.cpp                      |  11 +-
 gui/ctxdisplay.h                        |   5 +-
 gui/ctxdisplay.ui                       |   5 +-
 gui/deletemacro.cpp                     |   2 +-
 gui/deletemacro.h                       |   2 +-
 gui/editmacro.cpp                       |  12 +-
 gui/editmacro.h                         |   2 +-
 gui/editmacro.ui                        |  19 +
 gui/generalsettings.cpp                 | 140 +++--
 gui/generalsettings.h                   |   2 +-
 gui/generalsettings.ui                  | 133 +++--
 gui/gui.pro                             |  76 ---
 gui/linpsk.cpp                          |  78 ++-
 gui/linpsk.h                            |   6 +-
 gui/linpsk.ui                           |  87 ++-
 gui/macrocontrol.cpp                    |   2 +-
 gui/modemenu.cpp                        |   2 +-
 gui/modemenu.h                          |   2 +-
 gui/qsodata.cpp                         |  46 +-
 gui/qsodata.h                           |   1 +
 gui/qsodata.ui                          |  35 +-
 gui/renamemacro.cpp                     |   2 +-
 gui/renamemacro.h                       |   2 +-
 gui/spectrumdisplay.cpp                 |  18 +-
 gui/spectrumdisplay.h                   |   1 +
 gui/txwindow.cpp                        |  25 +-
 gui/txwindow.h                          |   6 +-
 images/linpsk_32x32.png                 | Bin 0 -> 1066 bytes
 images/linpsk_48x48.png                 | Bin 0 -> 1309 bytes
 images/linpsk_64x64.png                 | Bin 0 -> 620 bytes
 linpsk.pro                              | 163 +++++-
 src/bpskdemodulator.cpp                 | 132 ++---
 src/cledbutton.cpp                      |  20 +-
 src/cledbutton.h                        |   9 +-
 src/constants.h                         |  10 +-
 src/crxchannel.cpp                      |   1 +
 src/crxwindow.cpp                       |  73 ++-
 src/crxwindow.h                         |  95 ++--
 src/csound.cpp                          |  83 ++-
 src/csound.h                            |   3 +
 src/csquelch.cpp                        |   4 -
 src/ctxbuffer.cpp                       |   4 +-
 src/ctxdisplay.cpp                      | 120 ----
 src/ctxdisplay.h                        |  60 --
 src/mfskdemodulator.cpp                 |   4 +-
 src/mfskmodulator.cpp                   |   2 +-
 src/parameter.cpp                       |   9 +-
 src/parameter.h                         |  26 +-
 src/pskmodulator.cpp                    |  10 +-
 src/qpskdemodulator.cpp                 |   6 +-
 src/spectrumwindow.cpp                  |   2 +
 src/src.pro                             | 120 ----
 src/textinput.cpp                       |   4 +-
 src/viterbi.cpp                         |   4 +-
 src/viterbi.h                           |   8 +-
 src/viterbisoft.cpp                     | 953 --------------------------------
 src/viterbisoft.h                       |  75 ---
 src/waveinput.cpp                       |   9 +-
 72 files changed, 1330 insertions(+), 1894 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..119ba90
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+build
+linpsk.pro.user
diff --git a/ChangeLog b/ChangeLog
index 9f1afc8..76c54db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,32 @@
 LinPsk ChangeLog
+1.2.5
+Now building in build directory.
+Switching to qt5.
+
+1.2.2
+As I got some usb3 problems when transmitting
+- the same macro was executed several times though only clicked once
+
+I introduced a timer that assures a minum click time of one second.
+More rapid clicks are ignored.
+
+Introducing explicit mode - switching to receive.
+In this state you see the letter "A" ( Abort ) in the rx/tx button and you can abort the transmission.
+This might help if the transmission does not stop. ( Probably a bug, but I didn' find the reason. )This avoids killing the program.
+
+In debug mode: showing the properties of the sound device.
+
+Enabling usb2serial converters.
+
+Activate/ deactivate macros
+
+1.2.1
+
+Modified RxWindow to enable horizontal scrollbar correctly.
+Enable/disable date/time data in qsowindow.
+This fields can be set automatically on saving qso data.
+
+Copy data of rx window to clipboard.
 
 1.2
 
diff --git a/README b/README
index 0bcf951..fc8c3e2 100644
--- a/README
+++ b/README
@@ -1,16 +1,24 @@
+Important: This version uses qt5 !!!
+
 To build linpsk, untar the tar archiv and switch to the linpsk directory.
 
 run:
-qmake -o Makefile linpsk.pro
+mkdir -p build
+cd build
+qmake -o Makefile ../linpsk.pro
 make
 
-The executable linpsk is build in the bin subdirectory. Move the binary into prefered location , probably /usr/local/bin
+The executable linpsk is build in the build  directory.
 
-LinPSK now uses the alsa sound system.
-The names of the used alsa devices are LinPSK_Record and LinPSK_Play as default.
-To map these names to your soundcard edit the file asoundrc in the linpsk directory appropriately and append it to .asoundrc in your homedirectory.
-If no .asoundrc exists copy the edited asoundrc to .asoundrc in your homedirectory instead of appending.
+make install 
+
+will install the binary into usr/local/bin and the desktop file into /usr/share/pixmaps/ and the icon file into /usr/share/pixmaps/ .
 
-Instead of using LinPSK_Record/ LinPSK_Play now you can use valid alsa devices like plughw:1 in the settings dialog
-Also using the card name can be used. In this case LinPSK searches the cardnumber and opens
+LinPSK uses the alsa sound system.
+You can use valid alsa devices like plughw:1 in the settings dialog
+Also using the card name is possible. In this case LinPSK searches the cardnumber and opens
 plughw:[cardnumber]
+
+If you prefer to use LinPSK_Record and LinPSK_Play as in previous versions edit the file asoundrc in the linpsk directory appropriately and append it to .asoundrc in your homedirectory.
+If no .asoundrc exists copy the edited asoundrc to .asoundrc in your homedirectory instead of appending.
+
diff --git a/data/linpsk.appdata.xml b/data/linpsk.appdata.xml
new file mode 100644
index 0000000..af4c852
--- /dev/null
+++ b/data/linpsk.appdata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+  <id type="desktop">linpsk.desktop</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <description>
+    <p>
+      LinPSK is a hamradio application for different digital modes.
+      Suported modes:	
+    </p>
+    <ul>
+      <li>BPSK31</li>
+      <li>QPSK31</li>
+      <li>RTTY</li>
+      <li>MFSK16</li>
+    </ul>
+    <p>
+      The main features:
+    </p>
+    <ul>
+     <li>Decoding multiple signals simultaneously</li>
+     <li>Macro definition for  transmit</li>
+     <li>Sending qso data to LinLogbook</li>
+     <li>Requesting callsign data from LinLogbook</li>
+    </ul>
+  </description>
+  <screenshots>
+    <screenshot type="default">http://a.fsdn.com/con/app/proj/linpsk/screenshots/LinPskbig.png</screenshot>
+  </screenshots>
+  <url type="homepage">http://linpsk.sf.net</url>
+  <updatecontact>a at sf.net</updatecontact>
+</application>
diff --git a/data/linpsk.desktop b/data/linpsk.desktop
new file mode 100644
index 0000000..846a5ad
--- /dev/null
+++ b/data/linpsk.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Name=LinPSK
+GenericName=A Modem for PSK31, RTTY and MFSK16 ( experimental ) 
+Comment=A modem for some digital Ham modes
+# FIXME add comments in other languages
+Exec=linpsk
+Categories=Qt;HamRadio;
+Terminal=false
+Icon=linpsk
+Keywords=Radio;HAM;
diff --git a/gui/activatemacros.cpp b/gui/activatemacros.cpp
new file mode 100644
index 0000000..7a42044
--- /dev/null
+++ b/gui/activatemacros.cpp
@@ -0,0 +1,102 @@
+/***************************************************************************
+ *   Copyright (C) 2014 by Volker Schroer, DL1KSV                          *
+ *                                                                         *
+ *   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 "activatemacros.h"
+#include "ui_activatemacros.h"
+
+#include "readonlystringlistmodel.h"
+
+ActivateMacros::ActivateMacros(QVector<Macro> *macroList, QWidget *parent) :
+  QDialog(parent),
+  ui(new Ui::ActivateMacros)
+{
+  ui->setupUi(this);
+  mL = macroList;
+  activeMacros=new ReadOnlyStringListModel ( );
+  deactivatedMacros = new ReadOnlyStringListModel ( );
+
+//  activeList = new QStringList();
+// QStringList deactivateList;
+  int numberofMacros=macroList->size();
+  if (numberofMacros > 0 )
+  for(int i=0; i < numberofMacros;i++) {
+    if( (*macroList).at(i).languageType >= 0) {
+     activeList << (*macroList).at(i).name;
+     deactivateList << "";
+    }
+    else {
+     deactivateList << (*macroList).at(i).name;
+     activeList << "";
+    }
+  }
+    activeMacros->setStringList(activeList);
+    deactivatedMacros->setStringList(deactivateList);
+    ui->activeList->setModel(activeMacros);
+    ui->passiveList->setModel(deactivatedMacros);
+
+}
+
+ActivateMacros::~ActivateMacros()
+{
+  delete activeMacros;
+  delete deactivatedMacros;
+  delete ui;
+}
+void ActivateMacros::addtoList()
+{
+  if(ui->activeList->currentIndex().data().toString().isEmpty())
+    return;
+  deactivatedMacros->setData(ui->activeList->currentIndex(),ui->activeList->currentIndex().data());
+  deactivateList.replace(ui->activeList->currentIndex().row(),ui->activeList->currentIndex().data().toString());
+  activeMacros->setData(ui->activeList->currentIndex(),"");
+  ui->activeList->clearSelection();
+
+}
+void ActivateMacros::removefromList()
+{
+  if(ui->passiveList->currentIndex().data().toString().isEmpty())
+    return;
+  activeMacros->setData(ui->passiveList->currentIndex(),ui->passiveList->currentIndex().data());
+  activeList.replace(ui->passiveList->currentIndex().row(),ui->passiveList->currentIndex().data().toString());
+  deactivatedMacros->setData(ui->passiveList->currentIndex(),"");
+  ui->passiveList->clearSelection();
+
+}
+void ActivateMacros::accept()
+{
+  int numberofMacros=mL->size();
+  if (numberofMacros > 0 )
+    for(int i=0; i < numberofMacros;i++) {
+      if(((*mL).at(i).languageType >= 0) && (!deactivateList.at(i).isEmpty())) {
+        Macro macro;
+        macro=(*mL).at(i);
+        macro.languageType -=3;
+        mL->replace(i,macro);
+      }
+      else if (((*mL).at(i).languageType < 0) && (!activeList.at(i).isEmpty())) {
+        Macro macro;
+        macro=(*mL).at(i);
+        macro.languageType +=3;
+        mL->replace(i,macro);
+
+      }
+
+    }
+  QDialog::accept();
+}
diff --git a/gui/deletemacro.h b/gui/activatemacros.h
similarity index 75%
copy from gui/deletemacro.h
copy to gui/activatemacros.h
index a35c4ec..19a8cae 100644
--- a/gui/deletemacro.h
+++ b/gui/activatemacros.h
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2012 by Volker Schroer, DL1KSV                          *
+ *   Copyright (C) 2014 by Volker Schroer, DL1KSV                          *
  *                                                                         *
  *   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  *
@@ -16,43 +16,40 @@
  *   Free Software Foundation, Inc.,                                       *
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
-
-#ifndef DELETEMACRO_H
-#define DELETEMACRO_H
+#ifndef ACTIVATEMACROS_H
+#define ACTIVATEMACROS_H
 
 #include <QDialog>
-
 #include "constants.h"
 
+class ReadOnlyStringListModel;
+
 namespace Ui {
-  class DeleteMacro;
+class ActivateMacros;
 }
-class ReadOnlyStringListModel;
-class DeleteMacro : public QDialog
+
+class ActivateMacros : public QDialog
 {
   Q_OBJECT
 
 public:
-  DeleteMacro(QVector<Macro> *macroList,QWidget* parent = 0, Qt::WFlags fl = 0 );
-  ~DeleteMacro();
+  explicit ActivateMacros(QVector<Macro> *macroList,QWidget *parent = 0);
+  ~ActivateMacros();
 
-public slots:
-  /*$PUBLIC_SLOTS$*/
-
-protected:
+private:
+  Ui::ActivateMacros *ui;
+  QVector<Macro> *mL;
 
-ReadOnlyStringListModel *model;
-ReadOnlyStringListModel *deleteList;
+  ReadOnlyStringListModel *activeMacros;
+  ReadOnlyStringListModel *deactivatedMacros;
+  QStringList activeList;
+  QStringList deactivateList;
 
 protected slots:
-  virtual void          accept();
+  virtual void accept();
   void removefromList();
   void addtoList();
 
-private:
-  Ui::DeleteMacro *ui;
-  QVector<Macro> *mL;
 };
 
-#endif
-
+#endif // ACTIVATEMACROS_H
diff --git a/gui/activatemacros.ui b/gui/activatemacros.ui
new file mode 100644
index 0000000..c8f2668
--- /dev/null
+++ b/gui/activatemacros.ui
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ActivateMacros</class>
+ <widget class="QDialog" name="ActivateMacros">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>669</width>
+    <height>328</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Active / Deactivate Macros</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Activated Macros</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QListView" name="activeList"/>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_3">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>35</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="0" column="1">
+    <layout class="QVBoxLayout" name="verticalLayout_3">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>58</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="deactMacros">
+         <property name="text">
+          <string>>> Deactivate</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="actMacros">
+         <property name="text">
+          <string><< Activate</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_3">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>35</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item row="0" column="2">
+    <layout class="QVBoxLayout" name="verticalLayout_4">
+     <item>
+      <widget class="QLabel" name="label_2">
+       <property name="text">
+        <string>Deactivated Macros</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QListView" name="passiveList"/>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>ActivateMacros</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>ActivateMacros</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>deactMacros</sender>
+   <signal>clicked()</signal>
+   <receiver>ActivateMacros</receiver>
+   <slot>addtoList()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>334</x>
+     <y>110</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>334</x>
+     <y>163</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actMacros</sender>
+   <signal>clicked()</signal>
+   <receiver>ActivateMacros</receiver>
+   <slot>removefromList()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>334</x>
+     <y>202</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>334</x>
+     <y>163</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>addtoList()</slot>
+  <slot>removefromList()</slot>
+ </slots>
+</ui>
diff --git a/gui/addmacro.cpp b/gui/addmacro.cpp
index 50716cf..07cde00 100644
--- a/gui/addmacro.cpp
+++ b/gui/addmacro.cpp
@@ -25,7 +25,7 @@
 #include <QMessageBox>
 #include <QButtonGroup>
 
-AddMacro::AddMacro(QVector<Macro> *macroList,QStringList tokenList, QWidget* parent, Qt::WFlags fl)
+AddMacro::AddMacro(QVector<Macro> *macroList,QStringList tokenList, QWidget* parent, Qt::WindowFlags fl)
 : QDialog( parent, fl ),  ui(new Ui::AddMacro)
 {
   ui->setupUi(this);
diff --git a/gui/addmacro.h b/gui/addmacro.h
index 593e588..c82a42d 100644
--- a/gui/addmacro.h
+++ b/gui/addmacro.h
@@ -35,7 +35,7 @@ class AddMacro : public QDialog
   Q_OBJECT
 
 public:
-  AddMacro(QVector<Macro> *macroList,QStringList tokenList,QWidget* parent = 0, Qt::WFlags fl = 0 );
+  AddMacro(QVector<Macro> *macroList,QStringList tokenList,QWidget* parent = 0, Qt::WindowFlags fl = 0 );
   ~AddMacro();
 
 public slots:
diff --git a/gui/addrxwindow.cpp b/gui/addrxwindow.cpp
index e0f6969..0f91fc8 100644
--- a/gui/addrxwindow.cpp
+++ b/gui/addrxwindow.cpp
@@ -24,7 +24,7 @@
 
 extern Parameter settings;
 
-AddRxWindow::AddRxWindow(QWidget* parent, Qt::WFlags fl)
+AddRxWindow::AddRxWindow(QWidget* parent, Qt::WindowFlags fl)
 : QDialog( parent, fl ), Ui::AddRxWindow()
 {
 	setupUi(this);
diff --git a/gui/addrxwindow.h b/gui/addrxwindow.h
index f519ff8..051c7ab 100644
--- a/gui/addrxwindow.h
+++ b/gui/addrxwindow.h
@@ -30,7 +30,7 @@ class AddRxWindow : public QDialog, private Ui::AddRxWindow
   Q_OBJECT
 
 public:
-  AddRxWindow(QWidget* parent = 0, Qt::WFlags fl = 0 );
+  AddRxWindow(QWidget* parent = 0, Qt::WindowFlags fl = 0 );
   ~AddRxWindow();
 Mode selectedMode();
 QString titleText();
diff --git a/gui/controlpanel.cpp b/gui/controlpanel.cpp
index ba9be32..3f64656 100644
--- a/gui/controlpanel.cpp
+++ b/gui/controlpanel.cpp
@@ -57,14 +57,9 @@ void ControlPanel::startPlot ( double *d, bool b)
 {
   Display->startPlot(d,b);
 }
-void ControlPanel::display()
+void ControlPanel::present(bool p)
 {
-  Display->show();
-}
-
-void ControlPanel::undisplay()
-{
-  Display->hide();
+  Display->showSpectren(p);
 }
 void ControlPanel::newChannel()
 {
@@ -83,6 +78,11 @@ void ControlPanel::enableSaveData()
 {
   QSO->enableSaveData();
 }
+void ControlPanel::setAutoDate()
+{
+  QSO->setAutoDate();
+}
+
 void ControlPanel::restoreSplitterStates(const QByteArray & controlState,const QByteArray & spectrumState)
 {
   controlSplitter->restoreState(controlState);
diff --git a/gui/controlpanel.h b/gui/controlpanel.h
index 08d33f0..718cd9d 100644
--- a/gui/controlpanel.h
+++ b/gui/controlpanel.h
@@ -21,12 +21,12 @@ public:
     void insertMacros(Macros *);
     void setPhasePointer(std::complex<float> *);
     void setColorList(QList<QColor> *c);
-    void display();
-    void undisplay();
+    void present(bool p);
     void newChannel();
     void updateMacroWindow(int macroNumber);
     void insertMacros(QVector<Macro> *macroList);
     void enableSaveData();
+    void setAutoDate();
     void restoreSplitterStates(const QByteArray & controlState,const QByteArray & spectrumState);
     QByteArray controlSplitterState() const;
     QByteArray spectrumSplitterState() const;
diff --git a/gui/ctxdisplay.cpp b/gui/ctxdisplay.cpp
index f9dffc5..647fde4 100644
--- a/gui/ctxdisplay.cpp
+++ b/gui/ctxdisplay.cpp
@@ -34,7 +34,7 @@ CTxDisplay::CTxDisplay( QWidget* parent )
     TxFreq->setAfcMode(Narrow);
     connect(TxFunctions,SIGNAL(startRx()),this,SIGNAL(startRx()));
     connect(TxFunctions,SIGNAL(startTx()),this,SIGNAL(startTx()));
-
+    connect(TxFunctions,SIGNAL(abortTx()),this,SIGNAL(abortTx()));
     languageChange();
 }
 
@@ -57,10 +57,7 @@ void CTxDisplay::resizeEvent( QResizeEvent * )
 {
 TxFunctions->setFixedSize(QSize(height()-20,height()-20));
 }
-void CTxDisplay::abbruch()
-{
-TxFunctions->setStatus(UNDEF);
-}
+
 void CTxDisplay::insert(QString s)
 {
  txWindow->insertString(s);
@@ -69,3 +66,7 @@ void CTxDisplay::setTxFocus()
 {
  txWindow->setFocus();
 }
+void CTxDisplay::switch2Rx()
+{
+  TxFunctions->setStatus(SW);
+}
diff --git a/gui/ctxdisplay.h b/gui/ctxdisplay.h
index 89f6dfa..4e8e98b 100644
--- a/gui/ctxdisplay.h
+++ b/gui/ctxdisplay.h
@@ -32,9 +32,9 @@ public:
     ~CTxDisplay();
     void insert(QString s);
     void setTxFocus();
-
+    void switch2Rx();
   public slots:
-    void abbruch();
+ //   void abbruch();
   protected:
     void resizeEvent( QResizeEvent * );
 
@@ -45,6 +45,7 @@ protected slots:
   signals:
     void startRx();
     void startTx();
+    void abortTx();
 
 };
 
diff --git a/gui/ctxdisplay.ui b/gui/ctxdisplay.ui
index 8aa8d0c..d286ab1 100644
--- a/gui/ctxdisplay.ui
+++ b/gui/ctxdisplay.ui
@@ -74,12 +74,15 @@
         </size>
        </property>
        <property name="text">
-        <string>Rx</string>
+        <string>&RX</string>
        </property>
       </widget>
      </item>
      <item>
       <widget class="TxWindow" name="txWindow">
+       <property name="focusPolicy">
+        <enum>Qt::StrongFocus</enum>
+       </property>
        <property name="frameShape">
         <enum>QFrame::StyledPanel</enum>
        </property>
diff --git a/gui/deletemacro.cpp b/gui/deletemacro.cpp
index e9c682a..3880f84 100644
--- a/gui/deletemacro.cpp
+++ b/gui/deletemacro.cpp
@@ -21,7 +21,7 @@
 #include "ui_deletemacro.h"
 
 #include "readonlystringlistmodel.h"
-DeleteMacro::DeleteMacro (QVector<Macro> *macroList, QWidget* parent, Qt::WFlags fl )
+DeleteMacro::DeleteMacro (QVector<Macro> *macroList, QWidget* parent, Qt::WindowFlags fl )
                 : QDialog ( parent, fl ),  ui(new Ui::DeleteMacro)
 {
   ui->setupUi ( this );
diff --git a/gui/deletemacro.h b/gui/deletemacro.h
index a35c4ec..af6e032 100644
--- a/gui/deletemacro.h
+++ b/gui/deletemacro.h
@@ -33,7 +33,7 @@ class DeleteMacro : public QDialog
   Q_OBJECT
 
 public:
-  DeleteMacro(QVector<Macro> *macroList,QWidget* parent = 0, Qt::WFlags fl = 0 );
+  DeleteMacro(QVector<Macro> *macroList,QWidget* parent = 0, Qt::WindowFlags fl = 0 );
   ~DeleteMacro();
 
 public slots:
diff --git a/gui/editmacro.cpp b/gui/editmacro.cpp
index 6ee638a..e302de1 100644
--- a/gui/editmacro.cpp
+++ b/gui/editmacro.cpp
@@ -23,7 +23,7 @@
 #include "readonlystringlistmodel.h"
 #include <QMessageBox>
 
-EditMacro::EditMacro(QVector<Macro> *macroList,QStringList tokenList, QWidget* parent, Qt::WFlags fl)
+EditMacro::EditMacro(QVector<Macro> *macroList,QStringList tokenList, QWidget* parent, Qt::WindowFlags fl)
   : QDialog( parent, fl ), ui(new Ui::EditMacro)
 {
   ui->setupUi(this);
@@ -64,8 +64,10 @@ void EditMacro::accept()
   macro=(*mL).at(aktPosition);
   macro.text=ui->Definition->toPlainText();
   macro.accelerator=ui->Accelerator->text();
-  macro.languageType=ui->bG->checkedId();
-  if(aktPosition < newPosition) // Macro shoul be moved behind
+  int langType=ui->bG->checkedId();
+  if(macro.languageType < 0) //Deactivated
+    macro.languageType = langType-3;
+  if(aktPosition < newPosition) // Macro should be moved behind
     {
       mL->insert(newPosition,macro); //First insert then remove
       mL->remove(aktPosition);
@@ -90,7 +92,9 @@ if( Number > 0)
       ui->Definition->setText((*mL).at(Number).text);
       ui->Accelerator->setText((*mL).at(Number).accelerator);
       langType=(*mL).at(Number).languageType;
-      if(langType <0 || langType > 2 ) //Chek range if config file was wrongly modified
+      if(langType <0 )
+        langType +=3;
+      if ((langType <0) || (langType > 2 ) ) //Check range if config file was wrongly modified
         langType=0;
       ui->bG->button(langType)->setChecked(true);
   }
diff --git a/gui/editmacro.h b/gui/editmacro.h
index 8b0a6e3..3a68af9 100644
--- a/gui/editmacro.h
+++ b/gui/editmacro.h
@@ -36,7 +36,7 @@ class EditMacro : public QDialog
   Q_OBJECT
 
 public:
-  EditMacro(QVector<Macro> *macroList,QStringList tokenList,QWidget* parent = 0, Qt::WFlags fl = 0 );
+  EditMacro(QVector<Macro> *macroList,QStringList tokenList,QWidget* parent = 0, Qt::WindowFlags fl = 0 );
   ~EditMacro();
 
 
diff --git a/gui/editmacro.ui b/gui/editmacro.ui
index 9098029..8e2fc8d 100644
--- a/gui/editmacro.ui
+++ b/gui/editmacro.ui
@@ -227,7 +227,26 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>Keywords</sender>
+   <signal>clicked(QModelIndex)</signal>
+   <receiver>EditMacro</receiver>
+   <slot>insertKeyword(QModelIndex)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>329</x>
+     <y>155</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>288</x>
+     <y>146</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
+ <slots>
+  <slot>insertKeyword(QModelIndex)</slot>
+ </slots>
  <buttongroups>
   <buttongroup name="bG"/>
  </buttongroups>
diff --git a/gui/generalsettings.cpp b/gui/generalsettings.cpp
index f836772..caeef1d 100644
--- a/gui/generalsettings.cpp
+++ b/gui/generalsettings.cpp
@@ -27,8 +27,8 @@
 #include <QModelIndex>
 
 extern Parameter settings;
-GeneralSettings::GeneralSettings ( QWidget* parent, Qt::WFlags fl )
-		: QDialog ( parent, fl ), Ui::GeneralSettings()
+GeneralSettings::GeneralSettings ( QWidget* parent, Qt::WindowFlags fl )
+  : QDialog ( parent, fl ), Ui::GeneralSettings()
 {
   setupUi ( this );
   QString DirectoryName;
@@ -50,6 +50,7 @@ GeneralSettings::GeneralSettings ( QWidget* parent, Qt::WFlags fl )
   SlashedZero->setChecked ( LocalSettings.slashed0 );
   autoCrLf->setAutoExclusive(false);
   autoCrLf->setChecked(LocalSettings.autoCrLf);
+  autoDate->setChecked(LocalSettings.autoDate);
   QRegExp rx ( "^[A-R][A-R][0-9][0-9][A-X][A-X]$" );
   QValidator *validator = new QRegExpValidator ( rx, this );
   myLocator->setValidator ( validator );
@@ -63,45 +64,37 @@ GeneralSettings::GeneralSettings ( QWidget* parent, Qt::WFlags fl )
   else
     selectDemomode(false);
 
-//PTT
+  //PTT
   SelectedDevice->setText ( LocalSettings.SerialDevice );
-// First look in the /dev Directory
+  // First look in the /dev Directory
   DirectoryName = "/dev/";
 
   dir.setPath ( DirectoryName );
   QStringList filenames;
-  filenames << "ttyS*";
+  //Check for serial and usb to serial devices
+  filenames << "ttyS*" << "ttyUSB*";
   QStringList Files = dir.entryList ( filenames, QDir::System | QDir::CaseSensitive, QDir::Name );
 
   for ( int kk = 0; kk < Files.size(); kk++ )
     Files.replace ( kk, DirectoryName + Files.at ( kk ) );
   ReadOnlyStringListModel *m = new ReadOnlyStringListModel ( this );
-	m->setStringList ( Files );
-	AvailableDevices->setModel ( m );
-	AvailableDevices->show();
-// Now check for usb devices
-	/**
-	Directory="/dev/usb/tts/";
-	dir.setPath(Directory);
-	Files=dir.entryList(QDir::Files|QDir::System,QDir::Name);
-
-	for(QStringList::iterator Name=Files.begin();Name !=Files.end(); Name++)
-	 AvailableDevices->insertItem(Directory + *Name);
-	**/
-// Sound Devices
+  m->setStringList ( Files );
+  AvailableDevices->setModel ( m );
+  AvailableDevices->show();
+  // Sound Devices
   soundInputDeviceName->setText(LocalSettings.InputDeviceName);
   soundOutputDeviceName->setText(LocalSettings.OutputDeviceName);
- //Logging
-	Directory->setText ( LocalSettings.Directory );
-	QsoFile->setText ( LocalSettings.QSOFileName );
-	fileLog->setChecked ( LocalSettings.fileLog );
-connect(fileLog,SIGNAL(clicked(bool)),this,SLOT(selectFileLogging(bool)));
-	Directory->setDisabled ( !LocalSettings.fileLog );
-	QsoFile->setDisabled ( !LocalSettings.fileLog );
-	LinLog->setChecked ( LocalSettings.LinLog );
-connect(LinLog,SIGNAL(clicked(bool)),this,SLOT(selectLinLogLogging(bool)));
-	Port->setDisabled ( !LocalSettings.LinLog );
-	Host->setDisabled ( !LocalSettings.LinLog );
+  //Logging
+  Directory->setText ( LocalSettings.Directory );
+  QsoFile->setText ( LocalSettings.QSOFileName );
+  fileLog->setChecked ( LocalSettings.fileLog );
+  connect(fileLog,SIGNAL(clicked(bool)),this,SLOT(selectFileLogging(bool)));
+  Directory->setDisabled ( !LocalSettings.fileLog );
+  QsoFile->setDisabled ( !LocalSettings.fileLog );
+  LinLog->setChecked ( LocalSettings.LinLog );
+  connect(LinLog,SIGNAL(clicked(bool)),this,SLOT(selectLinLogLogging(bool)));
+  Port->setDisabled ( !LocalSettings.LinLog );
+  Host->setDisabled ( !LocalSettings.LinLog );
 
 }
 
@@ -114,56 +107,51 @@ GeneralSettings::~GeneralSettings()
 
 Parameter GeneralSettings::getSettings()
 {
-	LocalSettings.callsign = Callsign->text();
-	LocalSettings.myLocator = myLocator->text();
-	if ( Demomode->isChecked() )
-	{
-		LocalSettings.DemoMode = true;
-		LocalSettings.DemoTypeNumber = FileFormat->checkedId();
-		LocalSettings.inputFilename = "";
-	}
-	else
+  LocalSettings.callsign = Callsign->text();
+  LocalSettings.myLocator = myLocator->text();
+  if ( Demomode->isChecked() )
+    {
+      LocalSettings.DemoMode = true;
+      LocalSettings.DemoTypeNumber = FileFormat->checkedId();
+      LocalSettings.inputFilename = "";
+    }
+  else
+    {
+      LocalSettings.DemoMode = false;
+      LocalSettings.InputDeviceName=soundInputDeviceName->text();
+      LocalSettings.OutputDeviceName=soundOutputDeviceName->text();
+    }
+
+  LocalSettings.timeoffset = UTC->value();
+  LocalSettings.slashed0 = SlashedZero->isChecked();
+  LocalSettings.autoCrLf = autoCrLf->isChecked();
+  LocalSettings.autoDate=autoDate->isChecked();
+  LocalSettings.SerialDevice = SelectedDevice->text();
+  LocalSettings.fileLog = fileLog->isChecked();
+  if ( LocalSettings.fileLog )
     {
-		LocalSettings.DemoMode = false;
-        LocalSettings.InputDeviceName=soundInputDeviceName->text();
-        LocalSettings.OutputDeviceName=soundOutputDeviceName->text();
+      LocalSettings.Directory = Directory->text();
+      LocalSettings.QSOFileName = QsoFile->text();
     }
 
-	LocalSettings.timeoffset = UTC->value();
-	if ( SlashedZero->isChecked() )
-		LocalSettings.slashed0 = true;
-	else
-		LocalSettings.slashed0 = false;
-	if ( autoCrLf->isChecked() )
-		LocalSettings.autoCrLf = true;
-	else
-		LocalSettings.autoCrLf = false;
-	LocalSettings.SerialDevice = SelectedDevice->text();
-	LocalSettings.fileLog = fileLog->isChecked();
-	if ( LocalSettings.fileLog )
-	{
-		LocalSettings.Directory = Directory->text();
-		LocalSettings.QSOFileName = QsoFile->text();
-	}
-
-	LocalSettings.LinLog = LinLog->isChecked();
-	if ( LocalSettings.LinLog )
-	{
-		LocalSettings.Host = Host->text();
-		LocalSettings.Port = Port->value();
-	}
-LocalSettings.dateFormat=dateFormat->currentText();
-	return LocalSettings;
+  LocalSettings.LinLog = LinLog->isChecked();
+  if ( LocalSettings.LinLog )
+    {
+      LocalSettings.Host = Host->text();
+      LocalSettings.Port = Port->value();
+    }
+  LocalSettings.dateFormat=dateFormat->currentText();
+  return LocalSettings;
 }
 
 void GeneralSettings::selectDemomode ( bool mode )
 {
-	if ( mode )
+  if ( mode )
     {
       FileFormatLayout->show();
       SoundDeviceBox->hide();
     }
-	else
+  else
     {
       FileFormatLayout->hide();
       SoundDeviceBox->show();
@@ -172,22 +160,22 @@ void GeneralSettings::selectDemomode ( bool mode )
 
 void GeneralSettings::setPTTDevice ( const QModelIndex &index )
 {
-	QString s = index.data().toString();
+  QString s = index.data().toString();
 
-	SelectedDevice->clear();
-	SelectedDevice->setText ( s );
-	LocalSettings.SerialDevice = s;
+  SelectedDevice->clear();
+  SelectedDevice->setText ( s );
+  LocalSettings.SerialDevice = s;
 }
 
 void GeneralSettings::selectFileLogging ( bool b)
 {
-Directory->setDisabled ( !b);
-	QsoFile->setDisabled ( !b );
+  Directory->setDisabled ( !b);
+  QsoFile->setDisabled ( !b );
 }
 void GeneralSettings::selectLinLogLogging ( bool b )
 {
-	Port->setDisabled ( !b );
-	Host->setDisabled ( !b );
+  Port->setDisabled ( !b );
+  Host->setDisabled ( !b );
 }
 void GeneralSettings::setSampleRate(QString s)
 {
diff --git a/gui/generalsettings.h b/gui/generalsettings.h
index 59070fe..be1081c 100644
--- a/gui/generalsettings.h
+++ b/gui/generalsettings.h
@@ -31,7 +31,7 @@ class GeneralSettings : public QDialog, private Ui::GeneralSettings
   Q_OBJECT
 
 public:
-  GeneralSettings(QWidget* parent = 0, Qt::WFlags fl = 0 );
+  GeneralSettings(QWidget* parent = 0, Qt::WindowFlags fl = 0 );
   ~GeneralSettings();
 Parameter getSettings();
 
diff --git a/gui/generalsettings.ui b/gui/generalsettings.ui
index 47ea3d5..de0ba0d 100644
--- a/gui/generalsettings.ui
+++ b/gui/generalsettings.ui
@@ -150,32 +150,6 @@
      </property>
     </widget>
    </item>
-   <item row="2" column="3">
-    <spacer name="horizontalSpacer">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>115</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="2" column="4" colspan="2">
-    <spacer name="horizontalSpacer_2">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>115</width>
-       <height>20</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
    <item row="3" column="0" colspan="3">
     <widget class="QRadioButton" name="autoCrLf">
      <property name="enabled">
@@ -260,6 +234,34 @@
      </layout>
     </widget>
    </item>
+   <item row="6" column="0" colspan="2">
+    <widget class="QPushButton" name="buttonOk">
+     <property name="minimumSize">
+      <size>
+       <width>80</width>
+       <height>20</height>
+      </size>
+     </property>
+     <property name="font">
+      <font/>
+     </property>
+     <property name="focusPolicy">
+      <enum>Qt::ClickFocus</enum>
+     </property>
+     <property name="text">
+      <string>&Ok</string>
+     </property>
+     <property name="shortcut">
+      <string>Alt+O</string>
+     </property>
+     <property name="autoDefault">
+      <bool>false</bool>
+     </property>
+     <property name="default">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
    <item row="4" column="2" colspan="2">
     <widget class="QGroupBox" name="groupBox_2">
      <property name="title">
@@ -423,34 +425,6 @@
      </layout>
     </widget>
    </item>
-   <item row="6" column="0" colspan="2">
-    <widget class="QPushButton" name="buttonOk">
-     <property name="minimumSize">
-      <size>
-       <width>80</width>
-       <height>20</height>
-      </size>
-     </property>
-     <property name="font">
-      <font/>
-     </property>
-     <property name="focusPolicy">
-      <enum>Qt::ClickFocus</enum>
-     </property>
-     <property name="text">
-      <string>&Ok</string>
-     </property>
-     <property name="shortcut">
-      <string>Alt+O</string>
-     </property>
-     <property name="autoDefault">
-      <bool>false</bool>
-     </property>
-     <property name="default">
-      <bool>false</bool>
-     </property>
-    </widget>
-   </item>
    <item row="6" column="4" colspan="2">
     <spacer name="horizontalSpacer_3">
      <property name="orientation">
@@ -508,16 +482,63 @@
      </property>
     </spacer>
    </item>
+   <item row="2" column="4" colspan="2">
+    <spacer name="horizontalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>115</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="3">
+    <widget class="QRadioButton" name="autoDate">
+     <property name="minimumSize">
+      <size>
+       <width>150</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="text">
+      <string>Set Date qso saving</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+     <property name="autoExclusive">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
  <tabstops>
   <tabstop>Callsign</tabstop>
+  <tabstop>myLocator</tabstop>
+  <tabstop>UTC</tabstop>
+  <tabstop>dateFormat</tabstop>
+  <tabstop>SlashedZero</tabstop>
+  <tabstop>autoDate</tabstop>
+  <tabstop>autoCrLf</tabstop>
   <tabstop>Demomode</tabstop>
+  <tabstop>Wav</tabstop>
   <tabstop>Text</tabstop>
-  <tabstop>buttonOk</tabstop>
-  <tabstop>buttonCancel</tabstop>
+  <tabstop>AvailableDevices</tabstop>
+  <tabstop>SelectedDevice</tabstop>
+  <tabstop>soundInputDeviceName</tabstop>
+  <tabstop>soundOutputDeviceName</tabstop>
+  <tabstop>fileLog</tabstop>
+  <tabstop>Directory</tabstop>
+  <tabstop>QsoFile</tabstop>
+  <tabstop>LinLog</tabstop>
+  <tabstop>Host</tabstop>
+  <tabstop>Port</tabstop>
  </tabstops>
  <includes>
   <include location="local">parameter.h</include>
diff --git a/gui/gui.pro b/gui/gui.pro
deleted file mode 100644
index fb68977..0000000
--- a/gui/gui.pro
+++ /dev/null
@@ -1,76 +0,0 @@
-CONFIG(debug, debug|release) {
-    QMAKE_CXXFLAGS_DEBUG += -g3 \
-    -fpermissive \
-    -O0
-CONFIG +=  debug
-} else {
-    DEFINES += QT_NO_DEBUG
-    DEFINES += QT_NO_DEBUG_OUTPUT
-    QMAKE_CXXFLAGS_DEBUG +=-fpermissive \
-    -O2
-}
-
-FORMS += addmacro.ui \
-addrxwindow.ui \
-deletemacro.ui \
-editmacro.ui \
-generalsettings.ui \
-modemenu.ui \
-qsodata.ui \
-renamemacro.ui \
-    controlpanel.ui \
-    linpsk.ui \
-    crxdisplay.ui \
-    spectrumdisplay.ui \
-    ctxdisplay.ui \
-    macrocontrol.ui \
-    txwindow.ui
-
-CONFIG += build_all \
- staticlib \
- debug
-
-DESTDIR = .
-
-SOURCES += generalsettings.cpp \
- addmacro.cpp \
- addrxwindow.cpp \
- deletemacro.cpp \
- modemenu.cpp \
- qsodata.cpp \
- renamemacro.cpp \
- editmacro.cpp \
-    controlpanel.cpp \
-    linpsk.cpp \
-    crxdisplay.cpp \
-    spectrumdisplay.cpp \
-    ctxdisplay.cpp \
-    macrocontrol.cpp \
-    txwindow.cpp
-
-HEADERS += generalsettings.h \
- addmacro.h \
- addrxwindow.h \
- deletemacro.h \
- modemenu.h \
- qsodata.h \
- renamemacro.h \
- editmacro.h \
-    controlpanel.h \
-    linpsk.h \
-    crxdisplay.h \
-    spectrumdisplay.h \
-    ctxdisplay.h \
-    macrocontrol.h \
-    txwindow.h
-
-
-TEMPLATE = lib
-
-QT += network
-
-INCLUDEPATH += ../src
-
-RESOURCES += \
-    ../src/application.qrc
-
diff --git a/gui/linpsk.cpp b/gui/linpsk.cpp
index 4e54eab..e0bafef 100644
--- a/gui/linpsk.cpp
+++ b/gui/linpsk.cpp
@@ -42,6 +42,7 @@
 #include "modemenu.h"
 #include "addmacro.h"
 #include "deletemacro.h"
+#include "activatemacros.h"
 #include "qsodata.h"
 #include "editmacro.h"
 #include "deletemacro.h"
@@ -51,12 +52,12 @@
 
 #include <QtGui>
 #include <QEventLoop>
+#include <QMessageBox>
+#include <QFileDialog>
+#include <QFontDialog>
+#include <QColorDialog>
 
-#ifdef HAVE_CONFIG
-#include "config.h"
-#else
-#define VERSION "1.2"
-#endif
+#define VERSION "1.2.5"
 
 
 #define ProgramName "LinPSK "
@@ -67,17 +68,21 @@ extern Parameter settings;
  *  name 'name' and widget flags set to 'f'.
  *
  */
-LinPSK::LinPSK ( QWidget* parent, Qt::WFlags fl )
+LinPSK::LinPSK ( QWidget* parent, Qt::WindowFlags fl )
   : QMainWindow ( parent, fl ), Ui::LinPSK()
 {
   Sound = 0;
   Modulator = 0;
   inAction=false;
+  /** To avoid multipe Macro clicking **/
+  blockMacros=false;
+  /************************************/
   SaveParameters = new Parameter();
 
   setupUi(this);
   read_config();
-  Control->enableSaveData();
+  /** Fixme: handle font change: fontChange() **/
+
   if ( settings.ApplicationFont == 0 )
   {
     settings.ApplicationFont = new QFont ( qApp->font().family() );
@@ -136,8 +141,6 @@ LinPSK::LinPSK ( QWidget* parent, Qt::WFlags fl )
 //========== Macro Processing ======================================
   tokenList << "@CALLSIGN@" << "@DATE@" << "@Replace by filename@" << "@RX@" << "@THEIRCALL@" << "@THEIRNAME@" << "@TIMELOCAL@" << "@TIMEUTC@" << "@TX@" << "@RSTGIVEN@" << "@RSTRCVD@";
   Control->insertMacros( &macroList );
-//  connect(Control,SIGNAL(executeMacro(int)),this,SLOT(executeMacro(int)));
-
   connect ( this, SIGNAL ( StartRx() ), this, SLOT ( startRx() ) );
   connect ( this, SIGNAL ( StartTx() ), this, SLOT ( startTx() ) );
 
@@ -249,7 +252,6 @@ void LinPSK::addRxWindow()
   if ( Channel->exec() != 0 )
   {
     AfcMode modus;
-//    modus = RxDisplay->RxFreq->getAfcMode();
     modus = RxDisplay->getAfcMode();
     settings.ActChannel->setAfcMode ( modus );
     Mode rxmode = ( Mode ) Channel->selectedMode();
@@ -298,6 +300,7 @@ void LinPSK::startRx()
     TxBuffer->insert ( TXOFF_CODE );
     if ( Sound != NULL )  // Switch Trx to rx
       {
+        TxDisplay->switch2Rx();
         msg->setText ( tr ( "Switching to receive" ) );
         while ( Sound->isRunning() ) // Wait for buffer to be cleared
           qApp->processEvents ( QEventLoop::AllEvents, 100 );
@@ -335,7 +338,7 @@ void LinPSK::startRx()
   }
   else
     TxDisplay->TxFunctions->setStatus ( UNDEF );
-  Control->display();
+  Control->present(true);
   settings.Status = TxDisplay->TxFunctions->getstatus();
   TxDisplay->txWindow->setFocus();
   inAction=false;
@@ -348,7 +351,6 @@ void LinPSK::startTx()
   QString Info;
   double Frequency;
 
-
   RxDisplay->stop_process_loop();
   if ( settings.ActChannel == 0 )
   {
@@ -412,6 +414,7 @@ void LinPSK::startTx()
   {
     QMessageBox::information ( 0, ProgramName, errorstring );
     stopTx();
+     emit  StartRx();
     return;
   }
 
@@ -420,7 +423,7 @@ void LinPSK::startTx()
   msg->setText ( tr ( "Transmitting " ) + Info );
   TxDisplay->txWindow->setFocus();
   settings.Status = TxDisplay->TxFunctions->getstatus();
-  Control->undisplay();
+  Control->present(false);
 
   Txcount = BUF_SIZE;
 //  process_txdata(); // Generate first Sample
@@ -497,6 +500,7 @@ void LinPSK::FontSetup()
     qApp->setFont ( f );
   }
 }
+
 void LinPSK::stopTx()
 {
   Modulator->disconnect();
@@ -507,11 +511,14 @@ void LinPSK::stopTx()
   }
   delete Modulator;
   Modulator = 0;
+  TxDisplay->txWindow->clearBuffers();
 }
 
 void LinPSK::apply_settings()
 {
   selectPTTDevice();
+  Control->enableSaveData();
+  Control->setAutoDate();
 }
 void LinPSK::setChannelParams()
 {
@@ -583,11 +590,6 @@ void LinPSK::setRxMode()
       case MFSK16:
         Info = "MFSK16";
         break;
-/* RIP 
-    case RTTY2:
-        Info = "RTTY2";
-        break;
-*/
       default:
         Info = "undefined";
     }
@@ -601,9 +603,7 @@ void LinPSK::save_config()
   QSettings config ( "DL1KSV", "LinPSK" );
   /** Windows Parameter **/
   config.beginGroup ( "WindowsParameter" );
-// config.setValue ( "MinimumWindowWidth", settings.MinimumWindowWidth );
   config.setValue ( "WindowWidth", width() );
-// config.setValue ( "MinimumWindowHeight", settings.MinimumWindowHeight );
   config.setValue ( "Xpos", this->x() );
   config.setValue ( "Ypos", this->y() );
   config.setValue ( "WindowHeight", height() );
@@ -635,6 +635,7 @@ void LinPSK::save_config()
   config.setValue ( "dateFormat", settings.dateFormat );
   config.setValue ( "Slashed0", settings.slashed0 );
   config.setValue ("autoCrLf",settings.autoCrLf);
+  config.setValue ("autoDate",settings.autoDate);
   /** Colors **/
   if ( WindowColors.size() > 0 )
   {
@@ -676,6 +677,15 @@ void LinPSK::save_config()
 void LinPSK::executeMacro ( int id )
 {
 //  qDebug("Execute macro %d",id);
+  if(blockMacros) {
+    qDebug("Macro %d blocked",id);
+    return;
+  }
+  else
+  {
+    blockMacros=true;
+    QTimer::singleShot(1000,this,SLOT(unblockMacros()));
+  }
   QString macro = macroList.at(id).text;
   QString Token;
   QFile *MacroFile;
@@ -747,6 +757,18 @@ void LinPSK::executeMacro ( int id )
                                                  QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton );
                           return;
                         }
+                         if(settings.callsign.isEmpty())
+                         {
+                            QMessageBox::warning(0,"Parameter error",QLatin1String("Callsign not set"));
+                            TxDisplay->TxFunctions->setStatus ( OFF );
+                            return;
+                          }
+                         if(macro.contains(tokenList.at(4)) && settings.QslData->RemoteCallsign.isEmpty())  //Check if macro contains remote callsign when switching to tx
+                          {
+                            QMessageBox::critical(0,"Parameter error",QLatin1String("Remote callsign not set"));
+                            TxDisplay->TxFunctions->setStatus ( OFF );
+                            return;
+                          }
                         macro.remove ( indexvon, 4 );
                         if(settings.Status == OFF)
                           emit StartTx();
@@ -808,6 +830,7 @@ void LinPSK::executeMacro ( int id )
     TxDisplay->insert(macro);
     if(switchtoRx & (settings.Status == ON))
       {
+        TxDisplay->TxFunctions->setStatus(SW);
         msg->setText ( tr ( "Switching to receive" ) );
         emit  StartRx();
       }
@@ -839,6 +862,14 @@ void LinPSK::deleteMacro()
   }
   delete dL;
 }
+void LinPSK::actdeactMacros()
+{
+  ActivateMacros *act =new ActivateMacros(&macroList);
+  if(act->exec() !=0 ) {
+    Control->insertMacros( &macroList );
+  }
+  delete act;
+}
 void LinPSK::renameMacro()
 {
   RenameMacro *rM = new RenameMacro(&macroList);
@@ -901,6 +932,7 @@ void LinPSK::read_config()
   settings.dateFormat = config.value ( "dateFormat", "dd.MM.yyyy" ).toString();
   settings.slashed0 = config.value ( "Slashed0" ).toBool();
   settings.autoCrLf = config.value("autoCrLf").toBool();
+  settings.autoDate = config.value("autoDate").toBool();
   /** Colors **/
   if ( config.contains ( "Colors" ) )
   {
@@ -952,7 +984,7 @@ void LinPSK::selectPTTDevice()
   if ( settings.SerialDevice != "None" )
   {
     int flags = TIOCM_RTS | TIOCM_DTR;
-    settings.serial = open ( settings.SerialDevice.toAscii().data(), O_EXCL | O_WRONLY );
+    settings.serial = open ( settings.SerialDevice.toLatin1().data(), O_EXCL | O_WRONLY );
     if ( settings.serial > 0 )
       ioctl ( settings.serial, TIOCMBIC, &flags );
     else
@@ -994,3 +1026,7 @@ void LinPSK::on_RxDisplay_newActiveChannel()
 {
 
 }
+void LinPSK::unblockMacros()
+{
+ blockMacros=false;
+}
diff --git a/gui/linpsk.h b/gui/linpsk.h
index 9f1f4ad..50fe2b7 100644
--- a/gui/linpsk.h
+++ b/gui/linpsk.h
@@ -42,7 +42,7 @@ class LinPSK : public QMainWindow, private Ui::LinPSK
     Q_OBJECT
 
 public:
-    LinPSK( QWidget* parent = 0,Qt::WFlags fl = 0);
+    LinPSK( QWidget* parent = 0,Qt::WindowFlags fl = 0);
     ~LinPSK();
 
 
@@ -87,6 +87,8 @@ protected slots:
   void deleteMacro();
   /** Rename Macro **/
   void renameMacro();
+  /**Activate /Deactivate Macros**/
+  void actdeactMacros();
   /** Font Settings **/
   void FontSetup();
   /** Save Settings **/
@@ -96,11 +98,13 @@ protected slots:
 
 private slots:
   void on_RxDisplay_newActiveChannel();
+  void unblockMacros();
 private:
 
     void read_config();
     void save_config();
     bool inAction;
+    bool blockMacros;
 Parameter *SaveParameters;    
 /** Modulator **/
 CModulator *Modulator;
diff --git a/gui/linpsk.ui b/gui/linpsk.ui
index efe604a..2ce748c 100644
--- a/gui/linpsk.ui
+++ b/gui/linpsk.ui
@@ -19,15 +19,24 @@
   </property>
   <widget class="QWidget" name="centralwidget">
    <layout class="QGridLayout" name="gridLayout">
+    <property name="leftMargin">
+     <number>1</number>
+    </property>
+    <property name="topMargin">
+     <number>1</number>
+    </property>
+    <property name="rightMargin">
+     <number>1</number>
+    </property>
+    <property name="bottomMargin">
+     <number>1</number>
+    </property>
     <property name="horizontalSpacing">
      <number>0</number>
     </property>
     <property name="verticalSpacing">
      <number>1</number>
     </property>
-    <property name="margin">
-     <number>1</number>
-    </property>
     <item row="1" column="0">
      <widget class="CTxDisplay" name="TxDisplay">
       <property name="sizePolicy">
@@ -120,7 +129,7 @@
      <x>0</x>
      <y>0</y>
      <width>642</width>
-     <height>22</height>
+     <height>19</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">
@@ -145,6 +154,7 @@
      <addaction name="actionDelete_macro"/>
      <addaction name="actionRename_macro"/>
      <addaction name="separator"/>
+     <addaction name="actionActivate_deactivate_Macro"/>
     </widget>
     <addaction name="actionGeneral_Settings"/>
     <addaction name="separator"/>
@@ -225,6 +235,9 @@
    </property>
   </action>
   <action name="actionFont_settings">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
    <property name="text">
     <string>Font settings</string>
    </property>
@@ -244,12 +257,14 @@
     <string>Change Rx mode</string>
    </property>
   </action>
-  <action name="actionEdit_macro_language">
+  <action name="actionActivate_deactivate_Macro">
    <property name="text">
-    <string>Edit macro language</string>
+    <string>Activate/ deactivate Macro</string>
    </property>
-   <property name="toolTip">
-    <string>Change used macro languages</string>
+  </action>
+  <action name="actionRestore_default_font">
+   <property name="text">
+    <string>Restore default font</string>
    </property>
   </action>
  </widget>
@@ -276,6 +291,7 @@
    <slots>
     <signal>startRx()</signal>
     <signal>startTx()</signal>
+    <signal>abortTx()</signal>
    </slots>
   </customwidget>
   <customwidget>
@@ -293,7 +309,6 @@
  </customwidgets>
  <resources>
   <include location="../src/application.qrc"/>
-  <include location="../src/application.qrc"/>
  </resources>
  <connections>
   <connection>
@@ -531,8 +546,8 @@
      <y>154</y>
     </hint>
     <hint type="destinationlabel">
-     <x>404</x>
-     <y>532</y>
+     <x>405</x>
+     <y>455</y>
     </hint>
    </hints>
   </connection>
@@ -559,8 +574,8 @@
    <slot>executeMacro(int)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>404</x>
-     <y>532</y>
+     <x>405</x>
+     <y>455</y>
     </hint>
     <hint type="destinationlabel">
      <x>404</x>
@@ -595,8 +610,8 @@
      <y>154</y>
     </hint>
     <hint type="destinationlabel">
-     <x>404</x>
-     <y>532</y>
+     <x>405</x>
+     <y>455</y>
     </hint>
    </hints>
   </connection>
@@ -607,8 +622,8 @@
    <slot>startRx()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>404</x>
-     <y>343</y>
+     <x>405</x>
+     <y>279</y>
     </hint>
     <hint type="destinationlabel">
      <x>404</x>
@@ -623,8 +638,8 @@
    <slot>startTx()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>404</x>
-     <y>343</y>
+     <x>405</x>
+     <y>279</y>
     </hint>
     <hint type="destinationlabel">
      <x>404</x>
@@ -632,6 +647,38 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>actionActivate_deactivate_Macro</sender>
+   <signal>triggered()</signal>
+   <receiver>LinPSK</receiver>
+   <slot>actdeactMacros()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>320</x>
+     <y>239</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>TxDisplay</sender>
+   <signal>abortTx()</signal>
+   <receiver>LinPSK</receiver>
+   <slot>stopTx()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>320</x>
+     <y>236</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>320</x>
+     <y>239</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
  <slots>
   <slot>fileOpen()</slot>
@@ -654,5 +701,7 @@
   <slot>recording(bool)</slot>
   <slot>startRx()</slot>
   <slot>startTx()</slot>
+  <slot>actdeactMacros()</slot>
+  <slot>stopTx()</slot>
  </slots>
 </ui>
diff --git a/gui/macrocontrol.cpp b/gui/macrocontrol.cpp
index e34fb59..6edb818 100644
--- a/gui/macrocontrol.cpp
+++ b/gui/macrocontrol.cpp
@@ -88,7 +88,7 @@ void MacroControl::displayMacros()
       for ( i = 0; i < anzahl;i++ ) // insert macro buttons
       {
          lT=mL->at(i).languageType;
-         if((macroLang == 0) || ( lT == macroLang)|| (lT == 0))
+         if(((macroLang == 0) && (lT >0)) || ( lT == macroLang)|| (lT == 0))
              displayBox->button(i)->show();
           else
            displayBox->button(i) ->hide();
diff --git a/gui/modemenu.cpp b/gui/modemenu.cpp
index 83ee5e0..4ed4d13 100644
--- a/gui/modemenu.cpp
+++ b/gui/modemenu.cpp
@@ -25,7 +25,7 @@
 
 extern Parameter settings;
 
-ModeMenu::ModeMenu(QWidget* parent, Qt::WFlags fl)
+ModeMenu::ModeMenu(QWidget* parent, Qt::WindowFlags fl)
 : QDialog( parent, fl ), Ui::ModeMenu()
 {
 	setupUi(this);
diff --git a/gui/modemenu.h b/gui/modemenu.h
index 3f17b22..47e0b9d 100644
--- a/gui/modemenu.h
+++ b/gui/modemenu.h
@@ -32,7 +32,7 @@ class ModeMenu : public QDialog, private Ui::ModeMenu
   Q_OBJECT
 
 public:
-  ModeMenu(QWidget* parent = 0, Qt::WFlags fl = 0 );
+  ModeMenu(QWidget* parent = 0, Qt::WindowFlags fl = 0 );
   ~ModeMenu();
   /*$PUBLIC_FUNCTIONS$*/
 void setParameter(ExtraParameter Param);
diff --git a/gui/qsodata.cpp b/gui/qsodata.cpp
index 3439caa..121f1c5 100644
--- a/gui/qsodata.cpp
+++ b/gui/qsodata.cpp
@@ -43,7 +43,6 @@ QSOData::QSOData ( QWidget* parent )
   validator = new QRegExpValidator ( rx, this );
   Loc->setValidator ( validator );
   Loc->setStyleSheet ( "QLineEdit{color: black ; }" );
-  Distance->setAlignment ( Qt::AlignRight );
   QsoDate->setDisplayFormat ( settings.dateFormat );
   refreshDateTime();
   if ( settings.QslData )
@@ -209,6 +208,8 @@ void QSOData::save()
   Locatorchanged();
   HisRSTchanged();
   MyRSTchanged();
+  if(settings.autoDate)
+    refreshDateTime();
   Datechanged();
   Timechanged();
   QString saveString, s;
@@ -253,7 +254,8 @@ void QSOData::save()
   }
   if ( QsoTime->text() != "" )
   {
-    s = QString ( "<TIME_ON:%1>%2\n" ).arg ( QsoTime->text().length() ).arg ( QsoTime->text().remove ( ':' ) );
+    QString timeValue= QsoTime->text().remove ( ':' );
+    s = QString ( "<TIME_ON:%1>%2\n" ).arg ( timeValue.length() ).arg ( timeValue );
     saveString.append ( s );
   }
 
@@ -316,15 +318,27 @@ void QSOData::save()
        saveString.append("R\n");
     else
        saveString.append("N\n");
+    saveString.append("<QSL_RCVD:1>");
+    if(bureau->isChecked())
+       saveString.append("R\n");
+    else
+       saveString.append("N\n");
     saveString.append("<EQSL_QSL_SENT:1>");
     if(eQsl->isChecked())
        saveString.append("R\n");
      else
        saveString.append("N\n");
+    saveString.append("<EQSL_QSL_RCVD:1>");
+    if(eQsl->isChecked())
+       saveString.append("R\n");
+    else
+    saveString.append("N\n");
     saveString.append ( "<eor>\n" );
     if ( !logBookCommunication->isRunning() )
       logBookCommunication->start();
+#ifndef QT_NO_DEBUG
     qDebug ( "Written to Logbook\n%s", qPrintable ( saveString ) );
+#endif
     logBookCommunication->saveQsoData ( saveString );
   }
 }
@@ -344,14 +358,14 @@ void QSOData::calculateDistance ( QString loc )
   mine = loc2coordinates ( settings.myLocator.constData() );
   his = loc2coordinates ( loc.constData() );
   dist = 6371. * acos ( sin ( mine.breite ) * sin ( his.breite ) + cos ( mine.breite ) * cos ( his.breite ) * cos ( mine.laenge - his.laenge ) );
-  Distance->setText ( s.arg ( ( int ) dist, 6 ) );
+  Distance->setText ( s.arg ( ( int ) dist, 5 ) );
 }
 QSOData::coordinates QSOData::loc2coordinates ( const QChar *l )
 {
   coordinates c;
-  c.laenge = ( 20. * ( l[0].toAscii() - 'A' ) + 2. * ( l[2].toAscii() - '0' ) + ( 1. / 12. ) * ( l[4].toAscii() - 'A' ) + 1. / 24. );
+  c.laenge = ( 20. * ( l[0].toLatin1() - 'A' ) + 2. * ( l[2].toLatin1() - '0' ) + ( 1. / 12. ) * ( l[4].toLatin1() - 'A' ) + 1. / 24. );
   c.laenge *= M_PI / 180.;
-  c.breite = 90. - ( 10. * ( l[1].toAscii() - 'A' ) + 1. * ( l[3].toAscii() - '0' ) + ( 1. / 24. ) * ( l[5].toAscii() - 'A' ) + 1. / 48. );
+  c.breite = 90. - ( 10. * ( l[1].toLatin1() - 'A' ) + 1. * ( l[3].toLatin1() - '0' ) + ( 1. / 24. ) * ( l[5].toLatin1() - 'A' ) + 1. / 48. );
   c.breite *= M_PI / 180.;
   return c;
 }
@@ -362,7 +376,7 @@ void QSOData::setQsoData(QsoData value,QString s)
   switch (value)
   {
     case CallSign :
-      RemoteCallsign->setText ( s );
+      RemoteCallsign->setText ( s.remove(QChar(' ')) );
       Callsignchanged();
       break;
     case QTH :
@@ -398,7 +412,8 @@ void QSOData::newChannel()
     Qth->setText ( settings.QslData->Qth );
     Loc->setText ( settings.QslData->Locator );
     Locatorchanged(); // Check Locator and set Color
-    QsoFrequency->setCurrentIndex ( settings.QslData->QsoFrequency );
+//    QsoFrequency->setCurrentIndex ( settings.QslData->QsoFrequency );
+    settings.QslData->QsoFrequency=QsoFrequency->currentIndex();
     HisRST->setText ( settings.QslData->HisRST );
     MyRST->setText ( settings.QslData->MyRST );
     QsoDate->setDate ( settings.QslData->QsoDate );
@@ -450,3 +465,20 @@ void QSOData::copyAnswer()
   settings.QslData->continent = continent->text();
   settings.QslData->worked = worked->text();
 }
+void QSOData::setAutoDate()
+{
+  if(settings.autoDate)
+    {
+      dateLabel->hide();
+      QsoDate->hide();
+      timeLabel->hide();
+      QsoTime->hide();
+    }
+  else
+    {
+      dateLabel->show();
+      QsoDate->show();
+      timeLabel->show();
+      QsoTime->show();
+    }
+}
diff --git a/gui/qsodata.h b/gui/qsodata.h
index 7bd1af9..3fd35f3 100644
--- a/gui/qsodata.h
+++ b/gui/qsodata.h
@@ -41,6 +41,7 @@ public:
   QSOData(QWidget* parent = 0);
   ~QSOData();
   void enableSaveData();
+  void setAutoDate();
 
 public slots:
   /*$PUBLIC_SLOTS$*/
diff --git a/gui/qsodata.ui b/gui/qsodata.ui
index 1ebb016..e648fb6 100644
--- a/gui/qsodata.ui
+++ b/gui/qsodata.ui
@@ -147,14 +147,23 @@
        </rect>
       </property>
       <layout class="QGridLayout" name="gridLayout_2">
-       <property name="margin">
+       <property name="leftMargin">
+        <number>1</number>
+       </property>
+       <property name="topMargin">
+        <number>0</number>
+       </property>
+       <property name="rightMargin">
+        <number>1</number>
+       </property>
+       <property name="bottomMargin">
         <number>0</number>
        </property>
        <property name="spacing">
         <number>1</number>
        </property>
        <item row="3" column="0">
-        <widget class="QLabel" name="label_5">
+        <widget class="QLabel" name="dateLabel">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
            <horstretch>0</horstretch>
@@ -370,6 +379,9 @@
          <property name="alignment">
           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
          </property>
+         <property name="indent">
+          <number>0</number>
+         </property>
          <property name="textInteractionFlags">
           <set>Qt::NoTextInteraction</set>
          </property>
@@ -1528,6 +1540,12 @@
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
+         <property name="minimumSize">
+          <size>
+           <width>60</width>
+           <height>0</height>
+          </size>
+         </property>
          <property name="maximumSize">
           <size>
            <width>16777215</width>
@@ -1612,7 +1630,7 @@
         </widget>
        </item>
        <item row="3" column="5">
-        <widget class="QLabel" name="label_12">
+        <widget class="QLabel" name="timeLabel">
          <property name="sizePolicy">
           <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
            <horstretch>0</horstretch>
@@ -2228,19 +2246,16 @@
   </layout>
  </widget>
  <tabstops>
+  <tabstop>scrollArea</tabstop>
   <tabstop>RemoteCallsign</tabstop>
   <tabstop>OpName</tabstop>
   <tabstop>Qth</tabstop>
-  <tabstop>MyRST</tabstop>
+  <tabstop>Loc</tabstop>
   <tabstop>HisRST</tabstop>
+  <tabstop>MyRST</tabstop>
   <tabstop>dokName</tabstop>
-  <tabstop>Clear</tabstop>
-  <tabstop>eQsl</tabstop>
-  <tabstop>bureau</tabstop>
-  <tabstop>Save</tabstop>
-  <tabstop>scrollArea</tabstop>
+  <tabstop>QsoFrequency</tabstop>
   <tabstop>QsoTime</tabstop>
-  <tabstop>Loc</tabstop>
   <tabstop>QsoDate</tabstop>
  </tabstops>
  <resources/>
diff --git a/gui/renamemacro.cpp b/gui/renamemacro.cpp
index 01d785f..bf243b2 100644
--- a/gui/renamemacro.cpp
+++ b/gui/renamemacro.cpp
@@ -23,7 +23,7 @@
 #include "readonlystringlistmodel.h"
 #include <QMessageBox>
 
-RenameMacro::RenameMacro(QVector<Macro> *macroList,QWidget* parent, Qt::WFlags fl)
+RenameMacro::RenameMacro(QVector<Macro> *macroList,QWidget* parent, Qt::WindowFlags fl)
   : QDialog( parent, fl ), ui(new Ui:: RenameMacro())
 {
   ui->setupUi(this);
diff --git a/gui/renamemacro.h b/gui/renamemacro.h
index 6e83bee..f7b6346 100644
--- a/gui/renamemacro.h
+++ b/gui/renamemacro.h
@@ -36,7 +36,7 @@ class RenameMacro : public QDialog
   Q_OBJECT
 
 public:
-  RenameMacro(QVector<Macro> *macroList,QWidget* parent = 0, Qt::WFlags fl = 0 );
+  RenameMacro(QVector<Macro> *macroList,QWidget* parent = 0, Qt::WindowFlags fl = 0 );
   ~RenameMacro();
   int getMacroNumber();
 
diff --git a/gui/spectrumdisplay.cpp b/gui/spectrumdisplay.cpp
index 3d148c2..7398be6 100644
--- a/gui/spectrumdisplay.cpp
+++ b/gui/spectrumdisplay.cpp
@@ -29,7 +29,6 @@ extern Parameter settings;
 SpectrumDisplay::SpectrumDisplay ( QWidget* parent ) : QFrame ( parent ), Ui::SpectrumDisplay()
 {
   setupUi(this);
-  languageChange();
   inputdata = 0;
   for(int i=0; i< fftsize;i++)
     smoothedfft[i]=0.;
@@ -46,10 +45,6 @@ SpectrumDisplay::~SpectrumDisplay()
 	// no need to delete child widgets, Qt does it all for us
 }
 
-/*
- *  Sets the strings of the subwidgets using the current
- *  language.
- */
 void SpectrumDisplay::resizeEvent ( QResizeEvent * )
 {
   if ( inputdata == 0 )
@@ -157,3 +152,16 @@ void SpectrumDisplay::restoreSplitterState(const QByteArray & spectrumState)
 {
   spectrumSplitter->restoreState(spectrumState);
 }
+void SpectrumDisplay::showSpectren(bool p)
+{
+  if(p)
+    {
+      spectrumWindow->show();
+      waterfallWindow->show();
+    }
+  else
+    {
+      spectrumWindow->hide();
+      waterfallWindow->hide();
+    }
+}
diff --git a/gui/spectrumdisplay.h b/gui/spectrumdisplay.h
index d1eba6e..1a589cb 100644
--- a/gui/spectrumdisplay.h
+++ b/gui/spectrumdisplay.h
@@ -42,6 +42,7 @@ public:
   void setColorList(QList<QColor> *c);
   QByteArray spectrumSplitterState() const;
   void restoreSplitterState(const QByteArray & spectrumState);
+  void showSpectren(bool p);
 
 public slots:
   void startPlot(double *,bool);
diff --git a/gui/txwindow.cpp b/gui/txwindow.cpp
index 324689a..92d8ff1 100644
--- a/gui/txwindow.cpp
+++ b/gui/txwindow.cpp
@@ -33,20 +33,19 @@ TxWindow::TxWindow(QWidget *parent) :
 {
   QFontMetrics fm ( font() );
   int pixelwidth=82*fm.width("A");
+  int height=fm.height();
   ui->setupUi(this);
   zeile=0;
   spalte=0;
-//  ui->txLines->setFixedWidth(40*fm.maxWidth());
   for ( int i = 0;i < TXWINDOWBUFFER;i++ )
   {
     scrollBuffer[i] = new QLineEdit ( ui->txLines );
     scrollBuffer[i]->setFrame ( false );
-    scrollBuffer[i]->setFocusProxy(ui->txLines);
-    scrollBuffer[i]->setMaximumHeight(18);
+    scrollBuffer[i]->setFocusProxy(this);
+    scrollBuffer[i]->setMaximumHeight(2*height);
     scrollBuffer[i]->setFixedWidth(pixelwidth);
     ui->linesLayout->addWidget(scrollBuffer[i]);
   }
-  setFocusPolicy(Qt::ClickFocus);
   ui->txArea->ensureWidgetVisible(scrollBuffer[zeile]);
 }
 
@@ -76,7 +75,7 @@ void TxWindow::insert ( unsigned char c )
 void TxWindow::insertString (QString string )
 {
   for(int i=0;i < string.length();i++)
-    insert(string.at(i).toAscii());
+    insert(string.at(i).toLatin1());
 }
 void TxWindow::setTxBuffer ( CTxBuffer *p )
 {
@@ -158,14 +157,14 @@ void TxWindow::keyPressEvent ( QKeyEvent *e )
       if ( ( e->modifiers() == Qt::ShiftModifier ) || CapsLock )
       {
         if ( !e->text().isEmpty() )
-          c = e->text().toUpper().at ( 0 ).toAscii();
+          c = e->text().toUpper().at ( 0 ).toLatin1();
         else
           c = 0;
       }
       else
       {
         if ( !e->text().isEmpty() )
-          c = e->text().toLower().at ( 0 ).toAscii();
+          c = e->text().toLower().at ( 0 ).toLatin1();
         else
           c = 0;
       }
@@ -192,3 +191,15 @@ void TxWindow::backspace()
     ui->txArea->ensureWidgetVisible(scrollBuffer[zeile]);
   }
 }
+void TxWindow::focusInEvent(QFocusEvent *e)
+{
+  setStyleSheet("TxWindow{border: 1px solid green;}");
+  QFrame::focusInEvent(e);
+}
+
+void TxWindow::focusOutEvent(QFocusEvent *e)
+{
+
+  setStyleSheet("TxWindow{border: 1px solid red;}");
+  QFrame::focusOutEvent(e);
+}
diff --git a/gui/txwindow.h b/gui/txwindow.h
index 288a1a5..749dde0 100644
--- a/gui/txwindow.h
+++ b/gui/txwindow.h
@@ -55,8 +55,10 @@ private:
 
   void keyPressEvent(QKeyEvent *); // Bearbeiten der Eingaben im TX Window
   protected:
-//  virtual void mousePressEvent( QMouseEvent * );
-private slots:
+  virtual void focusInEvent(QFocusEvent *e);
+  virtual void focusOutEvent(QFocusEvent *e);
+//  virtual void mousePressEvent(QMouseEvent *);
+public slots:
   void clearBuffers();
 };
 
diff --git a/images/linpsk_32x32.png b/images/linpsk_32x32.png
new file mode 100755
index 0000000..0a3cd53
Binary files /dev/null and b/images/linpsk_32x32.png differ
diff --git a/images/linpsk_48x48.png b/images/linpsk_48x48.png
new file mode 100755
index 0000000..83a7ce2
Binary files /dev/null and b/images/linpsk_48x48.png differ
diff --git a/images/linpsk_64x64.png b/images/linpsk_64x64.png
new file mode 100755
index 0000000..a6d8cec
Binary files /dev/null and b/images/linpsk_64x64.png differ
diff --git a/linpsk.pro b/linpsk.pro
index cb3dca8..5731129 100644
--- a/linpsk.pro
+++ b/linpsk.pro
@@ -1,30 +1,147 @@
-CONFIG(debug, debug|release) {
-    QMAKE_CXXFLAGS_DEBUG += -g3 \
-    -fpermissive \
-    -O0
-CONFIG +=  debug
-} else {
-    DEFINES += QT_NO_DEBUG
-    DEFINES += QT_NO_DEBUG_OUTPUT
-    QMAKE_CXXFLAGS_DEBUG +=-fpermissive \
-    -O2
-}
-
-CONFIG += warn_on \
+CONFIG += warn_on debug_and_release \
           qt \
-          thread  \
- ordered
-DESTDIR = .
+         thread
 
-SUBDIRS += gui \
-  src
+QT += network widgets
 
-QT += network
+TEMPLATE = app
+TARGET = linpsk
+target.path=/usr/local/bin
+desktop.path=/usr/share/applications
+desktop.files=data/linpsk.desktop
+images.path=/usr/share/pixmaps
+images.files=images/linpsk.png
 
+INSTALLS +=desktop
+INSTALLS +=images
+INSTALLS +=target
+INCLUDEPATH += . src gui
 
-TEMPLATE = subdirs
+LIBS += -lasound -lfftw3
 
-LIBS += gui/libgui.a
 
-POST_TARGETDEPS += gui/libgui.a \
-src/../bin/linpsk
+# Input
+HEADERS += gui/activatemacros.h \
+           gui/addmacro.h \
+           gui/addrxwindow.h \
+           gui/controlpanel.h \
+           gui/crxdisplay.h \
+           gui/ctxdisplay.h \
+           gui/deletemacro.h \
+           gui/editmacro.h \
+           gui/generalsettings.h \
+           gui/linpsk.h \
+           gui/macrocontrol.h \
+           gui/modemenu.h \
+           gui/qsodata.h \
+           gui/renamemacro.h \
+           gui/spectrumdisplay.h \
+           gui/txwindow.h \
+           src/bpskdemodulator.h \
+           src/bpskmodulator.h \
+           src/cdemodulator.h \
+           src/cledbutton.h \
+           src/cmodulator.h \
+           src/color.h \
+           src/constants.h \
+           src/cpskdemodulator.h \
+           src/crxchannel.h \
+           src/crxwindow.h \
+           src/csound.h \
+           src/csquelch.h \
+           src/ctxbuffer.h \
+           src/deinterleaver.h \
+           src/feccoder.h \
+           src/fircoeffs.h \
+           src/firfilter.h \
+           src/frequencyselect.h \
+           src/fskmodulator.h \
+           src/input.h \
+           src/interleaver.h \
+           src/mfskdemodulator.h \
+           src/mfskmodulator.h \
+           src/mfskvaricode.h \
+           src/parameter.h \
+           src/processlogdata.h \
+           src/pskmodulator.h \
+           src/psktable.h \
+           src/qpskdemodulator.h \
+           src/qpskmodulator.h \
+           src/readonlystringlistmodel.h \
+           src/rttydemodulator.h \
+           src/rttymodulator.h \
+           src/spectrumwindow.h \
+           src/tabwidget.h \
+           src/textinput.h \
+           src/viterbi.h \
+           src/waterfallwindow.h \
+           src/waveinput.h
+FORMS += gui/activatemacros.ui \
+         gui/addmacro.ui \
+         gui/addrxwindow.ui \
+         gui/controlpanel.ui \
+         gui/crxdisplay.ui \
+         gui/ctxdisplay.ui \
+         gui/deletemacro.ui \
+         gui/editmacro.ui \
+         gui/generalsettings.ui \
+         gui/linpsk.ui \
+         gui/macrocontrol.ui \
+         gui/modemenu.ui \
+         gui/qsodata.ui \
+         gui/renamemacro.ui \
+         gui/spectrumdisplay.ui \
+         gui/txwindow.ui
+SOURCES += gui/activatemacros.cpp \
+           gui/addmacro.cpp \
+           gui/addrxwindow.cpp \
+           gui/controlpanel.cpp \
+           gui/crxdisplay.cpp \
+           gui/ctxdisplay.cpp \
+           gui/deletemacro.cpp \
+           gui/editmacro.cpp \
+           gui/generalsettings.cpp \
+           gui/linpsk.cpp \
+           gui/macrocontrol.cpp \
+           gui/modemenu.cpp \
+           gui/qsodata.cpp \
+           gui/renamemacro.cpp \
+           gui/spectrumdisplay.cpp \
+           gui/txwindow.cpp \
+           src/bpskdemodulator.cpp \
+           src/bpskmodulator.cpp \
+           src/cdemodulator.cpp \
+           src/cledbutton.cpp \
+           src/cmodulator.cpp \
+           src/cpskdemodulator.cpp \
+           src/crxchannel.cpp \
+           src/crxwindow.cpp \
+           src/csound.cpp \
+           src/csquelch.cpp \
+           src/ctxbuffer.cpp \
+           src/deinterleaver.cpp \
+           src/feccoder.cpp \
+           src/firfilter.cpp \
+           src/frequencyselect.cpp \
+           src/fskmodulator.cpp \
+           src/input.cpp \
+           src/interleaver.cpp \
+           src/main.cpp \
+           src/mfskdemodulator.cpp \
+           src/mfskmodulator.cpp \
+           src/mfskvaricode.cpp \
+           src/parameter.cpp \
+           src/processlogdata.cpp \
+           src/pskmodulator.cpp \
+           src/qpskdemodulator.cpp \
+           src/qpskmodulator.cpp \
+           src/readonlystringlistmodel.cpp \
+           src/rttydemodulator.cpp \
+           src/rttymodulator.cpp \
+           src/spectrumwindow.cpp \
+           src/tabwidget.cpp \
+           src/textinput.cpp \
+           src/viterbi.cpp \
+           src/waterfallwindow.cpp \
+           src/waveinput.cpp
+RESOURCES += src/application.qrc
diff --git a/src/bpskdemodulator.cpp b/src/bpskdemodulator.cpp
index 82a67c7..c9a89dc 100644
--- a/src/bpskdemodulator.cpp
+++ b/src/bpskdemodulator.cpp
@@ -12,15 +12,15 @@
  *   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.                                   *
- *    based on the work of  Moe Wheatly, AE4JY                             *  
+ *    based on the work of  Moe Wheatly, AE4JY                             *
  ***************************************************************************/
 
 #include "bpskdemodulator.h"
 
 BPskDemodulator::BPskDemodulator():CPskDemodulator()
 {
-ave1=1.0;
-ave2=1.0;
+  ave1=1.0;
+  ave2=1.0;
 
 }
 BPskDemodulator::~BPskDemodulator(){
@@ -29,58 +29,58 @@ void BPskDemodulator::DecodeSymbol(double angle)
 
 {
 
-bool bit;
-
-char ch =0;
-	CalcQuality(angle);
-	bit = GetBPSKSymb();
-
-	if( (bit==0) && m_LastBitZero )	//if character delimiter
-	{
-		if(m_BitAcc != 0 )
-		{
-			m_BitAcc >>= 2;				//get rid of last zero and one
-			m_BitAcc &= 0x07FF;
-			ch = m_VaricodeDecTbl[m_BitAcc];
-			m_BitAcc = 0;
-     if( (ch!=0)  &&
-      ( !Squelch || (Squelch && (fastSquelch || ( ( unsigned int ) m_DevAve  > Threshold ))))) // Squelch Part
-      {
-       emit newSymbol(ch);
-       if (fastSquelch && (( unsigned int ) m_DevAve < Threshold) )
-       fastSquelch = false;
-      } 
-   }
-	}
-	else
-	{
-		m_BitAcc <<= 1;
-		m_BitAcc |= bit;
-		if(bit==0)
-			m_LastBitZero = true;
-		else
-			m_LastBitZero = false;
-	}
-
-	if (bit)
-		{
-		m_OffCount=0;
-		if (m_OnCount++ >20)
-      fastSquelch=true;
-
-		}
-	else
-		{
-		m_OnCount=0;
-		if (m_OffCount++ > 20)
-      fastSquelch=false;
-		}
+  bool bit;
+
+  char ch =0;
+  CalcQuality(angle);
+  bit = GetBPSKSymb();
+
+  if( (bit==0) && m_LastBitZero )	//if character delimiter
+    {
+      if(m_BitAcc != 0 )
+        {
+          m_BitAcc >>= 2;				//get rid of last zero and one
+          m_BitAcc &= 0x07FF;
+          ch = m_VaricodeDecTbl[m_BitAcc];
+          m_BitAcc = 0;
+          if( (ch!=0)  &&
+              ( !Squelch || (Squelch && (fastSquelch || ( ( unsigned int ) m_DevAve  > Threshold ))))) // Squelch Part
+            {
+              emit newSymbol(ch);
+              if (fastSquelch && (( unsigned int ) m_DevAve < Threshold) )
+                fastSquelch = false;
+            }
+        }
+    }
+  else
+    {
+      m_BitAcc <<= 1;
+      m_BitAcc |= bit;
+      if(bit==0)
+        m_LastBitZero = true;
+      else
+        m_LastBitZero = false;
+    }
+
+  if (bit)
+    {
+      m_OffCount=0;
+      if (m_OnCount++ >20)
+        fastSquelch=true;
+
+    }
+  else
+    {
+      m_OnCount=0;
+      if (m_OffCount++ > 20)
+        fastSquelch=false;
+    }
 
 
 }
 bool BPskDemodulator::GetBPSKSymb()
 {
-return (Phase_Vector.real()> 0.0);
+  return (Phase_Vector.real()> 0.0);
 }
 
 //////////////////////////////////////////////////////////////////////
@@ -95,24 +95,24 @@ return (Phase_Vector.real()> 0.0);
 void BPskDemodulator::CalcQuality(  double angle )
 {
 
-double temp;
+  double temp;
 
 
-if ( fabs(angle) < M_PI_2)
-  temp= angle;
-else
- {
- if ( angle > 0.0)          
-  temp=angle-M_PI;
- else
-  temp = M_PI+ angle;
- } 
+  if ( fabs(angle) < M_PI_2)
+    temp= angle;
+  else
+    {
+      if ( angle > 0.0)
+        temp=angle-M_PI;
+      else
+        temp = M_PI+ angle;
+    }
   m_QFreqError = -temp;
-  temp = fabs(temp); 
-		m_DevAve =0.5 * ave1 + 0.45 * ave2 + 0.05 *temp;	
-ave2=ave1;
-ave1=m_DevAve;
-// And now norm m_DevAve for use in Squelch
-m_DevAve = 100. -m_DevAve *63.67;
+  temp = fabs(temp);
+  m_DevAve =0.5 * ave1 + 0.45 * ave2 + 0.05 *temp;
+  ave2=ave1;
+  ave1=m_DevAve;
+  // And now norm m_DevAve for use in Squelch
+  m_DevAve = 100. -m_DevAve *63.67;
 
 }
diff --git a/src/cledbutton.cpp b/src/cledbutton.cpp
index de736c5..e8550f7 100644
--- a/src/cledbutton.cpp
+++ b/src/cledbutton.cpp
@@ -21,7 +21,7 @@
 CLedButton::CLedButton(QWidget *parent) : QPushButton(parent)
 {
 status=UNDEF;
-setText("RX");
+setText("&RX");
 setFlat(false);
 connect(this,SIGNAL ( clicked() ),this,SLOT(rxtx()));
 }
@@ -47,11 +47,15 @@ switch (status)
 		break;
 	case UNDEF:
 		paint.setPen(Qt::black);
-		paint.setBrush(Qt::yellow);		
+    paint.setBrush(Qt::gray);
 		paint.drawEllipse(4,4,14,14);
 		break;
+  case SW:
+    paint.setPen(Qt::black);
+    paint.setBrush(Qt::yellow);
+    paint.drawEllipse(4,4,14,14);
+    break;
 	}
-//paint.drawText(4,height()-5,text());
 }
 /** sets the buttonstatus */
 void CLedButton::setStatus(BUTTONSTATUS state)
@@ -61,10 +65,13 @@ switch(status)
   {
   case UNDEF:
   case ON:
-    setText("RX");
+    setText("&RX");
     break;
   case OFF:
-    setText("TX");
+    setText("&TX");
+    break;
+  case SW:
+    setText("&A");
     break;
   }
 repaint();
@@ -83,6 +90,9 @@ switch(status)
 //    setStatus(ON);
     emit startTx();
     break;
+  case SW:
+    emit abortTx();
+    break;
   }
 }
 BUTTONSTATUS CLedButton::getstatus()
diff --git a/src/cledbutton.h b/src/cledbutton.h
index 9395783..053f8fe 100644
--- a/src/cledbutton.h
+++ b/src/cledbutton.h
@@ -18,15 +18,11 @@
 #define CLEDBUTTON_H
 
 #include <qpushbutton.h>
+#include "constants.h"
 /**Constucts a pushbutton with a led in it
   *@author Volker Schroer
   */
-enum BUTTONSTATUS
-{
-UNDEF,				// undefined
-ON,						// TX
-OFF						// RX
-};
+
 class CLedButton : public QPushButton  {
    Q_OBJECT
 public: 
@@ -46,6 +42,7 @@ private slots: // Private slots
 signals:
 void startRx();
 void startTx();
+void abortTx();
 };
 
 #endif
diff --git a/src/constants.h b/src/constants.h
index 6b0cc3f..7397860 100644
--- a/src/constants.h
+++ b/src/constants.h
@@ -23,6 +23,14 @@
 #include <QDate>
 #include <QTime>
 
+enum BUTTONSTATUS // Status of RX/TX Button
+{
+UNDEF,				// undefined
+ON,						// TX
+OFF,					// RX
+SW            // Switching to RX
+};
+
 #define TXOFF_CODE -1			// control codes that can be placed in the input
 #define TXON_CODE -2			// queue for various control functions
 #define TXTOG_CODE -3
@@ -98,7 +106,7 @@ struct Macro {
   QString name;
   QString text;
   QString accelerator;
-  int languageType; // 0,1,2
+  int languageType; // 0,1,2 languageType-3 >> Macro is disabled
 };
 
 static const unsigned short int VARICODE_TABLE[] = {
diff --git a/src/crxchannel.cpp b/src/crxchannel.cpp
index f525e97..cef2586 100644
--- a/src/crxchannel.cpp
+++ b/src/crxchannel.cpp
@@ -75,6 +75,7 @@ CRxChannel::CRxChannel ( int ID, QWidget *parent, Mode DemodulatorType, unsigned
 
   QsoData.QsoDate= t.date() ;
   QsoData.QsoTime= t1.time();
+  QsoData.QsoFrequency=5;
 }
 CRxChannel::~CRxChannel()
 {
diff --git a/src/crxwindow.cpp b/src/crxwindow.cpp
index ee21956..9d18715 100644
--- a/src/crxwindow.cpp
+++ b/src/crxwindow.cpp
@@ -18,6 +18,8 @@
 #include <QLineEdit>
 #include <QFontMetrics>
 #include <QMenu>
+#include <QVBoxLayout>
+#include <QClipboard>
 
 #include "parameter.h"
 
@@ -33,16 +35,21 @@ CRxWindow::CRxWindow ( QWidget* parent )
   QFontMetrics fm ( font() );
   rowHeight = fm.height()+3;
   int pixelwidth=82*fm.width("A");
-  DisplayBox = new QWidget ( this );
+  DisplayBox = new QWidget ();
   DisplayBox-> setFocusPolicy( Qt::NoFocus);
-  DisplayBox->setFixedSize ( 642, RXWINDOWBUFFER*rowHeight );
+  DisplayBox->setGeometry( 0,0 ,pixelwidth, RXWINDOWBUFFER*rowHeight );
   DisplayBox->setContextMenuPolicy ( Qt::CustomContextMenu );
   connect ( DisplayBox, SIGNAL ( customContextMenuRequested ( QPoint ) ), this, SLOT ( contextMenu ( QPoint ) ) );
 
   setWidget ( DisplayBox );
+  linesLayout = new QVBoxLayout(DisplayBox);
+  linesLayout->setSpacing(0);
+  linesLayout->setContentsMargins(0, 0, 0, 0);
+  linesLayout->setObjectName(QString::fromUtf8("linesLayout"));
+  linesLayout->setSizeConstraint(QLayout::SetNoConstraint);
 
-//  setHorizontalScrollBarPolicy ( Qt::ScrollBarAsNeeded );
-  setHorizontalScrollBarPolicy ( Qt::ScrollBarAlwaysOff );
+
+  setHorizontalScrollBarPolicy ( Qt::ScrollBarAsNeeded );
   setVerticalScrollBarPolicy ( Qt::ScrollBarAlwaysOn );
 
   trigger = false;
@@ -53,20 +60,19 @@ CRxWindow::CRxWindow ( QWidget* parent )
   Row = 0;
   Column = 0;
   AutoScroll = true;
-  DisplayLineHeight = rowHeight - 1;
+
   for ( int i = 0;i < RXWINDOWBUFFER;i++ )
   {
 
     ScrollBuffer[i] = new QLineEdit ( DisplayBox );
     ScrollBuffer[i]->setFixedWidth(pixelwidth);
-    ScrollBuffer[i]->move ( 1, 1+ DisplayLineHeight*i );
-
+    ScrollBuffer[i]->setMaximumHeight(18);
     ScrollBuffer[i]->setFrame ( false );
     ScrollBuffer[i]->setReadOnly ( true );
-    ScrollBuffer[i]->setFixedHeight ( rowHeight );
+    linesLayout->addWidget(ScrollBuffer[i]);
     ScrollBuffer[i]->setContextMenuPolicy ( Qt::NoContextMenu );
-    ScrollBuffer[i]->show();
   }
+  DisplayLineHeight = ScrollBuffer[0]->height()-1;
   setBackgroundRole ( ScrollBuffer[0]->backgroundRole() );
   menu = new QMenu ( tr ( "Log value" ), DisplayBox );
   QAction *A = menu->addAction ( tr ( "Callsign" ) );
@@ -81,9 +87,10 @@ CRxWindow::CRxWindow ( QWidget* parent )
   connect ( A, SIGNAL ( triggered() ), this, SLOT ( copyRST() ) );
   A = menu->addAction ("Dok");
   connect ( A, SIGNAL ( triggered() ), this, SLOT ( copyDok() ) );
+  A = menu->addAction ("Clipboard");
+  connect ( A, SIGNAL ( triggered() ), this, SLOT ( copy() ) );
 
   selectedString.clear();
-
 }
 
 /*
@@ -142,7 +149,7 @@ void CRxWindow::updateRx ( char c )
           }
         }
       }
-      QString s = ScrollBuffer[Row]->text() + QString ( QChar ( c ) );
+      QString s = ScrollBuffer[Row]->text() + QString ( QLatin1Char ( c ) );
       ScrollBuffer[Row]->setText ( s );
       Column++;
 
@@ -196,13 +203,17 @@ void CRxWindow::setColor ( QColor color )
   for ( int i = 0;i < RXWINDOWBUFFER;i++ )
     ScrollBuffer[i]->setStyleSheet ( "QLineEdit{color: " + color.name() + "; }" );
 }
-
+/**
 void CRxWindow::fontChange ( const QFont & )
 {
   QFontMetrics fm ( font() );
+  int pixelwidth=82*fm.width("A");
   for ( int i = 0;i < RXWINDOWBUFFER;i++ )
-    ScrollBuffer[i]->setFixedHeight ( fm.height() );
+    ScrollBuffer[i]->setFixedWidth( pixelwidth );
+  DisplayLineHeight = ScrollBuffer[0]->height()-1;
+
 }
+**/
 void CRxWindow::activateTrigger ( QString s )
 {
   trigger = true;
@@ -249,24 +260,22 @@ bool CRxWindow::getRecordingState()
   return save;
 }
 
-void CRxWindow::resizeEvent ( QResizeEvent * )
-{
-  int width = this->width();
-  DisplayBox->setFixedWidth ( width );;
-  for ( int i = 0;i < RXWINDOWBUFFER;i++ )
-    ScrollBuffer[i]->setFixedWidth ( width );
-}
+
 void CRxWindow::contextMenu ( QPoint p )
 {
   int selectedLine, selectedColumn;
   char c = 0xF8;
   QPoint p1 = QCursor::pos();
-  selectedLine = p.y() / DisplayLineHeight;
+  selectedLine = (p.y()-3) / DisplayLineHeight;
   if(selectedLine >= RXWINDOWBUFFER)
     selectedLine=RXWINDOWBUFFER-1;
-  selectedColumn = ScrollBuffer[selectedLine]->cursorPositionAt ( QPoint ( p.x(), 2 ) );
-  ScrollBuffer[selectedLine]->setCursorPosition ( selectedColumn );
-  ScrollBuffer[selectedLine]->cursorWordForward ( true );
+  selectedColumn=0;
+  if(!ScrollBuffer[selectedLine]->hasSelectedText())
+    {
+      selectedColumn = ScrollBuffer[selectedLine]->cursorPositionAt ( QPoint ( p.x(), 2 ) );
+      ScrollBuffer[selectedLine]->setCursorPosition ( selectedColumn );
+      ScrollBuffer[selectedLine]->cursorWordForward ( true );
+    }
   selectedString = ScrollBuffer[selectedLine]->selectedText();
   if(!selectedString.endsWith(QChar(' ')))
   {
@@ -285,7 +294,19 @@ void CRxWindow::contextMenu ( QPoint p )
     ScrollBuffer[selectedLine]->cursorWordForward ( true );
     selectedString = ScrollBuffer[selectedLine]->selectedText();
   }
+  /**
+  qDebug("*****Cursor: x: %i y: %i",p.x(),p.y());
+  int start;
+  start=selectedLine-4;
+  if(start <0)
+    start=0;
+  for(int i=start;i <=selectedLine;i++)
+    {
+      qDebug("Zeile: %i, %s",i,qPrintable(ScrollBuffer[i]->text()));
+    }
+    **/
   menu->exec ( p1 );
+  ScrollBuffer[selectedLine]->deselect();
 }
 void CRxWindow::copyCallSign()
 {
@@ -311,3 +332,7 @@ void CRxWindow::copyDok()
 {
   emit setQsoData( DOK, selectedString );
 }
+void CRxWindow::copy()
+{
+  QApplication::clipboard()->setText(selectedString);
+}
diff --git a/src/crxwindow.h b/src/crxwindow.h
index a1dea74..6cf488d 100644
--- a/src/crxwindow.h
+++ b/src/crxwindow.h
@@ -22,64 +22,67 @@
 
 #include <QFile>
 #include <QTextStream>
+
 class QLineEdit;
 class QWidget;
 class QString;
 class QMenu;
+class QVBoxLayout;
+
 class CRxWindow : public QScrollArea
 {
-    Q_OBJECT
-
-  public:
-    CRxWindow ( QWidget* parent = 0 );
-    ~CRxWindow();
-    bool getTriggerStatus();
-    QString getTriggerText();
-    void stopRecording();
-    void startRecording ( QString );
-    bool getRecordingState();
-  public slots:
-    void updateRx ( char );
-    void clearRxWindow();
-    void setColor ( QColor );
-    void activateTrigger ( QString );
-    void deactivateTrigger();
-    void contextMenu ( QPoint );
+  Q_OBJECT
 
-  protected:
-    virtual void fontChange ( const QFont & );
-    virtual void resizeEvent ( QResizeEvent * e );
+public:
+  CRxWindow ( QWidget* parent = 0 );
+  ~CRxWindow();
+  bool getTriggerStatus();
+  QString getTriggerText();
+  void stopRecording();
+  void startRecording ( QString );
+  bool getRecordingState();
+public slots:
+  void updateRx ( char );
+  void clearRxWindow();
+  void setColor ( QColor );
+  void activateTrigger ( QString );
+  void deactivateTrigger();
+  void contextMenu ( QPoint );
 
-  protected slots:
-    void copyCallSign();
-    void copyQTH();
-    void copyName();
-    void copyLocator();
-    void copyRST();
-    void copyDok();
-  private:
+protected:
+//  virtual void fontChange ( const QFont & );
 
+protected slots:
+  void copyCallSign();
+  void copyQTH();
+  void copyName();
+  void copyLocator();
+  void copyRST();
+  void copyDok();
+  void copy();
+private:
 
-    QLineEdit* ScrollBuffer[RXWINDOWBUFFER];
+  QVBoxLayout *linesLayout;
+  QLineEdit* ScrollBuffer[RXWINDOWBUFFER];
 
-    int Row, Column, rowHeight;
-    void removeLines(int);
-    void NeueZeile();
-    QWidget* DisplayBox;
-    bool AutoScroll;
-    bool trigger;
-    QString TriggerText;
-    QString TexttoTrigger;
-    bool save;
-    QFile File;
-    QTextStream *stream;
+  int Row, Column, rowHeight;
+  void removeLines(int);
+  void NeueZeile();
+  QWidget* DisplayBox;
+  bool AutoScroll;
+  bool trigger;
+  QString TriggerText;
+  QString TexttoTrigger;
+  bool save;
+  QFile File;
+  QTextStream *stream;
 
-    QMenu *menu;
-    QString selectedString;
-    int DisplayLineHeight;
-  signals:
-    void Triggered();
-    void setQsoData(QsoData,QString);
+  QMenu *menu;
+  QString selectedString;
+  int DisplayLineHeight;
+signals:
+  void Triggered();
+  void setQsoData(QsoData,QString);
 };
 
 #endif // CRXWINDOW_H
diff --git a/src/csound.cpp b/src/csound.cpp
index f4996fc..d7ce3e9 100644
--- a/src/csound.cpp
+++ b/src/csound.cpp
@@ -21,6 +21,54 @@
 
 using namespace std;
 extern Parameter settings;
+#ifdef SOUND_DEBUG
+static snd_pcm_format_t format_types[] = {
+  // SND_PCM_FORMAT_UNKNOWN,
+  SND_PCM_FORMAT_S8,
+  SND_PCM_FORMAT_U8,
+  SND_PCM_FORMAT_S16_LE,
+  SND_PCM_FORMAT_S16_BE,
+  SND_PCM_FORMAT_U16_LE,
+  SND_PCM_FORMAT_U16_BE,
+  SND_PCM_FORMAT_S24_LE,
+  SND_PCM_FORMAT_S24_BE,
+  SND_PCM_FORMAT_U24_LE,
+  SND_PCM_FORMAT_U24_BE,
+  SND_PCM_FORMAT_S32_LE,
+  SND_PCM_FORMAT_S32_BE,
+  SND_PCM_FORMAT_U32_LE,
+  SND_PCM_FORMAT_U32_BE,
+  SND_PCM_FORMAT_FLOAT_LE,
+  SND_PCM_FORMAT_FLOAT_BE,
+  SND_PCM_FORMAT_FLOAT64_LE,
+  SND_PCM_FORMAT_FLOAT64_BE,
+  SND_PCM_FORMAT_IEC958_SUBFRAME_LE,
+  SND_PCM_FORMAT_IEC958_SUBFRAME_BE,
+  SND_PCM_FORMAT_MU_LAW,
+  SND_PCM_FORMAT_A_LAW,
+  SND_PCM_FORMAT_IMA_ADPCM,
+  SND_PCM_FORMAT_MPEG,
+  SND_PCM_FORMAT_GSM,
+  SND_PCM_FORMAT_SPECIAL,
+  SND_PCM_FORMAT_S24_3LE,
+  SND_PCM_FORMAT_S24_3BE,
+  SND_PCM_FORMAT_U24_3LE,
+  SND_PCM_FORMAT_U24_3BE,
+  SND_PCM_FORMAT_S20_3LE,
+  SND_PCM_FORMAT_S20_3BE,
+  SND_PCM_FORMAT_U20_3LE,
+  SND_PCM_FORMAT_U20_3BE,
+  SND_PCM_FORMAT_S18_3LE,
+  SND_PCM_FORMAT_S18_3BE,
+  SND_PCM_FORMAT_U18_3LE,
+  SND_PCM_FORMAT_U18_3BE
+};
+static unsigned int test_rates[] = {
+  8000, 11025, 16000, 22050, 32000, 44100, 48000, 96000, 192000
+};
+
+#define NELEMS(x) (sizeof(x)/sizeof(x[0]))
+#endif
 CSound::CSound ( int ptt = -1 ) : Input ( ptt )
 {
   started = false;
@@ -29,6 +77,7 @@ CSound::CSound ( int ptt = -1 ) : Input ( ptt )
   available = 0;
   readPointer = 0;
   free = 2 * BUF_SIZE;
+  handle=0;
 
 }
 CSound::~CSound()
@@ -76,7 +125,7 @@ bool CSound::open_Device_read ( QString *errorstring )
   }
   else
    device=settings.InputDeviceName;
-  err = snd_pcm_open ( &handle, device.toAscii(), SND_PCM_STREAM_CAPTURE, SND_PCM_ASYNC );
+  err = snd_pcm_open ( &handle, device.toLatin1(), SND_PCM_STREAM_CAPTURE, SND_PCM_ASYNC );
 
   if ( err < 0 )
   {
@@ -93,6 +142,9 @@ bool CSound::open_Device_read ( QString *errorstring )
     *errorstring = QString ( "Broken configuration : no configurations available: " ) + QString ( snd_strerror ( err ) );
     return false;
   }
+  #ifdef SOUND_DEBUG
+  dump_hw_params(handle,hwparams);
+  #endif
   /* Set the interleaved read/write format */
   err = snd_pcm_hw_params_set_access ( handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED );
   if ( err < 0 )
@@ -102,6 +154,7 @@ bool CSound::open_Device_read ( QString *errorstring )
   }
   /* Set the sample format */
   err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_FLOAT_LE );
+//  err = snd_pcm_hw_params_set_format ( handle, hwparams, SND_PCM_FORMAT_S32_LE );
   if ( err < 0 )
   {
     *errorstring = QString ( "Sample format Float not available : " ) + QString ( snd_strerror ( err ) );
@@ -139,6 +192,9 @@ bool CSound::open_Device_read ( QString *errorstring )
   if ( err < 0 )
   {
     *errorstring = QString ( "Unable to set hw params for input: " ) + QString ( snd_strerror ( err ) );
+    #ifdef SOUND_DEBUG
+    dump_hw_params(handle,hwparams);
+    #endif
     return false;
   }
   snd_pcm_hw_params_free ( hwparams );
@@ -201,7 +257,7 @@ bool CSound::open_Device_write ( QString *errorstring )
   }
   else
    device=settings.OutputDeviceName;
-  err = snd_pcm_open ( &handle, device.toAscii(), SND_PCM_STREAM_PLAYBACK, 0 );
+  err = snd_pcm_open ( &handle, device.toLatin1(), SND_PCM_STREAM_PLAYBACK, 0 );
   if ( err < 0 )
   {
       *errorstring = QString ( "Unable to open Device: " )+settings.OutputDeviceName+ QString(" ") + QString ( snd_strerror ( err ) );
@@ -268,7 +324,7 @@ bool CSound::open_Device_write ( QString *errorstring )
   err = snd_pcm_hw_params ( handle, hwparams );
   if ( err < 0 )
   {
-    *errorstring = QString ( "Unable to set hw params for input: " ) + QString ( snd_strerror ( err ) );
+    *errorstring = QString ( "Unable to set hw params for Output: " ) + QString ( snd_strerror ( err ) );
     return false;
   }
   snd_pcm_hw_params_free ( hwparams );
@@ -536,3 +592,24 @@ int CSound::getDeviceNumber(QString device)
   }
   return id;
 }
+#ifdef SOUND_DEBUG
+void CSound::dump_hw_params(snd_pcm_t *h,snd_pcm_hw_params_t* hw_p)
+{
+ unsigned int i;
+ qDebug("PCM name: %s\n", snd_pcm_name (h));
+ qDebug("Formats:\n");
+
+ for (i = 0; i < NELEMS (format_types); i++){
+   snd_pcm_format_t    ft = format_types[i];
+  if (snd_pcm_hw_params_test_format (h, hw_p, ft) == 0)
+       qDebug( "    %-20s YES", snd_pcm_format_name (ft));
+   }
+
+ qDebug("Sample Rates:\n");
+  for (i = 0; i < NELEMS (test_rates); i++){
+    unsigned int rate = test_rates[i];
+    qDebug( "    %6u  %s", rate,
+             snd_pcm_hw_params_test_rate (h, hw_p, rate, 0) == 0 ? "YES" : "NO");
+  }
+}
+#endif
diff --git a/src/csound.h b/src/csound.h
index cca3f37..3254181 100644
--- a/src/csound.h
+++ b/src/csound.h
@@ -55,6 +55,9 @@ class CSound : public Input
     void record();
     void play();
     int getDeviceNumber(QString device);
+#ifdef SOUND_DEBUG
+    void dump_hw_params(snd_pcm_t *h,snd_pcm_hw_params_t* hw_p);
+#endif
   protected:
     void run();
     int free, freePointer, available, readPointer,toBePlayed;
diff --git a/src/csquelch.cpp b/src/csquelch.cpp
index a7e8dc9..1e765a1 100644
--- a/src/csquelch.cpp
+++ b/src/csquelch.cpp
@@ -26,8 +26,6 @@
 #include <QStyleOptionSlider>
 #include <QStylePainter>
 #include <QStyle>
-#include <QCleanlooksStyle>
-
 
 #define Cyan  color[127]
 #define Yellow color[192]
@@ -35,8 +33,6 @@
 mySlider::mySlider ( QWidget *parent ) :
     QSlider ( Qt::Vertical, parent )
 {
-  setStyle(new QCleanlooksStyle); // Has each style handles the drawing different,
-                                  // I fix the slder style
   setTickInterval ( 10 );
   setTickPosition ( QSlider::NoTicks );
   setMinimum ( 0 );
diff --git a/src/ctxbuffer.cpp b/src/ctxbuffer.cpp
index e347608..5c7d28f 100644
--- a/src/ctxbuffer.cpp
+++ b/src/ctxbuffer.cpp
@@ -109,7 +109,7 @@ for (int i=0;i <length; i++)
   if ( filled < TXBUFFER_LENGTH )
     {
     filled++;
-    txbuffer[inpos++]=Text.at(i).toAscii();
+    txbuffer[inpos++]=(unsigned char) Text.at(i).toLatin1();
     inpos = inpos % TXBUFFER_LENGTH;
     }
    else
@@ -117,7 +117,7 @@ for (int i=0;i <length; i++)
     while(this->Filled()) // Wait until Buffer is not filled
       qApp->processEvents(QEventLoop::AllEvents,100);
     filled++;
-    txbuffer[inpos++]=Text.at(i).toAscii();
+    txbuffer[inpos++]=Text.at(i).toLatin1();
     inpos = inpos % TXBUFFER_LENGTH;
       
     }   
diff --git a/src/ctxdisplay.cpp b/src/ctxdisplay.cpp
deleted file mode 100644
index 1c6c195..0000000
--- a/src/ctxdisplay.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/***************************************************************************
-                          |FILENAME|  -  description
-                             -------------------
-    begin                : |DATE|
-    copyright            : (C) |YEAR| by |AUTHOR|
-    email                : |EMAIL|
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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.                                   *
- ***************************************************************************/
-
-#include "ctxdisplay.h"
-
-
-#include "cledbutton.h"
-#include "ctxwindow.h"
-#include "frequencyselect.h"
-/* 
- *  Constructs a CTxDisplay which is a child of 'parent', with the 
- *  name 'name'.' 
- */
-CTxDisplay::CTxDisplay( QWidget* parent )
-    : QFrame( parent)
-{
-    setMinimumSize( QSize( 540, 96 ) );
-    setBaseSize( QSize( 540, 96 ) );
-    setFrameShape( QFrame::Panel );
-    setFrameShadow( QFrame::Sunken );
-
-    TxWindow = new CTxWindow( this );
-
-    TxFreq = new FrequencySelect( this );
-    TxFreq->setFunctionText("Net");
-    TxFreq->setTitle("Tx Freq");
-    TxFreq->setAfcDisplayMode(Narrow);
-    TxFreq->setAfcMode(Narrow);
-//    TxFunctions = new CTxFunctions( "Rx / Tx", this );
-     TxFunctions =new CLedButton(this);
-    connect(TxFunctions,SIGNAL(startRx()),this,SIGNAL(startRx()));
-    connect(TxFunctions,SIGNAL(startTx()),this,SIGNAL(startTx()));
-
-    TxFunctions->setGeometry( QRect( 100, 20, 51, 71 ) );
-    languageChange();
-}
-
-/*
- *  Destroys the object and frees any allocated resources
- */
-CTxDisplay::~CTxDisplay()
-{
-    // no need to delete child widgets, Qt does it all for us
-}
-
-/*
- *  Sets the strings of the subwidgets using the current
- *  language.
- */
-void CTxDisplay::languageChange()
-{
-}
-
-void CTxDisplay::calculateSizeofComponents()
-{
-/** in percent of whole widget **/
-/** TX Function part **/
-#define TXFUNCTIONWIDTH 10
-/** TxFrequency (Width) **/
-#define TXFREQWIDTH 18
-#define TXFREQHEIGHT 70
-/** Left and Right Margin **/
-#define LEFTANDRIGHTMARGIN 1
-/** Top and Bottom Margin **/
-#define TOPANDBOTTOMMARGIN 2
-/** Inner distance **/
-#define distance 1
-
-int xpos,ypos,width,height,innerheight,innerwidth;
-width=this->width();
-height=this->height();
-xpos=width*LEFTANDRIGHTMARGIN/100;
-
-/** Frequency select Box **/
-
-innerheight=height*TXFREQHEIGHT/100;
-ypos=(height-innerheight)/2;
-innerwidth=width*TXFREQWIDTH/100;
-
-TxFreq->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-/** TX- Functions **/
-
-
-//ypos=height*TOPANDBOTTOMMARGIN/100;
-//innerheight=height-2*ypos;
-innerheight=height*TXFREQHEIGHT/100;
-xpos=xpos+innerwidth+width*distance/100;
-innerwidth=width*TXFUNCTIONWIDTH/100;
-
-TxFunctions->setGeometry(xpos,ypos,innerwidth,innerheight);
-/** TX- Window **/
-xpos=xpos+innerwidth+width*distance/100;
-innerwidth=width-xpos-width*LEFTANDRIGHTMARGIN/100;
-TxWindow->setGeometry(xpos,ypos,innerwidth,innerheight);
-
-}
-
-void CTxDisplay::resizeEvent( QResizeEvent * )
-{
-calculateSizeofComponents();
-
-}
-void CTxDisplay::abbruch()
-{
-TxFunctions->setStatus(UNDEF);
-}
diff --git a/src/ctxdisplay.h b/src/ctxdisplay.h
deleted file mode 100644
index af7f698..0000000
--- a/src/ctxdisplay.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************
-                          |FILENAME|  -  description
-                             -------------------
-    begin                : |DATE|
-    copyright            : (C) |YEAR| by |AUTHOR|
-    email                : |EMAIL|
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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.                                   *
- *   The PSK part is based on WinPSK 1.0 by Moe Wheatley, AE4JY            *
- ***************************************************************************/
-
-#ifndef CTXDISPLAY_H
-#define CTXDISPLAY_H
-
-
-#include <QFrame>
-//class QVBoxLayout;
-//class QHBoxLayout;
-//class QGridLayout;
-//class CTxFunctions;
-class CLedButton;
-class CTxWindow;
-class FrequencySelect;
-
-class CTxDisplay : public QFrame
-{
-    Q_OBJECT
-
-public:
-    CTxDisplay( QWidget* parent = 0);
-    ~CTxDisplay();
-
-    CTxWindow* TxWindow;
-    FrequencySelect* TxFreq;
- //   CTxFunctions* TxFunctions;
-CLedButton *TxFunctions;
-
-public slots:
-void abbruch();
-protected:
-    void resizeEvent( QResizeEvent * );
-
-
-protected slots:
-    virtual void languageChange();
-private:
-    void calculateSizeofComponents();
-signals:
-void startRx();
-void startTx();
-
-};
-
-#endif // CTXDISPLAY_H
diff --git a/src/mfskdemodulator.cpp b/src/mfskdemodulator.cpp
index edaab12..a5ca79f 100644
--- a/src/mfskdemodulator.cpp
+++ b/src/mfskdemodulator.cpp
@@ -23,7 +23,7 @@
 
 #define NumberofTones 16
 
-const double MFSKDistance ( double *xa, int b )
+double MFSKDistance ( double *xa, int b )
 {
 	double dist;
 	int a1, a2;
@@ -174,7 +174,7 @@ void MFSKDemodulator::bitEstimate()
 	double max ;
 	int j, k, freq, pos;
 	double softBits[4];;
-
+	freq=pos=0;
 // Now we do some sliding fft on the downsampled values
 	for ( int i = 0;i < DOWNSAMPLEDBUFFERLENGTH;i++ )
 	{
diff --git a/src/mfskmodulator.cpp b/src/mfskmodulator.cpp
index 7dfd493..ce70277 100644
--- a/src/mfskmodulator.cpp
+++ b/src/mfskmodulator.cpp
@@ -36,7 +36,7 @@ MFSKModulator::MFSKModulator ( int FS, double freq, CTxBuffer *TxBuffer ) : FSKM
 	Baudrate = 15.625;
 	SamplesperSymbol = ( int ) ( SampleRate / Baudrate + 0.5 );
 // Tonespacing has the same value like Baudrate so
-	for ( int i = 0; i < NumberofTones;i++ )
+	for ( unsigned int i = 0; i < NumberofTones;i++ )
 	{
 		ToneFrequencyr[i] = cos ( PI2 * ( freq + i * Baudrate ) / SampleRate );
 		ToneFrequencyi[i] = sin ( PI2 * ( freq + i * Baudrate ) / SampleRate );
diff --git a/src/parameter.cpp b/src/parameter.cpp
index 9040257..ba11c3c 100644
--- a/src/parameter.cpp
+++ b/src/parameter.cpp
@@ -24,10 +24,6 @@ Status = UNDEF;
 
 // Defaultsettings
 
-//MinimumWindowWidth=640;
-//MinimumWindowHeight=480;
-
-
 callsign="";
 QslData=0;
 
@@ -41,12 +37,15 @@ DemoMode=true;
 DemoModeFileType[0]="*.wav";
 DemoModeFileType[1]="*.out";
 DemoTypeNumber=0;
+
 slashed0=false;
+autoCrLf=true;
+autoDate=true;
+
 RxChannels=1;
 ActChannel = 0;   // Pointer to the active Channel
 ChannelChain = 0; // Pointer to the Start of the Rx - ChannelChain
 ApplicationFont =0;
-autoCrLf=true;
 dateFormat="dd.MM.yyyy";
 
 InputDeviceName="LinPSK_Record";
diff --git a/src/parameter.h b/src/parameter.h
index e824e24..63a0187 100644
--- a/src/parameter.h
+++ b/src/parameter.h
@@ -46,25 +46,25 @@ void setupDevices();
 // Variables
 
 
-QString callsign;                    // Callsign
+QString callsign;             // Callsign
 QString myLocator;
-QString inputFilename;              //Name of Demofile
-QString DemoModeFileType[2];        // File Type of DemoFile
-int DemoTypeNumber;                 // Index of selected FileType
-int serial;                         // Filedescriptor for serial Device for PTT
-QString SerialDevice;               //Filename for PTT Device
+QString inputFilename;        //Name of Demofile
+QString DemoModeFileType[2];  // File Type of DemoFile
+int DemoTypeNumber;           // Index of selected FileType
+int serial;                   // Filedescriptor for serial Device for PTT
+QString SerialDevice;         //Filename for PTT Device
 //Logging
-QString QSOFileName;                 // Name of the file,where qsodata will be stored
+QString QSOFileName;          // Name of the file,where qsodata will be stored
 QString Directory;
 bool fileLog;
 bool LinLog;
 QString Host;
 int Port;
-bool DemoMode;                      // DemoMode ?
+bool DemoMode;                // DemoMode ?
 
-QString LangName[3];		    //Contains the used language names for button labeling
+QString LangName[3];	      //Contains the used language names for button labeling
 
-int timeoffset;                     // offset to UTC
+int timeoffset;               // offset to UTC
 
 /** DeviceSection */
 QString InputDeviceName;
@@ -73,8 +73,10 @@ QString OutputDeviceName;
 int sampleRate;
 bool complexFormat;
 
-bool slashed0; 				// True if to print 0 slashed
-bool autoCrLf;              // True if sending cr lf on enter
+bool slashed0;		      // True if to print 0 slashed
+bool autoCrLf;		      // True if sending cr lf on enter
+bool autoDate;		      // True if date/time will be set automatically when qso data are saved
+			      // If false, fields are displayed in qso data and editable
 
 int  RxChannels;
 CRxChannel * ChannelChain;
diff --git a/src/pskmodulator.cpp b/src/pskmodulator.cpp
index b089bd3..d5c0ea0 100644
--- a/src/pskmodulator.cpp
+++ b/src/pskmodulator.cpp
@@ -473,8 +473,8 @@ int PSKModulator::CalcSignal(double *pData, int n)
   {
     m_t += m_PSKPhaseInc; // increment radian phase count
 
-    pData[i] = 0.45 * (m_pPSKtxI[m_Ramp] * sin(m_t) + m_pPSKtxQ[m_Ramp++] * cos(m_t));
-
+    pData[i] = 0.3 * (m_pPSKtxI[m_Ramp] * sin(m_t) + m_pPSKtxQ[m_Ramp] * cos(m_t));
+    m_Ramp++;
     m_PSKTime += m_PSKSecPerSamp;
     if (m_PSKTime >= m_PSKPeriodUpdate)//if time to update envelope ramp index
     {
@@ -572,8 +572,7 @@ char PSKModulator::GetNextCWSymbol(void) {
 /////////////////////////////////////////////////////////////
 
 int PSKModulator::GetChar() {
-  int ch;
-//  static int last = 0;
+  int ch=0;
   switch (status) {
     case TX_OFF_STATE: //is receiving
       ch = TXOFF_CODE; //else turn off
@@ -585,7 +584,6 @@ int PSKModulator::GetChar() {
       ch = TXTOG_CODE; // steady idle symbol
       break;
     case TX_POSTAMBLE_STATE: // ending sequence
-      ///			if( !(ch = m_Postamble[m_AmblePtr++] ))  //m_Postamble is 0 terminated
       ch = m_Postamble[m_AmblePtr++];
       if (ch == 0) //m_Postamble is 0 terminated
       {
@@ -612,6 +610,7 @@ int PSKModulator::GetChar() {
       else
       ch = settings.CWIdString.at(m_AmblePtr++).cell();
        **/
+      ch = TXOFF_CODE;
       break;
     case TX_SENDING_STATE: //if sending text from TX window
       ch = Buffer->getTxChar();
@@ -624,6 +623,7 @@ int PSKModulator::GetChar() {
       m_AmblePtr = 0;
       break;
     case TX_END_STATE:
+      ch=0;
       break;
   }
 //  last = ch;
diff --git a/src/qpskdemodulator.cpp b/src/qpskdemodulator.cpp
index fca9f0e..971371d 100644
--- a/src/qpskdemodulator.cpp
+++ b/src/qpskdemodulator.cpp
@@ -19,15 +19,11 @@
 #include "viterbi.h"
 
 // phase wraparound correction table for viterbi decoder
-//static const double AngleTbl1[4] = { M_PI_3_2, 0.0, M_PI/2.0, M_PI};
-//static const double AngleTbl2[4] = { M_PI_3_2, PI2, M_PI/2.0, M_PI};
-//static const double AngleTbl1[4] = {  M_PI_2, -M_PI, -M_PI_2,0.0};
-//static const double AngleTbl2[4] = {  M_PI_2, M_PI, M_PI_3_2,0.0};
 static const double AngleTbl1[4] = {  0.0, -M_PI_2, -M_PI,-M_PI_3_2};
 static const double AngleTbl2[4] = {  0.0, M_PI_3_2, M_PI,M_PI_2};
 
 
-static const double  qdistance(double *x,int i)
+static double  qdistance(double *x,int i)
 {
 
 const double *pAngle;
diff --git a/src/spectrumwindow.cpp b/src/spectrumwindow.cpp
index ab8b95a..6691c3b 100644
--- a/src/spectrumwindow.cpp
+++ b/src/spectrumwindow.cpp
@@ -125,6 +125,8 @@ void SpectrumWindow::plotSpectrum(bool overload,float *fftdata,int minfreq,int m
    }
     if ( overload )
             p.setPen ( Qt::red );
+    else
+      p.setPen ( Qt::black );
     for ( int i = 1;i < xmax;i++ )
     {
 
diff --git a/src/src.pro b/src/src.pro
deleted file mode 100644
index 70338ef..0000000
--- a/src/src.pro
+++ /dev/null
@@ -1,120 +0,0 @@
-CONFIG(debug, debug|release) {
-    QMAKE_CXXFLAGS_DEBUG += -g3 \
-    -fpermissive \
-    -O0
-CONFIG +=  debug
-} else {
-    DEFINES += QT_NO_DEBUG
-    DEFINES += QT_NO_DEBUG_OUTPUT
-    QMAKE_CXXFLAGS_DEBUG +=-fpermissive \
-    -O2
-}
-
-SOURCES += main.cpp \
- bpskdemodulator.cpp \
- bpskmodulator.cpp \
- cdemodulator.cpp \
- cledbutton.cpp \
- cmodulator.cpp \
- cpskdemodulator.cpp \
- crxchannel.cpp \
- crxwindow.cpp \
- csound.cpp \
- csquelch.cpp \
- ctxbuffer.cpp \
- deinterleaver.cpp \
- feccoder.cpp \
- firfilter.cpp \
- frequencyselect.cpp \
- fskmodulator.cpp \
- input.cpp \
- interleaver.cpp \
- mfskdemodulator.cpp \
- mfskmodulator.cpp \
- mfskvaricode.cpp \
- parameter.cpp \
- pskmodulator.cpp \
- qpskdemodulator.cpp \
- qpskmodulator.cpp \
- rttydemodulator.cpp \
- rttymodulator.cpp \
- textinput.cpp \
- viterbi.cpp \
- waveinput.cpp \
- readonlystringlistmodel.cpp \
- processlogdata.cpp \
-    tabwidget.cpp \
-    spectrumwindow.cpp \
-    waterfallwindow.cpp
-HEADERS += bpskdemodulator.h \
- bpskmodulator.h \
- cdemodulator.h \
- cledbutton.h \
- cmodulator.h \
- color.h \
- constants.h \
- cpskdemodulator.h \
- crxchannel.h \
- crxwindow.h \
- csound.h \
- csquelch.h \
- ctxbuffer.h \
- deinterleaver.h \
- feccoder.h \
- fircoeffs.h \
- firfilter.h \
- frequencyselect.h \
- input.h \
- interleaver.h \
- mfskdemodulator.h \
- mfskmodulator.h \
- mfskvaricode.h \
- parameter.h \
- pskmodulator.h \
- psktable.h \
- qpskdemodulator.h \
- qpskmodulator.h \
- rttydemodulator.h \
- rttymodulator.h \
- textinput.h \
- viterbi.h \
- waveinput.h \
- readonlystringlistmodel.h \
- fskmodulator.h \
- processlogdata.h \
-    tabwidget.h \
-    spectrumwindow.h \
-    waterfallwindow.h
-TEMPLATE = app
-CONFIG += warn_on \
-	  thread \
-          qt \
- debug
-TARGET = ../bin/linpsk
-RESOURCES = application.qrc
-DESTDIR = .
-
-QT += network
-
-INCLUDEPATH += ../gui
-
-LIBS += ../gui/libgui.a \
--L/usr/lib64 \
--L/usr/lib \
--lasound \
--lfftw3
-POST_TARGETDEPS += ../gui/libgui.a
-
-DISTFILES += ../README ../COPYING \
- ../ChangeLog \
- ../asoundrc \
- ../images/linpsk.png
-
-
-
-INSTALLS += target
-
-target.path = /usr/local/bin
-
-FORMS +=
-
diff --git a/src/textinput.cpp b/src/textinput.cpp
index 93dbf5f..4783be3 100644
--- a/src/textinput.cpp
+++ b/src/textinput.cpp
@@ -89,7 +89,7 @@ int TextInput::putSamples ( double *sample, int anzahl )
   {
 
     s.setNum ( sample[i], 'f', 6 );
-    write ( fd, s.toAscii(), s.length() );
+    write ( fd, s.toLatin1(), s.length() );
     c = '\n';
     write ( fd, &c, 1 );
   }
@@ -109,7 +109,7 @@ bool TextInput::open_Device_read ( QString *errorstring )
     *errorstring = QString ( QObject::tr ( "Error, no Demofile selected" ) );
     return false;
   }
-  fd = open ( settings.inputFilename.toAscii(), O_RDONLY );
+  fd = open ( settings.inputFilename.toLatin1(), O_RDONLY );
   if ( fd > 0 )
     return true;
   else
diff --git a/src/viterbi.cpp b/src/viterbi.cpp
index 90b89ac..222169b 100644
--- a/src/viterbi.cpp
+++ b/src/viterbi.cpp
@@ -1,7 +1,7 @@
 /***************************************************************************
                           viterbi.cpp  -  description
                              -------------------
-    begin                : Sam M�r 8 2003
+    begin                : Sam Maerz 8 2003
     copyright            : (C) 2003 by Volker Schroer
     email                : dl1ksv at gmx.de
  ***************************************************************************/
@@ -19,7 +19,7 @@
 #include <iostream>
 using namespace std;
 
-Viterbi::Viterbi(int K,unsigned int PolyA, unsigned int PolyB,const double (*d)(double *,int))
+Viterbi::Viterbi(int K, unsigned int PolyA, unsigned int PolyB,double (*d)(double *, int))
 {
 int i;
 dist = d;
diff --git a/src/viterbi.h b/src/viterbi.h
index 5de9cc5..b3e436a 100644
--- a/src/viterbi.h
+++ b/src/viterbi.h
@@ -1,7 +1,7 @@
 /***************************************************************************
                           viterbi.h  -  description
                              -------------------
-    begin                : Sam M�r 8 2003
+    begin                : Sam Maerz 8 2003
     copyright            : (C) 2003 by Volker Schroer
     email                : dl1ksv at gmx.de
  ***************************************************************************/
@@ -25,7 +25,8 @@
 
 class Viterbi {
 public: 
-	Viterbi(int,unsigned int,unsigned int,const double (*)(double *,int));
+//	Viterbi(int,unsigned int,unsigned int,const double (*)(double *,int));
+	Viterbi(int,unsigned int,unsigned int,double (*)(double *,int));
 	~Viterbi();
   int encode(int);
   void decode(double *);
@@ -42,7 +43,8 @@ long long int * bitestimate;
 int NumberofStates;
 int MinimumPath;
 unsigned int CoderState;
-const double (*dist)(double *,int);
+//const double (*dist)(double *,int);
+double (*dist)(double *,int);
 
 
 };
diff --git a/src/viterbisoft.cpp b/src/viterbisoft.cpp
deleted file mode 100644
index 8a9f6a7..0000000
--- a/src/viterbisoft.cpp
+++ /dev/null
@@ -1,953 +0,0 @@
-/***************************************************************************
-                          viterbi.cpp  -  description
-                             -------------------
-    begin                : Sam M�r 8 2003
-    copyright            : (C) 2003 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#include "viterbisoft.h"
-#include <iostream>
-using namespace std;
-
-
-ViterbiSoft::ViterbiSoft ( const double ( *d ) ( double *, int ) )
-{
-	int i;
-	dist = d;
-	NumberofStates = NumberOfRTTYSampleStates;
-
-
-	for ( i = 0; i < NumberofStates ; i++ )
-	{
-		Metric[i] = 10000.;
-		PathMem[i][0] = Stop16;
-//  bitestimate[i][0] = Stop3;
-//  bitestimate[i+NumberofStates][0]=Stop3;
-	}
-	Metric[Stop16] = 0.0;
-	pathPointer = 1;
-	/** Set State Table **/
-	StateTable[0][Start1] = Start2;
-	StateTable[1][Start1] = Start2; // ??
-	StateTable[0][Start2] = Start3;
-	StateTable[1][Start2]= Start3;
-	StateTable[0][Start3]= Start4;
-	StateTable[1][Start3]= Start4;
-	StateTable[0][Start4]= Start5;
-	StateTable[1][Start4]= Start5;
-	StateTable[0][Start5]= Start6;
-	StateTable[1][Start5]= Start6;
-	StateTable[0][Start6]= Start7;
-	StateTable[1][Start6]= Start7;
-	StateTable[0][Start7]= Start8;
-	StateTable[1][Start7]= Start8;
-	StateTable[0][Start8]= Start9;
-	StateTable[1][Start8]= Start9;
-	StateTable[0][Start9]= Start10;
-	StateTable[1][Start9]= Start10;
-	StateTable[0][Start10]= Start11;
-	StateTable[1][Start10]= Start11;
-	StateTable[0][Start11] = D1_0_1;
-	StateTable[1][Start11] = D1_1_1;
-	StateTable[0][Stop1] = Stop2; // ??
-	StateTable[1][Stop1] = Stop2;
-	StateTable[0][Stop2] = Stop3; // ??
-	StateTable[1][Stop2] = Stop3;
-	StateTable[0][Stop3] = Stop4;
-	StateTable[1][Stop3] = Stop4;
-	StateTable[0][Stop4] = Stop5;
-	StateTable[1][Stop4] = Stop5;
-	StateTable[0][Stop5] = Stop6;
-	StateTable[1][Stop5] = Stop6;
-	StateTable[0][Stop6] = Stop7;
-	StateTable[1][Stop6] = Stop7;
-	StateTable[0][Stop7] = Stop8;
-	StateTable[1][Stop7] = Stop8;
-	StateTable[0][Stop8] = Stop9;
-	StateTable[1][Stop8] = Stop9;
-	StateTable[0][Stop9] = Stop10;
-	StateTable[1][Stop9] = Stop10;
-	StateTable[0][Stop10] = Stop11;
-	StateTable[1][Stop10] = Stop11;
-	StateTable[0][Stop11] = Stop12;
-	StateTable[1][Stop11] = Stop12;
-	StateTable[0][Stop12] = Stop13;
-	StateTable[1][Stop12] = Stop13;
-	StateTable[0][Stop13] = Stop14;
-	StateTable[1][Stop13] = Stop14;
-	StateTable[0][Stop14] = Stop15;
-	StateTable[1][Stop14] = Stop15;
-	StateTable[0][Stop15] = Stop16;
-	StateTable[1][Stop15] = Stop16;
-	StateTable[0][Stop16] = Start1;
-	StateTable[1][Stop16] = Stop16;
-	StateTable[0][D1_0_1] = D1_0_2;
-	StateTable[1][D1_0_1] = D1_0_2; //??
-	StateTable[0][D1_0_2] = D1_0_3;
-	StateTable[1][D1_0_2] = D1_0_3;
-	StateTable[0][D1_0_3] = D1_0_4;
-	StateTable[1][D1_0_3] = D1_0_4;
-	StateTable[0][D1_0_4] = D1_0_5;
-	StateTable[1][D1_0_4] = D1_0_5;
-	StateTable[0][D1_0_5] = D1_0_6;
-	StateTable[1][D1_0_5] = D1_0_6;
-	StateTable[0][D1_0_6] = D1_0_7;
-	StateTable[1][D1_0_6] = D1_0_7;
-	StateTable[0][D1_0_7] = D1_0_8;
-	StateTable[1][D1_0_7] = D1_0_8;
-	StateTable[0][D1_0_8] = D1_0_9;
-	StateTable[1][D1_0_8] = D1_0_9;
-	StateTable[0][D1_0_9] = D1_0_10;
-	StateTable[1][D1_0_9] = D1_0_10;
-	StateTable[0][D1_0_10] = D1_0_11;
-	StateTable[1][D1_0_10] = D1_0_11;
-StateTable[0][D1_0_11] = D2_0_1;
-StateTable[1][D1_0_11] = D2_1_1;
-	StateTable[0][D1_1_1] = D1_1_2;
-	StateTable[1][D1_1_1] = D1_1_2;
-	StateTable[0][D1_1_2] = D1_1_3;
-	StateTable[1][D1_1_2] = D1_1_3;
-	StateTable[0][D1_1_3] = D1_1_4;
-	StateTable[1][D1_1_3] = D1_1_4;
-	StateTable[0][D1_1_4] = D1_1_5;
-	StateTable[1][D1_1_4] = D1_1_5;
-	StateTable[0][D1_1_5] = D1_1_6;
-	StateTable[1][D1_1_5] = D1_1_6;
-	StateTable[0][D1_1_6] = D1_1_7;
-	StateTable[1][D1_1_6] = D1_1_7;
-	StateTable[0][D1_1_7] = D1_1_8;
-	StateTable[1][D1_1_7] = D1_1_8;
-	StateTable[0][D1_1_8] = D1_1_9;
-	StateTable[1][D1_1_8] = D1_1_9;
-	StateTable[0][D1_1_9] = D1_1_10;
-	StateTable[1][D1_1_9] = D1_1_10;
-	StateTable[0][D1_1_10] = D1_1_11;
-	StateTable[1][D1_1_10] = D1_1_11;
-StateTable[0][D1_1_11] = D2_0_1;
-StateTable[1][D1_1_11] = D2_1_1;
-	StateTable[0][D2_0_1] = D2_0_2;
-	StateTable[1][D2_0_1] = D2_0_2;
-	StateTable[0][D2_0_2] = D2_0_3;
-	StateTable[1][D2_0_2] = D2_0_3;
-	StateTable[0][D2_0_3] = D2_0_4;
-	StateTable[1][D2_0_3] = D2_0_4;
-	StateTable[0][D2_0_4] = D2_0_5;
-	StateTable[1][D2_0_4] = D2_0_5;
-	StateTable[0][D2_0_5] = D2_0_6;
-	StateTable[1][D2_0_5] = D2_0_6;
-	StateTable[0][D2_0_6] = D2_0_7;
-	StateTable[1][D2_0_6] = D2_0_7;
-	StateTable[0][D2_0_7] = D2_0_8;
-	StateTable[1][D2_0_7] = D2_0_8;
-	StateTable[0][D2_0_8] = D2_0_9;
-	StateTable[1][D2_0_8] = D2_0_9;
-	StateTable[0][D2_0_9] = D2_0_10;
-	StateTable[1][D2_0_9] = D2_0_10;
-	StateTable[0][D2_0_10] = D2_0_11;
-	StateTable[1][D2_0_10] = D2_0_11;
-StateTable[0][D2_0_11] = D3_0_1;
-StateTable[1][D2_0_11] = D3_1_1;
-	StateTable[0][D2_1_1] = D2_1_2;
-	StateTable[1][D2_1_1] = D2_1_2;
-	StateTable[0][D2_1_2] = D2_1_3;
-	StateTable[1][D2_1_2] = D2_1_3;
-	StateTable[0][D2_1_3] = D2_1_4;
-	StateTable[1][D2_1_3] = D2_1_4;
-	StateTable[0][D2_1_4] = D2_1_5;
-	StateTable[1][D2_1_4] = D2_1_5;
-	StateTable[0][D2_1_5] = D2_1_6;
-	StateTable[1][D2_1_5] = D2_1_6;
-	StateTable[0][D2_1_6] = D2_1_7;
-	StateTable[1][D2_1_6] = D2_1_7;
-	StateTable[0][D2_1_7] = D2_1_8;
-	StateTable[1][D2_1_7] = D2_1_8;
-	StateTable[0][D2_1_8] = D2_1_9;
-	StateTable[1][D2_1_8] = D2_1_9;
-	StateTable[0][D2_1_9] = D2_1_10;
-	StateTable[1][D2_1_9] = D2_1_10;
-	StateTable[0][D2_1_10] = D2_1_11;
-	StateTable[1][D2_1_10] = D2_1_11;
-StateTable[0][D2_1_11] = D3_0_1;
-StateTable[1][D2_1_11] = D3_1_1;
-	StateTable[0][D3_0_1] = D3_0_2;
-	StateTable[1][D3_0_1] = D3_0_2; // ??
-	StateTable[0][D3_0_2] = D3_0_3;
-	StateTable[1][D3_0_2] = D3_0_3;
-	StateTable[0][D3_0_3] = D3_0_4;
-	StateTable[1][D3_0_3] = D3_0_4;
-	StateTable[0][D3_0_4] = D3_0_5;
-	StateTable[1][D3_0_4] = D3_0_5;
-	StateTable[0][D3_0_5] = D3_0_6;
-	StateTable[1][D3_0_5] = D3_0_6;
-	StateTable[0][D3_0_6] = D3_0_7;
-	StateTable[1][D3_0_6] = D3_0_7;
-	StateTable[0][D3_0_7] = D3_0_8;
-	StateTable[1][D3_0_7] = D3_0_8;
-	StateTable[0][D3_0_8] = D3_0_9;
-	StateTable[1][D3_0_8] = D3_0_9;
-	StateTable[0][D3_0_9] = D3_0_10;
-	StateTable[1][D3_0_9] = D3_0_10;
-	StateTable[0][D3_0_10] = D3_0_11;
-	StateTable[1][D3_0_10] = D3_0_11;
-StateTable[0][D3_0_11] = D4_0_1; // ??
-StateTable[1][D3_0_11] = D4_1_1;
-	StateTable[0][D3_1_1] = D3_1_2;
-	StateTable[1][D3_1_1] = D3_1_2;
-	StateTable[0][D3_1_2] = D3_1_3;
-	StateTable[1][D3_1_2] = D3_1_3;
-	StateTable[0][D3_1_3] = D3_1_4;
-	StateTable[1][D3_1_3] = D3_1_4;
-	StateTable[0][D3_1_4] = D3_1_5;
-	StateTable[1][D3_1_4] = D3_1_5;
-	StateTable[0][D3_1_5] = D3_1_6;
-	StateTable[1][D3_1_5] = D3_1_6;
-	StateTable[0][D3_1_6] = D3_1_7;
-	StateTable[1][D3_1_6] = D3_1_7;
-	StateTable[0][D3_1_7] = D3_1_8;
-	StateTable[1][D3_1_7] = D3_1_8;
-	StateTable[0][D3_1_8] = D3_1_9;
-	StateTable[1][D3_1_8] = D3_1_9;
-	StateTable[0][D3_1_9] = D3_1_10;
-	StateTable[1][D3_1_9] = D3_1_10;
-	StateTable[0][D3_1_10] = D3_1_11;
-	StateTable[1][D3_1_10] = D3_1_11;
-StateTable[0][D3_1_11] = D4_0_1;
-StateTable[1][D3_1_11] = D4_1_1;
-	StateTable[0][D4_0_1] = D4_0_2;
-	StateTable[1][D4_0_1] = D4_0_2; // ??
-	StateTable[0][D4_0_2] = D4_0_3;
-	StateTable[1][D4_0_2] = D4_0_3;
-	StateTable[0][D4_0_3] = D4_0_4;
-	StateTable[1][D4_0_3] = D4_0_4;
-	StateTable[0][D4_0_4] = D4_0_5;
-	StateTable[1][D4_0_4] = D4_0_5;
-	StateTable[0][D4_0_5] = D4_0_6;
-	StateTable[1][D4_0_5] = D4_0_6;
-	StateTable[0][D4_0_6] = D4_0_7;
-	StateTable[1][D4_0_6] = D4_0_7;
-	StateTable[0][D4_0_7] = D4_0_8;
-	StateTable[1][D4_0_7] = D4_0_8;
-	StateTable[0][D4_0_8] = D4_0_9;
-	StateTable[1][D4_0_8] = D4_0_9;
-	StateTable[0][D4_0_9] = D4_0_10;
-	StateTable[1][D4_0_9] = D4_0_10;
-	StateTable[0][D4_0_10] = D4_0_11;
-	StateTable[1][D4_0_10] = D4_0_11;
-StateTable[0][D4_0_11] = D5_0_1;
-StateTable[1][D4_0_11] = D5_1_1;
-	StateTable[0][D4_1_1] = D4_1_2; // ??
-	StateTable[1][D4_1_1] = D4_1_2;
-	StateTable[0][D4_1_2] = D4_1_3;
-	StateTable[1][D4_1_2] = D4_1_3;
-	StateTable[0][D4_1_3] = D4_1_4;
-	StateTable[1][D4_1_3] = D4_1_4;
-	StateTable[0][D4_1_4] = D4_1_5;
-	StateTable[1][D4_1_4] = D4_1_5;
-	StateTable[0][D4_1_5] = D4_1_6;
-	StateTable[1][D4_1_5] = D4_1_6;
-	StateTable[0][D4_1_6] = D4_1_7;
-	StateTable[1][D4_1_6] = D4_1_7;
-	StateTable[0][D4_1_7] = D4_1_8;
-	StateTable[1][D4_1_7] = D4_1_8;
-	StateTable[0][D4_1_8] = D4_1_9;
-	StateTable[1][D4_1_8] = D4_1_9;
-	StateTable[0][D4_1_9] = D4_1_10;
-	StateTable[1][D4_1_9] = D4_1_10;
-	StateTable[0][D4_1_10] = D4_1_11;
-	StateTable[1][D4_1_10] = D4_1_11;
-StateTable[0][D4_1_11] = D5_0_1;
-StateTable[1][D4_1_11] = D5_1_1;
-	StateTable[0][D5_0_1] = D5_0_2;
-	StateTable[1][D5_0_1] = D5_0_2; // ??
-	StateTable[0][D5_0_2] = D5_0_3;
-	StateTable[1][D5_0_2] = D5_0_3;
-	StateTable[0][D5_0_3] = D5_0_4;
-	StateTable[1][D5_0_3] = D5_0_4;
-	StateTable[0][D5_0_4] = D5_0_5;
-	StateTable[1][D5_0_4] = D5_0_5;
-	StateTable[0][D5_0_5] = D5_0_6;
-	StateTable[1][D5_0_5] = D5_0_6;
-	StateTable[0][D5_0_6] = D5_0_7;
-	StateTable[1][D5_0_6] = D5_0_7;
-	StateTable[0][D5_0_7] = D5_0_8;
-	StateTable[1][D5_0_7] = D5_0_8;
-	StateTable[0][D5_0_8] = D5_0_9;
-	StateTable[1][D5_0_8] = D5_0_9;
-	StateTable[0][D5_0_9] = D5_0_10;
-	StateTable[1][D5_0_9] = D5_0_10;
-	StateTable[0][D5_0_10] = D5_0_11;
-	StateTable[1][D5_0_10] = D5_0_11;
-StateTable[0][D5_0_11] = D6_0_1; // ??
-StateTable[1][D5_0_11] = D6_1_1;
-	StateTable[0][D5_1_1] = D5_1_2; // ??
-	StateTable[1][D5_1_1] = D5_1_2;
-	StateTable[0][D5_1_2] = D5_1_3;
-	StateTable[1][D5_1_2] = D5_1_3;
-	StateTable[0][D5_1_3] = D5_1_4;
-	StateTable[1][D5_1_3] = D5_1_4;
-	StateTable[0][D5_1_4] = D5_1_5;
-	StateTable[1][D5_1_4] = D5_1_5;
-	StateTable[0][D5_1_5] = D5_1_6;
-	StateTable[1][D5_1_5] = D5_1_6;
-	StateTable[0][D5_1_6] = D5_1_7;
-	StateTable[1][D5_1_6] = D5_1_7;
-	StateTable[0][D5_1_7] = D5_1_8;
-	StateTable[1][D5_1_7] = D5_1_8;
-	StateTable[0][D5_1_8] = D5_1_9;
-	StateTable[1][D5_1_8] = D5_1_9;
-	StateTable[0][D5_1_9] = D5_1_10;
-	StateTable[1][D5_1_9] = D5_1_10;
-	StateTable[0][D5_1_10] = D5_1_11;
-	StateTable[1][D5_1_10] = D5_1_11;
-StateTable[0][D5_1_11] = D6_0_1; // ??
-StateTable[1][D5_1_11] = D6_1_1;
-
-	StateTable[0][D6_0_1] = D6_0_2;
-	StateTable[1][D6_0_1] = D6_0_2; // ??
-	StateTable[0][D6_0_2] = D6_0_3;
-	StateTable[1][D6_0_2] = D6_0_3;
-	StateTable[0][D6_0_3] = D6_0_4;
-	StateTable[1][D6_0_3] = D6_0_4;
-	StateTable[0][D6_0_4] = D6_0_5;
-	StateTable[1][D6_0_4] = D6_0_5;
-	StateTable[0][D6_0_5] = D6_0_6;
-	StateTable[1][D6_0_5] = D6_0_6;
-	StateTable[0][D6_0_6] = D6_0_7;
-	StateTable[1][D6_0_6] = D6_0_7;
-	StateTable[0][D6_0_7] = D6_0_8;
-	StateTable[1][D6_0_7] = D6_0_8;
-	StateTable[0][D6_0_8] = D6_0_9;
-	StateTable[1][D6_0_8] = D6_0_9;
-	StateTable[0][D6_0_9] = D6_0_10;
-	StateTable[1][D6_0_9] = D6_0_10;
-	StateTable[0][D6_0_10] = D6_0_11;
-	StateTable[1][D6_0_10] = D6_0_11;
-StateTable[0][D6_0_11] = D7_0_1; // ??
-StateTable[1][D6_0_11] = D7_1_1;
-	StateTable[0][D6_1_1] = D6_1_2; // ??
-	StateTable[1][D6_1_1] = D6_1_2;
-	StateTable[0][D6_1_2] = D6_1_3;
-	StateTable[1][D6_1_2] = D6_1_3;
-	StateTable[0][D6_1_3] = D6_1_4;
-	StateTable[1][D6_1_3] = D6_1_4;
-	StateTable[0][D6_1_4] = D6_1_5;
-	StateTable[1][D6_1_4] = D6_1_5;
-	StateTable[0][D6_1_5] = D6_1_6;
-	StateTable[1][D6_1_5] = D6_1_6;
-	StateTable[0][D6_1_6] = D6_1_7;
-	StateTable[1][D6_1_6] = D6_1_7;
-	StateTable[0][D6_1_7] = D6_1_8;
-	StateTable[1][D6_1_7] = D6_1_8;
-	StateTable[0][D6_1_8] = D6_1_9;
-	StateTable[1][D6_1_8] = D6_1_9;
-	StateTable[0][D6_1_9] = D6_1_10;
-	StateTable[1][D6_1_9] = D6_1_10;
-	StateTable[0][D6_1_10] = D6_1_11;
-	StateTable[1][D6_1_10] = D6_1_11;
-StateTable[0][D6_1_11] = D7_0_1; // ??
-StateTable[1][D6_1_11] = D7_1_1;
-
-	StateTable[0][D7_0_1] = D7_0_2;
-	StateTable[1][D7_0_1] = D7_0_2; // ??
-	StateTable[0][D7_0_2] = D7_0_3;
-	StateTable[1][D7_0_2] = D7_0_3;
-	StateTable[0][D7_0_3] = D7_0_4;
-	StateTable[1][D7_0_3] = D7_0_4;
-	StateTable[0][D7_0_4] = D7_0_5;
-	StateTable[1][D7_0_4] = D7_0_5;
-	StateTable[0][D7_0_5] = D7_0_6;
-	StateTable[1][D7_0_5] = D7_0_6;
-	StateTable[0][D7_0_6] = D7_0_7;
-	StateTable[1][D7_0_6] = D7_0_7;
-	StateTable[0][D7_0_7] = D7_0_8;
-	StateTable[1][D7_0_7] = D7_0_8;
-	StateTable[0][D7_0_8] = D7_0_9;
-	StateTable[1][D7_0_8] = D7_0_9;
-	StateTable[0][D7_0_9] = D7_0_10;
-	StateTable[1][D7_0_9] = D7_0_10;
-	StateTable[0][D7_0_10] = D7_0_11;
-	StateTable[1][D7_0_10] = D7_0_11;
-StateTable[0][D7_0_11] = D8_0_1; // ??
-StateTable[1][D7_0_11] = D8_1_1;
-	StateTable[0][D7_1_1] = D7_1_2; // ??
-	StateTable[1][D7_1_1] = D7_1_2;
-	StateTable[0][D7_1_2] = D7_1_3;
-	StateTable[1][D7_1_2] = D7_1_3;
-	StateTable[0][D7_1_3] = D7_1_4;
-	StateTable[1][D7_1_3] = D7_1_4;
-	StateTable[0][D7_1_4] = D7_1_5;
-	StateTable[1][D7_1_4] = D7_1_5;
-	StateTable[0][D7_1_5] = D7_1_6;
-	StateTable[1][D7_1_5] = D7_1_6;
-	StateTable[0][D7_1_6] = D7_1_7;
-	StateTable[1][D7_1_6] = D7_1_7;
-	StateTable[0][D7_1_7] = D7_1_8;
-	StateTable[1][D7_1_7] = D7_1_8;
-	StateTable[0][D7_1_8] = D7_1_9;
-	StateTable[1][D7_1_8] = D7_1_9;
-	StateTable[0][D7_1_9] = D7_1_10;
-	StateTable[1][D7_1_9] = D7_1_10;
-	StateTable[0][D7_1_10] = D7_1_11;
-	StateTable[1][D7_1_10] = D7_1_11;
-StateTable[0][D7_1_11] = D8_0_1; // ??
-StateTable[1][D7_1_11] = D8_1_1;
-
-	StateTable[0][D8_0_1] = D8_0_2;
-	StateTable[1][D8_0_1] = D8_0_2; // ??
-	StateTable[0][D8_0_2] = D8_0_3;
-	StateTable[1][D8_0_2] = D8_0_3;
-	StateTable[0][D8_0_3] = D8_0_4;
-	StateTable[1][D8_0_3] = D8_0_4;
-	StateTable[0][D8_0_4] = D8_0_5;
-	StateTable[1][D8_0_4] = D8_0_5;
-	StateTable[0][D8_0_5] = D8_0_6;
-	StateTable[1][D8_0_5] = D8_0_6;
-	StateTable[0][D8_0_6] = D8_0_7;
-	StateTable[1][D8_0_6] = D8_0_7;
-	StateTable[0][D8_0_7] = D8_0_8;
-	StateTable[1][D8_0_7] = D8_0_8;
-	StateTable[0][D8_0_8] = D8_0_9;
-	StateTable[1][D8_0_8] = D8_0_9;
-	StateTable[0][D8_0_9] = D8_0_10;
-	StateTable[1][D8_0_9] = D8_0_10;
-	StateTable[0][D8_0_10] = D8_0_11;
-	StateTable[1][D8_0_10] = D8_0_11;
-StateTable[0][D8_0_11] = D9_0_1; // ??
-StateTable[1][D8_0_11] = D9_1_1;
-	StateTable[0][D8_1_1] = D8_1_2; // ??
-	StateTable[1][D8_1_1] = D8_1_2;
-	StateTable[0][D8_1_2] = D8_1_3;
-	StateTable[1][D8_1_2] = D8_1_3;
-	StateTable[0][D8_1_3] = D8_1_4;
-	StateTable[1][D8_1_3] = D8_1_4;
-	StateTable[0][D8_1_4] = D8_1_5;
-	StateTable[1][D8_1_4] = D8_1_5;
-	StateTable[0][D8_1_5] = D8_1_6;
-	StateTable[1][D8_1_5] = D8_1_6;
-	StateTable[0][D8_1_6] = D8_1_7;
-	StateTable[1][D8_1_6] = D8_1_7;
-	StateTable[0][D8_1_7] = D8_1_8;
-	StateTable[1][D8_1_7] = D8_1_8;
-	StateTable[0][D8_1_8] = D8_1_9;
-	StateTable[1][D8_1_8] = D8_1_9;
-	StateTable[0][D8_1_9] = D8_1_10;
-	StateTable[1][D8_1_9] = D8_1_10;
-	StateTable[0][D8_1_10] = D8_1_11;
-	StateTable[1][D8_1_10] = D8_1_11;
-StateTable[0][D8_1_11] = D9_0_1; // ??
-StateTable[1][D8_1_11] = D9_1_1;
-
-	StateTable[0][D9_0_1] = D9_0_2;
-	StateTable[1][D9_0_1] = D9_0_2; // ??
-	StateTable[0][D9_0_2] = D9_0_3;
-	StateTable[1][D9_0_2] = D9_0_3;
-	StateTable[0][D9_0_3] = D9_0_4;
-	StateTable[1][D9_0_3] = D9_0_4;
-	StateTable[0][D9_0_4] = D9_0_5;
-	StateTable[1][D9_0_4] = D9_0_5;
-	StateTable[0][D9_0_5] = D9_0_6;
-	StateTable[1][D9_0_5] = D9_0_6;
-	StateTable[0][D9_0_6] = D9_0_7;
-	StateTable[1][D9_0_6] = D9_0_7;
-	StateTable[0][D9_0_7] = D9_0_8;
-	StateTable[1][D9_0_7] = D9_0_8;
-	StateTable[0][D9_0_8] = D9_0_9;
-	StateTable[1][D9_0_8] = D9_0_9;
-	StateTable[0][D9_0_9] = D9_0_10;
-	StateTable[1][D9_0_9] = D9_0_10;
-	StateTable[0][D9_0_10] = D9_0_11;
-	StateTable[1][D9_0_10] = D9_0_11;
-StateTable[0][D9_0_11] = D10_0_1; // ??
-StateTable[1][D9_0_11] = D10_1_1;
-	StateTable[0][D9_1_1] = D9_1_2; // ??
-	StateTable[1][D9_1_1] = D9_1_2;
-	StateTable[0][D9_1_2] = D9_1_3;
-	StateTable[1][D9_1_2] = D9_1_3;
-	StateTable[0][D9_1_3] = D9_1_4;
-	StateTable[1][D9_1_3] = D9_1_4;
-	StateTable[0][D9_1_4] = D9_1_5;
-	StateTable[1][D9_1_4] = D9_1_5;
-	StateTable[0][D9_1_5] = D9_1_6;
-	StateTable[1][D9_1_5] = D9_1_6;
-	StateTable[0][D9_1_6] = D9_1_7;
-	StateTable[1][D9_1_6] = D9_1_7;
-	StateTable[0][D9_1_7] = D9_1_8;
-	StateTable[1][D9_1_7] = D9_1_8;
-	StateTable[0][D9_1_8] = D9_1_9;
-	StateTable[1][D9_1_8] = D9_1_9;
-	StateTable[0][D9_1_9] = D9_1_10;
-	StateTable[1][D9_1_9] = D9_1_10;
-	StateTable[0][D9_1_10] = D9_1_11;
-	StateTable[1][D9_1_10] = D9_1_11;
-StateTable[0][D9_1_11] = D10_0_1; // ??
-StateTable[1][D9_1_11] = D10_1_1;
-
-	StateTable[0][D10_0_1] = D10_0_2;
-	StateTable[1][D10_0_1] = D10_0_2; // ??
-	StateTable[0][D10_0_2] = D10_0_3;
-	StateTable[1][D10_0_2] = D10_0_3;
-	StateTable[0][D10_0_3] = D10_0_4;
-	StateTable[1][D10_0_3] = D10_0_4;
-	StateTable[0][D10_0_4] = D10_0_5;
-	StateTable[1][D10_0_4] = D10_0_5;
-	StateTable[0][D10_0_5] = D10_0_6;
-	StateTable[1][D10_0_5] = D10_0_6;
-	StateTable[0][D10_0_6] = D10_0_7;
-	StateTable[1][D10_0_6] = D10_0_7;
-	StateTable[0][D10_0_7] = D10_0_8;
-	StateTable[1][D10_0_7] = D10_0_8;
-	StateTable[0][D10_0_8] = D10_0_9;
-	StateTable[1][D10_0_8] = D10_0_9;
-	StateTable[0][D10_0_9] = D10_0_10;
-	StateTable[1][D10_0_9] = D10_0_10;
-	StateTable[0][D10_0_10] = D10_0_11;
-	StateTable[1][D10_0_10] = D10_0_11;
-StateTable[0][D10_0_11] = D11_0_1; // ??
-StateTable[1][D10_0_11] = D11_1_1;
-	StateTable[0][D10_1_1] = D10_1_2; // ??
-	StateTable[1][D10_1_1] = D10_1_2;
-	StateTable[0][D10_1_2] = D10_1_3;
-	StateTable[1][D10_1_2] = D10_1_3;
-	StateTable[0][D10_1_3] = D10_1_4;
-	StateTable[1][D10_1_3] = D10_1_4;
-	StateTable[0][D10_1_4] = D10_1_5;
-	StateTable[1][D10_1_4] = D10_1_5;
-	StateTable[0][D10_1_5] = D10_1_6;
-	StateTable[1][D10_1_5] = D10_1_6;
-	StateTable[0][D10_1_6] = D10_1_7;
-	StateTable[1][D10_1_6] = D10_1_7;
-	StateTable[0][D10_1_7] = D10_1_8;
-	StateTable[1][D10_1_7] = D10_1_8;
-	StateTable[0][D10_1_8] = D10_1_9;
-	StateTable[1][D10_1_8] = D10_1_9;
-	StateTable[0][D10_1_9] = D10_1_10;
-	StateTable[1][D10_1_9] = D10_1_10;
-	StateTable[0][D10_1_10] = D10_1_11;
-	StateTable[1][D10_1_10] = D10_1_11;
-StateTable[0][D10_1_11] = D11_0_1; // ??
-StateTable[1][D10_1_11] = D11_1_1;
-
-	StateTable[0][D11_0_1] = D11_0_2;
-	StateTable[1][D11_0_1] = D11_0_2; // ??
-	StateTable[0][D11_0_2] = D11_0_3;
-	StateTable[1][D11_0_2] = D11_0_3;
-	StateTable[0][D11_0_3] = D11_0_4;
-	StateTable[1][D11_0_3] = D11_0_4;
-	StateTable[0][D11_0_4] = D11_0_5;
-	StateTable[1][D11_0_4] = D11_0_5;
-	StateTable[0][D11_0_5] = D11_0_6;
-	StateTable[1][D11_0_5] = D11_0_6;
-	StateTable[0][D11_0_6] = D11_0_7;
-	StateTable[1][D11_0_6] = D11_0_7;
-	StateTable[0][D11_0_7] = D11_0_8;
-	StateTable[1][D11_0_7] = D11_0_8;
-	StateTable[0][D11_0_8] = D11_0_9;
-	StateTable[1][D11_0_8] = D11_0_9;
-	StateTable[0][D11_0_9] = D11_0_10;
-	StateTable[1][D11_0_9] = D11_0_10;
-	StateTable[0][D11_0_10] = D11_0_11;
-	StateTable[1][D11_0_10] = D11_0_11;
-StateTable[0][D11_0_11] = Stop1; // ??
-StateTable[1][D11_0_11] = Stop1;
-	StateTable[0][D11_1_1] = D11_1_2; // ??
-	StateTable[1][D11_1_1] = D11_1_2;
-	StateTable[0][D11_1_2] = D11_1_3;
-	StateTable[1][D11_1_2] = D11_1_3;
-	StateTable[0][D11_1_3] = D11_1_4;
-	StateTable[1][D11_1_3] = D11_1_4;
-	StateTable[0][D11_1_4] = D11_1_5;
-	StateTable[1][D11_1_4] = D11_1_5;
-	StateTable[0][D11_1_5] = D11_1_6;
-	StateTable[1][D11_1_5] = D11_1_6;
-	StateTable[0][D11_1_6] = D11_1_7;
-	StateTable[1][D11_1_6] = D11_1_7;
-	StateTable[0][D11_1_7] = D11_1_8;
-	StateTable[1][D11_1_7] = D11_1_8;
-	StateTable[0][D11_1_8] = D11_1_9;
-	StateTable[1][D11_1_8] = D11_1_9;
-	StateTable[0][D11_1_9] = D11_1_10;
-	StateTable[1][D11_1_9] = D11_1_10;
-	StateTable[0][D11_1_10] = D11_1_11;
-	StateTable[1][D11_1_10] = D11_1_11;
-StateTable[0][D11_1_11] = Stop1; // ??
-StateTable[1][D11_1_11] = Stop1;
-
-	BitCount = 0;
-//	StopBitCount = SAMPLESPERSTOPBIT;
-
-	BitTable[Start1] = 0;
-	BitTable[Start2] = 0;
-	BitTable[Start3]=0;
-	BitTable[Start4]=0;
-	BitTable[Start5]=0;
-	BitTable[Start6]=0;
-	BitTable[Start7]=0;
-	BitTable[Start8]=0;
-	BitTable[Start9]=0;
-	BitTable[Start10]=0;
-	BitTable[Start11]=0;
-
-	BitTable[ Stop1] = 1;
-	BitTable[Stop2] = 1;
-	BitTable[Stop3] = 1;
-	BitTable[Stop4] = 1;
-	BitTable[Stop5] = 1;
-	BitTable[Stop6] = 1;
-	BitTable[Stop7] = 1;
-	BitTable[Stop8] = 1;
-	BitTable[Stop9] = 1;
-	BitTable[Stop10] = 1;
-	BitTable[Stop11] = 1;
-	BitTable[Stop12] = 1;
-	BitTable[Stop13] = 1;
-	BitTable[Stop14] = 1;
-	BitTable[Stop15] = 1;
-	BitTable[Stop16] = 1;
-
-	BitTable[ D1_0_1] = 0;
-	BitTable[D1_0_2] = 0;
-	BitTable[D1_0_3] = 0;
-	BitTable[D1_0_4] = 0;
-	BitTable[D1_0_5] = 0;
-	BitTable[D1_0_6] = 0;
-	BitTable[D1_0_7] = 0;
-	BitTable[D1_0_8] = 0;
-	BitTable[D1_0_9] = 0;
-	BitTable[D1_0_10] = 0;
-	BitTable[D1_0_11] = 0;
-
-	BitTable[ D1_1_1] = 1;
-	BitTable[D1_1_2] = 1;
-	BitTable[ D1_1_3] = 1;
-	BitTable[ D1_1_4] = 1;
-	BitTable[ D1_1_5] = 1;
-	BitTable[ D1_1_6] = 1;
-	BitTable[ D1_1_7] = 1;
-	BitTable[ D1_1_8] = 1;
-	BitTable[ D1_1_9] = 1;
-	BitTable[ D1_1_10] = 1;
-	BitTable[ D1_1_11] = 1;
-
-	BitTable[ D2_0_1] = 0;
-	BitTable[D2_0_2] = 0;
-	BitTable[D2_0_3] = 0;
-	BitTable[D2_0_4] = 0;
-	BitTable[D2_0_5] = 0;
-	BitTable[D2_0_6] = 0;
-	BitTable[D2_0_7] = 0;
-	BitTable[D2_0_8] = 0;
-	BitTable[D2_0_9] = 0;
-	BitTable[D2_0_10] = 0;
-	BitTable[D2_0_11] = 0;
-
-	BitTable[ D2_1_1] = 1;
-	BitTable[D2_1_2] = 1;
-	BitTable[D2_1_3] = 1;
-	BitTable[D2_1_4] = 1;
-	BitTable[D2_1_5] = 1;
-	BitTable[D2_1_6] = 1;
-	BitTable[D2_1_7] = 1;
-	BitTable[D2_1_8] = 1;
-	BitTable[D2_1_9] = 1;
-	BitTable[D2_1_10] = 1;
-	BitTable[D2_1_11] = 1;
-
-	BitTable[ D3_0_1] = 0;
-	BitTable[D3_0_2] = 0;
-	BitTable[D3_0_3] = 0;
-	BitTable[D3_0_4] = 0;
-	BitTable[D3_0_5] = 0;
-	BitTable[D3_0_6] = 0;
-	BitTable[D3_0_7] = 0;
-	BitTable[D3_0_8] = 0;
-	BitTable[D3_0_9] = 0;
-	BitTable[D3_0_10] = 0;
-	BitTable[D3_0_11] = 0;
-
-	BitTable[ D3_1_1] = 1;
-	BitTable[D3_1_2] = 1;
-	BitTable[D3_1_3] = 1;
-	BitTable[D3_1_4] = 1;
-	BitTable[D3_1_5] = 1;
-	BitTable[D3_1_6] = 1;
-	BitTable[D3_1_7] = 1;
-	BitTable[D3_1_8] = 1;
-	BitTable[D3_1_9] = 1;
-	BitTable[D3_1_10] = 1;
-	BitTable[D3_1_11] = 1;
-
-	BitTable[D4_0_1] = 0;
-	BitTable[D4_0_2] = 0;
-	BitTable[D4_0_3] = 0;
-	BitTable[D4_0_4] = 0;
-	BitTable[D4_0_5] = 0;
-	BitTable[D4_0_6] = 0;
-	BitTable[D4_0_7] = 0;
-	BitTable[D4_0_8] = 0;
-	BitTable[D4_0_9] = 0;
-	BitTable[D4_0_10] = 0;
-	BitTable[D4_0_11] = 0;
-
-	BitTable[ D4_1_1] = 1;
-	BitTable[D4_1_2] = 1;
-	BitTable[D4_1_3] = 1;
-	BitTable[D4_1_4] = 1;
-	BitTable[D4_1_5] = 1;
-	BitTable[D4_1_6] = 1;
-	BitTable[D4_1_7] = 1;
-	BitTable[D4_1_8] = 1;
-	BitTable[D4_1_9] = 1;
-	BitTable[D4_1_10] = 1;
-	BitTable[D4_1_11] = 1;
-
-	BitTable[ D5_0_1] = 0;
-	BitTable[D5_0_2] = 0;
-	BitTable[D5_0_3] = 0;
-	BitTable[D5_0_4] = 0;
-	BitTable[D5_0_5] = 0;
-	BitTable[D5_0_6] = 0;
-	BitTable[D5_0_7] = 0;
-	BitTable[D5_0_8] = 0;
-	BitTable[D5_0_9] = 0;
-	BitTable[D5_0_10] = 0;
-	BitTable[D5_0_11] = 0;
-
-	BitTable[ D5_1_1] = 1;
-	BitTable[D5_1_2] = 1;
-	BitTable[D5_1_3] = 1;
-	BitTable[D5_1_4] = 1;
-	BitTable[D5_1_5] = 1;
-	BitTable[D5_1_6] = 1;
-	BitTable[D5_1_7] = 1;
-	BitTable[D5_1_8] = 1;
-	BitTable[D5_1_9] = 1;
-	BitTable[D5_1_10] = 1;
-	BitTable[D5_1_11] = 1;
-
-	BitTable[ D6_0_1] = 0;
-	BitTable[D6_0_2] = 0;
-	BitTable[D6_0_3] = 0;
-	BitTable[D6_0_4] = 0;
-	BitTable[D6_0_5] = 0;
-	BitTable[D6_0_6] = 0;
-	BitTable[D6_0_7] = 0;
-	BitTable[D6_0_8] = 0;
-	BitTable[D6_0_9] = 0;
-	BitTable[D6_0_10] = 0;
-	BitTable[D6_0_11] = 0;
-
-	BitTable[ D6_1_1] = 1;
-	BitTable[D6_1_2] = 1;
-	BitTable[D6_1_3] = 1;
-	BitTable[D6_1_4] = 1;
-	BitTable[D6_1_5] = 1;
-	BitTable[D6_1_6] = 1;
-	BitTable[D6_1_7] = 1;
-	BitTable[D6_1_8] = 1;
-	BitTable[D6_1_9] = 1;
-	BitTable[D6_1_10] = 1;
-	BitTable[D6_1_11] = 1;
-
-
-	BitTable[ D7_0_1] = 0;
-	BitTable[D7_0_2] = 0;
-	BitTable[D7_0_3] = 0;
-	BitTable[D7_0_4] = 0;
-	BitTable[D7_0_5] = 0;
-	BitTable[D7_0_6] = 0;
-	BitTable[D7_0_7] = 0;
-	BitTable[D7_0_8] = 0;
-	BitTable[D7_0_9] = 0;
-	BitTable[D7_0_10] = 0;
-	BitTable[D7_0_11] = 0;
-
-	BitTable[ D7_1_1] = 1;
-	BitTable[D7_1_2] = 1;
-	BitTable[D7_1_3] = 1;
-	BitTable[D7_1_4] = 1;
-	BitTable[D7_1_5] = 1;
-	BitTable[D7_1_6] = 1;
-	BitTable[D7_1_7] = 1;
-	BitTable[D7_1_8] = 1;
-	BitTable[D7_1_9] = 1;
-	BitTable[D7_1_10] = 1;
-	BitTable[D7_1_11] = 1;
-
-	BitTable[ D8_0_1] = 0;
-	BitTable[D8_0_2] = 0;
-	BitTable[D8_0_3] = 0;
-	BitTable[D8_0_4] = 0;
-	BitTable[D8_0_5] = 0;
-	BitTable[D8_0_6] = 0;
-	BitTable[D8_0_7] = 0;
-	BitTable[D8_0_8] = 0;
-	BitTable[D8_0_9] = 0;
-	BitTable[D8_0_10] = 0;
-	BitTable[D8_0_11] = 0;
-
-	BitTable[ D8_1_1] = 1;
-	BitTable[D8_1_2] = 1;
-	BitTable[D8_1_3] = 1;
-	BitTable[D8_1_4] = 1;
-	BitTable[D8_1_5] = 1;
-	BitTable[D8_1_6] = 1;
-	BitTable[D8_1_7] = 1;
-	BitTable[D8_1_8] = 1;
-	BitTable[D8_1_9] = 1;
-	BitTable[D8_1_10] = 1;
-	BitTable[D8_1_11] = 1;
-
-	BitTable[ D9_0_1] = 0;
-	BitTable[D9_0_2] = 0;
-	BitTable[D9_0_3] = 0;
-	BitTable[D9_0_4] = 0;
-	BitTable[D9_0_5] = 0;
-	BitTable[D9_0_6] = 0;
-	BitTable[D9_0_7] = 0;
-	BitTable[D9_0_8] = 0;
-	BitTable[D9_0_9] = 0;
-	BitTable[D9_0_10] = 0;
-	BitTable[D9_0_11] = 0;
-
-	BitTable[ D9_1_1] = 1;
-	BitTable[D9_1_2] = 1;
-	BitTable[D9_1_3] = 1;
-	BitTable[D9_1_4] = 1;
-	BitTable[D9_1_5] = 1;
-	BitTable[D9_1_6] = 1;
-	BitTable[D9_1_7] = 1;
-	BitTable[D9_1_8] = 1;
-	BitTable[D9_1_9] = 1;
-	BitTable[D9_1_10] = 1;
-	BitTable[D9_1_11] = 1;
-
-	BitTable[ D10_0_1] = 0;
-	BitTable[D10_0_2] = 0;
-	BitTable[D10_0_3] = 0;
-	BitTable[D10_0_4] = 0;
-	BitTable[D10_0_5] = 0;
-	BitTable[D10_0_6] = 0;
-	BitTable[D10_0_7] = 0;
-	BitTable[D10_0_8] = 0;
-	BitTable[D10_0_9] = 0;
-	BitTable[D10_0_10] = 0;
-	BitTable[D10_0_11] = 0;
-
-	BitTable[ D10_1_1] = 1;
-	BitTable[D10_1_2] = 1;
-	BitTable[D10_1_3] = 1;
-	BitTable[D10_1_4] = 1;
-	BitTable[D10_1_5] = 1;
-	BitTable[D10_1_6] = 1;
-	BitTable[D10_1_7] = 1;
-	BitTable[D10_1_8] = 1;
-	BitTable[D10_1_9] = 1;
-	BitTable[D10_1_10] = 1;
-	BitTable[D10_1_11] = 1;
-
-	BitTable[ D11_0_1] = 0;
-	BitTable[D11_0_2] = 0;
-	BitTable[D11_0_3] = 0;
-	BitTable[D11_0_4] = 0;
-	BitTable[D11_0_5] = 0;
-	BitTable[D11_0_6] = 0;
-	BitTable[D11_0_7] = 0;
-	BitTable[D11_0_8] = 0;
-	BitTable[D11_0_9] = 0;
-	BitTable[D11_0_10] = 0;
-	BitTable[D11_0_11] = 0;
-
-	BitTable[ D11_1_1] = 1;
-	BitTable[D11_1_2] = 1;
-	BitTable[D11_1_3] = 1;
-	BitTable[D11_1_4] = 1;
-	BitTable[D11_1_5] = 1;
-	BitTable[D11_1_6] = 1;
-	BitTable[D11_1_7] = 1;
-	BitTable[D11_1_8] = 1;
-	BitTable[D11_1_9] = 1;
-	BitTable[D11_1_10] = 1;
-	BitTable[D11_1_11] = 1;
-}
-ViterbiSoft::~ViterbiSoft()
-{}
-
-void ViterbiSoft::decode ( double dibit[2] )
-{
-	double min;
-	int i, k;
-	min = 1.0E99;
-	MinimumPath = 0;
-	double d[2];
-	d[0] = dibit[0];
-	d[1] = dibit[1];
-	double x;
-	RTTYSampleStates s;
-	double distance[2*NumberOfRTTYSampleStates];
-  RTTYSampleStates bitestimate[2*NumberOfRTTYSampleStates][MEMORYLENGTH];
-
-	for ( i = 0;i < 2*NumberOfRTTYSampleStates;i++ )
-		distance[i] = 10000.;
-	for ( i = 0; i < NumberofStates; i++ )
-	{
-		for ( int j = 0; j < 2;j++ )
-		{
-			s = StateTable[j][i];
-
-//  x = Metric[i] + ( *dist ) ( dibit,BitTable[StateTable[j][i]]  );
-			x = Metric[i] + ( *dist ) ( dibit, j );
-			if ( x < distance[s+j*NumberofStates] )
-			{
-				distance[s+j*NumberofStates] = x;
-
-				if ( x < min )
-				{
-					min = x;
-					MinimumPath = s;
-				}
-				for ( k = 0;k < MEMORYLENGTH;k++ )
-					bitestimate[s+j*NumberofStates][k] = PathMem[i][k];
-				bitestimate[s+j*NumberofStates][pathPointer] = StateTable[j][i];
-			}
-		}
-	}
-	for ( i = 0;i < NumberofStates ;i++ )
-	{
-		if ( distance[i] < distance[i+NumberofStates] )
-		{
-			Metric[i] = distance[i] - min;
-			for ( k = 0;k < MEMORYLENGTH;k++ )
-				PathMem[i][k] = bitestimate[i][k];
-		}
-		else
-		{
-			Metric[i] = distance[NumberofStates+i] - min;
-			for ( k = 0;k < MEMORYLENGTH;k++ )
-				PathMem[i][k] = bitestimate[NumberofStates+i][k];
-
-		}
-	}
-	pathPointer = ( pathPointer + 1 ) % MEMORYLENGTH;
-}
-int ViterbiSoft::getBit ( unsigned int i )
-{
-	int pos;
-	pos = ( pathPointer + 127 - i ) % MEMORYLENGTH;
-	return ( BitTable[ PathMem[MinimumPath][pos]] );
-}
-ViterbiSoft::RTTYSampleStates ViterbiSoft::getState(unsigned int i)
-{
-	int pos;
-	pos = ( pathPointer + 127 - i ) % MEMORYLENGTH;
-	return ( PathMem[MinimumPath][pos] );
-}
diff --git a/src/viterbisoft.h b/src/viterbisoft.h
deleted file mode 100644
index aebcfc6..0000000
--- a/src/viterbisoft.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/***************************************************************************
-                          viterbisoft.h  -  description
-                             -------------------
-    begin                : Sam M�r 8 2003
-    copyright            : (C) 2003 by Volker Schroer
-    email                : dl1ksv at gmx.de
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   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.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#ifndef viterbisoft_H
-#define viterbisoft_H
-
-#define MEMORYLENGTH 256
-#define NumberOfRTTYSampleStates 269 
-/**
-  *@author Volker Schroer
-  */
-
-class ViterbiSoft
-{
-	public:
-		ViterbiSoft ( const double ( * ) ( double *, int ) );
-		~ViterbiSoft();
-//  void decode(int,const double (*)(int,int));
-		void decode ( double * );
-
-		int getBit ( unsigned int i );
-		enum RTTYSampleStates {Start1 = 0,Start2,Start3,Start4,Start5,Start6,Start7,Start8,Start9,Start10,Start11,
-Stop1,Stop2,Stop3,Stop4,Stop5,Stop6,Stop7,Stop8,Stop9,Stop10,Stop11,Stop12,Stop13,Stop14,Stop15,Stop16,
- D1_0_1,D1_0_2,D1_0_3,D1_0_4,D1_0_5,D1_0_6,D1_0_7,D1_0_8,D1_0_9,D1_0_10,D1_0_11,
- D1_1_1,D1_1_2,D1_1_3,D1_1_4,D1_1_5,D1_1_6,D1_1_7,D1_1_8,D1_1_9,D1_1_10,D1_1_11,
- D2_0_1,D2_0_2,D2_0_3,D2_0_4,D2_0_5,D2_0_6,D2_0_7,D2_0_8,D2_0_9,D2_0_10,D2_0_11,
- D2_1_1,D2_1_2,D2_1_3,D2_1_4,D2_1_5,D2_1_6,D2_1_7,D2_1_8,D2_1_9,D2_1_10,D2_1_11,
- D3_0_1,D3_0_2,D3_0_3,D3_0_4,D3_0_5,D3_0_6,D3_0_7,D3_0_8,D3_0_9,D3_0_10,D3_0_11,
- D3_1_1,D3_1_2,D3_1_3,D3_1_4,D3_1_5,D3_1_6,D3_1_7,D3_1_8,D3_1_9,D3_1_10,D3_1_11,
- D4_0_1,D4_0_2,D4_0_3,D4_0_4,D4_0_5,D4_0_6,D4_0_7,D4_0_8,D4_0_9,D4_0_10,D4_0_11,
- D4_1_1,D4_1_2,D4_1_3,D4_1_4,D4_1_5,D4_1_6,D4_1_7,D4_1_8,D4_1_9,D4_1_10,D4_1_11,
- D5_0_1,D5_0_2,D5_0_3,D5_0_4,D5_0_5,D5_0_6,D5_0_7,D5_0_8,D5_0_9,D5_0_10,D5_0_11,
- D5_1_1,D5_1_2,D5_1_3,D5_1_4,D5_1_5,D5_1_6,D5_1_7,D5_1_8,D5_1_9,D5_1_10,D5_1_11,
- D6_0_1,D6_0_2,D6_0_3,D6_0_4,D6_0_5,D6_0_6,D6_0_7,D6_0_8,D6_0_9,D6_0_10,D6_0_11,
- D6_1_1,D6_1_2,D6_1_3,D6_1_4,D6_1_5,D6_1_6,D6_1_7,D6_1_8,D6_1_9,D6_1_10,D6_1_11,
- D7_0_1,D7_0_2,D7_0_3,D7_0_4,D7_0_5,D7_0_6,D7_0_7,D7_0_8,D7_0_9,D7_0_10,D7_0_11,
- D7_1_1,D7_1_2,D7_1_3,D7_1_4,D7_1_5,D7_1_6,D7_1_7,D7_1_8,D7_1_9,D7_1_10,D7_1_11,
- D8_0_1,D8_0_2,D8_0_3,D8_0_4,D8_0_5,D8_0_6,D8_0_7,D8_0_8,D8_0_9,D8_0_10,D8_0_11,
- D8_1_1,D8_1_2,D8_1_3,D8_1_4,D8_1_5,D8_1_6,D8_1_7,D8_1_8,D8_1_9,D8_1_10,D8_1_11,
- D9_0_1,D9_0_2,D9_0_3,D9_0_4,D9_0_5,D9_0_6,D9_0_7,D9_0_8,D9_0_9,D9_0_10,D9_0_11,
- D9_1_1,D9_1_2,D9_1_3,D9_1_4,D9_1_5,D9_1_6,D9_1_7,D9_1_8,D9_1_9,D9_1_10,D9_1_11,
- D10_0_1,D10_0_2,D10_0_3,D10_0_4,D10_0_5,D10_0_6,D10_0_7,D10_0_8,D10_0_9,D10_0_10,D10_0_11,
- D10_1_1,D10_1_2,D10_1_3,D10_1_4,D10_1_5,D10_1_6,D10_1_7,D10_1_8,D10_1_9,D10_1_10,D10_1_11,
- D11_0_1,D11_0_2,D11_0_3,D11_0_4,D11_0_5,D11_0_6,D11_0_7,D11_0_8,D11_0_9,D11_0_10,D11_0_11,
- D11_1_1,D11_1_2,D11_1_3,D11_1_4,D11_1_5,D11_1_6,D11_1_7,D11_1_8,D11_1_9,D11_1_10,D11_1_11};
-    RTTYSampleStates getState(unsigned int i);
-	private:
-		int BitCount;
-		int StopBitCount;
-		int NumberofStates;
-		int MinimumPath;
-int BitTable[NumberOfRTTYSampleStates];
-RTTYSampleStates StateTable[2][NumberOfRTTYSampleStates];
-		const double ( *dist ) ( double [], int );
-		double Metric[NumberOfRTTYSampleStates];
-		RTTYSampleStates PathMem[NumberOfRTTYSampleStates][MEMORYLENGTH];
-		int pathPointer;
-
-};
-
-#endif
diff --git a/src/waveinput.cpp b/src/waveinput.cpp
index 30e8fc9..d72db79 100644
--- a/src/waveinput.cpp
+++ b/src/waveinput.cpp
@@ -48,8 +48,7 @@ void WaveInput::PTT(bool )
 bool WaveInput::open_Device_read(QString *errorstring)
 {
  char header[5];
- unsigned char header1[4]; // Only 3 are used, but lead to buffer 
-                           // overflow while reading, when compiled with -O2
+ unsigned char header1[4];
  char c;
  QString s;
  int i;
@@ -59,7 +58,7 @@ bool WaveInput::open_Device_read(QString *errorstring)
    *errorstring= QString(QObject::tr("Error, no Demofile selected")); 
     return false;
   }
- fd = open(settings.inputFilename.toAscii(),O_RDONLY);
+ fd = open(settings.inputFilename.toLatin1(),O_RDONLY);
  if ( fd < 0)
   {
     *errorstring= QString(QObject::tr("Error, Could not open Demofile "));
@@ -195,14 +194,14 @@ offset +=36;
 lseek(fd,offset,SEEK_SET);
 i=read(fd,&header[0],4*sizeof(header[0]));
 
-header[5]=0;
+header[4]=0;
 s=QString(header);
 // Checking for fact chunk
 if ( s == "fact")
 {
  lseek(fd,8,SEEK_CUR);
  i=read(fd,&header[0],4*sizeof(header[0]));
- header[5]=0;
+ header[4]=0;
  s=QString(header);
 
 } 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/linpsk.git



More information about the pkg-hamradio-commits mailing list