Changeset 58 in projects


Ignore:
Timestamp:
Jan 3, 2010, 3:42:50 PM (10 years ago)
Author:
sven
Message:

GUI improvements (card widget).

  • Tested the QItemView framework in the CardEditor class. Quite nice features (all rotating/scaling/etc. work already implemented), but a strange viewport bug didn't make this fun at all... so removed again (commented out)
  • Codec:

Codec classes are now supposed to be implicit shared objects

(some kind of useless since the next entry:)

Codec Factory know performs global caching of codecs
Codecs are therefore supposed to be used as Codec* anywhere.

  • Widget:

Now has a local Codec => can display a label
Label will be rendered with some dot matrix Open Type font

(looks quite realistic)

TODO: setting codecs dynamically by focus entry/exit on

text editors (with only one text editor => always set codec like in
text editor)

Have made tests with pixmaps as punch card background,

works damned well (but one card background needs about uncompressed
5MB RAM...).

Storing card vendor names is one core feature of Douglas Jones' Punch
card format. I thought about a property editor for punch cards
(as another deck widget) for editing all card properties proposed by
Douglas Jones, but that's a lot of work that isn't really useful.
Perhaps I will just give some card backgrounds for choice in a menu,
would be pretty easy and impressive, anyway.

-- sven @ workstation

