Changeset 48 in projects


Ignore:
Timestamp:
Dec 10, 2009, 3:01:11 AM (10 years ago)
Author:
sven
Message:
  • Fixed more bugs
  • Cardeditor is now capable of writing text live using Codecs
  • Toolbars for Cardeditor, Codec changing menu
  • etc...
Location:
punch-card/punch-card-editor/src
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • punch-card/punch-card-editor/src/app/Makefile

    r44 r48  
    11#############################################################################
    22# Makefile for building: ../../bin/app
    3 # Generated by qmake (2.01a) (Qt 4.5.1) on: Di. Dez 1 18:50:34 2009
     3# Generated by qmake (2.01a) (Qt 4.5.1) on: Mi. Dez 9 19:05:45 2009
    44# Project:  app.pro
    55# Template: app
     
    5757                ../../bin/moc_navigator.cpp \
    5858                ../../bin/moc_decktexteditor.cpp \
     59                ../../bin/moc_deckviewer.cpp \
    5960                ../../bin/moc_card.cpp \
    6061                ../../bin/moc_format.cpp \
     
    7576                ../../bin/moc_navigator.o \
    7677                ../../bin/moc_decktexteditor.o \
     78                ../../bin/moc_deckviewer.o \
    7779                ../../bin/moc_card.o \
    7880                ../../bin/moc_format.o \
     
    178180dist:
    179181        @$(CHK_DIR_EXISTS) ../../bin/app1.0.0 || $(MKDIR) ../../bin/app1.0.0
    180         $(COPY_FILE) --parents $(SOURCES) $(DIST) ../../bin/app1.0.0/ && $(COPY_FILE) --parents editorwindow.h ../qpunchcard/deckmodel.h cardeditor.h navigator.h decktexteditor.h ../qpunchcard/card.h ../qpunchcard/format.h ../qpunchcard/widget.h ../qpunchcard/codec.h ../qpunchcard/cardcodes.h ../../bin/app1.0.0/ && $(COPY_FILE) --parents ../qpunchcard/card.cc ../qpunchcard/widget.cc ../qpunchcard/format.cc ../qpunchcard/codec.cc ../qpunchcard/deckmodel.cc cardeditor.cc navigator.cc decktexteditor.cc main.cc editorwindow.cc ../../bin/app1.0.0/ && (cd `dirname ../../bin/app1.0.0` && $(TAR) app1.0.0.tar app1.0.0 && $(COMPRESS) app1.0.0.tar) && $(MOVE) `dirname ../../bin/app1.0.0`/app1.0.0.tar.gz . && $(DEL_FILE) -r ../../bin/app1.0.0
     182        $(COPY_FILE) --parents $(SOURCES) $(DIST) ../../bin/app1.0.0/ && $(COPY_FILE) --parents editorwindow.h ../qpunchcard/deckmodel.h cardeditor.h navigator.h decktexteditor.h deckviewer.h ../qpunchcard/card.h ../qpunchcard/format.h ../qpunchcard/widget.h ../qpunchcard/codec.h ../qpunchcard/cardcodes.h ../../bin/app1.0.0/ && $(COPY_FILE) --parents ../qpunchcard/card.cc ../qpunchcard/widget.cc ../qpunchcard/format.cc ../qpunchcard/codec.cc ../qpunchcard/deckmodel.cc cardeditor.cc navigator.cc decktexteditor.cc main.cc editorwindow.cc ../../bin/app1.0.0/ && (cd `dirname ../../bin/app1.0.0` && $(TAR) app1.0.0.tar app1.0.0 && $(COMPRESS) app1.0.0.tar) && $(MOVE) `dirname ../../bin/app1.0.0`/app1.0.0.tar.gz . && $(DEL_FILE) -r ../../bin/app1.0.0
    181183
    182184
     
    197199mocables: compiler_moc_header_make_all compiler_moc_source_make_all
    198200
    199 compiler_moc_header_make_all: ../../bin/moc_editorwindow.cpp ../../bin/moc_deckmodel.cpp ../../bin/moc_cardeditor.cpp ../../bin/moc_navigator.cpp ../../bin/moc_decktexteditor.cpp ../../bin/moc_card.cpp ../../bin/moc_format.cpp ../../bin/moc_widget.cpp
     201compiler_moc_header_make_all: ../../bin/moc_editorwindow.cpp ../../bin/moc_deckmodel.cpp ../../bin/moc_cardeditor.cpp ../../bin/moc_navigator.cpp ../../bin/moc_decktexteditor.cpp ../../bin/moc_deckviewer.cpp ../../bin/moc_card.cpp ../../bin/moc_format.cpp ../../bin/moc_widget.cpp
    200202compiler_moc_header_clean:
    201         -$(DEL_FILE) ../../bin/moc_editorwindow.cpp ../../bin/moc_deckmodel.cpp ../../bin/moc_cardeditor.cpp ../../bin/moc_navigator.cpp ../../bin/moc_decktexteditor.cpp ../../bin/moc_card.cpp ../../bin/moc_format.cpp ../../bin/moc_widget.cpp
     203        -$(DEL_FILE) ../../bin/moc_editorwindow.cpp ../../bin/moc_deckmodel.cpp ../../bin/moc_cardeditor.cpp ../../bin/moc_navigator.cpp ../../bin/moc_decktexteditor.cpp ../../bin/moc_deckviewer.cpp ../../bin/moc_card.cpp ../../bin/moc_format.cpp ../../bin/moc_widget.cpp
    202204../../bin/moc_editorwindow.cpp: navigator.h \
    203205                editorwindow.h \
    204206                cardeditor.h \
    205207                decktexteditor.h \
     208                deckviewer.h \
    206209                editorwindow.h
    207210        /usr/bin/moc $(DEFINES) $(INCPATH) editorwindow.h -o ../../bin/moc_editorwindow.cpp
    208211
    209 ../../bin/moc_deckmodel.cpp: ../qpunchcard/card.h \
     212../../bin/moc_deckmodel.cpp: editorwindow.h \
     213                navigator.h \
     214                deckviewer.h \
     215                cardeditor.h \
     216                decktexteditor.h \
     217                ../qpunchcard/card.h \
    210218                ../qpunchcard/format.h \
    211219                ../qpunchcard/widget.h \
     
    215223../../bin/moc_cardeditor.cpp: editorwindow.h \
    216224                navigator.h \
     225                deckviewer.h \
    217226                cardeditor.h \
    218227                decktexteditor.h \
     
    222231../../bin/moc_navigator.cpp: editorwindow.h \
    223232                navigator.h \
     233                deckviewer.h \
    224234                cardeditor.h \
    225235                decktexteditor.h \
     
    230240                editorwindow.h \
    231241                navigator.h \
     242                deckviewer.h \
    232243                decktexteditor.h \
    233244                decktexteditor.h
    234245        /usr/bin/moc $(DEFINES) $(INCPATH) decktexteditor.h -o ../../bin/moc_decktexteditor.cpp
     246
     247../../bin/moc_deckviewer.cpp: editorwindow.h \
     248                navigator.h \
     249                deckviewer.h \
     250                cardeditor.h \
     251                decktexteditor.h \
     252                deckviewer.h
     253        /usr/bin/moc $(DEFINES) $(INCPATH) deckviewer.h -o ../../bin/moc_deckviewer.cpp
    235254
    236255../../bin/moc_card.cpp: ../qpunchcard/format.h \
     
    288307
    289308../../bin/deckmodel.o: ../qpunchcard/deckmodel.cc ../qpunchcard/deckmodel.h \
     309                editorwindow.h \
     310                navigator.h \
     311                deckviewer.h \
     312                cardeditor.h \
     313                decktexteditor.h \
    290314                ../qpunchcard/card.h \
    291315                ../qpunchcard/format.h \
     
    296320                editorwindow.h \
    297321                navigator.h \
     322                deckviewer.h \
    298323                decktexteditor.h
    299324        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../../bin/cardeditor.o cardeditor.cc
     
    302327                editorwindow.h \
    303328                cardeditor.h \
    304                 decktexteditor.h
     329                decktexteditor.h \
     330                deckviewer.h
    305331        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../../bin/navigator.o navigator.cc
    306332
     
    308334                cardeditor.h \
    309335                editorwindow.h \
    310                 navigator.h
     336                navigator.h \
     337                deckviewer.h
    311338        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../../bin/decktexteditor.o decktexteditor.cc
    312339
    313340../../bin/main.o: main.cc editorwindow.h \
    314341                navigator.h \
     342                deckviewer.h \
    315343                cardeditor.h \
    316344                decktexteditor.h
     
    319347../../bin/editorwindow.o: editorwindow.cc editorwindow.h \
    320348                navigator.h \
     349                deckviewer.h \
    321350                cardeditor.h \
    322351                decktexteditor.h
     
    338367        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../../bin/moc_decktexteditor.o ../../bin/moc_decktexteditor.cpp
    339368
     369../../bin/moc_deckviewer.o: ../../bin/moc_deckviewer.cpp
     370        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../../bin/moc_deckviewer.o ../../bin/moc_deckviewer.cpp
     371
    340372../../bin/moc_card.o: ../../bin/moc_card.cpp
    341373        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ../../bin/moc_card.o ../../bin/moc_card.cpp
  • punch-card/punch-card-editor/src/app/app.pro

    r44 r48  
    66    cardeditor.h \
    77    navigator.h \
    8     decktexteditor.h
     8    decktexteditor.h \
     9    deckviewer.h
    910
    1011# raus aus dem src-tree
  • punch-card/punch-card-editor/src/app/cardeditor.cc

    r47 r48  
    2828}
    2929
    30 void CardEditor::fileOpened(bool opened) {
     30void CardEditor::fileOpened(bool /*opened*/) {
    3131        // in jedem Fall: Karte entfernen und neuzeichnen
    3232        view->unsetCard();
  • punch-card/punch-card-editor/src/app/decktexteditor.cc

    r47 r48  
    33#include <QPainter>
    44#include <QTextBlock>
     5#include <QBoxLayout>
     6#include <QLabel>
     7#include <QComboBox>
     8#include <QPushButton>
    59
    610using namespace QPunchCard;
     
    1014        setWindowTitle(tr("Text Editor"));
    1115
    12         // - Codec erstellen oder kriegen
    1316        editor = new DeckTextEditor(main);
    1417
     
    1720        connect(main, SIGNAL(contentsChanged(DeckIndex,DeckIndex)), editor, SLOT(contentsChanged(DeckIndex,DeckIndex)));
    1821
    19         // spaeter: oben (in Titelleiste oder drunter) Codeauswahl,
    20         //          unten Legende mit Farbauswahl
    21         setWidget(editor);
     22        // urhm... Codebar erstellen
     23        create_code_bar();
     24        create_color_bar();
     25
     26        // Container-Widget erstellen
     27        QWidget* container = new QWidget(this);
     28        QVBoxLayout* layout = new QVBoxLayout(container);
     29
     30        //layout->addWidget(code_bar);
     31        layout->addWidget(editor);
     32        layout->addWidget(color_bar);
     33
     34        setWidget(container);
     35        setTitleBarWidget(code_bar);
    2236        setFeatures(QDockWidget::AllDockWidgetFeatures);
     37}
     38
     39void TextEditorDock::create_code_bar() {
     40        code_bar = new QWidget(this);
     41        QBoxLayout* layout = new QBoxLayout(QBoxLayout::LeftToRight, code_bar);
     42
     43        // Label fuer Fenster
     44        layout->addWidget(new QLabel(tr("Card Text"), code_bar));
     45
     46        // Codec-Auswahlbox
     47        QComboBox* codec_selection = new QComboBox(code_bar);
     48        codec_selection->addItems( CodecFactory::availableCodecs() );
     49        codec_selection->setStatusTip(tr("Use another codec to display the decks contents as ASCII text. This won't change the cards contents"));
     50        connect(codec_selection, SIGNAL(currentIndexChanged(QString)), this, SLOT(setCodec(QString)));
     51        layout->addWidget(codec_selection);
     52
     53        // Button zur Codec-Umwandlung
     54        QPushButton* text_converter = new QPushButton(tr("Convert text..."), code_bar);
     55        text_converter->setStatusTip(tr("Convert the current deck (or selection) to another punch card code"));
     56        connect(text_converter, SIGNAL(clicked()), this, SLOT(showTextConverterDialog()));
     57        layout->addWidget(text_converter);
     58}
     59
     60void TextEditorDock::create_color_bar() {
     61        color_bar = new QWidget(this);
     62        // usw.
    2363}
    2464
    2565void TextEditorDock::setCard(DeckIndex i) {
    2666        editor->highlightRow(i);
     67}
     68
     69void TextEditorDock::setCodec(QString by_name) {
     70        // QSharedPointer: Durch Assignment wird das alte Objekt geloescht :-)
     71        editor->codec = QSharedPointer<const Codec>( CodecFactory::createCodec(by_name) );
     72        // jetzt: Text komplett neu auswerten. Todo...
     73}
     74
     75void TextEditorDock::showTextConverterDialog() {
     76        qDebug("Text Converter Dialog... PENDING");
    2777}
    2878
     
    4191                cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
    4292                // an dieser Stelle: Ungueltige Zeichen maskieren (per anderem QTextCharFormat)!
    43                 cursor.insertText(QString("Zeile %d von Lochkarte").arg(i));
     93                cursor.insertText(QString("Zeile %1 von Lochkarte").arg(i));
    4494        }
    4595}
     
    52102                this, SLOT(translateChanges(int, int, int)));
    53103
     104        // Codec erstellen
     105        codec = QSharedPointer<const Codec>( CodecFactory::createCodec("o29_code") );
     106        if(!codec) {
     107                qDebug("Got NULL Codec :-(");
     108        }
    54109
    55110        // Font einstellen
     
    76131        // den Inhalt geaendert hat. => Uebersetzen ins Kartenmodell und als Signal
    77132        // weitergeben.
     133        Q_ASSERT(main != 0);
     134        Q_ASSERT(main->deck != 0);
    78135        // NATÜRLICH muss ZUSAETZLICH auch noch das MODEL DIREKT VERAENDERT werden.
    79136        // also die betreffenden Karten AUSTAUSCHEN durch den neuen Inhalt, der dann
    80137        // per Codec uebersetzt wird!
    81138        qDebug("Pos: %d, removed: %d, added: %d", position, charsRemoved, charsAdded);
     139        // veraenderte Zeilen ausrechnen
     140        int start_pos = position;
     141        int end_pos = position + charsAdded - charsRemoved;
     142        QTextBlock start_block = document()->findBlock(start_pos);
     143        QTextBlock end_block = document()->findBlock(end_pos);
     144        DeckIndex start_block_number = main->deck->createIndex( start_block.blockNumber() );
     145        DeckIndex end_block_number = main->deck->createIndex( end_block.blockNumber() );
     146
     147        if(! start_block.isValid()) {
     148                // keine gute Grundlage.
     149                qDebug("Pretty bad: Start block pos is invalid.");
     150                return;
     151        }
     152        if(! start_block_number.isValid()) {
     153                // auch keine gute Grundlage
     154                qDebug("Pretty bad: Start deck index pos is invalid");
     155                qDebug() << start_block_number;
     156                return;
     157        }
     158
     159        if(! end_block.isValid()) {
     160                // das Dokument ist *kuerzer* geworden
     161                DeckIndex new_max_blocks = main->deck->createIndex( document()->lineCount() );
     162                // sicherheitshalber
     163                if(! new_max_blocks.isValid()) {
     164                        qDebug() << "new max blocks is invalid " << new_max_blocks;
     165                        return;
     166                }
     167
     168                // Alle Blocks von new_max_blocks bis end_block_number loeschen
     169                main->deck->erase(new_max_blocks, end_block_number);
     170        }
     171
     172        // start_block und end_block sind innerhalb des Dokumentes.
     173        // pruefe, ob Dokument laenger geworden ist
     174
     175        if(end_block_number > main->deck->count()) {
     176                // ja, es sind
     177                int new_lines_count = main->deck->count() - end_block_number;
     178                // Reihen dazugekommen.
     179                qDebug("Inserting %d cards at end", new_lines_count);
     180                main->deck->insertTimes( main->deck->createIndex( main->deck->count()-1), new_lines_count);
     181        }
     182
     183        // jetzt: ueber bloecke iterieren.
     184        for(QTextBlock current_block = start_block;
     185            current_block < end_block || current_block == end_block;
     186            current_block = current_block.next()) {
     187                if(!translateBlock(current_block)) {
     188                        qDebug("Translation stopped at block %d, failing. breaking translation", current_block.blockNumber());
     189                        break;
     190                }
     191        }
     192}
     193
     194bool DeckTextEditor::translateBlock(const QTextBlock& block) {
     195        Q_ASSERT(!codec.isNull());
     196        Q_ASSERT(!main->deck.isNull());
     197        if(! block.isValid()) {
     198                // urhh
     199                qDebug("translateBlock called on invalid block");
     200                return false;
     201        }
     202
     203        DeckIndex card_index = main->deck->createIndex( block.blockNumber() );
     204
     205        // und nun: Block uebersetzen.
     206        qDebug() << "Going to translate to " << card_index;
     207        QString text = block.text();
     208        qDebug() << "Contents:" <<  text;
     209
     210        if(!card_index.isValid()) {
     211                qDebug("Invalid card index, won't translate");
     212                return false;
     213        }
     214
     215        if(!codec->canEncode(text)) {
     216                // gut, der text ist halt schlecht. sollte an anderer Stelle
     217                // schon bemerkt worden sein
     218                qDebug("Codec will make errors while translating");
     219        }
     220
     221        // start translation
     222        qDebug() << "starting translation";
     223        codec->fromAscii(text, main->deck->at( card_index ) );
     224        qDebug("Translated successfully");
     225        // urhm... that was all the magic.
     226        // send "you were changed" thingy! :-)
     227        main->deck->emitChanged(card_index, card_index);
     228        return true;
    82229}
    83230
  • punch-card/punch-card-editor/src/app/decktexteditor.h

    r47 r48  
    44#include <QPlainTextEdit>
    55#include <QDockWidget>
     6#include <QSharedPointer>
    67
    78class TextEditorDock;
     
    1617
    1718        EditorWindow* main;
    18         QPunchCard::Codec* codec;
    1919        DeckTextEditor* editor;
     20        QWidget* code_bar;
     21        QWidget* color_bar;
    2022public:
    2123        TextEditorDock(EditorWindow* parent);
    2224
     25private:
     26        void create_code_bar();
     27        void create_color_bar();
     28
    2329public slots:
    2430        void setCard(DeckIndex i);
     31        void setCodec(QString by_name);
     32        void showTextConverterDialog();
    2533
    2634signals:
     
    3240        Q_OBJECT
    3341
    34         EditorWindow* main;
     42        QPointer<EditorWindow> main;
     43        QSharedPointer<const Codec> codec;
     44        friend class TextEditorDock;
    3545
    3646public:
     
    5363        void numberAreaPaintEvent(NumberArea* area, QPaintEvent* event);
    5464        QSize numberAreaSize(const NumberArea* area) const;
     65        bool translateBlock(const QTextBlock& block);
    5566
    5667public slots:
  • punch-card/punch-card-editor/src/app/navigator.h

    r47 r48  
    1414#include "qpunchcard/deckmodel.h"
    1515#include "editorwindow.h"
     16//#include "deckviewer.h"
    1617#include <QResizeEvent>
    1718#include <QDragEnterEvent>
  • punch-card/punch-card-editor/src/qpunchcard/card.cc

    r47 r48  
    2727}
    2828
    29 bool Deck::move(DeckIndex before, DeckIndex after) {
     29bool Deck::insertTimes(DeckIndex after, int times) {
     30        // ja, das ist bloed, aber reicht erst mal:
     31        for(;times>0;times--) insert(++after);
     32        return true;
     33}
     34
     35
     36bool Deck::move(DeckIndex /*before*/, DeckIndex /*after*/) {
    3037        // asdasdas
    3138        return true;
     39        // emit cardChanged
     40}
     41
     42bool Deck::erase(DeckIndex from, DeckIndex to) {
     43        qDebug() << "Deck: Erasing from" << from << " to " << to;
     44//      main->deck->erase( main->deck->begin() += new_max_blocks+1,
     45//         main->deck->begin() += end_block_number+1 );
     46        return true;
     47        // emit cardChanged
    3248}
    3349
     
    7389
    7490QDebug QPunchCard::operator<<(QDebug dbg, const DeckIndex &c) {
    75         dbg.nospace() << "QPunchCard::DeckIndex: i=" << c.asInt() << ". Has deck: " << c.hasDeck() << "\n";
     91        dbg.nospace() << "[QPunchCard::DeckIndex: i=" << c.asInt() << ". Has deck: " << c.hasDeck() << "]";
    7692        return dbg.nospace();
    7793}
  • punch-card/punch-card-editor/src/qpunchcard/card.h

    r47 r48  
    1717
    1818#include "format.h"
     19//#include "codec.h"
    1920
    2021namespace QPunchCard {
     
    123124        // Bearbeitungsfunktionen
    124125        bool insert(DeckIndex after); // neue Karte hinzufuegen
     126        bool insertTimes(DeckIndex after, int times = 1);
    125127        bool move(DeckIndex from, DeckIndex to);
    126 
     128        bool erase(DeckIndex from, DeckIndex to);
     129
     130        // Quick & dirty
     131        inline void emitChanged(DeckIndex lower, DeckIndex upper);
    127132signals:
    128133        void cardCountChanged(int newCardCount); // wer braucht das?
     
    182187        /// @returns null wenn nicht normalisierbar (also letztlich kein Deck da ist)
    183188        QPointer<Card> getCard() const { return canNormalize() ? deck->at(normalized()) : NULL; }
     189
     190        DeckIndex& operator++() { i++; return *this; }
     191        DeckIndex& operator+=(int x) { i+= x; return *this; }
    184192};
    185193
     
    200208inline bool Deck::isValid(int i) { return createIndex(i).isValid(); }
    201209inline DeckIndex Deck::createIndex(int i) { return DeckIndex(this, i); }
    202 
     210inline void Deck::emitChanged(DeckIndex lower, DeckIndex upper) {
     211        emit contentsChanged(lower, upper);
     212}
    203213
    204214}; // Namespace
  • punch-card/punch-card-editor/src/qpunchcard/codec.cc

    r47 r48  
    88
    99using namespace QPunchCard;
     10
     11QString Codec::toAscii(const Card* target_card) const {
     12        QString ret;
     13        for(int x = 0; x < target_card->length(); x++) {
     14                ret += toAscii( &target_card->get(x) );
     15        }
     16        return ret;
     17}
     18
     19void Codec::fromAscii(const QString& string, Card* target_card) const {
     20        if(string.count() > 80) {
     21                qDebug() << "Codec: String has "<< string.count() << " chars, will translate 80: "
     22                         << string << "<<END";
     23        }
     24        Q_ASSERT(target_card != 0);
     25        for(int x = 0; x < qMin(target_card->length(), string.count()); x++) {
     26                target_card->get(x) = fromAscii( string[x].toAscii() );
     27        }
     28}
     29
     30bool Codec::canEncode(const QString& string) const {
     31        for(int x = 0; x < string.count(); x++) {
     32                if(!canEncode( string[x].toAscii() ))
     33                        return false;
     34        }
     35        return true;
     36}
    1037
    1138int Codec::countIllegalColumns(const Card* card) const {
  • punch-card/punch-card-editor/src/qpunchcard/codec.h

    r47 r48  
    3131        virtual ~Codec() {}
    3232        virtual char toAscii(const Column* col) const = 0;
     33        virtual QString toAscii(const Card* target_card) const;
    3334        virtual Column fromAscii(char ch) const = 0;
     35        void fromAscii(const QString& string, Card* target_card) const;
     36
    3437        virtual bool canEncode(const Column* col) const { return toAscii(col) != illegal; }
    35         virtual bool canEncode(char ch) const = 0;
     38        virtual bool canEncode(char /*char*/ ) const = 0;
     39        bool canEncode(const QString& string) const;
    3640
    3741        int countIllegalColumns(const Card* card) const;
  • punch-card/punch-card-editor/src/qpunchcard/deckmodel.cc

    r47 r48  
    6868                card_widget->setCard( main->deck->at(i) );
    6969
    70                 qDebug("Zeichne Karte %d von %d", i, deck->count());
     70                // das hier kommt sonst sehr oft...
     71                //qDebug("Zeichne Karte %d von %d", i, deck->count());
    7172                QPixmap ret = QPixmap::grabWidget( card_widget /* cardwidgets[i] */, QRect(QPoint(), icon_size));
    7273                // sicherheitshalber
     
    9899
    99100
    100 void DeckModel::contentsChanged(DeckIndex left, DeckIndex right) {
     101void DeckModel::contentsChanged(DeckIndex /*left*/, DeckIndex /*right*/) {
    101102        // Ist halt ein casting DeckIndex -> int -> ModelIndex hier noetig,
    102103        // daher kann man nicht einfach SIGNAL => SIGNAL patchen
     
    104105        // mit dem folgenden sind Laengenaenderungen nicht abgedeckt:
    105106        //emit dataChanged( index(left), index(right));
    106         // dummy damit compiler nicht weint:
    107         { left + right; }
    108107        reset();
    109108}
  • punch-card/punch-card-editor/src/src.pro.user

    r47 r48  
    8383    <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>
    8484    <value type="QString" >CVS_RSH=ssh</value>
    85     <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-XAq30nyORB,guid=134c1bb9a70db62ad2f24a9f4b1e9bb3</value>
     85    <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-uhw0GfKk8Y,guid=e0286bbbef04ed7c603577be4b1fe48d</value>
    8686    <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
    8787    <value type="QString" >DESKTOP_SESSION=xfce</value>
     
    122122    <value type="QString" >QTDIR=/usr</value>
    123123    <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
    124     <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3927,unix/sveni:/tmp/.ICE-unix/3927</value>
     124    <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3921,unix/sveni:/tmp/.ICE-unix/3921</value>
    125125    <value type="QString" >SHELL=/bin/bash</value>
    126126    <value type="QString" >SHLVL=1</value>
    127     <value type="QString" >SSH_AGENT_PID=3919</value>
    128     <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-vvipbU3918/agent.3918</value>
     127    <value type="QString" >SSH_AGENT_PID=3913</value>
     128    <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-emYdHV3912/agent.3912</value>
    129129    <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
    130130    <value type="QString" >USER=sven</value>
     
    133133    <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
    134134    <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
    135     <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1260297139.405734-2091533809</value>
     135    <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1260381324.894938-786350827</value>
    136136    <value type="QString" >XDM_MANAGED=method=classic</value>
    137137    <value type="QString" >_=/usr/bin/xfce4-session</value>
     
    160160    <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>
    161161    <value type="QString" >CVS_RSH=ssh</value>
    162     <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-XAq30nyORB,guid=134c1bb9a70db62ad2f24a9f4b1e9bb3</value>
     162    <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-uhw0GfKk8Y,guid=e0286bbbef04ed7c603577be4b1fe48d</value>
    163163    <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
    164164    <value type="QString" >DESKTOP_SESSION=xfce</value>
     
    199199    <value type="QString" >QTDIR=/usr</value>
    200200    <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
    201     <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3927,unix/sveni:/tmp/.ICE-unix/3927</value>
     201    <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3921,unix/sveni:/tmp/.ICE-unix/3921</value>
    202202    <value type="QString" >SHELL=/bin/bash</value>
    203203    <value type="QString" >SHLVL=1</value>
    204     <value type="QString" >SSH_AGENT_PID=3919</value>
    205     <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-vvipbU3918/agent.3918</value>
     204    <value type="QString" >SSH_AGENT_PID=3913</value>
     205    <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-emYdHV3912/agent.3912</value>
    206206    <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
    207207    <value type="QString" >USER=sven</value>
     
    210210    <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
    211211    <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
    212     <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1260297139.405734-2091533809</value>
     212    <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1260381324.894938-786350827</value>
    213213    <value type="QString" >XDM_MANAGED=method=classic</value>
    214214    <value type="QString" >_=/usr/bin/xfce4-session</value>
     
    233233    <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>
    234234    <value type="QString" >CVS_RSH=ssh</value>
    235     <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-i5TbEPyS69,guid=df5ddbcc5e99ee37a66b52c84b1acc98</value>
     235    <value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-uhw0GfKk8Y,guid=e0286bbbef04ed7c603577be4b1fe48d</value>
    236236    <value type="QString" >DCCC_PATH=/usr/lib/distcc/bin</value>
    237237    <value type="QString" >DESKTOP_SESSION=xfce</value>
     
    272272    <value type="QString" >QTDIR=/usr</value>
    273273    <value type="QString" >SANE_CONFIG_DIR=/etc/sane.d</value>
    274     <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3916,unix/sveni:/tmp/.ICE-unix/3916</value>
     274    <value type="QString" >SESSION_MANAGER=local/sveni:@/tmp/.ICE-unix/3921,unix/sveni:/tmp/.ICE-unix/3921</value>
    275275    <value type="QString" >SHELL=/bin/bash</value>
    276276    <value type="QString" >SHLVL=1</value>
    277     <value type="QString" >SSH_AGENT_PID=3908</value>
    278     <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-RXWoZv3907/agent.3907</value>
     277    <value type="QString" >SSH_AGENT_PID=3913</value>
     278    <value type="QString" >SSH_AUTH_SOCK=/tmp/ssh-emYdHV3912/agent.3912</value>
    279279    <value type="QString" >USB_DEVFS_PATH=/dev/bus/usb</value>
    280280    <value type="QString" >USER=sven</value>
     
    283283    <value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
    284284    <value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/kde/4.2/share:/usr/kde/3.5/share:/usr/share:/usr/share</value>
    285     <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1260047511.776293-2048873734</value>
     285    <value type="QString" >XDG_SESSION_COOKIE=4ca7d15657433fffff2f84004717d7fc-1260381324.894938-786350827</value>
    286286    <value type="QString" >XDM_MANAGED=method=classic</value>
    287287    <value type="QString" >_=/usr/bin/xfce4-session</value>
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