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...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
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