Location:
punch-card-project/trunk/punch-card-editor
Files:
5 added
1 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • punch-card-project/trunk/punch-card-editor/src/Makefile

    r54 r58  
    11#############################################################################
    22# Makefile for building: ../bin/src
    3 # Generated by qmake (2.01a) (Qt 4.5.1) on: Do. Dez 24 19:28:48 2009
     3# Generated by qmake (2.01a) (Qt 4.5.1) on: Fr. Jan 1 19:42:19 2010
    44# Project:  src.pro
    55# Template: app
     
    390390        -$(DEL_FILE) qrc_icons.cpp
    391391qrc_icons.cpp: ../shared/icons.qrc \
    392                 ../shared/icons/document-new.png
     392                ../shared/icons/go-down.png \
     393                ../shared/icons/document-open.png \
     394                ../shared/icons/go-up.png \
     395                ../shared/icons/format-indent-more.png \
     396                ../shared/icons/system-log-out.png \
     397                ../shared/icons/go-top.png \
     398                ../shared/icons/document-new.png \
     399                ../shared/icons/go-previous.png \
     400                ../shared/icons/list-remove.png \
     401                ../shared/icons/edit-undo.png \
     402                ../shared/icons/go-next.png \
     403                ../shared/icons/document-save.png \
     404                ../shared/icons/edit-redo.png \
     405                ../shared/icons/format-indent-less.png \
     406                ../shared/icons/document-save-as.png \
     407                ../shared/icons/list-add.png
    393408        /usr/bin/rcc -name icons ../shared/icons.qrc -o qrc_icons.cpp
    394409
  • punch-card-project/trunk/punch-card-editor/src/app/mainwindow.cc

    r53 r58  
    5656
    5757void MainWindow::createGraphicalEditor() {
    58         graphical_editor = new CardEditor(this);
     58        graphical_editor = new CardEditor(this); // this takes ownership nevertheless
    5959        setCentralWidget(graphical_editor);
    6060        // signale und so:
     
    195195}
    196196
    197 void MainWindow::exportPicture() {
    198         // das haupteditorwidget bzw. nach Auswahl alle/bestimmte Karten als PNG/SVG/...
    199         // rendern.
    200 }
    201 
    202197void MainWindow::closeFile() {
    203198        if(maybeSave()) {
  • punch-card-project/trunk/punch-card-editor/src/app/mainwindow.h

    r53 r58  
    6969        bool saveFileAs();
    7070        void exportText();
    71         void exportPicture();
     71        //void exportPicture();
    7272        void closeFile();
    7373        void help();
  • punch-card-project/trunk/punch-card-editor/src/app/mainwindow.ui.cc

    r54 r58  
    6060                connect(deck, SIGNAL(modified(bool)), save_file_action, SLOT(setEnabled(bool)));
    6161                connect(deck, SIGNAL(modified(bool)), save_file_as_action, SLOT(setEnabled(bool)));
     62                connect(export_picture_action, SIGNAL(triggered()), graphical_editor, SLOT(exportPictureDialog()));
    6263
    6364                // dynamische Menues und Toolbars erstellen
     
    106107        export_picture_action = new QAction(tr("&Export Picture of Card..."), this);
    107108        export_picture_action->setStatusTip(tr("Save the visualisation of one or more cards as a picture"));
    108         connect(export_picture_action, SIGNAL(triggered()), this, SLOT(exportPicture()));
     109        // connect to cardeditor will be etabilshed when deck is loaded
    109110
    110111        // close Window: Always possible. Will close Window and if no more windows left => quitting.
  • punch-card-project/trunk/punch-card-editor/src/deckviewer/cardeditor.cc

    r52 r58  
    11#include "cardeditor.h"
     2
     3#include <QFileDialog>
     4#include <QMessageBox>
     5#include <QImageWriter>
    26
    37using namespace QPunchCard;
    48
    5 CardEditor::CardEditor(App::MainWindow* win) : QScrollArea(win), main(win) {
     9CardEditor::CardEditor(App::MainWindow* win) : /*QGraphicsView(win)*/ QScrollArea(win), main(win) {
    610        view = new CardWidget(this);
    711        setWidget(view);
    812        view->unsetCard();
     13
     14        // neuer, cooler testcode:
     15/*
     16        view = new CardWidget(this);
     17        view->unsetCard();
     18
     19        QGraphicsScene* scene = new QGraphicsScene();
     20        QGraphicsProxyWidget* card_item = scene->addWidget(view);
     21        scene->setBackgroundBrush(Qt::red);
     22        scene->setSceneRect(0, 0, 3000, 3000);
     23
     24
     25        //setMinimumSize(800, 400);
     26
     27     setCacheMode(CacheBackground);
     28     setViewportUpdateMode(FullViewportUpdate);
     29     setRenderHint(QPainter::Antialiasing);
     30     setTransformationAnchor(AnchorUnderMouse);
     31     setResizeAnchor(AnchorUnderMouse); //ViewCenter);
     32
     33
     34        this->setScene(scene);
     35
     36        card_item->setPos(QPointF(1000, 1000));
     37        fitInView(card_item, Qt::KeepAspectRatio);
     38*/
    939}
     40
     41 void CardEditor::keyPressEvent(QKeyEvent *event)
     42 {
     43     switch (event->key()) {
     44     case Qt::Key_Plus:
     45             //scene()->setSceneRect(0, 0, scene()->width()*1.2, scene()->height()*1.2);
     46             //scale(1.2, 1.2);
     47             break;
     48     case Qt::Key_Minus:
     49             //scene()->setSceneRect(0, 0, scene()->width()*1./1.2, scene()->height()*1./1.2);
     50             //scale(1./1.2, 1./1.2);
     51             break;
     52     default:
     53             QScrollArea::keyPressEvent(event);
     54         //QGraphicsView::keyPressEvent(event);
     55     }
     56 }
     57
     58
    1059
    1160void CardEditor::setCard(DeckIndex i) {
     
    3988}
    4089
    41 void CardEditor::enterEvent(QEvent*) {
     90void CardEditor::enterEvent(QEvent* e) {
    4291        // aeh... wird vielleicht spaeter gebraucht :)
     92        QScrollArea::enterEvent(e);
    4393}
     94
     95void CardEditor::exportPictureDialog() {
     96        // show dialog to export current view to PNG, SVG, etc.
     97        /*
     98         * TODO: * export all cards at once? (in directory?...)
     99         *
     100         */
     101        Q_ASSERT(this->main);
     102        Q_ASSERT(this->view);
     103        QString filename = QFileDialog::getSaveFileName(this->main, tr("Choose output file and format by extension"), QString(),
     104                tr("Image Files (*.bmp *.jpg *.jpeg *.png *.ppm *.tiff *.xbm *.xpm);;Another (*.xyz)"));
     105
     106        if(filename.isNull()) {
     107                // canceled
     108                return;
     109        }
     110
     111        //QFile file(filename);
     112        //if(!file.open(QIODevice::WriteOnly)) {
     113        /*if(! QFileInfo(filename).isWritable()) {
     114                QMessageBox::critical(main, tr("Could not export picture"),
     115                        tr("Could not open file <i>%1</i> for writing. Please select a valid filename").arg(filename));
     116                // open file dialog another time:
     117                exportPictureDialog();
     118        }*/
     119
     120        // get pixmap of actual widget
     121        QPixmap pixmap = QPixmap::grabWidget(view);
     122        if(!pixmap.save(filename)) {
     123                // get list of supported file formats by string
     124                QStringList formats;
     125                for(int i = 0; i < QImageWriter::supportedImageFormats().count(); i++) {
     126                        formats << QString(QImageWriter::supportedImageFormats().at(i));
     127                }
     128
     129                QMessageBox::critical(main, tr("Could not export picture"),
     130                        tr("Exporting picture failed. Valid file formats (filename extensions) are %1").
     131                        arg( formats.join(", ") ));
     132                // open file dialog for another time
     133                exportPictureDialog();
     134        } else {
     135                // finished successfully, tell in status bar
     136                main->statusBar()->showMessage(tr("Successfully exported file %1").arg(filename), 4000);
     137        }
     138}
  • punch-card-project/trunk/punch-card-editor/src/deckviewer/cardeditor.h

    r52 r58  
    22#define CARDEDITOR_H
    33
     4#include <QGraphicsView>
     5#include <QGraphicsScene>
     6
    47#include <QScrollArea>
    58#include <QEvent>
     9#include <QKeyEvent>
    610
    711namespace QPunchCard {
     
    1519namespace QPunchCard {
    1620
    17 class CardEditor : public QScrollArea {
     21class CardEditor : public /*QGraphicsView */ QScrollArea {
    1822        Q_OBJECT
    1923
     
    2933        void contentsChanged(DeckIndex lower, DeckIndex upper);
    3034        void fileOpened(bool opened);
     35        void exportPictureDialog();
     36
     37
    3138
    3239signals:
     
    3643protected:
    3744        void enterEvent(QEvent* event);
     45        void keyPressEvent(QKeyEvent *event);
    3846
    3947};
  • punch-card-project/trunk/punch-card-editor/src/qpunchcard/widget.cc

    r44 r58  
    11#include <QPainter>
     2#include <QPainterPath>
     3#include <QPolygon>
     4#include <QPixmap>
     5#include <QBitmap>
     6
     7#include <QFontDatabase>
     8#include <QFontMetrics>
    29
    310#include "widget.h"
     
    714CardWidget::CardWidget(QWidget * parent, Qt::WFlags f) {
    815        QWidget(parent,f);
     16
     17         setAutoFillBackground(false);
     18
    919        QSizePolicy size(QSizePolicy::Expanding, QSizePolicy::Expanding);
    1020        // Lochkartenmasse: bloederweise nur uchar als Datenbereich!?
     
    1222        size.setVerticalStretch(33);
    1323        size.setHeightForWidth(true);
     24        setSizePolicy(size);
     25
     26        // create background picture
     27        qDebug("Creating picture from card");
     28        qDebug() << "Loading returned " << background_picture.load("/tmp/anb.jpg");
     29        background_picture.setMask( background_picture.createMaskFromColor(Qt::white, Qt::MaskOutColor) );
     30
     31        // mal ganz bloed:
     32        codec = CodecFactory::createCodec("o29_code");
     33
     34        // setup font
     35        QFontDatabase::addApplicationFont(":/fonts/BPdots.otf");
    1436
    1537        setQuality(HighQuality);
    16         setSizePolicy(size);
    1738        updateGeometry();
    1839}
     
    4162
    4263        // prepare for painting
    43         if(quality() == HighQuality)
     64        //if(quality() == HighQuality)
    4465                painter.setRenderHint(QPainter::Antialiasing);
    4566        painter.setWindow(bound);
    4667
    4768        // paint punch card
    48         painter.setPen(Qt::lightGray);
    49         painter.drawRoundedRect(bound, 100.0, 100.0);
     69        if(quality() == ThumbnailQuality) {
     70                // paint thumbnail punch card:
     71                // * no border, no round edges, var size edge
     72                // * only plain background
     73                painter.setPen(QPen(Qt::red, 1)); // black
     74                painter.setBrush(Qt::lightGray); // lightGray
     75                QPoint points[5] = {
     76                        QPoint(0, 300),
     77                        QPoint(0, 3250),
     78                        QPoint(7375, 3250),
     79                        QPoint(7375, 0),
     80                        QPoint(200, 0)
     81                };
     82                painter.drawPolygon(points, 5);
     83        } else {
     84                // highquality punch card
     85                QPainterPath plain_bg;
     86                QPainterPath edge;
     87                plain_bg.addRoundedRect(bound, 100.0, 100.0);
     88                QPolygon edge_polygon;
     89                edge_polygon << QPoint(0, 0) << QPoint(0, 300) << QPoint(200, 0);
     90                edge.addPolygon(edge_polygon);
     91
     92                QPainterPath background;
     93                background = plain_bg - edge;
     94                painter.setPen(Qt::black); // lightGray
     95                //painter.drawRoundedRect(bound, 100.0, 100.0);
     96                painter.setBrush(Qt::lightGray);
     97                painter.drawPath(background);
     98                painter.drawPixmap(0, 0, 7375, 3250, this->background_picture);
     99        }
    50100
    51101        // now iterate the columns of the card
     
    58108        int col, row; // counters
    59109        QPoint hole_center;
     110
    60111        for(col=0; col < 80; col++) {
    61112                // card.columns[i] would be the actual column
     113                // #1: Print cols out
    62114                for(row = 0; row < 12; row++) {
    63115                        // card.columns[col][row] would it be...
     
    69121                        painter.setPen(Qt::black);
    70122
    71                         static const int transform[] = {12,11,0,1,2,3,4,5,6,7,8,9};
     123                        static const int transform[] = {9,8,7,6,5,4,3,2,1,0,11,12};
    72124                        //qDebug("Will ausgeben: row=%d, transform=%d < SIZE=%d", row, transform[row], card->get(col).size());
    73                         if(card->get(col).at( transform[row] ))
    74                                 // gelocht
    75                                 painter.fillRect(hole, Qt::black);
    76                         else if(quality() != ThumbnailQuality)
    77                                 // ungelocht, nur high quality zeichnen
    78                                 painter.fillRect(hole, Qt::white);
     125                        bool is_punched = card->get(col).at( transform[row] );
     126                        if(quality() == ThumbnailQuality) {
     127                                if(is_punched)
     128                                        painter.fillRect(hole, Qt::black);
     129                        } else {
     130                                if(is_punched) {
     131                                        painter.setPen(Qt::black);
     132                                        painter.fillRect(hole, Qt::white);
     133                                } else {
     134                                        painter.setOpacity(0.1);
     135                                        painter.fillRect(hole, Qt::white);
     136                                        painter.setOpacity(1.0);
     137                                }
     138                        } // if quality
     139                } // for row
     140
     141                // #2: Print out the Label line, if present
     142                if(this->codec && quality() == HighQuality) {
     143                        bool can_encode = codec->canEncode(&card->get(col));
     144                        char c = codec->toAscii(&card->get(col));
     145                        QFont font("BPDots");
     146                        font.setFixedPitch(true);
     147                        font.setPixelSize(150);
     148                        QFontMetrics metrics(font);
     149
     150                        hole_center.rx() = 251 + col * 87;
     151                        hole_center.ry() = 73;
     152                        hole.moveCenter(hole_center);
     153
     154                        painter.setFont(font);
     155                        if(can_encode) {
     156                                painter.setPen(Qt::black);
     157                                painter.drawText(hole, Qt::AlignCenter | Qt::TextDontClip, QString(c));
     158                        } else {
     159                                painter.setPen(Qt::red);
     160                                painter.drawText(hole, Qt::AlignCenter | Qt::TextDontClip, QString("?"));
     161                        }
    79162                }
    80         }
    81 }
     163
     164        } // for col
     165} // paintEvent
    82166
    83167QDebug QPunchCard::operator<<(QDebug dbg, const CardWidget &c) {
  • punch-card-project/trunk/punch-card-editor/src/qpunchcard/widget.h

    r52 r58  
    77
    88#include "qpunchcard/card.h"
     9#include "text/codec.h"
    910
    1011#include <QWidget>
    1112#include <QPointer>
     13#include <QFlags>
    1214#include <QtDebug>
     15#include <QPixmap>
    1316
    1417namespace QPunchCard {
     
    2225        const Card* card;
    2326        //QPointer<Card> card; // ### something like Card* const card;
     27        const Codec* codec;
    2428
    2529public:
    2630        enum Quality { HighQuality, ThumbnailQuality };
    2731        Quality _quality;
     32        enum Editable { Readable, Hoverable, Writable };
     33        Editable _editable;
     34
     35        /*
     36        enum ElementVisibility {
     37                Default = 0x00,
     38                ShowNotPunchedHoles = 0x01
     39        };
     40        Q_DECLARE_FLAGS(_show_elements, ElementVisibility);
     41        */
     42
     43        QPixmap background_picture;
    2844
    2945        CardWidget(QWidget * parent = 0, Qt::WFlags f = 0);
    3046        CardWidget(const Card* card, QWidget * parent = 0, Qt::WFlags f = 0) : card(card) { CardWidget(parent, f); }
     47
     48        // card handling
    3149        void setCard(const Card* card) { this->card = card; }
    3250        void unsetCard() { card = 0; }
     
    4159
    4260        // Quality issues (Property)
    43         void setQuality(const Quality quality) { _quality = quality; } // { setProperty("quality", quality); }
    44         Quality quality() const { return _quality; } // { getProperty("quality"); }
     61        void setQuality(Quality quality) { _quality = quality; }
     62        Quality quality() const { return _quality; }
     63
     64        // Editable issues
     65        void setEditable(Editable editable) { _editable = editable; }
     66        Editable editable() const { return _editable; }
     67
     68        // View issues
     69
     70
     71        // text related things
     72        const Codec* getCodec() const { return codec; }
    4573
    4674        ~CardWidget() {};
     75
     76public slots:
     77        void setCodec(const Codec* codec) { this->codec = codec; }
     78        void clearCodec() { setCodec(0); }
    4779
    4880protected:
    4981        void paintEvent(QPaintEvent *event);
    5082};
     83
     84//Q_DECLARE_OPERATORS_FOR_FLAGS(CardWidget::ElementVisibility);
    5185
    5286QDebug operator<<(QDebug dbg, const CardWidget &c);
  • punch-card-project/trunk/punch-card-editor/src/src.pro

    r54 r58  
    55OBJECTS_DIR = ../bin/obj
    66
    7 RESOURCES = ../shared/icons.qrc
     7RESOURCES = ../shared/files.qrc
    88
    99# INCLUDEPATH += ../../protocols/documation-m200
     
    1111CONFIG += warn_off
    1212
    13 #CONFIG += debug
     13CONFIG += debug
    1414#CONFIG += release
    1515
  • punch-card-project/trunk/punch-card-editor/src/src.pro.user

    r54 r58  
    1111 <data>
    1212  <variable>RunConfiguration0-Executable</variable>
    13   <value type="QString" >/mnt/data/Programme/Lochstreifen/punch-card/punch-card-editor/bin/src</value>
     13  <value type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/bin/src</value>
    1414 </data>
    1515 <data>
    1616  <variable>RunConfiguration0-RunConfiguration.name</variable>
    17   <value type="QString" >Führe /mnt/data/Programme/Lochstreifen/punch-card/punch-card-editor/bin/src aus</value>
     17  <value type="QString" >Führe /mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/bin/src aus</value>
    1818 </data>
    1919 <data>
     
    101101   <value key="addQDumper" type="" ></value>
    102102   <value key="buildConfiguration" type="int" >2</value>
    103    <value key="buildDirectory" type="QString" >/mnt/data/Programme/Lochstreifen/punch-card/punch-card-editor/src</value>
     103   <value key="buildDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value>
    104104  </valuemap>
    105105 </data>
     
    123123    <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value>
    124124    <value type="QString" >CVS_RSH=ssh</value>
    125     <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-NGF11UUF2G,guid=d77d60b3dd8aad2f8ae9083b4b336e9a</value>
     125    <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vStWvGfPi4,guid=f13e2f54c7de3a252ce1974d4b40914d</value>
     126    <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
     127    <value type="QString" >DESKTOP_SESSION=xfce</value>
     128    <value type="QString" >DESKTOP_STARTUP_ID=</value>
     129    <value type="QString" >DISPLAY=:0.0</value>
     130    <value type="QString" >DISTCC_LOG=</value>
     131    <value type="QString" >DISTCC_VERBOSE=0</value>
     132    <value type="QString" >DM_CONTROL=/var/run/xdmctl</value>
     133    <value type="QString" >EDITOR=/bin/nano</value>
     134    <value type="QString" >GCC_SPECS=</value>
     135    <value type="QString" >GDK_USE_XFT=1</value>
     136    <value type="QString" >GENERATION=2</value>
     137    <value type="QString" >GLADE_CATALOG_PATH=:</value>
     138    <value type="QString" >GLADE_MODULE_PATH=:</value>
     139    <value type="QString" >GLADE_PIXMAP_PATH=:</value>
     140    <value type="QString" >GTK_PATH=:/usr/lib/gtk-2.0</value>
     141    <value type="QString" >HOME=/home/sven</value>
     142    <value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info:/usr/share/info/emacs-21</value>
     143    <value type="QString" >JAVAC=/home/sven/.gentoo/java-config-2/current-user-vm/bin/javac</value>
     144    <value type="QString" >JAVA_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
     145    <value type="QString" >JDK_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
     146    <value type="QString" >LADSPA_PATH=/usr/lib/ladspa</value>
     147    <value type="QString" >LANG=de_DE</value>
     148    <value type="QString" >LC_ALL=de_DE</value>
     149    <value type="QString" >LESS=-R -M --shift 5</value>
     150    <value type="QString" >LESSOPEN=|lesspipe.sh %s</value>
     151    <value type="QString" >LIBGLADE_MODULE_PATH=:/usr/lib/libglade/2.0</value>
     152    <value type="QString" >LOGNAME=sven</value>
     153    <value type="QString" >MANPATH=/home/sven/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/4.2/share/man:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man</value>
     154    <value type="QString" >OPENGL_PROFILE=nvidia</value>
     155    <value type="QString" >PAGER=/usr/bin/less</value>
     156    <value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/4.2/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin</value>
     157    <value type="QString" >PKG_CONFIG_PATH=/usr/kde/4.2/lib/pkgconfig:/usr/qt/3/lib/pkgconfig</value>
     158    <value type="QString" >PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8</value>
     159    <value type="QString" >PWD=/home/sven</value>
     160    <value type="QString" >QMAKESPEC=linux-g++</value>
     161    <value type="QString" >QTDIR=/usr</value>
     162    <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
     163    <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3877,unix/sveni:/tmp/.ICE-unix/3877</value>
     164    <value type="QString" >SHELL=/bin/bash</value>
     165    <value type="QString" >SHLVL=1</value>
     166    <value type="QString" >SSH_AGENT_PID=3869</value>
     167    <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-IZwkod3868/agent.3868</value>
     168    <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
     169    <value type="QString" >USER=sven</value>
     170    <value type="QString" >VMHANDLE=blackdown-jdk-1.4.2</value>
     171    <value type="QString" >WINDOWPATH=7</value>
     172    <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
     173    <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
     174    <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1262522700.921936-30255898</value>
     175    <value type="QString" >XDM_MANAGED=method=classic</value>
     176    <value type="QString" >_=/usr/bin/xfce4-session</value>
     177   </valuelist>
     178   <valuelist key="abstractProcess.arguments" type="QVariantList" >
     179    <value type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src/src.pro</value>
     180    <value type="QString" >-spec</value>
     181    <value type="QString" >/usr/share/qt4/mkspecs/linux-g++</value>
     182    <value type="QString" >-r</value>
     183    <value type="QString" >CONFIG+=debug</value>
     184   </valuelist>
     185   <value key="abstractProcess.command" type="QString" >/usr/bin/qmake</value>
     186   <value key="abstractProcess.enabled" type="bool" >false</value>
     187   <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value>
     188   <valuelist key="qmakeArgs" type="QVariantList" />
     189  </valuemap>
     190 </data>
     191 <data>
     192  <variable>buildconfiguration-Debug-buildstep1</variable>
     193  <valuemap type="QVariantMap" >
     194   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
     195   <valuelist key="abstractProcess.Environment" type="QVariantList" >
     196    <value type="QString" >ANT_HOME=/usr/share/ant</value>
     197    <value type="QString" >CLASSPATH=.</value>
     198    <value type="QString" >CONFIG_PROTECT=/usr/kde/4.2/share/config /usr/kde/4.2/env /usr/kde/4.2/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown</value>
     199    <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value>
     200    <value type="QString" >CVS_RSH=ssh</value>
     201    <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vStWvGfPi4,guid=f13e2f54c7de3a252ce1974d4b40914d</value>
     202    <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
     203    <value type="QString" >DESKTOP_SESSION=xfce</value>
     204    <value type="QString" >DESKTOP_STARTUP_ID=</value>
     205    <value type="QString" >DISPLAY=:0.0</value>
     206    <value type="QString" >DISTCC_LOG=</value>
     207    <value type="QString" >DISTCC_VERBOSE=0</value>
     208    <value type="QString" >DM_CONTROL=/var/run/xdmctl</value>
     209    <value type="QString" >EDITOR=/bin/nano</value>
     210    <value type="QString" >GCC_SPECS=</value>
     211    <value type="QString" >GDK_USE_XFT=1</value>
     212    <value type="QString" >GENERATION=2</value>
     213    <value type="QString" >GLADE_CATALOG_PATH=:</value>
     214    <value type="QString" >GLADE_MODULE_PATH=:</value>
     215    <value type="QString" >GLADE_PIXMAP_PATH=:</value>
     216    <value type="QString" >GTK_PATH=:/usr/lib/gtk-2.0</value>
     217    <value type="QString" >HOME=/home/sven</value>
     218    <value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info:/usr/share/info/emacs-21</value>
     219    <value type="QString" >JAVAC=/home/sven/.gentoo/java-config-2/current-user-vm/bin/javac</value>
     220    <value type="QString" >JAVA_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
     221    <value type="QString" >JDK_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
     222    <value type="QString" >LADSPA_PATH=/usr/lib/ladspa</value>
     223    <value type="QString" >LANG=de_DE</value>
     224    <value type="QString" >LC_ALL=de_DE</value>
     225    <value type="QString" >LESS=-R -M --shift 5</value>
     226    <value type="QString" >LESSOPEN=|lesspipe.sh %s</value>
     227    <value type="QString" >LIBGLADE_MODULE_PATH=:/usr/lib/libglade/2.0</value>
     228    <value type="QString" >LOGNAME=sven</value>
     229    <value type="QString" >MANPATH=/home/sven/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/4.2/share/man:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man</value>
     230    <value type="QString" >OPENGL_PROFILE=nvidia</value>
     231    <value type="QString" >PAGER=/usr/bin/less</value>
     232    <value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/4.2/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin</value>
     233    <value type="QString" >PKG_CONFIG_PATH=/usr/kde/4.2/lib/pkgconfig:/usr/qt/3/lib/pkgconfig</value>
     234    <value type="QString" >PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8</value>
     235    <value type="QString" >PWD=/home/sven</value>
     236    <value type="QString" >QMAKESPEC=linux-g++</value>
     237    <value type="QString" >QTDIR=/usr</value>
     238    <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
     239    <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3877,unix/sveni:/tmp/.ICE-unix/3877</value>
     240    <value type="QString" >SHELL=/bin/bash</value>
     241    <value type="QString" >SHLVL=1</value>
     242    <value type="QString" >SSH_AGENT_PID=3869</value>
     243    <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-IZwkod3868/agent.3868</value>
     244    <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
     245    <value type="QString" >USER=sven</value>
     246    <value type="QString" >VMHANDLE=blackdown-jdk-1.4.2</value>
     247    <value type="QString" >WINDOWPATH=7</value>
     248    <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
     249    <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
     250    <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1262522700.921936-30255898</value>
     251    <value type="QString" >XDM_MANAGED=method=classic</value>
     252    <value type="QString" >_=/usr/bin/xfce4-session</value>
     253   </valuelist>
     254   <value key="abstractProcess.IgnoreReturnValue" type="bool" >false</value>
     255   <valuelist key="abstractProcess.arguments" type="QVariantList" >
     256    <value type="QString" >-w</value>
     257   </valuelist>
     258   <value key="abstractProcess.command" type="QString" >/usr/bin/make</value>
     259   <value key="abstractProcess.enabled" type="bool" >true</value>
     260   <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value>
     261  </valuemap>
     262 </data>
     263 <data>
     264  <variable>buildconfiguration-Debug-cleanstep0</variable>
     265  <valuemap type="QVariantMap" >
     266   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
     267   <valuelist key="abstractProcess.Environment" type="QVariantList" >
     268    <value type="QString" >ANT_HOME=/usr/share/ant</value>
     269    <value type="QString" >CLASSPATH=.</value>
     270    <value type="QString" >CONFIG_PROTECT=/usr/kde/4.2/share/config /usr/kde/4.2/env /usr/kde/4.2/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown</value>
     271    <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value>
     272    <value type="QString" >CVS_RSH=ssh</value>
     273    <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-al0AsHPXja,guid=4bd797857293243240627b514b3dc8f5</value>
    126274    <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
    127275    <value type="QString" >DESKTOP_SESSION=xfce</value>
     
    162310    <value type="QString" >QTDIR=/usr</value>
    163311    <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
    164     <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3881,unix/sveni:/tmp/.ICE-unix/3881</value>
     312    <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3873,unix/sveni:/tmp/.ICE-unix/3873</value>
    165313    <value type="QString" >SHELL=/bin/bash</value>
    166314    <value type="QString" >SHLVL=1</value>
    167     <value type="QString" >SSH_AGENT_PID=3873</value>
    168     <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-zSZPLl3872/agent.3872</value>
     315    <value type="QString" >SSH_AGENT_PID=3865</value>
     316    <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-saRMzq3864/agent.3864</value>
    169317    <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
    170318    <value type="QString" >USER=sven</value>
     
    173321    <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
    174322    <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
    175     <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1261661850.180533-607134573</value>
    176     <value type="QString" >XDM_MANAGED=method=classic</value>
    177     <value type="QString" >_=/usr/bin/xfce4-session</value>
    178    </valuelist>
    179    <valuelist key="abstractProcess.arguments" type="QVariantList" >
    180     <value type="QString" >/mnt/data/Programme/Lochstreifen/punch-card/punch-card-editor/src/src.pro</value>
    181     <value type="QString" >-spec</value>
    182     <value type="QString" >/usr/share/qt4/mkspecs/linux-g++</value>
    183     <value type="QString" >-r</value>
    184     <value type="QString" >CONFIG+=debug</value>
    185    </valuelist>
    186    <value key="abstractProcess.command" type="QString" >/usr/bin/qmake</value>
    187    <value key="abstractProcess.enabled" type="bool" >false</value>
    188    <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/Lochstreifen/punch-card/punch-card-editor/src</value>
    189    <valuelist key="qmakeArgs" type="QVariantList" />
    190   </valuemap>
    191  </data>
    192  <data>
    193   <variable>buildconfiguration-Debug-buildstep1</variable>
    194   <valuemap type="QVariantMap" >
    195    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
    196    <valuelist key="abstractProcess.Environment" type="QVariantList" >
    197     <value type="QString" >ANT_HOME=/usr/share/ant</value>
    198     <value type="QString" >CLASSPATH=.</value>
    199     <value type="QString" >CONFIG_PROTECT=/usr/kde/4.2/share/config /usr/kde/4.2/env /usr/kde/4.2/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown</value>
    200     <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value>
    201     <value type="QString" >CVS_RSH=ssh</value>
    202     <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-NGF11UUF2G,guid=d77d60b3dd8aad2f8ae9083b4b336e9a</value>
    203     <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
    204     <value type="QString" >DESKTOP_SESSION=xfce</value>
    205     <value type="QString" >DESKTOP_STARTUP_ID=</value>
    206     <value type="QString" >DISPLAY=:0.0</value>
    207     <value type="QString" >DISTCC_LOG=</value>
    208     <value type="QString" >DISTCC_VERBOSE=0</value>
    209     <value type="QString" >DM_CONTROL=/var/run/xdmctl</value>
    210     <value type="QString" >EDITOR=/bin/nano</value>
    211     <value type="QString" >GCC_SPECS=</value>
    212     <value type="QString" >GDK_USE_XFT=1</value>
    213     <value type="QString" >GENERATION=2</value>
    214     <value type="QString" >GLADE_CATALOG_PATH=:</value>
    215     <value type="QString" >GLADE_MODULE_PATH=:</value>
    216     <value type="QString" >GLADE_PIXMAP_PATH=:</value>
    217     <value type="QString" >GTK_PATH=:/usr/lib/gtk-2.0</value>
    218     <value type="QString" >HOME=/home/sven</value>
    219     <value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info:/usr/share/info/emacs-21</value>
    220     <value type="QString" >JAVAC=/home/sven/.gentoo/java-config-2/current-user-vm/bin/javac</value>
    221     <value type="QString" >JAVA_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
    222     <value type="QString" >JDK_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
    223     <value type="QString" >LADSPA_PATH=/usr/lib/ladspa</value>
    224     <value type="QString" >LANG=de_DE</value>
    225     <value type="QString" >LANGUAGE=</value>
    226     <value type="QString" >LC_ALL=de_DE</value>
    227     <value type="QString" >LESS=-R -M --shift 5</value>
    228     <value type="QString" >LESSOPEN=|lesspipe.sh %s</value>
    229     <value type="QString" >LIBGLADE_MODULE_PATH=:/usr/lib/libglade/2.0</value>
    230     <value type="QString" >LOGNAME=sven</value>
    231     <value type="QString" >MANPATH=/home/sven/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/4.2/share/man:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man</value>
    232     <value type="QString" >OPENGL_PROFILE=nvidia</value>
    233     <value type="QString" >PAGER=/usr/bin/less</value>
    234     <value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/4.2/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin</value>
    235     <value type="QString" >PKG_CONFIG_PATH=/usr/kde/4.2/lib/pkgconfig:/usr/qt/3/lib/pkgconfig</value>
    236     <value type="QString" >PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8</value>
    237     <value type="QString" >PWD=/home/sven</value>
    238     <value type="QString" >QMAKESPEC=linux-g++</value>
    239     <value type="QString" >QTDIR=/usr</value>
    240     <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
    241     <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3881,unix/sveni:/tmp/.ICE-unix/3881</value>
    242     <value type="QString" >SHELL=/bin/bash</value>
    243     <value type="QString" >SHLVL=1</value>
    244     <value type="QString" >SSH_AGENT_PID=3873</value>
    245     <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-zSZPLl3872/agent.3872</value>
    246     <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
    247     <value type="QString" >USER=sven</value>
    248     <value type="QString" >VMHANDLE=blackdown-jdk-1.4.2</value>
    249     <value type="QString" >WINDOWPATH=7</value>
    250     <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
    251     <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
    252     <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1261661850.180533-607134573</value>
    253     <value type="QString" >XDM_MANAGED=method=classic</value>
    254     <value type="QString" >_=/usr/bin/xfce4-session</value>
    255    </valuelist>
    256    <value key="abstractProcess.IgnoreReturnValue" type="bool" >false</value>
    257    <valuelist key="abstractProcess.arguments" type="QVariantList" >
    258     <value type="QString" >-w</value>
    259    </valuelist>
    260    <value key="abstractProcess.command" type="QString" >/usr/bin/make</value>
    261    <value key="abstractProcess.enabled" type="bool" >true</value>
    262    <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/Lochstreifen/punch-card/punch-card-editor/src</value>
    263   </valuemap>
    264  </data>
    265  <data>
    266   <variable>buildconfiguration-Debug-cleanstep0</variable>
    267   <valuemap type="QVariantMap" >
    268    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
    269    <valuelist key="abstractProcess.Environment" type="QVariantList" >
    270     <value type="QString" >ANT_HOME=/usr/share/ant</value>
    271     <value type="QString" >CLASSPATH=.</value>
    272     <value type="QString" >CONFIG_PROTECT=/usr/kde/4.2/share/config /usr/kde/4.2/env /usr/kde/4.2/shutdown /usr/share/config /usr/kde/3.5/share/config /usr/kde/3.5/env /usr/kde/3.5/shutdown</value>
    273     <value type="QString" >CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/env.d/java/ /etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild</value>
    274     <value type="QString" >CVS_RSH=ssh</value>
    275     <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-9LL9VRBIRW,guid=0b12c30eaf4d6c14ba5868eb4b3298b5</value>
    276     <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
    277     <value type="QString" >DESKTOP_SESSION=xfce</value>
    278     <value type="QString" >DESKTOP_STARTUP_ID=</value>
    279     <value type="QString" >DISPLAY=:0.0</value>
    280     <value type="QString" >DISTCC_LOG=</value>
    281     <value type="QString" >DISTCC_VERBOSE=0</value>
    282     <value type="QString" >DM_CONTROL=/var/run/xdmctl</value>
    283     <value type="QString" >EDITOR=/bin/nano</value>
    284     <value type="QString" >GCC_SPECS=</value>
    285     <value type="QString" >GDK_USE_XFT=1</value>
    286     <value type="QString" >GENERATION=2</value>
    287     <value type="QString" >GLADE_CATALOG_PATH=:</value>
    288     <value type="QString" >GLADE_MODULE_PATH=:</value>
    289     <value type="QString" >GLADE_PIXMAP_PATH=:</value>
    290     <value type="QString" >GTK_PATH=:/usr/lib/gtk-2.0</value>
    291     <value type="QString" >HOME=/home/sven</value>
    292     <value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info:/usr/share/info/emacs-21</value>
    293     <value type="QString" >JAVAC=/home/sven/.gentoo/java-config-2/current-user-vm/bin/javac</value>
    294     <value type="QString" >JAVA_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
    295     <value type="QString" >JDK_HOME=/home/sven/.gentoo/java-config-2/current-user-vm</value>
    296     <value type="QString" >LADSPA_PATH=/usr/lib/ladspa</value>
    297     <value type="QString" >LANG=de_DE</value>
    298     <value type="QString" >LC_ALL=de_DE</value>
    299     <value type="QString" >LESS=-R -M --shift 5</value>
    300     <value type="QString" >LESSOPEN=|lesspipe.sh %s</value>
    301     <value type="QString" >LIBGLADE_MODULE_PATH=:/usr/lib/libglade/2.0</value>
    302     <value type="QString" >LOGNAME=sven</value>
    303     <value type="QString" >MANPATH=/home/sven/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.18/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man:/opt/blackdown-jdk-1.4.2.03/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/:/usr/kde/4.2/share/man:/usr/kde/3.5/share/man:/usr/qt/3/doc/man:/opt/opera/share/man</value>
    304     <value type="QString" >OPENGL_PROFILE=nvidia</value>
    305     <value type="QString" >PAGER=/usr/bin/less</value>
    306     <value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/4.2/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/games/bin</value>
    307     <value type="QString" >PKG_CONFIG_PATH=/usr/kde/4.2/lib/pkgconfig:/usr/qt/3/lib/pkgconfig</value>
    308     <value type="QString" >PRELINK_PATH_MASK=/usr/lib/gstreamer-0.8</value>
    309     <value type="QString" >PWD=/home/sven</value>
    310     <value type="QString" >QMAKESPEC=linux-g++</value>
    311     <value type="QString" >QTDIR=/usr</value>
    312     <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
    313     <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3980,unix/sveni:/tmp/.ICE-unix/3980</value>
    314     <value type="QString" >SHELL=/bin/bash</value>
    315     <value type="QString" >SHLVL=1</value>
    316     <value type="QString" >SSH_AGENT_PID=3972</value>
    317     <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-RAyzVU3971/agent.3971</value>
    318     <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
    319     <value type="QString" >USER=sven</value>
    320     <value type="QString" >VMHANDLE=blackdown-jdk-1.4.2</value>
    321     <value type="QString" >WINDOWPATH=7</value>
    322     <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
    323     <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
    324     <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1261607092.718129-2000615939</value>
     323    <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1262340341.91684-1518068440</value>
    325324    <value type="QString" >XDM_MANAGED=method=classic</value>
    326325    <value type="QString" >_=/usr/bin/xfce4-session</value>
     
    333332   <value key="abstractProcess.command" type="QString" >/usr/bin/make</value>
    334333   <value key="abstractProcess.enabled" type="bool" >true</value>
    335    <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/Lochstreifen/punch-card/punch-card-editor/src</value>
     334   <value key="abstractProcess.workingDirectory" type="QString" >/mnt/data/Programme/technikum29-projects/punch-card-project/trunk/punch-card-editor/src</value>
    336335   <value key="cleanConfig" type="bool" >true</value>
    337336   <valuelist key="makeargs" type="QVariantList" >
  • punch-card-project/trunk/punch-card-editor/src/text/codec.cc

    r52 r58  
    11#include <QDebug>
    22#include <QHash>
    3 #include <QMap>
    4 #include <QSharedPointer>
    53
    64#include "codec.h"
     
    86
    97using namespace QPunchCard;
     8
     9// initialize static members
     10QHash<QString, Codec*> CodecFactory::codec_cache;
    1011
    1112QString Codec::toAscii(const Card* target_card) const {
     
    5354}
    5455
    55 CharArrayCodec::CharArrayCodec(const int* table, char illegal) : Codec(illegal), table(table) {
     56CharArrayCodec::CharArrayCodec(const int* table, char illegal) : Codec(illegal) {
     57        d = new Data;
     58        d->table = table;
     59
    5660        // Inverse Tabelle (ASCII -> Column-Tabelle) erstellen
    57         if(!table) {
     61        if(!d->table) {
    5862                // uhh... miserable failure. Sehr schlecht.
    5963                qDebug() << "CharArrayCodec: Table is NULL! This will *CRASH* application!";
     
    6367        for(int i = 0; i < 4096; i++) {
    6468                // Illegal characters setzen
    65                 inverse_table[i] = illegal;
     69                d->inverse_table[i] = illegal;
    6670        }
    6771
    6872        for(char c = ' '; c < '`'; c++) {
    69                 inverse_table[ this->table[c] ] = c;
     73                d->inverse_table[ d->table[c] ] = c;
    7074        }
    7175}
     
    7882
    7983const Codec* CodecFactory::createCodec(const QString& name, char illegal) {
    80         if("o29_code" == name)
    81                 return new CharArrayCodec(o29_code, illegal);
    82         else if("o26_ftn_code" == name)
    83                 return new CharArrayCodec(o26_ftn_code, illegal);
    84         else if("o26_comm_code" == name)
    85                 return new CharArrayCodec(o26_comm_code, illegal);
    86         else {
    87                 qDebug() << QString("Codec '%s' not supported!").arg(name);
    88                 return NULL;
     84        if(!CodecFactory::codec_cache.contains(name)) {
     85                if("o29_code" == name)
     86                        CodecFactory::codec_cache[name] = new CharArrayCodec(o29_code, illegal);
     87                else if("o26_ftn_code" == name)
     88                        CodecFactory::codec_cache[name] = new CharArrayCodec(o26_ftn_code, illegal);
     89                else if("o26_comm_code" == name)
     90                        CodecFactory::codec_cache[name] = new CharArrayCodec(o26_comm_code, illegal);
     91                else {
     92                        qDebug() << QString("Codec '%s' not supported!").arg(name);
     93                        return NULL;
     94                }
    8995        }
     96
     97        return CodecFactory::codec_cache[name];
    9098}
    9199
  • punch-card-project/trunk/punch-card-editor/src/text/codec.h

    r52 r58  
    2929        const char illegal;
    3030        /// @param illegal_character Zeichen fuer nicht existente Zahlen
    31         Codec(char illegal_character = '~') : illegal(illegal_character) { }
     31        Codec(char illegal_character = '~') : illegal(illegal_character) {}
     32        Codec(const Codec& other) : illegal(other.illegal) {}
    3233        virtual ~Codec() {}
    3334        virtual char toAscii(const Column* col) const = 0;
     
    5152 **/
    5253class CharArrayCodec : public Codec {
    53         const int* table;
    54         char inverse_table[4096];
     54        class Data {
     55        public:
     56                const int* table;
     57                char inverse_table[4096];
     58                int ref;
     59        };
     60
     61        Data* d;
    5562
    5663public:
    5764        CharArrayCodec(const int* table, char illegal = '~');// : Codec(illegal), table(table) {}
    58         char toAscii(const Column* col) const { return inverse_table[*col]; }
    59         Column fromAscii(char ch) const { return Column(canEncode(ch) ? table[ch]: 0); }
     65        CharArrayCodec(const CharArrayCodec& other) : Codec(other) {
     66                d = other.d;
     67                d->ref++;
     68        }
     69        ~CharArrayCodec() { if(--d->ref == 0) delete d; }
     70        char toAscii(const Column* col) const { return d->inverse_table[*col]; }
     71        Column fromAscii(char ch) const { return Column(canEncode(ch) ? d->table[ch]: 0); }
    6072
    61         bool canEncode(const Column* col) const { return inverse_table[*col] != illegal; }
     73        bool canEncode(const Column* col) const { return d->inverse_table[*col] != illegal; }
    6274        bool canEncode(char ch) const {
    63                 bool r = (table[ch] != ERROR);
     75                bool r = (d->table[ch] != ERROR);
    6476                if(ch < ' ' || ch > 'z') r = false;
    6577                //qDebug("CharArrayCodec: %c is a %s character", ch, r ? "valid" : "invalid");
     
    7587 **/
    7688class CodecFactory {
     89        static QHash<QString, Codec*> codec_cache;
    7790public:
    7891        // TODO: Codec-Caching (Codec-Constructor privatisieren, dafuer hier caching
     
    8497};
    8598
    86 
    8799}; // Namespace
    88100#endif // CODEC_H
  • punch-card-project/trunk/punch-card-editor/src/text/editor.cc

    r53 r58  
    1818
    1919        // Codec erstellen
    20         codec = QSharedPointer<const Codec>( CodecFactory::createCodec("o29_code") );
     20        //codec = QSharedPointer<const Codec>( CodecFactory::createCodec("o29_code") );
     21        codec = CodecFactory::createCodec("o29_code");
    2122        if(!codec) {
    2223                qDebug("Got NULL Codec :-(");
     
    201202 **/
    202203bool Text::Editor::translateBlock(const QTextBlock& block) {
    203         Q_ASSERT(!codec.isNull());
     204        Q_ASSERT(codec != NULL);
    204205        Q_ASSERT(!main->deck.isNull());
    205206        if(! block.isValid()) {
  • punch-card-project/trunk/punch-card-editor/src/text/editor.h

    r53 r58  
    2727
    2828        QPointer<App::MainWindow> main;
    29         QSharedPointer<const Codec> codec;
     29        //QSharedPointer<const Codec> codec;
     30        const Codec* codec;
    3031        QList<QTextEdit::ExtraSelection> invalid_characters;
    3132        friend class Text::EditorDock;
  • punch-card-project/trunk/punch-card-editor/src/text/editordock.cc

    r53 r58  
    6969void Text::EditorDock::setCodec(QString by_name) {
    7070        // QSharedPointer: Durch Assignment wird das alte Objekt geloescht :-)
    71         editor->codec = QSharedPointer<const Codec>( CodecFactory::createCodec(by_name) );
     71        //editor->codec = QSharedPointer<const Codec>( CodecFactory::createCodec(by_name) );
     72        editor->codec = CodecFactory::createCodec(by_name);
    7273        // jetzt: Text komplett neu auswerten. Todo...
    7374}
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License