diff --git a/plugins/patience_plugin/Patience/Ablagestapel.cpp b/plugins/patience_plugin/Patience/Ablagestapel.cpp new file mode 100644 index 000000000..3ff654093 --- /dev/null +++ b/plugins/patience_plugin/Patience/Ablagestapel.cpp @@ -0,0 +1,59 @@ +#include "Ablagestapel.h" +#include "Karte.h" +#include "Proportionen.h" +#include "Scene.h" + +using namespace std; + +Ablagestapel::Ablagestapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent) : Basisstapel(pixmap, oparent, gparent) +{ +} + + +Ablagestapel::~Ablagestapel() +{ +} + + +QPointF Ablagestapel::ablageposition() const +{ +QPointF erg; + +// im ablagestapel sollen die karten aufgefaechert abgelegt werden, deshalb YDRIFT hinzufuegen. die position ist relative zum parent grafik objekt +if (kartenliste.size() > 0) erg.setY(boundingRect().height() / ABLAGESTAPEL_YDRIFT_VERHAELTNIS); + +return erg; +} + + +bool Ablagestapel::ablage_moeglich(Karte* karte) const +{ +bool erg = false; + +if (Basisstapel::ablage_moeglich(karte) == true && ((oberste_karte() == 0 && karte->wert() == 13) || (oberste_karte() != 0 && oberste_karte()->farbe() != karte->farbe() && karte->wert() == (oberste_karte()->wert() - 1)))) erg = true; + +if (erg == true && oberste_karte() != 0) +{ +if (karte->farbe() == KARTEN_KREUTZ && oberste_karte()->farbe() == KARTEN_PIK) erg = false; +else if (karte->farbe() == KARTEN_PIK && oberste_karte()->farbe() == KARTEN_KREUTZ) erg = false; +else if (karte->farbe() == KARTEN_HERZ && oberste_karte()->farbe() == KARTEN_KARO) erg = false; +else if (karte->farbe() == KARTEN_KARO && oberste_karte()->farbe() == KARTEN_HERZ) erg = false; +} + +return erg; +} + + +void Ablagestapel::passe_groesse_an(double wert) +{ +if (oberste_karte() != 0) oberste_karte()->nach_hause(); + +Basisstapel::passe_groesse_an(wert); + +for (register int idx = 1; idx < kartenliste.size(); idx++) +{ +kartenliste.at(idx)->setPos(kartenliste.at(idx)->pos().x(), (double) boundingRect().height() / ABLAGESTAPEL_YDRIFT_VERHAELTNIS); + +kartenliste.at(idx)->speichere_zuhause(); +} +} diff --git a/plugins/patience_plugin/Patience/Ablagestapel.h b/plugins/patience_plugin/Patience/Ablagestapel.h new file mode 100644 index 000000000..91735ee47 --- /dev/null +++ b/plugins/patience_plugin/Patience/Ablagestapel.h @@ -0,0 +1,23 @@ +#ifndef ABLAGESTAPEL_H +#define ABLAGESTAPEL_H + +#include "Basisstapel.h" + +class Ablagestapel : public Basisstapel +{ +Q_OBJECT + +public: +Ablagestapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent = 0); +virtual ~Ablagestapel(); + +virtual bool ablage_moeglich(Karte*) const; + +public slots: +virtual void passe_groesse_an(double); + +protected: +virtual QPointF ablageposition() const; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Austeilcostapel.cpp b/plugins/patience_plugin/Patience/Austeilcostapel.cpp new file mode 100644 index 000000000..30d0cb630 --- /dev/null +++ b/plugins/patience_plugin/Patience/Austeilcostapel.cpp @@ -0,0 +1,141 @@ +#include "Austeilcostapel.h" +#include "Karte.h" +#include "Proportionen.h" +#include "Scene.h" + +using namespace std; + +Austeilcostapel::Austeilcostapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent) : Basisstapel(pixmap, oparent, gparent), austeilstapel(0), ablagenummer(0) +{ +} + + +Austeilcostapel::~Austeilcostapel() +{ +} + + +void Austeilcostapel::registriere_austeilstapel(Basisstapel* stapel) +{ +austeilstapel = stapel; +} + + +bool Austeilcostapel::ablage_moeglich(Karte * karte) const +{ +bool erg = false; + +if (karte->eigentuemer_stapel()->objectName() == BASISSTAPEL_AUSTEILSTAPEL) erg = true; + +return erg; +} + + +QPointF Austeilcostapel::ablageposition() const +{ +QPointF erg(Basisstapel::ablageposition()); + +// wenn drei karten gezogen werden und die ablagenummer groesser als 0 ist eine drift nach rechts zur position hinzufuegen +if (nur_eine_wird_gezogen() == false && ablagenummer > 0) erg.setX(erg.x() + (boundingRect().width() / AUSTEILCOSTAPEL_XDRIFT_VERHAELTNIS)); + +return erg; +} + + +bool Austeilcostapel::lege_karte_ab(Karte* karte) +{ +bool erg = false; + +// nur, wenn eine ablage ueberhaupt moeglich ist +if (ablage_moeglich(karte) == true) +{ +if (nur_eine_wird_gezogen() == false && oberste_karte() != 0) oberste_karte()->setFlag(QGraphicsItem::ItemIsMovable, false); + +// wenn bereits 3 karten aufgefaechert daliegen +if (nur_eine_wird_gezogen() == false && ablagenummer == 3) +{ +// ablagenummer wieder zuruecksetzen (die nachste karte wird ohne drift eingefuegt) +ablagenummer = 0; + +// die bisher im stapel befindlichen karten sollen ohne drift am stapel liegen +alle_karten_einreihen(); +} + +erg = Basisstapel::lege_karte_ab(karte); + +// wenn drei karten gezogen werden die ablagenummer um 1 erhoehen +if (nur_eine_wird_gezogen() == false) ablagenummer++; +} + +return erg; +} + + +void Austeilcostapel::alle_karten_einreihen() +{ +// von allen karten im stapel die drift entfernen +for (register int idx = 0; idx < kartenliste.size(); idx++) kartenliste.at(idx)->setPos(0, 0); +} + + +void Austeilcostapel::resette_ablagenummer() +{ +// die ablagenummer zuruecksetzen +ablagenummer = 0; + +// von allen karten im stapel die drift entfernen +alle_karten_einreihen(); +} + + +void Austeilcostapel::entferne_karte(Karte* karte) +{ +Basisstapel::entferne_karte(karte); + +if (oberste_karte() != 0) oberste_karte()->setFlag(QGraphicsItem::ItemIsMovable); +} + + +void Austeilcostapel::hilfsanfrage_start(Karte*) +{ +} + + +const QStringList Austeilcostapel::speichere() const +{ +QStringList erg(Basisstapel::speichere()); + +// die ablegenummer speichern +erg.append(QString::number(ablagenummer)); + +return erg; +} + + +bool Austeilcostapel::lade(const QStringList& daten) +{ +bool erg = Basisstapel::lade(daten); + +if (erg == true && daten.size() >= AUSTEILSTAPEL_ANZAHL_SPEICHERELEMENTE) +{ +// die ablagenummer laden +ablagenummer = daten.at(AUSTEILSTAPEL_ABLAGENUMMER_IDX).toInt(); +} + +return erg; +} + + +void Austeilcostapel::passe_groesse_an(double wert) +{ +if (oberste_karte() != 0) oberste_karte()->nach_hause(); + +Basisstapel::passe_groesse_an(wert); + +for (register int idx1 = kartenliste.size() - 1, idx2 = 0; eine_wird_gezogen() == false && idx1 > 0 && idx2 < ablagenummer; idx1--, idx2++) +{ +kartenliste.at(idx1)->setPos(QPointF(boundingRect().width() / AUSTEILCOSTAPEL_XDRIFT_VERHAELTNIS, kartenliste.at(idx1)->pos().y())); + +kartenliste.at(idx1)->speichere_zuhause(); +} +} diff --git a/plugins/patience_plugin/Patience/Austeilcostapel.h b/plugins/patience_plugin/Patience/Austeilcostapel.h new file mode 100644 index 000000000..e62f812c5 --- /dev/null +++ b/plugins/patience_plugin/Patience/Austeilcostapel.h @@ -0,0 +1,37 @@ +#ifndef AUSTEILCOSTAPEL_H +#define AUSTEILCOSTAPEL_H + +#include "Basisstapel.h" + +class Austeilcostapel : public Basisstapel +{ +Q_OBJECT + +public: +Austeilcostapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent = 0); +virtual ~Austeilcostapel(); + +virtual void registriere_austeilstapel(Basisstapel*); +virtual bool ablage_moeglich(Karte *) const; +virtual bool lege_karte_ab(Karte*); +virtual void entferne_karte(Karte*); +virtual const QStringList speichere() const; +virtual bool lade(const QStringList&); + +public slots: +virtual void resette_ablagenummer(); +virtual void hilfsanfrage_start(Karte*); +virtual void passe_groesse_an(double); + +private: +Basisstapel *austeilstapel; +bool nur_eine_ziehen; +virtual void alle_karten_einreihen(); + +protected: +int ablagenummer; + +virtual QPointF ablageposition() const; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Austeilstapel.cpp b/plugins/patience_plugin/Patience/Austeilstapel.cpp new file mode 100644 index 000000000..e2aea3e0c --- /dev/null +++ b/plugins/patience_plugin/Patience/Austeilstapel.cpp @@ -0,0 +1,100 @@ +#include "Austeilstapel.h" +#include "Karte.h" +#include "Proportionen.h" +#include +#include + +using namespace std; + +Austeilstapel::Austeilstapel(const QPixmap& pixmap, Scene* oparent , QGraphicsItem* gparent) : Basisstapel(pixmap, oparent , gparent), costapel(0) +{ +} + + +Austeilstapel::~Austeilstapel() +{ +} + + +void Austeilstapel::registriere_costapel(Basisstapel* costapel_) +{ +costapel = costapel_; +} + + +void Austeilstapel::karte_wurde_aufgedeckt(Karte* karte) +{ +Basisstapel::karte_wurde_aufgedeckt(karte); + +costapel->lege_karte_ab(karte); + +// nur, wenn drei karten gezogen werden +if (nur_eine_wird_gezogen() == false) +{ +// zwei weitere karten ... +for (register int idx = 0; idx < 2 && oberste_karte() != 0; idx++) +{ +Karte *tmp_karte = oberste_karte(); + +// ... auf costapel legen, ... +costapel->lege_karte_ab(tmp_karte); + +// ... und dort aufdecken +tmp_karte->zeige_vorderseite(); +} + +// die neue oberste karte auf costapel beweglich machen +if (costapel->oberste_karte() != 0) costapel->oberste_karte()->setFlag(QGraphicsItem::ItemIsMovable); +} + +normalisiere_zwert(); +} + + +bool Austeilstapel::ablage_moeglich(Karte *karte) const +{ +bool erg = false; + +if (karte->eigentuemer_stapel()->objectName() == BASISSTAPEL_AUSTEILCOSTAPEL && karte->ist_rueckseite() == true) erg = true; + +return erg; +} + + +void Austeilstapel::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ +QGraphicsPixmapItem::mousePressEvent(event); + +if (event->button() == Qt::LeftButton) +{ +if (kartenliste.isEmpty() == true) +{ +if (nur_eine_wird_gezogen() == false) costapel->resette_ablagenummer(); + +while (costapel->karten() > 0) +{ +costapel->oberste_karte()->zeige_rueckseite(); + +lege_karte_ab(costapel->oberste_karte()); +} + +if (kartenliste.isEmpty() == false) emit stapel_durch(); +} + +// sicherstellen, das die scene aktualisiert wird. ist dies ein fehler in QT ??? +scene()->update(); +} +} + + +void Austeilstapel::hilfsanfrage_start(Karte*) +{ +} + + +void Austeilstapel::undo_karten_ablage(Karte* karte) +{ +karte->zeige_rueckseite(); + +Basisstapel::undo_karten_ablage(karte); +} diff --git a/plugins/patience_plugin/Patience/Austeilstapel.h b/plugins/patience_plugin/Patience/Austeilstapel.h new file mode 100644 index 000000000..80550e909 --- /dev/null +++ b/plugins/patience_plugin/Patience/Austeilstapel.h @@ -0,0 +1,28 @@ +#ifndef AUSTEILSTAPEL_H +#define AUSTEILSTAPEL_H + +#include "Basisstapel.h" + +class Austeilstapel : public Basisstapel +{ +Q_OBJECT + +public: +Austeilstapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent = 0); +virtual ~Austeilstapel(); + +virtual void registriere_costapel(Basisstapel*); +virtual void karte_wurde_aufgedeckt(Karte*); +virtual bool ablage_moeglich(Karte*) const; +virtual void undo_karten_ablage(Karte*); + +public slots: +virtual void hilfsanfrage_start(Karte*); + +private: +Basisstapel *costapel; + +virtual void mousePressEvent(QGraphicsSceneMouseEvent*); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Basisstapel.cpp b/plugins/patience_plugin/Patience/Basisstapel.cpp new file mode 100644 index 000000000..3d2b45e65 --- /dev/null +++ b/plugins/patience_plugin/Patience/Basisstapel.cpp @@ -0,0 +1,410 @@ +#include "Basisstapel.h" +#include "Karte.h" +#include "Rahmen.h" +#include "Hilfszeiger.h" +#include "Scene.h" +#include "Proportionen.h" + +using namespace std; + +Basisstapel::Basisstapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent) : QObject(oparent), QGraphicsPixmapItem(pixmap, gparent), meine_scene(oparent), nur_eine_ziehen(true), meinrahmen(0), meinhilfszeiger(0), bild(pixmap), bild_skaliert(pixmap), stapelgroesse(pixmap.height()) +{ +// den hilfszeiger erstellen +meinhilfszeiger = new Hilfszeiger(this); +meinhilfszeiger->hide(); +} + + +Basisstapel::~Basisstapel() +{ +} + + +bool Basisstapel::lege_karte_ab(Karte* karte) +{ +bool erg = false; + +if (ablage_moeglich(karte) == true) +{ +erg = true; + +Basisstapel *quelle(karte->eigentuemer_stapel()); + +// die oberste karte,oder den stapel, wenn keine karte vorhanden ist zum parent der karte machen +if (oberste_karte() == 0) karte->setParentItem(this); +else karte->setParentItem(oberste_karte()); + +// die position der karte einstellen +karte->setPos(ablageposition()); + +// die karte aus dem alten stapel entfernen +karte->eigentuemer_stapel()->entferne_karte(karte); + +// der karten den stapel, zu der sie jetzt gehoert mitteilen +karte->setze_meinstapel(this); + +// die rueckkehrposition der karte anpassen +karte->setze_rueckehrkoordinaten(karte->pos()); + +// den zwert der karte setzen +karte->setZValue(zwert()); + +// die karte in die kartenliste einfuegen +kartenliste.append(karte); + +// die kinder karten der karten ebenfalls ablegen +lege_child_karten_ab(karte); + +emit zug(Zug(karte, quelle, this)); + +ablage_erfolgt(); +} + +return erg; +} + + +bool Basisstapel::beruehrungstest(Karte* karte) +{ +return gesamt_rect().intersects(karte->gesamt_rect()); +} + + +bool Basisstapel::ablage_moeglich(Karte* karte) const +{ +bool erg = false; + +if ((oberste_karte() == 0 || (oberste_karte() != 0 && oberste_karte()->ist_vorderseite() == true)) && karte->eigentuemer_stapel() != this) erg = true; + +return erg; +} + + +QPointF Basisstapel::ablageposition() const +{ +return QPointF(0, 0); +} + + +void Basisstapel::initialisiere_karte(Karte* karte) +{ +// die oberste karte,oder den stapel wenn keine karte vorhanden ist zum parent der karte machen +if (oberste_karte() == 0) karte->setParentItem(this); +else karte->setParentItem(oberste_karte()); + +// die position der karte einstellen +karte->setPos(ablageposition()); + +// der karten den stapel, zu der sie jetzt gehoert mitteilen +karte->setze_meinstapel(this); + +// die rueckkehrposition der karte anpassen +karte->setze_rueckehrkoordinaten(karte->pos()); + +// den zwert der karte setzen +karte->setZValue(zwert()); + +// die karte in die kartenliste einfuegen +kartenliste.append(karte); +} + + +int Basisstapel::zwert() const +{ +int erg = zValue(); + +if (kartenliste.isEmpty() == false) erg = kartenliste.last()->zValue(); + +erg++; + +return erg; +} + + +Karte* Basisstapel::oberste_karte() const +{ +Karte* erg = 0; + +if (kartenliste.isEmpty() == false) erg = kartenliste.last(); + +return erg; +} + + +bool Basisstapel::ist_oberste_karte(Karte* karte) +{ +bool erg = false; + +if (oberste_karte() != 0 && oberste_karte() == karte) erg = true; + +return erg; +} + + +void Basisstapel::entferne_karte(Karte* karte) +{ +if (kartenliste.contains(karte) == true) kartenliste.removeAll(karte); +} + + +void Basisstapel::karte_wurde_aufgedeckt(Karte* karte) +{ +emit zug(Zug(karte, this)); +} + + +void Basisstapel::lege_child_karten_ab(Karte* karte) +{ +QList kinder(karte->kinderkarten()); + +for (register int idx = 0; idx < kinder.size(); idx++) +{ +// die position der karte einstellen +kinder.at(idx)->setPos(ablageposition()); + +// die karte aus dem alten stapel entfernen +kinder.at(idx)->eigentuemer_stapel()->entferne_karte(kinder.at(idx)); + +// der karten den stapel, zu der sie jetzt gehoert mitteilen +kinder.at(idx)->setze_meinstapel(this); + +// die rueckkehrposition der karte anpassen +kinder.at(idx)->setze_rueckehrkoordinaten(kinder.at(idx)->pos()); + +// den zwert der karte setzen +kinder.at(idx)->setZValue(zwert()); + +// die karte in die kartenliste einfuegen +kartenliste.append(kinder.at(idx)); +} +} + + +void Basisstapel::erhoehe_zwert() +{ +setZValue(1000); +} + + +void Basisstapel::normalisiere_zwert() +{ +setZValue(0); +} + + +int Basisstapel::karten() const +{ +return kartenliste.size(); +} + + +void Basisstapel::setze_kartenliste_zurueck() +{ +kartenliste.clear(); +} + + +void Basisstapel::ablage_erfolgt() +{ +} + + +QRectF Basisstapel::gesamt_rect() const +{ +QRectF erg(sceneBoundingRect()); + +if (oberste_karte() != 0) erg.setBottomRight(oberste_karte()->sceneBoundingRect().bottomRight()); + +return erg; +} + + +int Basisstapel::ueberlappungs_flaeche(Karte* karte) +{ +QRectF ueberlappung_rect(gesamt_rect().intersect(karte->gesamt_rect())); + +return ueberlappung_rect.width() * ueberlappung_rect.height(); +} + + +bool Basisstapel::nur_eine_wird_gezogen() const +{ +return nur_eine_ziehen; +} + + +void Basisstapel::eine_ziehen() +{ +nur_eine_ziehen = true; +} + + +void Basisstapel::drei_ziehen() +{ +nur_eine_ziehen = false; +} + + +void Basisstapel::registriere_costapel(Basisstapel*) +{ +} + + +void Basisstapel::registriere_austeilstapel(Basisstapel*) +{ +} + + +void Basisstapel::resette_ablagenummer() +{ +} + + +void Basisstapel::alle_karten_einreihen() +{ +} + + +void Basisstapel::registriere_siegkontrolle(Siegkontrolle*) +{ +} + + +void Basisstapel::registriere_nachbar_zielstapel(Basisstapel*, Basisstapel*, Basisstapel*) +{ +} + + +void Basisstapel::registriere_rahmen(Rahmen *rahmen) +{ +meinrahmen = rahmen; +} + + +void Basisstapel::zeige_rahmen() +{ +if (meinrahmen != 0) +{ +QPointF position(scenePos()); + +if (oberste_karte() != 0) position = oberste_karte()->scenePos(); + +meinrahmen->zeige(this, position); +} +} + + +void Basisstapel::hilfsanfrage_start(Karte* karte) +{ +// wenn die ablage der karte moeglich ist +if (ablage_moeglich(karte) == true) +{ +// die position des hilfszeiger setzen + +meinhilfszeiger->setPos(QPointF(boundingRect().width() / 2 - meinhilfszeiger->boundingRect().width() / 2, gesamt_rect().height() + stapelgroesse / BASISSTAPEL_ABSTAND_HILFSZEIGER_VERHAELTNIS)); +meinhilfszeiger->show(); +} +} + + +void Basisstapel::hilfsanfrage_ende() +{ +// den hilfszeiger verstecken +meinhilfszeiger->hide(); +} + + +void Basisstapel::undo_karten_ablage(Karte* karte) +{ +// die oberste karte,oder den stapel, wenn keine karte vorhanden ist zum parent der karte machen +if (oberste_karte() == 0) karte->setParentItem(this); +else karte->setParentItem(oberste_karte()); + +// die position der karte einstellen +karte->setPos(ablageposition()); + +// die karte aus dem alten stapel entfernen +karte->eigentuemer_stapel()->entferne_karte(karte); + +// der karten den stapel, zu der sie jetzt gehoert mitteilen +karte->setze_meinstapel(this); + +// die rueckkehrposition der karte anpassen +karte->setze_rueckehrkoordinaten(karte->pos()); + +// den zwert der karte setzen +karte->setZValue(zwert()); + +// die karte in die kartenliste einfuegen +kartenliste.append(karte); + +// die kinder karten der karten ebenfalls ablegen +lege_child_karten_ab(karte); +} + + +const QStringList Basisstapel::speichere() const +{ +QStringList erg; + +// den namen des stapels als id speichern +erg.append(objectName()); + +// die enthaltenen karten speichern +QString karten; + +for (register int idx = 0; idx < kartenliste.size(); idx++) +{ +if (idx > 0) karten.append(BASISSTAPEL_KARTEN_SPLITTER); + +karten.append(kartenliste.at(idx)->objectName()); +} + +erg.append(karten); + +return erg; +} + + +bool Basisstapel::lade(const QStringList& daten) +{ +bool erg = false; + +if (daten.size() >= BASISSTAPEL_ANZAHL_SPEICHERELEMENTE && daten.first() == objectName()) +{ +erg = true; + +// die enthaltenen karten laden und an den stapel anhaengen +QStringList karten(daten.at(BASISSTAPEL_KARTEN_IDX).split(BASISSTAPEL_KARTEN_SPLITTER, QString::SkipEmptyParts)); + +for (register int idx = 0; idx < karten.size(); idx++) +{ +Karte *karte = meine_scene->suche_karte(karten.at(idx)); + +if (karte == 0) erg = false; +else initialisiere_karte(karte); +} +} + +return erg; +} + + +void Basisstapel::passe_groesse_an(double wert) +{ +stapelgroesse = wert; + +bild_skaliert = bild.scaledToHeight(stapelgroesse, Qt::SmoothTransformation); + +setPixmap(bild_skaliert); + +// auch den hiflszeiger und den rahmen anpassen +if (meinhilfszeiger != 0) meinhilfszeiger->passe_groesse_an(boundingRect()); +if (meinrahmen != 0) meinrahmen->passe_groesse_an(boundingRect()); +} + + +bool Basisstapel::eine_wird_gezogen() +{ +return nur_eine_ziehen; +} diff --git a/plugins/patience_plugin/Patience/Basisstapel.h b/plugins/patience_plugin/Patience/Basisstapel.h new file mode 100644 index 000000000..30a8348bf --- /dev/null +++ b/plugins/patience_plugin/Patience/Basisstapel.h @@ -0,0 +1,85 @@ +#ifndef BASISSTAPEL_H +#define BASISSTAPEL_H + +#include "Zug.h" +#include +#include +#include +#include +#include +#include + +class Karte; +class Siegkontrolle; +class Rahmen; +class Hilfszeiger; +class Scene; + +class Basisstapel : public QObject, public QGraphicsPixmapItem +{ +Q_OBJECT + +public: +Basisstapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent = 0); +virtual ~Basisstapel(); + +void registriere_rahmen(Rahmen*); +void zeige_rahmen(); + +virtual bool beruehrungstest(Karte*); +virtual Karte* oberste_karte() const; +virtual bool ist_oberste_karte(Karte*); +virtual void lege_child_karten_ab(Karte*); +virtual void erhoehe_zwert(); +virtual void normalisiere_zwert(); +virtual int karten() const; +virtual void setze_kartenliste_zurueck(); +virtual QRectF gesamt_rect() const; +virtual int ueberlappungs_flaeche(Karte*); +virtual bool nur_eine_wird_gezogen() const; +virtual bool ablage_moeglich(Karte *) const; +virtual bool lege_karte_ab(Karte*); +virtual void undo_karten_ablage(Karte*); +virtual void initialisiere_karte(Karte*); +virtual void karte_wurde_aufgedeckt(Karte*); +virtual void ablage_erfolgt(); +virtual void entferne_karte(Karte*); +virtual void registriere_costapel(Basisstapel*); +virtual void registriere_austeilstapel(Basisstapel*); +virtual void resette_ablagenummer(); +virtual void registriere_siegkontrolle(Siegkontrolle*); +virtual void registriere_nachbar_zielstapel(Basisstapel*, Basisstapel*, Basisstapel*); +virtual const QStringList speichere() const; +virtual bool lade(const QStringList&); + +bool eine_wird_gezogen(); + +public slots: +virtual void eine_ziehen(); +virtual void drei_ziehen(); +virtual void hilfsanfrage_start(Karte*); +virtual void hilfsanfrage_ende(); +virtual void passe_groesse_an(double); + +signals: +void zug(const Zug&); +void stapel_durch(); + +protected: +QList kartenliste; + +virtual QPointF ablageposition() const; +virtual int zwert() const; + +private: +Scene *meine_scene; +bool nur_eine_ziehen; +Rahmen *meinrahmen; +Hilfszeiger *meinhilfszeiger; +QPixmap bild, bild_skaliert; +double stapelgroesse; + +virtual void alle_karten_einreihen(); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Highscore.cpp b/plugins/patience_plugin/Patience/Highscore.cpp new file mode 100644 index 000000000..fa69fe6b3 --- /dev/null +++ b/plugins/patience_plugin/Patience/Highscore.cpp @@ -0,0 +1,180 @@ +#include "Highscore.h" +#include "Proportionen.h" +#include +#include +#include +#include +#include + +using namespace std; + +Highscore::Highscore(QWidget *parent) : QDialog(parent), einstellungen(0) +{ +setupUi(this); + +tabelle->setRowCount(HIGHSCORE_ZEILEN); + +// die tabelle mit elementen befuellen +for (register int idx1 = 0; idx1 < tabelle->rowCount(); idx1++) +{ +for (register int idx2 = 0; idx2 <= HIGHSCORE_ZEIT_POSITION; idx2++) +{ +QTableWidgetItem *tmp_item = new QTableWidgetItem(); + +tmp_item->setText(HIGHSCORE_LEER); + +tabelle->setItem(idx1, idx2, tmp_item); +} +} +} + + +Highscore::~Highscore() +{ +} + + +bool Highscore::neues_ergebnis(int punkte, long sekunden) +{ +bool erg = false; +int ziel = -1; + +for (register int idx = HIGHSCORE_ZEILEN - 1; idx >= 0; idx--) +{ +int element_sekundenverbrauch = 0, element_ergebnis = 0; + +QStringList tmp_zeit(tabelle->item(idx, HIGHSCORE_ZEIT_POSITION)->text().split(HIGHSCORE_SPLITTER, QString::SkipEmptyParts)); + +// wenn das element an idx leer ist ist es auf jeden fall unterlegen +if (tabelle->item(idx, HIGHSCORE_NAME_POSITION)->text() == HIGHSCORE_LEER || tabelle->item(idx, HIGHSCORE_PUNKTE_POSITION)->text() == HIGHSCORE_LEER || tabelle->item(idx, HIGHSCORE_ZEIT_POSITION)->text() == HIGHSCORE_LEER) +{ +ziel = idx; +} + +// ansonsten +else if (tmp_zeit.size() == 3) +{ +// die bewertung des tabellenelements an idx berechnen. je mehr mienen und felder, je mehr punkte +element_ergebnis = tabelle->item(idx, HIGHSCORE_PUNKTE_POSITION)->text().toInt(); + +// den sekundenverbrauch fuer des tabellenelements an idx berechnen +element_sekundenverbrauch = (tmp_zeit.at(0).toInt() * 3600) + (tmp_zeit.at(1).toInt() * 60) + tmp_zeit.at(2).toInt(); +} + +// wenn das neue ergebnis mehr punkte hat als das tabellenelement oder gleich viel punkte wie das tabellenelement enthaelt, aber weniger zeit verbraucht hat ist es ueberlegen +if (punkte > element_ergebnis || (punkte == element_ergebnis && sekunden < element_sekundenverbrauch)) ziel = idx; +} + +// wenn das neue element in die tabelle darf +if (ziel >= 0 && ziel < tabelle->rowCount()) +{ +// eine neue reihe an ziel in die tabelle einfuegen ... +tabelle->insertRow(ziel); + +// ... und mit elementen befuellen +tabelle->setItem(ziel, HIGHSCORE_NAME_POSITION, new QTableWidgetItem()); +tabelle->setItem(ziel, HIGHSCORE_PUNKTE_POSITION, new QTableWidgetItem()); +tabelle->setItem(ziel, HIGHSCORE_ZEIT_POSITION, new QTableWidgetItem()); + +// der letzte muss die tabelle verlassen +tabelle->removeRow(tabelle->rowCount() - 1); + +erg = true; +bool ok; + +// den namen des nutzers abfragen +QString name_vorbereitung(QDir::home().dirName()); + +// wenn name_vorbereitung nicht leer ist +if (name_vorbereitung.isEmpty() == false) +{ +QChar erstes_zeichen = name_vorbereitung.at(0); + +if (erstes_zeichen.isLower() == true) name_vorbereitung[0] = erstes_zeichen.toUpper(); +} + +QString name = QInputDialog::getText(parentWidget(), tr("Patience"), tr("You got a Highscore !"), QLineEdit::Normal, name_vorbereitung, &ok); + +// wenn kein nutzername eingegeben wurde den namen auf unbekannt setzen +if (ok == false || name.isEmpty() == true) name = tr("Unknown"); + +// wenn der name LEER entspricht den namen ebenfalls auf unbekannt setzen +if (name == HIGHSCORE_LEER) name = tr("Unknown"); + +int stunden = sekunden / 3600; + +int minuten = (sekunden - (stunden * 3600)) / 60; + +int sekunden_ = sekunden - (minuten * 60) - (stunden * 3600); + +QString stunden_string = QString::number(stunden); +QString minuten_string = QString::number(minuten); +QString sekunden_string = QString::number(sekunden_); + +if (stunden < 10) stunden_string.prepend('0'); +if (minuten < 10) minuten_string.prepend('0'); +if (sekunden_ < 10) sekunden_string.prepend('0'); + +tabelle->item(ziel, HIGHSCORE_NAME_POSITION)->setText(name); +tabelle->item(ziel, HIGHSCORE_PUNKTE_POSITION)->setText(QString::number(punkte)); +tabelle->item(ziel, HIGHSCORE_ZEIT_POSITION)->setText(stunden_string + HIGHSCORE_SPLITTER + minuten_string + HIGHSCORE_SPLITTER + sekunden_string); + +// die highscoretabelle anzeigen +show(); +} + +return erg; +} + + +void Highscore::registriere_einstellungen(QSettings* einstellungen_) +{ +einstellungen = einstellungen_; +} + + +void Highscore::einstellungen_laden() +{ +if (einstellungen != 0) +{ +// die breite der spalten laden +tabelle->setColumnWidth(HIGHSCORE_NAME_POSITION, einstellungen->value(QString("tabelle/spalte_") + QString::number(HIGHSCORE_NAME_POSITION), HIGHSCORE_NAME_SPALTE_STANDARTGROESSE).toInt()); +tabelle->setColumnWidth(HIGHSCORE_PUNKTE_POSITION, einstellungen->value(QString("tabelle/spalte_") + QString::number(HIGHSCORE_PUNKTE_POSITION), tabelle->columnWidth(HIGHSCORE_PUNKTE_POSITION)).toInt()); +tabelle->setColumnWidth(HIGHSCORE_ZEIT_POSITION, einstellungen->value(QString("tabelle/spalte_") + QString::number(HIGHSCORE_ZEIT_POSITION), tabelle->columnWidth(HIGHSCORE_ZEIT_POSITION)).toInt()); +} + +// den inhalt der tabelle laden +for (register int idx = 0; idx < tabelle->rowCount() && einstellungen != 0; idx++) +{ +// den namen laden +tabelle->item(idx, HIGHSCORE_NAME_POSITION)->setText(einstellungen->value(QString("highscore/") + QString::number(idx) + QString("name"), HIGHSCORE_LEER).toString()); + +// die punkte laden +tabelle->item(idx, HIGHSCORE_PUNKTE_POSITION)->setText(einstellungen->value(QString("highscore/") + QString::number(idx) + QString("breite"), HIGHSCORE_LEER).toString()); + +// die zeit laden +tabelle->item(idx, HIGHSCORE_ZEIT_POSITION)->setText(einstellungen->value(QString("highscore/") + QString::number(idx) + QString("hoehe"), HIGHSCORE_LEER).toString()); +} +} + + +void Highscore::einstellungen_speichern() +{ +// die breite der spalten speichern +einstellungen->setValue(QString("tabelle/spalte_") + QString::number(HIGHSCORE_NAME_POSITION), tabelle->columnWidth(HIGHSCORE_NAME_POSITION)); +einstellungen->setValue(QString("tabelle/spalte_") + QString::number(HIGHSCORE_PUNKTE_POSITION), tabelle->columnWidth(HIGHSCORE_PUNKTE_POSITION)); +einstellungen->setValue(QString("tabelle/spalte_") + QString::number(HIGHSCORE_ZEIT_POSITION), tabelle->columnWidth(HIGHSCORE_ZEIT_POSITION)); + +// den inhalt der tabelle speichern +for (register int idx = 0; idx < tabelle->rowCount() && einstellungen != 0; idx++) +{ +// den namen speichern +einstellungen->setValue(QString("highscore/") + QString::number(idx) + QString("name"), tabelle->item(idx, HIGHSCORE_NAME_POSITION)->text()); + +// die punkte speichern +einstellungen->setValue(QString("highscore/") + QString::number(idx) + QString("breite"), tabelle->item(idx, HIGHSCORE_PUNKTE_POSITION)->text()); + +// die zeit speichern +einstellungen->setValue(QString("highscore/") + QString::number(idx) + QString("hoehe"), tabelle->item(idx, HIGHSCORE_ZEIT_POSITION)->text()); +} +} diff --git a/plugins/patience_plugin/Patience/Highscore.h b/plugins/patience_plugin/Patience/Highscore.h new file mode 100644 index 000000000..3d7084596 --- /dev/null +++ b/plugins/patience_plugin/Patience/Highscore.h @@ -0,0 +1,27 @@ +#ifndef HIGHSCORE_H +#define HIGHSCORE_H + +#include +#include +#include "ui_Highscore.h" + +class QSettings; + +class Highscore : public QDialog, private Ui::Highscore +{ +Q_OBJECT + +public: +Highscore(QWidget *parent); +virtual ~Highscore(); + +bool neues_ergebnis(int, long); +void registriere_einstellungen(QSettings*); +void einstellungen_laden(); +void einstellungen_speichern(); + +private: +QSettings *einstellungen; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Highscore.ui b/plugins/patience_plugin/Patience/Highscore.ui new file mode 100644 index 000000000..c499f9ae0 --- /dev/null +++ b/plugins/patience_plugin/Patience/Highscore.ui @@ -0,0 +1,111 @@ + + + Highscore + + + Qt::WindowModal + + + + 0 + 0 + 528 + 300 + + + + + 528 + 300 + + + + Patience - Highscore + + + + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::SelectRows + + + QAbstractItemView::ScrollPerPixel + + + QAbstractItemView::ScrollPerPixel + + + true + + + + Name + + + + + Points + + + + + Time + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Ok + + + false + + + true + + + + + + + + + + + ok_button + clicked() + Highscore + accept() + + + 485 + 275 + + + 356 + 263 + + + + + diff --git a/plugins/patience_plugin/Patience/Hilfszeiger.cpp b/plugins/patience_plugin/Patience/Hilfszeiger.cpp new file mode 100644 index 000000000..6353f3038 --- /dev/null +++ b/plugins/patience_plugin/Patience/Hilfszeiger.cpp @@ -0,0 +1,49 @@ +#include "Hilfszeiger.h" +#include "Basisstapel.h" +#include "Proportionen.h" +#include + +using namespace std; + +Hilfszeiger::Hilfszeiger(Basisstapel *parent) : QObject(parent), QGraphicsItem(parent), meinstapel(parent), breite(parent->boundingRect().width() / HILFSZEIGER_BREITE_VERHAELTNIS), hoehe(parent->boundingRect().height() / HILFSZEIGER_HOEHE_VERHAELTNIS), dicke(parent->boundingRect().height() / HILFSZEIGER_DICKE_VERHAELTNIS) +{ +setZValue(1000); +} + + +Hilfszeiger::~Hilfszeiger() +{ +} + + +void Hilfszeiger::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) +{ +painter->setPen(Qt::darkBlue); +painter->setBrush(Qt::darkBlue); + +QPen stift(painter->pen()); +stift.setWidth(dicke); +painter->setPen(stift); + +painter->drawLine(breite / 2, 0 + (dicke / 2), breite / 2, hoehe - (dicke / 2)); +painter->drawLine(breite / 2, 0 + (dicke / 2), dicke / 2, (hoehe / 2)); +painter->drawLine(breite / 2, 0 + (dicke / 2), breite - (dicke / 2), (hoehe / 2)); +} + + +QRectF Hilfszeiger::boundingRect() const +{ +return QRectF(0, 0, breite, hoehe); +} + + +void Hilfszeiger::passe_groesse_an(const QRectF& wert) +{ +prepareGeometryChange(); + +breite = wert.width() / HILFSZEIGER_BREITE_VERHAELTNIS; +hoehe = wert.height() / HILFSZEIGER_HOEHE_VERHAELTNIS; +dicke = wert.height() / HILFSZEIGER_DICKE_VERHAELTNIS; + +update(); +} diff --git a/plugins/patience_plugin/Patience/Hilfszeiger.h b/plugins/patience_plugin/Patience/Hilfszeiger.h new file mode 100644 index 000000000..3c14206be --- /dev/null +++ b/plugins/patience_plugin/Patience/Hilfszeiger.h @@ -0,0 +1,27 @@ +#ifndef HILFSZEIGER_H +#define HILFSZEIGER_H + +#include +#include + +class Basisstapel; + +class Hilfszeiger : public QObject, public QGraphicsItem +{ +Q_OBJECT + +public: +Hilfszeiger(Basisstapel *parent); +virtual ~Hilfszeiger(); + +virtual QRectF boundingRect() const; +void passe_groesse_an(const QRectF&); + +private: +Basisstapel *meinstapel; +double breite, hoehe, dicke; + +virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Karte.cpp b/plugins/patience_plugin/Patience/Karte.cpp new file mode 100644 index 000000000..af769dd7d --- /dev/null +++ b/plugins/patience_plugin/Patience/Karte.cpp @@ -0,0 +1,424 @@ +#include "Karte.h" +#include "Basisstapel.h" +#include "Proportionen.h" +#include "Scene.h" +#include +#include + +using namespace std; + +Karte::Karte(const QPixmap& vorderseite, const QPixmap& hinterseite, Scene *oparent, QGraphicsItem *gparent) : QObject(oparent), QGraphicsPixmapItem(hinterseite, gparent), vorne(vorderseite), hinten(hinterseite), vorne_skaliert(vorderseite), hinten_skaliert(hinterseite), Wert(0), vorderseite_oben(false), rahmen_anzeigen(true), double_click_sperre(false), gegrabbt(false), scene(oparent), kreutzstapel(0), pikstapel(0), herzstapel(0), karostapel(0), kartengroesse(vorderseite.height()) +{ +setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton); +} + + +Karte::~Karte() +{ +} + + +void Karte::setze_farbe(const QString& farbe_) +{ +Farbe = farbe_; +} + + +const QString& Karte::farbe() const +{ +return Farbe; +} + + +void Karte::setze_wert(int wert_) +{ +Wert = wert_; +} + + +int Karte::wert() const +{ +return Wert; +} + + +void Karte::zeige_vorderseite() +{ +vorderseite_oben = true; + +setPixmap(vorne_skaliert); + +Meinstapel->karte_wurde_aufgedeckt(this); + +// wenn es sich beim stapel nicht um austeilcostapel handelt die karte beweglich machen +if (Meinstapel->objectName() != BASISSTAPEL_AUSTEILCOSTAPEL) setFlag(QGraphicsItem::ItemIsMovable, true); + +// ansonsten die karte unbeweglich machen. dies muss spaeter, im mouse release event wieder rueckgaengig gemacht werden +else setFlag(QGraphicsItem::ItemIsMovable, false); +} + + +void Karte::zeige_rueckseite() +{ +vorderseite_oben = false; + +setPixmap(hinten_skaliert); + +setFlag(QGraphicsItem::ItemIsMovable, false); +} + + +bool Karte::ist_vorderseite() const +{ +return vorderseite_oben; +} + + +bool Karte::ist_rueckseite() const +{ +return !vorderseite_oben; +} + + +void Karte::registriere_stapel(const QList& stapelliste_) +{ +stapelliste = stapelliste_; +} + + +void Karte::setze_meinstapel(Basisstapel *meinstapel_) +{ +Meinstapel = meinstapel_; +} + + +void Karte::setze_rueckehrkoordinaten(const QPointF& punkt) +{ +Rueckkehrkoordinaten = punkt; +} + + +// diese methode ist fuer das ablegen der karte auf dem passenden zielstapel zustaendig, sofern moeglich +void Karte::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ +if (event->buttons() == Qt::LeftButton && gegrabbt == false && flags() == QGraphicsItem::ItemIsMovable && event->button() == Qt::LeftButton && ist_vorderseite() == true && Meinstapel->ist_oberste_karte(this) == true && hat_kinderkarten() == false && Meinstapel->objectName().contains(BASISSTAPEL_ZIELSTAPEL) == false) +{ +// nach einem double click soll die karte bis zum naechsten release gegen bewegungen geschuetzt werden +double_click_sperre = true; + +// die karte soll nicht mehr über die anderen erhoeht werden +Meinstapel->normalisiere_zwert(); + +if (farbe() == KARTEN_KREUTZ) kreutzstapel->lege_karte_ab(this); +else if (farbe() == KARTEN_PIK) pikstapel->lege_karte_ab(this); +else if (farbe() == KARTEN_HERZ) herzstapel->lege_karte_ab(this); +else if (farbe() == KARTEN_KARO) karostapel->lege_karte_ab(this); + +// sicherstellen, das die scene aktualisiert wird +scene->update(); +} +} + + +void Karte::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ +// linke maustaste +if (event->button() == Qt::LeftButton && gegrabbt == false) +{ +gegrabbt = true; + +// die karte soll ueber den anderen erhoeht angezeigt werden +Meinstapel->erhoehe_zwert(); + +if (ist_vorderseite() == true) QGraphicsPixmapItem::mousePressEvent(event); + +// wenn diese karte die oberste karte ist und noch nicht die vorderseite gezeigt wird die vorderseite zeigen +else if (Meinstapel->ist_oberste_karte(this) == true && ist_vorderseite() == false) zeige_vorderseite(); +} + +// wenn die rechte maustaste gedrueckt wurde und die karte beweglich, jedoch nicht gegrabbt ist eine hilfsanfrage starten +else if (event->button() == Qt::RightButton && flags() == QGraphicsItem::ItemIsMovable && gegrabbt == false) +{ +gegrabbt = true; + +emit hilfsanfrage_start(this); +} +} + + +void Karte::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ +// die karte soll nicht mehr über die anderen erhoeht werden +Meinstapel->normalisiere_zwert(); + +QGraphicsPixmapItem::mouseReleaseEvent(event); + +// nur wenn keine weitere maustaste mehr gehalten wird +if (event->buttons() == Qt::NoButton) +{ +// wenn double klick sperre nicht aktive ist +if (double_click_sperre == false) +{ +Basisstapel *ziel = suche_ziel(); + +if (ziel == 0) setPos(Rueckkehrkoordinaten); + +else if (ziel != 0 && ziel->lege_karte_ab(this) == false) setPos(Rueckkehrkoordinaten); + +else setPos(Rueckkehrkoordinaten); + +// die ist noetig, weil beim aufdecken auf dem austeilcostapel die karte unbeweglich gemacht wurde. dies ist jedoch nur zulaessig, wenn nur eine karte gezogen wird. wenn 3 gezogen werden, erfolgt die freigabe aus dem austeilstapel heraus +if (Meinstapel->objectName() == BASISSTAPEL_AUSTEILCOSTAPEL && Meinstapel->nur_eine_wird_gezogen() == true) setFlag(QGraphicsItem::ItemIsMovable, true); +} + +// wenn double klick sperre doch aktive ist +else setPos(Rueckkehrkoordinaten); +} + +// wenn doch noch eine weitere maustaste gehalten wird +else setPos(Rueckkehrkoordinaten); + +// den rahmen wieder verstecken +emit rahmen_verstecken(); + +// den hilfs pfeil wieder ausblenden +emit hilfsanfrage_ende(); + +// die double click sperre wieder aufheben, damit die karte zukuenftig wieder beweglich ist +double_click_sperre = false; + +gegrabbt = false; + +// sicherstellen, das das element nicht laenger gegrabbt ist !!! +ungrabMouse(); +} + + +Basisstapel* Karte::eigentuemer_stapel() +{ +return Meinstapel; +} + + +void Karte::registriere_zielstapel(Basisstapel* kreutzstapel_, Basisstapel* pikstapel_, Basisstapel* herzstapel_, Basisstapel* karostapel_) +{ +kreutzstapel = kreutzstapel_; +pikstapel = pikstapel_; +herzstapel = herzstapel_; +karostapel = karostapel_; +} + + +void Karte::setze_kartenbilder(const QPixmap& vorne_, const QPixmap& hinten_) +{ +vorne = vorne_; +hinten = hinten_; + +passe_groesse_an(kartengroesse); +} + + +Basisstapel* Karte::suche_ziel() +{ +QList moegliche_ziele(stapelliste); + +Basisstapel *erg = 0; + +// den eigenen stapel aus moegliche_ziele entfernen +moegliche_ziele.removeAll(Meinstapel); + +// alle unmoeglichen stapel entfernen +for (register int idx = 0; idx < moegliche_ziele.size(); idx++) if (moegliche_ziele.at(idx)->ablage_moeglich(this) == false && (moegliche_ziele.at(idx)->objectName().contains("ziel") == false || (moegliche_ziele.at(idx)->objectName().contains("ziel") == true && kreutzstapel->ablage_moeglich(this) == false && pikstapel->ablage_moeglich(this) == false && herzstapel->ablage_moeglich(this) == false && karostapel->ablage_moeglich(this) == false))) +{ +moegliche_ziele.removeAt(idx); + +idx--; +} + +// wenn das ziel noch nicht eindeutig ist die groesste ueberlappung finden +if (moegliche_ziele.size() > 1) +{ +// das ziel mit der groessten ueberlappenden flaeche finden +Basisstapel *ziel = 0; +int groesste_ueberlappung = 0; + +for (register int idx = 0; idx < moegliche_ziele.size(); idx++) +{ +int ueberlappung = moegliche_ziele.at(idx)->ueberlappungs_flaeche(this); + +if (ueberlappung > groesste_ueberlappung) +{ +groesste_ueberlappung = ueberlappung; + +ziel = moegliche_ziele.at(idx); +} +} + +erg = ziel; +} + +else if (moegliche_ziele.size() == 1) erg = moegliche_ziele.first(); + +// besteht mit dem sieger eine beruehrung ? +if (erg != 0 && erg->beruehrungstest(this) == false) erg = 0; + +// wird ein zielstapel angepeilt? +if (erg != 0 && erg->objectName().contains("ziel") == true) +{ +if (farbe() == KARTEN_KREUTZ && kreutzstapel->ablage_moeglich(this) == true) erg = kreutzstapel; +else if (farbe() == KARTEN_PIK && pikstapel->ablage_moeglich(this) == true) erg = pikstapel; +else if (farbe() == KARTEN_HERZ && herzstapel->ablage_moeglich(this) == true) erg = herzstapel; +else if (farbe() == KARTEN_KARO && karostapel->ablage_moeglich(this) == true) erg = karostapel; +else erg = 0; +} + +return erg; +} + + +void Karte::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ +if (gegrabbt == true) +{ +if (double_click_sperre == false && event->buttons() == Qt::LeftButton) QGraphicsPixmapItem::mouseMoveEvent(event); + +else setPos(Rueckkehrkoordinaten); + +if (rahmen_anzeigen == true) +{ +Basisstapel *ziel = suche_ziel(); + +if (ziel != 0) ziel->zeige_rahmen(); + +else +{ +emit rahmen_verstecken(); +} +} +} +} + + +void Karte::sichtbarkeit_rahmen(bool wert) +{ +rahmen_anzeigen = wert; +} + + +QRectF Karte::gesamt_rect() +{ +QRectF erg(sceneBoundingRect()); + +Karte *testkarte = unterste_karte(); + +erg.setBottomRight(testkarte->sceneBoundingRect().bottomRight()); + +return erg; +} + + +Karte* Karte::unterste_karte() +{ +Karte *erg = this; + +if (hat_kinderkarten() == true) erg = kinderkarten().last(); + +return erg; +} + + +// wenn die karte child items besitzt, die nicht vom typ karte sind muessen diese hier herausgefiltert werden !!! +bool Karte::hat_kinderkarten() const +{ +bool erg = false; + +if (childItems().size() > 1) +{ +qDebug() << tr("The Card ") << objectName() << tr(" have more than one Child Card"); + +exit(1); +} + +if (childItems().size() > 0) erg = true; + +return erg; +} + + +// wenn die karte child items besitzt, die nicht vom typ karte sind muessen diese hier herausgefiltert werden !!! +QList Karte::kinderkarten() +{ +QList erg; + +if (childItems().size() > 1) +{ +qDebug() << tr("The Card ") << objectName() << tr(" have more than one Child Card"); + +exit(1); +} + +if (childItems().isEmpty() == false) erg.append((Karte*) childItems().first()); + +if (erg.isEmpty() == false) erg.append(erg.first()->kinderkarten()); + +return erg; +} + + +const QStringList Karte::speichere() const +{ +QStringList erg; + +// die karten id speichern +erg.append(objectName()); + +// die kartenseite speichern +erg.append(QString::number(ist_vorderseite())); + +return erg; +} + + +bool Karte::lade(const QStringList& daten) +{ +bool erg = false; + +if (daten.size() == KARTE_ANZAHL_SPEICHERELEMENTE && daten.first() == objectName()) +{ +erg = true; + +if (daten.at(KARTE_IST_VORNE_IDX).toInt() == 1) zeige_vorderseite(); + +else zeige_rueckseite(); +} + +return erg; +} + + +void Karte::passe_groesse_an(double wert) +{ +kartengroesse = wert; + +vorne_skaliert = vorne.scaledToHeight(kartengroesse, Qt::SmoothTransformation); +hinten_skaliert = hinten.scaledToHeight(kartengroesse, Qt::SmoothTransformation); + +if (ist_vorderseite() == true) setPixmap(vorne_skaliert); +else setPixmap(hinten_skaliert); +} + + +void Karte::nach_hause() +{ +setPos(Rueckkehrkoordinaten); + +emit rahmen_verstecken(); + +if (scene->mouseGrabberItem() == this) ungrabMouse(); +} + + +void Karte::speichere_zuhause() +{ +Rueckkehrkoordinaten = pos(); +} diff --git a/plugins/patience_plugin/Patience/Karte.h b/plugins/patience_plugin/Patience/Karte.h new file mode 100644 index 000000000..13535240e --- /dev/null +++ b/plugins/patience_plugin/Patience/Karte.h @@ -0,0 +1,74 @@ +#ifndef KARTE_H +#define KARTE_H + +#include +#include +#include +#include +#include +#include +#include + +class Scene; +class Basisstapel; + +class Karte : public QObject, public QGraphicsPixmapItem +{ +Q_OBJECT + +public: +Karte(const QPixmap& vorderseite, const QPixmap& hinterseite, Scene *oparent, QGraphicsItem *gparent = 0); +virtual ~Karte(); + +void setze_farbe(const QString&); +const QString& farbe() const; +void setze_wert(int); +int wert() const; +bool ist_vorderseite() const; +bool ist_rueckseite() const; +void registriere_stapel(const QList& stapelliste_); +void setze_meinstapel(Basisstapel *meinstapel_); +void setze_rueckehrkoordinaten(const QPointF&); +void registriere_zielstapel(Basisstapel* kreutzstapel_, Basisstapel* pikstapel_, Basisstapel* herzstapel_, Basisstapel* karoherzstapel_); +Basisstapel* eigentuemer_stapel(); +void setze_kartenbilder(const QPixmap&, const QPixmap&); +Basisstapel* suche_ziel(); +QList kinderkarten(); +QRectF gesamt_rect(); +Karte* unterste_karte(); +bool hat_kinderkarten() const; +const QStringList speichere() const; +bool lade(const QStringList&); +void nach_hause(); +void speichere_zuhause(); + +public slots: +void zeige_vorderseite(); +void zeige_rueckseite(); +void sichtbarkeit_rahmen(bool); +void passe_groesse_an(double); + +signals: +void rahmen_verstecken(); +void hilfsanfrage_start(Karte*); +void hilfsanfrage_ende(); + +private: +QPixmap vorne, hinten, vorne_skaliert, hinten_skaliert; +QString Farbe; +int Wert; +bool vorderseite_oben, rahmen_anzeigen, double_click_sperre, gegrabbt; +Scene *scene; +QList stapelliste; +Basisstapel *Meinstapel; +QPointF Rueckkehrkoordinaten; +Basisstapel *kreutzstapel, *pikstapel, *herzstapel, *karostapel; +double kartengroesse; + +virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*); +virtual void mousePressEvent(QGraphicsSceneMouseEvent*); +virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent*); +virtual void mouseMoveEvent(QGraphicsSceneMouseEvent*); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/MainWindow.cpp b/plugins/patience_plugin/Patience/MainWindow.cpp new file mode 100644 index 000000000..aef7907cd --- /dev/null +++ b/plugins/patience_plugin/Patience/MainWindow.cpp @@ -0,0 +1,350 @@ +#include "MainWindow.h" +#include "Scene.h" +#include "Highscore.h" +#include "Speichern_frage.h" +#include +#include +#include +#include +#include +#include + +using namespace std; + +MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) +{ +// die benutzeroberflaeche aufbauen +setupUi(this); + +// osx spezifische einstellungen vornehmen +#ifdef Q_WS_MAC + +setUnifiedTitleAndToolBarOnMac(true); + +#endif + +// einstellungen erstellen +einstellungen = new QSettings("konarski-wuppertal", "Patience", this); + +// es ist noetigm das einige einstellungen vorab geladen werden, damit sie von vorne herein verfuegbar sind !!! +// den kartentyp laden +QString kartentyp(einstellungen->value("deckblatt", "french").toString()); + +// sicherstellen, das der geladene kartentyp gueltig ist +if (kartentyp != "french" && kartentyp != "german") kartentyp = "french"; + +// action_french und action_german zu einer gruppe verbinden +QActionGroup *deckblatt_gruppe = new QActionGroup(this); +deckblatt_gruppe->addAction(action_french); +deckblatt_gruppe->addAction(action_german); + +// die action gruppe initialisieren +if (kartentyp == "french") action_french->setChecked(true); +else action_german->setChecked(true); + +// action_eine_ziehen und action_drei_ziehen zu einer gruppe verbinden ... +QActionGroup *spieltyp_gruppe = new QActionGroup(this); +spieltyp_gruppe->addAction(action_eine_ziehen); +spieltyp_gruppe->addAction(action_drei_ziehen); + +// ... und initialisieren +action_eine_ziehen->setChecked(true); + +// action_speichern und action_nicht_speichern zu eoner gruppe verbinden +QActionGroup *speichern_gruppe = new QActionGroup(this); +speichern_gruppe->addAction(action_speichern); +speichern_gruppe->addAction(action_nicht_speichern); + +// scene erstellen ... +scene = new Scene(kartentyp, viewer); +scene->setObjectName("scene"); +scene->setSceneRect(0, 0, 795, 595); +scene->registriere_einstellungen(einstellungen); + +// ... und in viewer registrieren +viewer->setScene(scene); + +// siegmeldung erzeugen +siegmeldung = new QMessageBox(this); +siegmeldung->setWindowModality(Qt::WindowModal); +siegmeldung->setWindowTitle(tr("Patience - You won !")); +siegmeldung->setText(tr("You won, but you don't reach a highscore.")); +siegmeldung->addButton(QMessageBox::Ok); + +sicherheitsfrage = new QMessageBox(this); +sicherheitsfrage->setWindowModality(Qt::WindowModal); +sicherheitsfrage->setWindowTitle(tr("Patience - Start new game ?")); +sicherheitsfrage->setText(tr("Start a new Game and break the current Game ?")); +sicherheitsfrage->addButton(QMessageBox::Yes); +sicherheitsfrage->addButton(QMessageBox::No); + +// punktelabel und zeitlabel erzeugen ... +punktelabel = new QLabel(this); +zeitlabel = new QLabel(this); + +// ... und der statusleiste als permanentes widget hinzufuegen +statusBar()->addPermanentWidget(punktelabel); +statusBar()->addPermanentWidget(zeitlabel); + +// highscore erzeugen +highscore = new Highscore(this); +highscore->registriere_einstellungen(einstellungen); + +// speichern_frage erstellen +speichern_frage = new Speichern_frage(this); +speichern_frage->setObjectName("speichern_frage"); + +// signal - slot verbindungen +// das starten neuer spiele ermoeglichen +connect(action_neues_spiel, SIGNAL(triggered(bool)), this, SLOT(neues_spiel())); + +// action_about ermoeglichen +connect(action_about, SIGNAL(triggered(bool)), this, SLOT(about())); + +// action_about_qt ermoeglichen +connect(action_about_qt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt())); + +// das anzeigen der siegmeldung ermoeglichen +connect(scene, SIGNAL(gewonnen(int, long)), this, SLOT(gewonnen(int, long))); + +// das umschalten des deckblattes waehrend des spiels ermoeglichen +connect(action_french, SIGNAL(triggered(bool)), scene, SLOT(lade_franzoesisches_deckblatt())); +connect(action_german, SIGNAL(triggered(bool)), scene, SLOT(lade_deutsches_deckblatt())); + +// das aktualisieren der punkte ermoeglichen +connect(scene, SIGNAL(neue_punktzahl(int)), this, SLOT(aktualisiere_punktelabel(int))); + +// das aktualisieren der spielzeit ermoeglichen +connect(scene, SIGNAL(verstrichene_sekunden(long)), this, SLOT(aktualisiere_spielzeit(long))); + +// das anzeigen der highscore ermoeglichen +connect(action_highscore, SIGNAL(triggered(bool)), highscore, SLOT(show())); + +// das umschalten des spieltyps ermoeglichen +connect(action_eine_ziehen, SIGNAL(triggered(bool)), this, SLOT(eine_ziehen())); +connect(action_drei_ziehen, SIGNAL(triggered(bool)), this, SLOT(drei_ziehen())); + +// das steuern der rahmen sichtbarkeit ermoeglichen +connect(action_rahmen, SIGNAL(triggered(bool)), scene, SIGNAL(rahmen_anzeigen(bool))); + +// action_schliessen ermoeglichen +connect(action_beenden, SIGNAL(triggered(bool)), this, SLOT(close())); + +// action_undo ermoeglichen +connect(action_undo, SIGNAL(triggered(bool)), scene, SLOT(rueckgaengig())); + +// steuerung der verfuegbarkeit von action_undo ermoeglichen +connect(scene, SIGNAL(undo_verfuegbar(bool)), action_undo, SLOT(setEnabled(bool))); + +// action_fragen und speichern_frage verbinden +connect(action_fragen, SIGNAL(toggled(bool)), speichern_frage, SLOT(verbindung_merken(bool))); +connect(speichern_frage, SIGNAL(verbindung_merk_status(bool)), action_fragen, SLOT(setChecked(bool))); + +// den speicher status mit action_speichern und action_nicht_speichern verbinden +connect(speichern_frage, SIGNAL(wird_gespeichert(bool)), action_speichern, SLOT(setChecked(bool))); +connect(speichern_frage, SIGNAL(wird_nicht_gespeichert(bool)), action_nicht_speichern, SLOT(setChecked(bool))); +connect(action_speichern, SIGNAL(toggled(bool)), speichern_frage, SLOT(setze_speichern(bool))); + +// die restlichen einstellungen laden +restliche_einstellungen_laden(); +} + + +MainWindow::~MainWindow() +{ +// die einstellungen speichern +einstellungen_speichern(); +} + + +void MainWindow::neues_spiel() +{ +// wenn kein spiel laueft, einfach eins starten ... +if (scene->laufendes_spiel() == false) scene->neues_spiel(); + +// ansonsten erst nach einer sicherheitsfrage ein neues spiel starten +else +{ +QAbstractButton *sicherheitsfrage_ja = sicherheitsfrage->button(QMessageBox::Yes); + +sicherheitsfrage->exec(); + +if (sicherheitsfrage->clickedButton() == sicherheitsfrage_ja) scene->neues_spiel(); +} +} + + +void MainWindow::about() +{ +QMessageBox::about(this, tr("About Patience"), tr("Patience Version " VERSION " \n\nAuthor:\tAndreas Konarski\nLizenz:\tgpl\n\nKontakt:\n\nprogrammieren@konarski-wuppertal.de\nwww.konarski-wuppertal.de")); +} + + +void MainWindow::restliche_einstellungen_laden() +{ +// die fenstergeometrie laden +restoreGeometry(einstellungen->value("mainwindow/geometry").toByteArray()); + +// den spieltyp laden +if (einstellungen->value("spieltyp", 1).toInt() == 3) +{ +scene->drei_ziehen(); +action_drei_ziehen->setChecked(true); +} + +// die sichtbarkeit des rahmens laden +action_rahmen->setChecked(einstellungen->value("mainwindow/rahmen", true).toBool()); +scene->initialisiere_rahmen(action_rahmen->isChecked()); + +// die highscore laden +highscore->einstellungen_laden(); + +// den spielstand laden oder ein neues spiel starten +if (einstellungen->value("begonnenes_spiel", false).toBool() == false) scene->neues_spiel(); +else scene->lade_spielstand(); + +// einstellungen fuer speichern_frage laden +speichern_frage->setze_merken(einstellungen->value("speichern_frage/merken", false).toBool()); +speichern_frage->setze_speichern(einstellungen->value("speichern_frage/speichern", true).toBool()); +} + + +void MainWindow::einstellungen_speichern() +{ +// die fenstergeometrie speichern +einstellungen->setValue("mainwindow/geometry", saveGeometry()); + +// den spieltyp speichern +if (scene->nur_eine_wird_gezogen() == true) einstellungen->setValue("spieltyp", 1); +else einstellungen->setValue("spieltyp", 3); + +// die sichtbarkeit des rahmens speichern +einstellungen->setValue("mainwindow/rahmen", action_rahmen->isChecked()); + +// die deckblatt sprache speichern +if (action_french->isChecked() == true) einstellungen->setValue("deckblatt", "french"); +else einstellungen->setValue("deckblatt", "german"); + +// die highscore speichern +highscore->einstellungen_speichern(); + +// wenn ein spiel laueft und der spielstand gespeichert werden soll, den spielstand speichern +if (scene->begonnenes_spiel() == true && speichern_frage->soll_speichern() == true) +{ +scene->speichere_spielstand(); + +// speichern, ob ein spiel begonnen wurde +einstellungen->setValue("begonnenes_spiel", scene->begonnenes_spiel()); +} + +else einstellungen->setValue("begonnenes_spiel", false); + +// einstellungen fuer speichern_frage speichern +einstellungen->setValue("speichern_frage/merken", speichern_frage->soll_merken()); +einstellungen->setValue("speichern_frage/speichern", speichern_frage->soll_speichern()); +} + + +void MainWindow::gewonnen(int punkte, long sekunden) +{ +if (highscore->neues_ergebnis(punkte, sekunden) == false) siegmeldung->show(); +} + + +void MainWindow::aktualisiere_punktelabel(int wert) +{ +punktelabel->setText(QString::number(wert) + tr(" Points")); +} + + +void MainWindow::aktualisiere_spielzeit(long verstrichene_sekunden) +{ +// die verstrichenen sekunden aufbereiten +int stunden = verstrichene_sekunden / 3600; + +int minuten = (verstrichene_sekunden - (stunden * 3600)) / 60; + +int sekunden = verstrichene_sekunden - (minuten * 60) - (stunden * 3600); + +QString stunden_string = QString::number(stunden); +QString minuten_string = QString::number(minuten); +QString sekunden_string = QString::number(sekunden); + +if (stunden < 10) stunden_string.prepend('0'); +if (minuten < 10) minuten_string.prepend('0'); +if (sekunden < 10) sekunden_string.prepend('0'); + +zeitlabel->setText(stunden_string + ":" + minuten_string + ":" + sekunden_string); +} + + +void MainWindow::eine_ziehen() +{ +// wenn kein spiel laueft, einfach eins starten ... +if (scene->laufendes_spiel() == false) +{ +scene->eine_ziehen(); +scene->neues_spiel(); +} + +// ansonsten erst nach einer sicherheitsfrage ein neues spiel starten +else +{ +QAbstractButton *sicherheitsfrage_ja = sicherheitsfrage->button(QMessageBox::Yes); + +sicherheitsfrage->exec(); + +if (sicherheitsfrage->clickedButton() == sicherheitsfrage_ja) +{ +scene->eine_ziehen(); +scene->neues_spiel(); +} + +else action_drei_ziehen->setChecked(true); +} +} + + +void MainWindow::drei_ziehen() +{ +// wenn kein spiel laueft, einfach eins starten ... +if (scene->laufendes_spiel() == false) +{ +scene->drei_ziehen(); +scene->neues_spiel(); +} + +// ansonsten erst nach einer sicherheitsfrage ein neues spiel starten +else +{ +QAbstractButton *sicherheitsfrage_ja = sicherheitsfrage->button(QMessageBox::Yes); + +sicherheitsfrage->exec(); + +if (sicherheitsfrage->clickedButton() == sicherheitsfrage_ja) +{ +scene->drei_ziehen(); +scene->neues_spiel(); +} + +else action_eine_ziehen->setChecked(true); +} +} + + +void MainWindow::closeEvent(QCloseEvent* event) +{ +bool brauche_frage = true; + +// wenn kein spiel begonnen wurde oder speichern_frage auf merken (dabei jedoch nicht auf reject) eingestellt ist wird keine frage gebraucht +if (scene->begonnenes_spiel() == false || (speichern_frage->soll_merken() == true && speichern_frage->result() != QDialog::Rejected)) brauche_frage = false; + +// wenn eine frage gebraucht wird +if (brauche_frage == true) speichern_frage->exec(); + +// wenn speichern_frage akzeptiert wurde das schliessen der anwendung erlauben, ... +if (speichern_frage->result() == QDialog::Accepted) QMainWindow::closeEvent(event); + +// ... ansonsten, wenn nicht akzeptiert, verhindern +else if (speichern_frage->result() == QDialog::Rejected) event->ignore(); +} diff --git a/plugins/patience_plugin/Patience/MainWindow.h b/plugins/patience_plugin/Patience/MainWindow.h new file mode 100644 index 000000000..49bf718de --- /dev/null +++ b/plugins/patience_plugin/Patience/MainWindow.h @@ -0,0 +1,46 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#define VERSION "0.81" + +#include +#include "ui_MainWindow.h" + +class Scene; +class QSettings; +class QMessageBox; +class QLabel; +class Highscore; +class Speichern_frage; + +class MainWindow : public QMainWindow, private Ui::MainWindow +{ +Q_OBJECT + +public: +MainWindow(QWidget *parent = 0); +virtual ~MainWindow(); + +private slots: +void neues_spiel(); +void about(); +void restliche_einstellungen_laden(); +void einstellungen_speichern(); +void gewonnen(int, long); +void aktualisiere_punktelabel(int); +void aktualisiere_spielzeit(long); +void eine_ziehen(); +void drei_ziehen(); + +private: +Scene *scene; +QSettings *einstellungen; +QMessageBox *siegmeldung, *sicherheitsfrage; +QLabel *punktelabel, *zeitlabel; +Highscore *highscore; +Speichern_frage *speichern_frage; + +virtual void closeEvent(QCloseEvent*); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/MainWindow.ui b/plugins/patience_plugin/Patience/MainWindow.ui new file mode 100644 index 000000000..053cd28d5 --- /dev/null +++ b/plugins/patience_plugin/Patience/MainWindow.ui @@ -0,0 +1,269 @@ + + + MainWindow + + + + 0 + 0 + 810 + 653 + + + + Patience + + + + + 5 + + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing + + + QGraphicsView::CacheBackground + + + QGraphicsView::FullViewportUpdate + + + + + + + + + 0 + 0 + 810 + 22 + + + + + Game + + + + + + + + &Help + + + + + + + &Settings + + + + &Cardset + + + + + + + Gametype + + + + + + + Save Game + + + + + + + + + + + + + + + + &Highscore + + + + + + &Edit + + + + + + + + + + + + + &New Game + + + Ctrl+N + + + + + Close + + + + + About Patience + + + + + About QT + + + + + true + + + French + + + + + true + + + German + + + + + &Show + + + + + true + + + Take One + + + + + true + + + Take Three + + + + + true + + + French + + + + + true + + + German + + + + + true + + + Take One + + + + + true + + + Take Three + + + + + true + + + true + + + Frame + + + + + Undo + + + + + true + + + true + + + Ask + + + + + true + + + false + + + Save + + + + + true + + + Don't save + + + + + + Viewer + QGraphicsView +
Viewer.h
+
+
+ + + + +
diff --git a/plugins/patience_plugin/Patience/Patience.rc b/plugins/patience_plugin/Patience/Patience.rc new file mode 100644 index 000000000..2f554233d --- /dev/null +++ b/plugins/patience_plugin/Patience/Patience.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "icon.ico" diff --git a/plugins/patience_plugin/Patience/PatiencePlugin.cpp b/plugins/patience_plugin/Patience/PatiencePlugin.cpp new file mode 100644 index 000000000..83b2624f9 --- /dev/null +++ b/plugins/patience_plugin/Patience/PatiencePlugin.cpp @@ -0,0 +1,53 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2010 RetroShare Team + * + * 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., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +//#include +//#include +//#include + +#include "PatiencePlugin.h" +#include "MainWindow.h" + +QString +PatiencePlugin::pluginDescription() const +{ + QString res; + res = "a Patience plugin" ; + + return res; +} + +QString +PatiencePlugin::pluginName() const +{ + return "Patience" ; +} + +QWidget* +PatiencePlugin::pluginWidget(QWidget * parent ) +{ + MainWindow* window = new MainWindow(); + + return window; +} + + +Q_EXPORT_PLUGIN2(patience_plugin, PatiencePlugin) diff --git a/plugins/patience_plugin/Patience/PatiencePlugin.h b/plugins/patience_plugin/Patience/PatiencePlugin.h new file mode 100644 index 000000000..f70af5768 --- /dev/null +++ b/plugins/patience_plugin/Patience/PatiencePlugin.h @@ -0,0 +1,48 @@ +/**************************************************************** + * RetroShare is distributed under the following license: + * + * Copyright (C) 2010 RetroShare Team + * + * 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., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + ****************************************************************/ + +#ifndef _PATIENCE_PLUGIN_H_ +#define _PATIENCE_PLUGIN_H_ + +#include + +#include +#include + +#include + +#include + +class PatiencePlugin: public QObject, public PluginInterface +{ + Q_OBJECT + Q_INTERFACES(PluginInterface) + + public slots: + + virtual QString pluginDescription() const ; + virtual QString pluginName() const ; + + virtual QWidget* pluginWidget(QWidget * parent = 0) ; + +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Proportionen.h b/plugins/patience_plugin/Patience/Proportionen.h new file mode 100644 index 000000000..1998a892e --- /dev/null +++ b/plugins/patience_plugin/Patience/Proportionen.h @@ -0,0 +1,128 @@ +#ifndef PROPORTIONEN_H +#define PROPORTIONEN_H + +// fuer Basisstapel +#define BASISSTAPEL_AUSTEILSTAPEL "austeilstapel" +#define BASISSTAPEL_AUSTEILCOSTAPEL "austeilcostapel" +#define BASISSTAPEL_ZIELSTAPEL "zielstapel" +#define BASISSTAPEL_ABLAGESTAPEL "ablagestapel" +#define BASISSTAPEL_ABSTAND_HILFSZEIGER_VERHAELTNIS 28.0 +#define BASISSTAPEL_ANZAHL_SPEICHERELEMENTE 2 +#define BASISSTAPEL_SAVE_ID_IDX 0 +#define BASISSTAPEL_KARTEN_IDX 1 +#define BASISSTAPEL_KARTEN_SPLITTER "," + +// fuer Ablagestapel +#define ABLAGESTAPEL_YDRIFT_VERHAELTNIS 9.333333333333333 + + +// fuer Austeilcostapel +#define AUSTEILCOSTAPEL_XDRIFT_VERHAELTNIS 7.0 + +// muss um 1 groesser sein als BASISSTAPEL_KARTEN_IDX !!! +#define AUSTEILSTAPEL_ABLAGENUMMER_IDX 2 + +// muss um mindestens 1 groesser sein als BASISSTAPEL_ANZAHL_SPEICHERELEMENTE !!! +#define AUSTEILSTAPEL_ANZAHL_SPEICHERELEMENTE 3 + +// fuer Highscore +#define HIGHSCORE_NAME_POSITION 0 +#define HIGHSCORE_PUNKTE_POSITION 1 +#define HIGHSCORE_ZEIT_POSITION 2 +#define HIGHSCORE_ZEILEN 15 +#define HIGHSCORE_LEER "n / a" +#define HIGHSCORE_SPLITTER ":" +#define HIGHSCORE_NAME_SPALTE_STANDARTGROESSE 250 + + +// fuer Hilfszeiger +#define HILFSZEIGER_BREITE_VERHAELTNIS 6.0 +#define HILFSZEIGER_HOEHE_VERHAELTNIS 7.0 +#define HILFSZEIGER_DICKE_VERHAELTNIS 70 + + +// fuer Karten +#define KARTEN_KREUTZ "kreutz" +#define KARTEN_PIK "pik" +#define KARTEN_HERZ "herz" +#define KARTEN_KARO "karo" +#define KARTEN_ASS "ass" +#define KARTEN_BUBE "bube" +#define KARTEN_DAME "dame" +#define KARTEN_KOENIG "koenig" +#define KARTE_ANZAHL_SPEICHERELEMENTE 2 +#define KARTE_SAVE_ID_IDX 0 +#define KARTE_IST_VORNE_IDX 1 +#define KARTE_VERHAELTNIS_BREITE_ZU_HOEHE 1.555555555555556 + + +// fuer Punktezaehler +// punkte wenn nur eine karte gezogen wird +#define PUNKTEZAEHLER_EINE_ZIEHEN_AUSTEILSTAPEL_ZU_ABLAGESTAPEL 5 +#define PUNKTEZAEHLER_EINE_ZIEHEN_AUSTEILSTAPEL_ZU_ZIELSTAPEL 15 +#define PUNKTEZAEHLER_EINE_ZIEHEN_ABLAGESTAPEL_ZU_ZIELSTAPEL 10 +#define PUNKTEZAEHLER_EINE_ZIEHEN_PUNKTEABZUG_ZEIT 2 +#define PUNKTEZAEHLER_EINE_ZIEHEN_KARTE_AUF_ABLAGESTAPEL_AUFGEDECKT 5 +#define PUNKTEZAEHLER_EINE_ZIEHEN_AUSTEILSTAPEL_DURCH 100 + +// punkte wenn drei karten gezogen werden +#define PUNKTEZAEHLER_DREI_ZIEHEN_AUSTEILSTAPEL_ZU_ABLAGESTAPEL 5 +#define PUNKTEZAEHLER_DREI_ZIEHEN_AUSTEILSTAPEL_ZU_ZIELSTAPEL 15 +#define PUNKTEZAEHLER_DREI_ZIEHEN_ABLAGESTAPEL_ZU_ZIELSTAPEL 10 +#define PUNKTEZAEHLER_DREI_ZIEHEN_PUNKTEABZUG_ZEIT 1 +#define PUNKTEZAEHLER_DREI_ZIEHEN_KARTE_AUF_ABLAGESTAPEL_AUFGEDECKT 5 +#define PUNKTEZAEHLER_DREI_ZIEHEN_AUSTEILSTAPEL_DURCH 50 + +#define PUNKTEZAEHLER_SPLITTER "<<<" + +#define PUNKTEZAEHLER_ANZAHL_SPEICHERELEMENTE 4 +#define PUNKTEZAEHLER_STRING_SPLITTER "," +#define PUNKTEZAEHLER_SAVE_ID_IDX 0 +#define PUNKTEZAEHLER_STRAFTIMER_ON_IDX 1 +#define PUNKTEZAEHLER_NACH_OBEN_LISTE_IDX 2 +#define PUNKTEZAEHLER_PUNKTE_IDX 3 + + +// fuer Rahmen +#define RAHMEN_DICKE_VERHAELTNIS 23.333333333333333 +#define RAHMEN_ECKRADIUS_VERHAELTNIS 9.333333333333333 + +// fuer Scene +#define SCENE_ABLAGE_STAPELZAHL 7 +#define SCENE_ANZAHL_SPEICHERELEMENTE 3 +#define SCENE_SAVE_ID_IDX 0 +#define SCENE_EINE_ZIEHEN_IDX 1 +#define SCENE_VERSTRICHENE_ZEIT_IDX 2 +#define SCENE_AUSGANGSBREITE 795.0 +#define SCENE_AUSGANGSHOEHE 595.0 +#define SCENE_AUSTEILSTAPEL_X_VERHAELTNIS 34.565217391304348 +#define SCENE_AUSTEILCOSTAPEL_X_VERHAELTNIS 5.977443609022556 +#define SCENE_KREUTZZIELSTAPEL_X_VERHAELTNIS 2.252124645892351 +#define SCENE_PIKZIELSTAPEL_X_VERHAELTNIS 1.717062634989201 +#define SCENE_KAROZIELSTAPEL_X_VERHAELTNIS 1.387434554973822 +#define SCENE_HERZZIELSTAPEL_X_VERHAELTNIS 1.16398243045388 +#define SCENE_ABLAGESTAPEL_01_X_VERHAELTNIS 34.565217391304348 +#define SCENE_ABLAGESTAPEL_02_X_VERHAELTNIS 5.977443609022556 +#define SCENE_ABLAGESTAPEL_03_X_VERHAELTNIS 3.271604938271605 +#define SCENE_ABLAGESTAPEL_04_X_VERHAELTNIS 2.252124645892351 +#define SCENE_ABLAGESTAPEL_05_X_VERHAELTNIS 1.717062634989201 +#define SCENE_ABLAGESTAPEL_06_X_VERHAELTNIS 1.387434554973822 +#define SCENE_ABLAGESTAPEL_07_X_VERHAELTNIS 1.16398243045388 +#define SCENE_ABLAGESTAPEL_Y_VERHAELTNIS 3.305555555555556 +#define SCENE_VERHAELTNIS_BREITE_ZU_HOEHE 1.336134453781513 +#define SCENE_VERHAELTNIS_HOEHE_ZU_BREITE 0.748427672955975 +#define SCENE_HOEHE_ZU_KARTENHOEHE 4.25 +#define SCENE_OBERE_STAPEL_Y_VERHAELTNIS 59.5 + + +// fuer Undo +#define ZUEGE_PRO_BEWEGUNG 1.0 +#define ZUEGE_PRO_AUFDECKUNG 0.5 +#define UNDO_LIMIT 3.0 +#define ZUEGE_SPLITTER "," +#define ZUEGE_NACH_SPLITTER "." +#define UNDO_ANZAHL_SPEICHERELEMENTE 2 +#define UNDO_SAVE_ID_IDX 0 +#define UNDO_VERLAUF_IDX 1 + +#endif diff --git a/plugins/patience_plugin/Patience/Punktezaehler.cpp b/plugins/patience_plugin/Patience/Punktezaehler.cpp new file mode 100644 index 000000000..478e31ba5 --- /dev/null +++ b/plugins/patience_plugin/Patience/Punktezaehler.cpp @@ -0,0 +1,284 @@ +#include "Punktezaehler.h" +#include "Scene.h" +#include "Basisstapel.h" +#include "Proportionen.h" +#include +#include + +using namespace std; + +Punktezaehler::Punktezaehler(Scene *parent) : QObject(parent), punkte(0), scene(parent), nur_eine_ziehen(true) +{ +// straftimer erstellen und seinen intervall auf 10 sekunden einstellen +straftimer = new QTimer(this); +straftimer->setInterval(10000); + +// signal - slot verbindungen +// reaktionen auf straftimer ermoeglichen +connect(straftimer, SIGNAL(timeout()), this, SLOT(reaktion_auf_timeout())); +} + + +Punktezaehler::~Punktezaehler() +{ +} + + +void Punktezaehler::neuer_zug(const Zug& zug) +{ +// auf ungueltigen zug pruefen +if (zug.ist_gueltig() == false) +{ +qDebug() << tr("Invalid move in Punktzaehler::neuer_zug()"); + +exit(1); +} + +// nur, wenn ein spiel laeuft +if (scene->laufendes_spiel() == true) +{ +// wenn straftimer noch nicht laueft +if (straftimer->isActive() == false && scene->laufendes_spiel() == true) +{ +straftimer->start(); + +emit erster_zug(); +} + +punkte += kalkuliere_punkte(zug); + +if (straftimer->isActive() == true && bringt_zeitaufschub(zug) == true) +{ +straftimer->stop(); +straftimer->start(); +} + +emit neue_punktzahl(punkte); +} +} + + +void Punktezaehler::neues_spiel() +{ +straftimer->stop(); + +punkte = 0; + +emit neue_punktzahl(punkte); + +nach_oben_liste.clear(); +} + + +void Punktezaehler::spiel_zuende() +{ +straftimer->stop(); +} + + +void Punktezaehler::reaktion_auf_timeout() +{ +if (punkte > 0) +{ +if (nur_eine_ziehen == true) punkte -= PUNKTEZAEHLER_EINE_ZIEHEN_PUNKTEABZUG_ZEIT; +else punkte -= PUNKTEZAEHLER_DREI_ZIEHEN_PUNKTEABZUG_ZEIT; + +if (punkte < 0) punkte = 0; + +emit neue_punktzahl(punkte); +} +} + + +void Punktezaehler::stapel_durch() +{ +if (punkte > 0) +{ +if (nur_eine_ziehen == true) punkte -= PUNKTEZAEHLER_EINE_ZIEHEN_AUSTEILSTAPEL_DURCH; +else punkte -= PUNKTEZAEHLER_DREI_ZIEHEN_AUSTEILSTAPEL_DURCH; + +if (punkte < 0) punkte = 0; + +emit neue_punktzahl(punkte); +} +} + + +int Punktezaehler::punktstand() const +{ +return punkte; +} + + +void Punktezaehler::eine_ziehen() +{ +nur_eine_ziehen = true; +} + + +void Punktezaehler::drei_ziehen() +{ +nur_eine_ziehen = false; +} + + +void Punktezaehler::undo_meldung(const Zug& zug) +{ +// die punke des rueckgaengi gemachten zuges wieder abziehen +nach_oben_liste.removeAll(zug.karte_name()); +punkte -= kalkuliere_punkte(zug); + +emit neue_punktzahl(punkte); +} + + +int Punktezaehler::kalkuliere_punkte(const Zug& zug) const +{ +int erg = 0; + +// wenn es sich um eine bewegung handelt +if (zug.ist_bewegung() == true) +{ +// vom austeilstapel zu einem ablagestapel bringt 5 punkte +if (zug.herkunft_name() == BASISSTAPEL_AUSTEILCOSTAPEL && zug.ziel_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true) +{ +if (nur_eine_ziehen == true) erg += PUNKTEZAEHLER_EINE_ZIEHEN_AUSTEILSTAPEL_ZU_ABLAGESTAPEL; +else erg += PUNKTEZAEHLER_DREI_ZIEHEN_AUSTEILSTAPEL_ZU_ABLAGESTAPEL; +} + +// vom austeilcostapel zum zielstapel bringt 15 punkte +else if (zug.herkunft_name() == BASISSTAPEL_AUSTEILCOSTAPEL && zug.ziel_name().contains(BASISSTAPEL_ZIELSTAPEL) == true && nach_oben_liste.contains(zug.karte_name()) == false) +{ +// man soll fuer das hochlegen einer karte nicht mehrfach punkte kassieren koennen +if (nur_eine_ziehen == true) erg += PUNKTEZAEHLER_EINE_ZIEHEN_AUSTEILSTAPEL_ZU_ZIELSTAPEL; +else erg += PUNKTEZAEHLER_DREI_ZIEHEN_AUSTEILSTAPEL_ZU_ZIELSTAPEL; +} + +// von unten zum zielstapel bringt 10 punkte +else if (zug.herkunft_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true && zug.ziel_name().contains(BASISSTAPEL_ZIELSTAPEL) == true && nach_oben_liste.contains(zug.karte_name()) == false) +{ +if (nur_eine_ziehen == true) erg += PUNKTEZAEHLER_EINE_ZIEHEN_ABLAGESTAPEL_ZU_ZIELSTAPEL; +else erg += PUNKTEZAEHLER_DREI_ZIEHEN_ABLAGESTAPEL_ZU_ZIELSTAPEL; +} +} + +// wenn es sich bei zug um eine aufdeckung handelt +else if (zug.ist_aufdeckgung() == true) +{ +// wenn eine karte vom ablagestapel aufgedeckt wurde gibt's dafuer 5 punkte +if (zug.herkunft_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true) +{ +if (nur_eine_ziehen == true) erg += PUNKTEZAEHLER_EINE_ZIEHEN_KARTE_AUF_ABLAGESTAPEL_AUFGEDECKT; +else erg += PUNKTEZAEHLER_DREI_ZIEHEN_KARTE_AUF_ABLAGESTAPEL_AUFGEDECKT; +} +} + +// wenn es sich weder um eine bewegung noch um eine aufdeckung handelt ist zug ungueltig +else +{ +qDebug() << tr("Invalid move in Punktzaehler::kalkuliere_punkte(const Zug& zug)"); + +exit(1); +} + +return erg; +} + + +bool Punktezaehler::bringt_zeitaufschub(const Zug& zug) const +{ +bool erg = false; + +// wenn es sich um eine bewegung handelt +if (zug.ist_bewegung() == true) +{ +// vom austeilstapel zu einem ablagestapel bringt zeitaufschub +if (zug.herkunft_name() == BASISSTAPEL_AUSTEILCOSTAPEL && zug.ziel_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true) erg = true; + +// vom austeilcostapel zum zielstapel bringt zeitaufschub +else if (zug.herkunft_name() == BASISSTAPEL_AUSTEILCOSTAPEL && zug.ziel_name().contains(BASISSTAPEL_ZIELSTAPEL) == true && nach_oben_liste.contains(zug.karte_name()) == false) erg = true; + +// karte unten umstapeln bringt zeitaufschub +else if (zug.herkunft_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true && zug.ziel_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true) erg = true; + +// von unten zum zielstapel bringt zeitaufschub +else if (zug.herkunft_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true && zug.ziel_name().contains(BASISSTAPEL_ZIELSTAPEL) == true && nach_oben_liste.contains(zug.karte_name()) == false) erg = true; + +// karten vom zielstapel nach unten bringt nur zeitaufschub +else if (zug.herkunft_name().contains(BASISSTAPEL_ZIELSTAPEL) == true && zug.ziel_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true) erg = true; +} + +// wenn es sich bei zug um eine aufdeckung handelt +else if (zug.ist_aufdeckgung() == true) +{ +// wenn eine karte vom ablagestapel aufgedeckt wurde gibt's dafuer 5 punkte +if (zug.herkunft_name().contains(BASISSTAPEL_ABLAGESTAPEL) == true) erg = true; +} + +else +{ +qDebug() << tr("Invalid move in Punktzaehler::bringt_zeitaufschub(const Zug& zug)"); + +exit(1); +} + +return erg; +} + + +const QStringList Punktezaehler::speichere() const +{ +QStringList erg; + +// die id speichern +erg.append(objectName()); + +// straftimer zustand speichern +erg.append(QString::number(straftimer->isActive())); + +// die nach_oben_liste speichern +QString nach_oben_string; + +for (register int idx = 0; idx < nach_oben_liste.size(); idx++) +{ +if (idx > 0) nach_oben_string.append(PUNKTEZAEHLER_STRING_SPLITTER); +nach_oben_string.append(nach_oben_liste.at(idx)); +} + +erg.append(nach_oben_string); + +// die punkte speichern +erg.append(QString::number(punkte)); + +return erg; +} + + +bool Punktezaehler::lade(const QStringList& daten) +{ +bool erg = false; + +if (daten.size() == PUNKTEZAEHLER_ANZAHL_SPEICHERELEMENTE && daten.first() == objectName()) +{ +erg = true; + +// noetigenfalls den straftimer starten +if (daten.at(PUNKTEZAEHLER_STRAFTIMER_ON_IDX).toInt() == 1) straftimer->start(); + +// die nach_oben_liste laden +nach_oben_liste = daten.at(PUNKTEZAEHLER_NACH_OBEN_LISTE_IDX).split(PUNKTEZAEHLER_STRING_SPLITTER, QString::SkipEmptyParts); + +// die punkte laden +punkte = daten.at(PUNKTEZAEHLER_PUNKTE_IDX).toInt(); + +emit neue_punktzahl(punkte); +} + +return erg; +} + + +bool Punktezaehler::begonnenes_spiel() const +{ +return straftimer->isActive(); +} diff --git a/plugins/patience_plugin/Patience/Punktezaehler.h b/plugins/patience_plugin/Patience/Punktezaehler.h new file mode 100644 index 000000000..a3a6fac5c --- /dev/null +++ b/plugins/patience_plugin/Patience/Punktezaehler.h @@ -0,0 +1,52 @@ +#ifndef PUNKTEZAEHLER_H +#define PUNKTEZAEHLER_H + +#include +#include +#include +#include "Zug.h" + +class QTimer; +class Scene; + +class Punktezaehler : public QObject +{ +Q_OBJECT + +public: +Punktezaehler(Scene *parent); +virtual ~Punktezaehler(); + +int punktstand() const; +const QStringList speichere() const; +bool lade(const QStringList&); +bool begonnenes_spiel() const; + +public slots: +void neuer_zug(const Zug&); +void stapel_durch(); +void neues_spiel(); +void spiel_zuende(); +void eine_ziehen(); +void drei_ziehen(); +void undo_meldung(const Zug&); + +signals: +void neue_punktzahl(int); +void erster_zug(); + +private slots: +void reaktion_auf_timeout(); + +private: +int punkte; +QTimer *straftimer; +Scene *scene; +QStringList nach_oben_liste; + +bool nur_eine_ziehen; +int kalkuliere_punkte(const Zug&) const; +bool bringt_zeitaufschub(const Zug&) const; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Rahmen.cpp b/plugins/patience_plugin/Patience/Rahmen.cpp new file mode 100644 index 000000000..b63b21d72 --- /dev/null +++ b/plugins/patience_plugin/Patience/Rahmen.cpp @@ -0,0 +1,74 @@ +#include "Rahmen.h" +#include "Basisstapel.h" +#include "Proportionen.h" +#include + +using namespace std; + +Rahmen::Rahmen(Basisstapel* parent) : QObject(parent), QGraphicsItem(0), Groesse(QSizeF(parent->boundingRect().size().width() + (((parent->boundingRect().size().height() / RAHMEN_DICKE_VERHAELTNIS) - 1) * 2), parent->boundingRect().size().height() + (((parent->boundingRect().size().height() / RAHMEN_DICKE_VERHAELTNIS) - 1) * 2))), meinstapel(0), dicke(parent->boundingRect().size().height() / RAHMEN_DICKE_VERHAELTNIS), eckradius(parent->boundingRect().size().height() / RAHMEN_ECKRADIUS_VERHAELTNIS) +{ +setZValue(500); + +setVisible(false); +} + + +Rahmen::~Rahmen() +{ +} + + +void Rahmen::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) +{ +QPen stift(painter->pen()); + +stift.setWidth(dicke); +stift.setColor(Qt::darkRed); + +painter->setPen(stift); + +painter->drawRoundedRect(boundingRect().adjusted(dicke / 2, dicke / 2, -(dicke / 2), -(dicke / 2)), eckradius, eckradius); +} + + +QRectF Rahmen::boundingRect() const +{ +return QRectF(QPointF(0, 0), Groesse); +} + + +void Rahmen::zeige(Basisstapel* stapel, const QPointF& position) +{ +if (stapel != meinstapel || isVisible() == false) + +meinstapel = stapel; + +setPos(QPointF(position.x() - (dicke), position.y() - (dicke))); + +setVisible(true); +} + + +void Rahmen::verstecke() +{ +if (isVisible() == true) setVisible(false); +} + + +Basisstapel* Rahmen::aktueller_stapel() const +{ +return meinstapel; +} + + +void Rahmen::passe_groesse_an(const QRectF& wert) +{ +prepareGeometryChange(); + +Groesse = QSizeF(wert.size().width() + ((wert.size().height() / RAHMEN_DICKE_VERHAELTNIS) * 2), wert.size().height() + ((wert.size().height() / RAHMEN_DICKE_VERHAELTNIS) * 2)); + +dicke = wert.size().height() / RAHMEN_DICKE_VERHAELTNIS; +eckradius = wert.size().height() / RAHMEN_ECKRADIUS_VERHAELTNIS; + +update(); +} diff --git a/plugins/patience_plugin/Patience/Rahmen.h b/plugins/patience_plugin/Patience/Rahmen.h new file mode 100644 index 000000000..d6faebef5 --- /dev/null +++ b/plugins/patience_plugin/Patience/Rahmen.h @@ -0,0 +1,38 @@ +#ifndef RAHMEN_H +#define RAHMEN_H + +#include +#include + +class Basisstapel; + +class Rahmen : public QObject, public QGraphicsItem +{ +Q_OBJECT + +public: +Rahmen(Basisstapel* parent); +virtual ~Rahmen(); + +void zeige(Basisstapel*, const QPointF&); +Basisstapel *aktueller_stapel() const; +void passe_groesse_an(const QRectF&); + +public slots: +void verstecke(); + +signals: + +private slots: + +private: +QSizeF Groesse; +Basisstapel* meinstapel; +double dicke; +double eckradius; + +void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*); +QRectF boundingRect() const; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Random.cpp b/plugins/patience_plugin/Patience/Random.cpp new file mode 100644 index 000000000..5c9ff40c6 --- /dev/null +++ b/plugins/patience_plugin/Patience/Random.cpp @@ -0,0 +1,77 @@ +#include "Random.h" +#include +#include +#include +#include +#include +#include + +using namespace std; + +namespace Random +{ + +int random(int min, int max) +{ +int ergebnis = 0; +unsigned int differenz = 0; +unsigned int zufall = qrand(); + +// min muss kleiner als max sein +if (min < max) +{ +// die differenz zwischen min und max berechnen +if (min < 0) +{ +differenz = max + (0 - min); +} + +else +{ +differenz = max - min; +} + +// dafuer sorgen, das auch der max als ergebnis moeglich ist. jedoch nur, wenn differenz kleiner als UINT_MAX ist ! +if (differenz < UINT_MAX) differenz++; + +// wenn die differenz groesser als RAND_MAX ist und RAND_MAX kleiner als UINT_MAX ist zufall durch addition zusaetzlicher zufallszahlen vergroessern +if (differenz > RAND_MAX && RAND_MAX < UINT_MAX) +{ +// wie oft passt RAND_MAX in ULONG_MAX ? +int schleifen = UINT_MAX / RAND_MAX; + +// so oft, wie RAND_MAX in UINT_MAX passt die schleife durchlaufen lassen. dabei beruecksichtigen, das eine abfrage bereits erledigt ist +for (register int idx = 1; idx < schleifen; idx++) zufall += qrand(); +} + +// zufall in den bereich der differenz bringen +if (zufall > differenz) +{ +zufall = zufall % differenz; +} + +ergebnis = min + zufall; +} + +// wenn min gleich max ist, ist onehin nur ein wert moeglich +else if (min == max) +{ +ergebnis = min; +} + +else +{ +qDebug() << QObject::tr("min is bigger than max !"); + +exit(1); +} + +return ergebnis; +} + +void initialisiere() +{ +// den zufallssimulator initialisieren +qsrand(QDateTime::currentDateTime().toTime_t() + QTime::currentTime().msec()); +} +} diff --git a/plugins/patience_plugin/Patience/Random.h b/plugins/patience_plugin/Patience/Random.h new file mode 100644 index 000000000..cf94406a8 --- /dev/null +++ b/plugins/patience_plugin/Patience/Random.h @@ -0,0 +1,30 @@ +/* + +Name: Random +Autor: Andreas Konarski +Erstellt: 18.12.2009. +Version: 0.05 +Lizenz: GPL v3 +Plattformen: Alle Systeme, auf denen QT 4.5 verfuegbar ist. + +Kontakt: programmieren@konarski-wuppertal.de +home: www.konarski-wuppertal.de + +Falls ich mit diesem Programm die Rechte von irgend jemand verletzen sollte, bitte ich um einen Hinweis. Wenn dies Tatsaechlich der Fall ist, entferne ich es schnellstmoeglich von meiner Homepage. + +*/ + + +#ifndef RANDOM_H + +#define RANDOM_H + +namespace Random +{ + +int random(int min, int max); +void initialisiere(); + +} + +#endif diff --git a/plugins/patience_plugin/Patience/Scene.cpp b/plugins/patience_plugin/Patience/Scene.cpp new file mode 100644 index 000000000..157955e75 --- /dev/null +++ b/plugins/patience_plugin/Patience/Scene.cpp @@ -0,0 +1,1213 @@ +/* + +Achtung! Die Objektnamen der hier erzeugten Objekte dürfen auf keinen Fall, auch nicht zur korrektur von eventuell vorhandenen Rechtschreibfehlern geaendert werden, da sie in verschiedenen Situationen zur Laufzeit des Programms zum auffinden und identifizieren von Objekten verwendet werden!!! + +*/ + +#include "Scene.h" +#include "Karte.h" +#include "Random.h" +#include "Basisstapel.h" +#include "Austeilstapel.h" +#include "Austeilcostapel.h" +#include "Zielstapel.h" +#include "Ablagestapel.h" +#include "Siegkontrolle.h" +#include "Punktezaehler.h" +#include "Rahmen.h" +#include "Undo.h" +#include "Zug.h" +#include "Proportionen.h" +#include +#include +#include +#include +#include +#include + +using namespace std; + +Scene::Scene(const QString& deckblatt, QObject *parent) : QGraphicsScene(parent), Laufendes_spiel(false), nur_eine_ziehen(true) +{ +// den zufallssimulator initialisieren +Random::initialisiere(); + +// die hintergrundfarbe einstellen +setBackgroundBrush(Qt::darkGreen); + +// die klasse Zug fuer das signal - slot system registrieren +qRegisterMetaType("Zug"); + +/* + +Wichtiger Hinweis: + +Die Reihenfolge, in der die Karten aufgebaut und in die Kartenliste eingefuegt werden, darf auf keinen Fall veraendert werden, da es ansonsten beim aendern des Deckblattes zu fehlern kommen wuerde! Ausserdem darf auch die Anzahl der Karten auf keinen Fall geaendert werden !!! + +*/ + +// die karten erstellen +// die 4 asse erstellen +// kreutz +Karte *kreutz_ass = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/01c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_ass->setObjectName(QString(KARTEN_KREUTZ) + "_" + KARTEN_ASS); +kreutz_ass->setze_farbe(KARTEN_KREUTZ); +kreutz_ass->setze_wert(1); +kartenliste.append(kreutz_ass); + +// karo +Karte *karo_ass = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/01d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_ass->setObjectName(QString(KARTEN_KARO) + "_" + KARTEN_ASS); +karo_ass->setze_farbe(KARTEN_KARO); +karo_ass->setze_wert(1); +kartenliste.append(karo_ass); + +// herz +Karte *herz_ass = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/01h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_ass->setObjectName(QString(KARTEN_HERZ) + "_" + KARTEN_ASS); +herz_ass->setze_farbe(KARTEN_HERZ); +herz_ass->setze_wert(1); +kartenliste.append(herz_ass); + +// pik +Karte *pik_ass = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/01s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_ass->setObjectName(QString(KARTEN_PIK) + "_" + KARTEN_ASS); +pik_ass->setze_farbe(KARTEN_PIK); +pik_ass->setze_wert(1); +kartenliste.append(pik_ass); + +// die 2er erstellen +// kreutz +Karte *kreutz_2 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/02c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_2->setObjectName(QString(KARTEN_KREUTZ) + "_2"); +kreutz_2->setze_farbe(KARTEN_KREUTZ); +kreutz_2->setze_wert(2); +kartenliste.append(kreutz_2); + +// karo +Karte *karo_2 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/02d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_2->setObjectName(QString(KARTEN_KARO) + "_2"); +karo_2->setze_farbe(KARTEN_KARO); +karo_2->setze_wert(2); +kartenliste.append(karo_2); + +// herz +Karte *herz_2 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/02h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_2->setObjectName(QString(KARTEN_HERZ) + "_2"); +herz_2->setze_farbe(KARTEN_HERZ); +herz_2->setze_wert(2); +kartenliste.append(herz_2); + +// pik +Karte *pik_2 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/02s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_2->setObjectName(QString(KARTEN_PIK) + "_2"); +pik_2->setze_farbe(KARTEN_PIK); +pik_2->setze_wert(2); +kartenliste.append(pik_2); + +// die 3er erstellen +// kreutz +Karte *kreutz_3 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/03c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_3->setObjectName(QString(KARTEN_KREUTZ) + "_3"); +kreutz_3->setze_farbe(KARTEN_KREUTZ); +kreutz_3->setze_wert(3); +kartenliste.append(kreutz_3); + +// karo +Karte *karo_3 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/03d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_3->setObjectName(QString(KARTEN_KARO) + "_3"); +karo_3->setze_farbe(KARTEN_KARO); +karo_3->setze_wert(3); +kartenliste.append(karo_3); + +// herz +Karte *herz_3 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/03h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_3->setObjectName(QString(KARTEN_HERZ) + "_3"); +herz_3->setze_farbe(KARTEN_HERZ); +herz_3->setze_wert(3); +kartenliste.append(herz_3); + +// pik +Karte *pik_3 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/03s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_3->setObjectName(QString(KARTEN_PIK) + "_3"); +pik_3->setze_farbe(KARTEN_PIK); +pik_3->setze_wert(3); +kartenliste.append(pik_3); + +// die 4er erstellen +// kreutz +Karte *kreutz_4 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/04c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_4->setObjectName(QString(KARTEN_KREUTZ) + "_4"); +kreutz_4->setze_farbe(KARTEN_KREUTZ); +kreutz_4->setze_wert(4); +kartenliste.append(kreutz_4); + +// karo +Karte *karo_4 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/04d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_4->setObjectName(QString(KARTEN_KARO) + "_4"); +karo_4->setze_farbe(KARTEN_KARO); +karo_4->setze_wert(4); +kartenliste.append(karo_4); + +// herz +Karte *herz_4 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/04h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_4->setObjectName(QString(KARTEN_HERZ) + "_4"); +herz_4->setze_farbe(KARTEN_HERZ); +herz_4->setze_wert(4); +kartenliste.append(herz_4); + +// pik +Karte *pik_4 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/04s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_4->setObjectName(QString(KARTEN_PIK) + "_4"); +pik_4->setze_farbe(KARTEN_PIK); +pik_4->setze_wert(4); +kartenliste.append(pik_4); + +// die 5er erstellen +// kreutz +Karte *kreutz_5 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/05c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_5->setObjectName(QString(KARTEN_KREUTZ) + "_5"); +kreutz_5->setze_farbe(KARTEN_KREUTZ); +kreutz_5->setze_wert(5); +kartenliste.append(kreutz_5); + +// karo +Karte *karo_5 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/05d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_5->setObjectName(QString(KARTEN_KARO) + "_5"); +karo_5->setze_farbe(KARTEN_KARO); +karo_5->setze_wert(5); +kartenliste.append(karo_5); + +// herz +Karte *herz_5 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/05h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_5->setObjectName(QString(KARTEN_HERZ) + "_5"); +herz_5->setze_farbe(KARTEN_HERZ); +herz_5->setze_wert(5); +kartenliste.append(herz_5); + +// pik +Karte *pik_5 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/05s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_5->setObjectName(QString(KARTEN_PIK) + "_5"); +pik_5->setze_farbe(KARTEN_PIK); +pik_5->setze_wert(5); +kartenliste.append(pik_5); + +// die 6er erstellen +// kreutz +Karte *kreutz_6 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/06c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_6->setObjectName(QString(KARTEN_KREUTZ) + "_6"); +kreutz_6->setze_farbe(KARTEN_KREUTZ); +kreutz_6->setze_wert(6); +kartenliste.append(kreutz_6); + +// karo +Karte *karo_6 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/06d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_6->setObjectName(QString(KARTEN_KARO) + "_6"); +karo_6->setze_farbe(KARTEN_KARO); +karo_6->setze_wert(6); +kartenliste.append(karo_6); + +// herz +Karte *herz_6 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/06h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_6->setObjectName(QString(KARTEN_HERZ) + "_6"); +herz_6->setze_farbe(KARTEN_HERZ); +herz_6->setze_wert(6); +kartenliste.append(herz_6); + +// pik +Karte *pik_6 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/06s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_6->setObjectName(QString(KARTEN_PIK) + "_6"); +pik_6->setze_farbe(KARTEN_PIK); +pik_6->setze_wert(6); +kartenliste.append(pik_6); + +// die 7er erstellen +// kreutz +Karte *kreutz_7 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/07c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_7->setObjectName(QString(KARTEN_KREUTZ) + "_7"); +kreutz_7->setze_farbe(KARTEN_KREUTZ); +kreutz_7->setze_wert(7); +kartenliste.append(kreutz_7); + +// karo +Karte *karo_7 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/07d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_7->setObjectName(QString(KARTEN_KARO) + "_7"); +karo_7->setze_farbe(KARTEN_KARO); +karo_7->setze_wert(7); +kartenliste.append(karo_7); + +// herz +Karte *herz_7 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/07h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_7->setObjectName(QString(KARTEN_HERZ) + "_7"); +herz_7->setze_farbe(KARTEN_HERZ); +herz_7->setze_wert(7); +kartenliste.append(herz_7); + +// pik +Karte *pik_7 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/07s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_7->setObjectName(QString(KARTEN_PIK) + "_7"); +pik_7->setze_farbe(KARTEN_PIK); +pik_7->setze_wert(7); +kartenliste.append(pik_7); + +// die 8er erstellen +// kreutz +Karte *kreutz_8 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/08c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_8->setObjectName(QString(KARTEN_KREUTZ) + "_8"); +kreutz_8->setze_farbe(KARTEN_KREUTZ); +kreutz_8->setze_wert(8); +kartenliste.append(kreutz_8); + +// karo +Karte *karo_8 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/08d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_8->setObjectName(QString(KARTEN_KARO) + "_8"); +karo_8->setze_farbe(KARTEN_KARO); +karo_8->setze_wert(8); +kartenliste.append(karo_8); + +// herz +Karte *herz_8 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/08h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_8->setObjectName(QString(KARTEN_HERZ) + "_8"); +herz_8->setze_farbe(KARTEN_HERZ); +herz_8->setze_wert(8); +kartenliste.append(herz_8); + +// pik +Karte *pik_8 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/08s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_8->setObjectName(QString(KARTEN_PIK) + "_8"); +pik_8->setze_farbe(KARTEN_PIK); +pik_8->setze_wert(8); +kartenliste.append(pik_8); + +// die 9er erstellen +// kreutz +Karte *kreutz_9 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/09c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_9->setObjectName(QString(KARTEN_KREUTZ) + "_9"); +kreutz_9->setze_farbe(KARTEN_KREUTZ); +kreutz_9->setze_wert(9); +kartenliste.append(kreutz_9); + +// karo +Karte *karo_9 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/09d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_9->setObjectName(QString(KARTEN_KARO) + "_9"); +karo_9->setze_farbe(KARTEN_KARO); +karo_9->setze_wert(9); +kartenliste.append(karo_9); + +// herz +Karte *herz_9 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/09h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_9->setObjectName(QString(KARTEN_HERZ) + "_9"); +herz_9->setze_farbe(KARTEN_HERZ); +herz_9->setze_wert(9); +kartenliste.append(herz_9); + +// pik +Karte *pik_9 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/09s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_9->setObjectName(QString(KARTEN_PIK) + "_9"); +pik_9->setze_farbe(KARTEN_PIK); +pik_9->setze_wert(9); +kartenliste.append(pik_9); + +// die 10er erstellen +// kreutz +Karte *kreutz_10 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/10c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_10->setObjectName(QString(KARTEN_KREUTZ) + "_10"); +kreutz_10->setze_farbe(KARTEN_KREUTZ); +kreutz_10->setze_wert(10); +kartenliste.append(kreutz_10); + +// karo +Karte *karo_10 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/10d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_10->setObjectName(QString(KARTEN_KARO) + "_10"); +karo_10->setze_farbe(KARTEN_KARO); +karo_10->setze_wert(10); +kartenliste.append(karo_10); + +// herz +Karte *herz_10 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/10h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_10->setObjectName(QString(KARTEN_HERZ) + "_10"); +herz_10->setze_farbe(KARTEN_HERZ); +herz_10->setze_wert(10); +kartenliste.append(herz_10); + +// pik +Karte *pik_10 = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/10s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_10->setObjectName(QString(KARTEN_PIK) + "_10"); +pik_10->setze_farbe(KARTEN_PIK); +pik_10->setze_wert(10); +kartenliste.append(pik_10); + +// die buben erstellen +// kreutz +Karte *kreutz_bube = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/11c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_bube->setObjectName(QString(KARTEN_KREUTZ) + "_" + KARTEN_BUBE); +kreutz_bube->setze_farbe(KARTEN_KREUTZ); +kreutz_bube->setze_wert(11); +kartenliste.append(kreutz_bube); + +// karo +Karte *karo_bube = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/11d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_bube->setObjectName(QString(KARTEN_KARO) + "_" + KARTEN_BUBE); +karo_bube->setze_farbe(KARTEN_KARO); +karo_bube->setze_wert(11); +kartenliste.append(karo_bube); + +// herz +Karte *herz_bube = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/11h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_bube->setObjectName(QString(KARTEN_HERZ) + "_" + KARTEN_BUBE); +herz_bube->setze_farbe(KARTEN_HERZ); +herz_bube->setze_wert(11); +kartenliste.append(herz_bube); + +// pik +Karte *pik_bube = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/11s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_bube->setObjectName(QString(KARTEN_PIK) + "_" + KARTEN_BUBE); +pik_bube->setze_farbe(KARTEN_PIK); +pik_bube->setze_wert(11); +kartenliste.append(pik_bube); + +// die damen erstellen +// kreutz +Karte *kreutz_dame = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/12c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_dame->setObjectName(QString(KARTEN_KREUTZ) + "_" + KARTEN_DAME); +kreutz_dame->setze_farbe(KARTEN_KREUTZ); +kreutz_dame->setze_wert(12); +kartenliste.append(kreutz_dame); + +// karo +Karte *karo_dame = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/12d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_dame->setObjectName(QString(KARTEN_KARO) + "_" + KARTEN_DAME); +karo_dame->setze_farbe(KARTEN_KARO); +karo_dame->setze_wert(12); +kartenliste.append(karo_dame); + +// herz +Karte *herz_dame = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/12h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_dame->setObjectName(QString(KARTEN_HERZ) + "_" + KARTEN_DAME); +herz_dame->setze_farbe(KARTEN_HERZ); +herz_dame->setze_wert(12); +kartenliste.append(herz_dame); + +// pik +Karte *pik_dame = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/12s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_dame->setObjectName(QString(KARTEN_PIK) + "_" + KARTEN_DAME); +pik_dame->setze_farbe(KARTEN_PIK); +pik_dame->setze_wert(12); +kartenliste.append(pik_dame); + +// die koenige erstellen +// kreutz +Karte *kreutz_koenig = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/13c.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +kreutz_koenig->setObjectName(QString(KARTEN_KREUTZ) + "_" + KARTEN_KOENIG); +kreutz_koenig->setze_farbe(KARTEN_KREUTZ); +kreutz_koenig->setze_wert(13); +kartenliste.append(kreutz_koenig); + +// karo +Karte *karo_koenig = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/13d.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +karo_koenig->setObjectName(QString(KARTEN_KARO) + "_" + KARTEN_KOENIG); +karo_koenig->setze_farbe(KARTEN_KARO); +karo_koenig->setze_wert(13); +kartenliste.append(karo_koenig); + +// herz +Karte *herz_koenig = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/13h.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +herz_koenig->setObjectName(QString(KARTEN_HERZ) + "_" + KARTEN_KOENIG); +herz_koenig->setze_farbe(KARTEN_HERZ); +herz_koenig->setze_wert(13); +kartenliste.append(herz_koenig); + +// pik +Karte *pik_koenig = new Karte(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/13s.gif"), QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/back01.gif"), this); +pik_koenig->setObjectName(QString(KARTEN_PIK) + "_" + KARTEN_KOENIG); +pik_koenig->setze_farbe(KARTEN_PIK); +pik_koenig->setze_wert(13); +kartenliste.append(pik_koenig); + +// die stapel erzeugen ... +austeilstapel = new Austeilstapel(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/shade.gif"), this); +austeilstapel->setObjectName(BASISSTAPEL_AUSTEILSTAPEL); +austeilstapel->setZValue(0); + +austeilcostapel = new Austeilcostapel(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/shade.gif"), this); +austeilcostapel->setObjectName(BASISSTAPEL_AUSTEILCOSTAPEL); +austeilcostapel->setZValue(0); + +// austeilstapel und austeilcostapel gegenseitig registrieren +austeilstapel->registriere_costapel(austeilcostapel); +austeilcostapel->registriere_austeilstapel(austeilstapel); + +kreutzzielstapel = new Zielstapel(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/shade.gif"), this); +kreutzzielstapel->setObjectName(QString(KARTEN_KREUTZ) + BASISSTAPEL_ZIELSTAPEL); +kreutzzielstapel->setZValue(0); + +Rahmen *zielrahmen = new Rahmen(kreutzzielstapel); +kreutzzielstapel->registriere_rahmen(zielrahmen); +addItem(zielrahmen); + +pikzielstapel = new Zielstapel(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/shade.gif"), this); +pikzielstapel->setObjectName(QString(KARTEN_PIK) + BASISSTAPEL_ZIELSTAPEL); +pikzielstapel->setZValue(0); +pikzielstapel->registriere_rahmen(zielrahmen); + +karozielstapel = new Zielstapel(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/shade.gif"), this); +karozielstapel->setObjectName(QString(KARTEN_KARO) + BASISSTAPEL_ZIELSTAPEL); +karozielstapel->setZValue(0); +karozielstapel->registriere_rahmen(zielrahmen); + + +herzzielstapel = new Zielstapel(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/shade.gif"), this); +herzzielstapel->setObjectName(QString(KARTEN_HERZ) + BASISSTAPEL_ZIELSTAPEL); +herzzielstapel->setZValue(0); +herzzielstapel->registriere_rahmen(zielrahmen); + +// die zielstapel verknuepfen +kreutzzielstapel->registriere_nachbar_zielstapel(pikzielstapel, karozielstapel, herzzielstapel); +pikzielstapel->registriere_nachbar_zielstapel(kreutzzielstapel, karozielstapel, herzzielstapel); +karozielstapel->registriere_nachbar_zielstapel(kreutzzielstapel, pikzielstapel, herzzielstapel); +herzzielstapel->registriere_nachbar_zielstapel(kreutzzielstapel, pikzielstapel, karozielstapel); + +for (register int idx = 0; idx < SCENE_ABLAGE_STAPELZAHL; idx++) +{ +Basisstapel *tmp_stapel = new Ablagestapel(QPixmap(":/" + deckblatt + "/karten/" + deckblatt + "/shade.gif"), this); +tmp_stapel->setObjectName(QString(BASISSTAPEL_ABLAGESTAPEL) + "_" + QString::number(idx + 1)); +tmp_stapel->setZValue(0); + +// den rahmen fuer den stapel erzeugen +tmp_stapel->registriere_rahmen(zielrahmen); + +ablagestapel.append(tmp_stapel); +} + +// ... ihre positionen setzen +austeilstapel->setPos(SCENE_AUSGANGSBREITE / SCENE_AUSTEILSTAPEL_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +austeilcostapel->setPos(SCENE_AUSGANGSBREITE / SCENE_AUSTEILCOSTAPEL_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +kreutzzielstapel->setPos(SCENE_AUSGANGSBREITE / SCENE_KREUTZZIELSTAPEL_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +pikzielstapel->setPos(SCENE_AUSGANGSBREITE / SCENE_PIKZIELSTAPEL_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +karozielstapel->setPos(SCENE_AUSGANGSBREITE / SCENE_KAROZIELSTAPEL_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +herzzielstapel->setPos(SCENE_AUSGANGSBREITE / SCENE_HERZZIELSTAPEL_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +ablagestapel.at(0)->setPos(SCENE_AUSGANGSBREITE / SCENE_ABLAGESTAPEL_01_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(1)->setPos(SCENE_AUSGANGSBREITE / SCENE_ABLAGESTAPEL_02_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(2)->setPos(SCENE_AUSGANGSBREITE / SCENE_ABLAGESTAPEL_03_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(3)->setPos(SCENE_AUSGANGSBREITE / SCENE_ABLAGESTAPEL_04_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(4)->setPos(SCENE_AUSGANGSBREITE / SCENE_ABLAGESTAPEL_05_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(5)->setPos(SCENE_AUSGANGSBREITE / SCENE_ABLAGESTAPEL_06_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(6)->setPos(SCENE_AUSGANGSBREITE / SCENE_ABLAGESTAPEL_07_X_VERHAELTNIS, SCENE_AUSGANGSHOEHE / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); + +// ... und in die scene einfuegen +addItem(austeilstapel); +addItem(austeilcostapel); +addItem(kreutzzielstapel); +addItem(pikzielstapel); +addItem(karozielstapel); +addItem(herzzielstapel); + +for (register int idx = 0; idx < SCENE_ABLAGE_STAPELZAHL; idx++) addItem(ablagestapel.at(idx)); + +// eine liste erstellen, die alle stapel enthaelt +allestapel = ablagestapel; +allestapel.append(austeilstapel); +allestapel.append(austeilcostapel); +allestapel.append(kreutzzielstapel); +allestapel.append(pikzielstapel); +allestapel.append(karozielstapel); +allestapel.append(herzzielstapel); + +for (register int idx = 0; idx < kartenliste.size(); idx++) +{ +// die stapelliste an alle karten uebergeben +kartenliste.at(idx)->registriere_stapel(allestapel); + +// den karten die zielstapel mitteilen +kartenliste.at(idx)->registriere_zielstapel(kreutzzielstapel, pikzielstapel, herzzielstapel, karozielstapel); + +// alle karten in die scene einfuegen +addItem(kartenliste.at(idx)); +} + +// siegkontrolle erstellen ... +siegkontrolle = new Siegkontrolle(this); +siegkontrolle->setObjectName("siegkontrolle"); + +// ... und in den zielstapeln registrieren +kreutzzielstapel->registriere_siegkontrolle(siegkontrolle); +pikzielstapel->registriere_siegkontrolle(siegkontrolle); +karozielstapel->registriere_siegkontrolle(siegkontrolle); +herzzielstapel->registriere_siegkontrolle(siegkontrolle); + +// in siegkontrolle die zielstapel registrieren +siegkontrolle->registriere_zielstapel(kreutzzielstapel, pikzielstapel, herzzielstapel, karozielstapel); + +// punktezaehler erzeugen +punktezaehler = new Punktezaehler(this); +punktezaehler->setObjectName("punktezaehler"); + +// spieltimer erstellen +spieltimer = new QTimer(this); +spieltimer->setInterval(1000); + +// die auffindhilfen aufbauen +for (register int idx = 0; idx < allestapel.size(); idx++) stapelfinder.insert(allestapel.at(idx)->objectName(), allestapel.at(idx)); +for (register int idx = 0; idx < kartenliste.size(); idx++) kartenfinder.insert(kartenliste.at(idx)->objectName(), kartenliste.at(idx)); + +// undo erstellen +undo = new Undo(this); +undo->setObjectName("undo"); + +// signal - slot verbindungen +// bei spielende (sieg) sollen alle karten blockert werden +connect(siegkontrolle, SIGNAL(gewonnen()), this, SLOT(blockiere_alle_karten())); + +// alle stapel am punktezaehler anschliessen, damit die stapel zuege an punktzaehler melden koennen +for (register int idx = 0; idx < allestapel.size(); idx++) +{ +connect(allestapel.at(idx), SIGNAL(zug(const Zug&)), punktezaehler, SLOT(neuer_zug(const Zug&))); +} + + + +// verbindungen herstellen, die alle karten betreffen +for (register int idx = 0; idx < kartenliste.size(); idx++) +{ +for (register int ablagestapelidx = 0; ablagestapelidx < ablagestapel.size(); ablagestapelidx++) +{ +// allen karten das senden von hilfsanfragen ermoeglichen +// das starten von hilfsanfragen ermoeglichen +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_start(Karte*)), ablagestapel.at(ablagestapelidx), SLOT(hilfsanfrage_start(Karte*))); + +// das stoppen von hilfsanfragen ermoeglichen +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_ende()), ablagestapel.at(ablagestapelidx), SLOT(hilfsanfrage_ende())); +} + +// das starten von hilfsanfragen ermoeglichen +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_start(Karte*)), herzzielstapel, SLOT(hilfsanfrage_start(Karte*))); +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_start(Karte*)), karozielstapel, SLOT(hilfsanfrage_start(Karte*))); +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_start(Karte*)), pikzielstapel, SLOT(hilfsanfrage_start(Karte*))); +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_start(Karte*)), kreutzzielstapel, SLOT(hilfsanfrage_start(Karte*))); + +// das stoppen von hilfsanfragen ermoeglichen +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_ende()), herzzielstapel, SLOT(hilfsanfrage_ende())); +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_ende()), karozielstapel, SLOT(hilfsanfrage_ende())); +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_ende()), pikzielstapel, SLOT(hilfsanfrage_ende())); +connect(kartenliste.at(idx), SIGNAL(hilfsanfrage_ende()), kreutzzielstapel, SLOT(hilfsanfrage_ende())); + +// allen karten das verstecken des zielrahmens ermoeglichen und das steuern der sichtbarkeit des rahmens ermoeglichen +connect(kartenliste.at(idx), SIGNAL(rahmen_verstecken()), zielrahmen, SLOT(verstecke())); +connect(this, SIGNAL(rahmen_anzeigen(bool)), kartenliste.at(idx), SLOT(sichtbarkeit_rahmen(bool))); + +// das skalieren der kartengroesse ermoeglichen +connect(this, SIGNAL(neue_groesse_karten(double)), kartenliste.at(idx), SLOT(passe_groesse_an(double))); +} + + + +// den punktezaehler ueber den start neuer spiele unterrichten +connect(this, SIGNAL(neues_spiel_gestartet()), punktezaehler, SLOT(neues_spiel())); + +// den punktezaehler ueber spielende unterrichten +connect(siegkontrolle, SIGNAL(gewonnen()), punktezaehler, SLOT(spiel_zuende())); + +// punktezaehler das melden der punktzahl ermoeglichen +connect(punktezaehler, SIGNAL(neue_punktzahl(int)), this, SIGNAL(neue_punktzahl(int))); + +// wenn bei austeilstapel der stapel durch ist dies an punktzaehler melden +connect(austeilstapel, SIGNAL(stapel_durch()), punktezaehler, SLOT(stapel_durch())); + +// starten und stoppen von spieltimer ermoeglichen. erste der erste zug startet die zeit +connect(punktezaehler, SIGNAL(erster_zug()), this, SLOT(starte_spieltimer())); +connect(siegkontrolle, SIGNAL(gewonnen()), this, SLOT(stoppe_spieltimer())); + +// reaktionen auf spieltimer ermoeglichen +connect(spieltimer, SIGNAL(timeout()), this, SLOT(reaktionen_auf_spieltimer())); + +// das durchreichen von siegmeldungen ermoeglichen +connect(siegkontrolle, SIGNAL(gewonnen()), this, SLOT(gewonnen_relay())); + +// wenn ein neues spiel gestartet wird, muss austeilcostapel die ablagenummer resetten +connect(this, SIGNAL(neues_spiel_gestartet()), austeilcostapel, SLOT(resette_ablagenummer())); + +// austeilstapel und austeilcostapel sollen den spieltyp kennen +connect(this, SIGNAL(relay_eine_ziehen()), austeilstapel, SLOT(eine_ziehen())); +connect(this, SIGNAL(relay_eine_ziehen()), austeilcostapel, SLOT(eine_ziehen())); +connect(this, SIGNAL(relay_drei_ziehen()), austeilstapel, SLOT(drei_ziehen())); +connect(this, SIGNAL(relay_drei_ziehen()), austeilcostapel, SLOT(drei_ziehen())); + +// auch der punktezaehler soll den spieltyp kennen +connect(this, SIGNAL(relay_eine_ziehen()), punktezaehler, SLOT(eine_ziehen())); +connect(this, SIGNAL(relay_drei_ziehen()), punktezaehler, SLOT(drei_ziehen())); + +// allen ablagestapel stapel ausser austeilstapel an undo anschliessen +for (register int idx = 0; idx < ablagestapel.size(); idx++) +{ +connect(ablagestapel.at(idx), SIGNAL(zug(const Zug&)), undo, SLOT(speichere_zug(const Zug&))); +} + +connect(austeilcostapel, SIGNAL(zug(const Zug&)), undo, SLOT(speichere_zug(const Zug&))); +connect(herzzielstapel, SIGNAL(zug(const Zug&)), undo, SLOT(speichere_zug(const Zug&))); +connect(karozielstapel, SIGNAL(zug(const Zug&)), undo, SLOT(speichere_zug(const Zug&))); +connect(pikzielstapel, SIGNAL(zug(const Zug&)), undo, SLOT(speichere_zug(const Zug&))); +connect(kreutzzielstapel, SIGNAL(zug(const Zug&)), undo, SLOT(speichere_zug(const Zug&))); + +// undo meldungen an punktezaehler ermoeglichen +connect(undo, SIGNAL(undo_meldung(const Zug&)), punktezaehler, SLOT(undo_meldung(const Zug&))); + +// verfuegbarkeit von undo melden +connect(undo, SIGNAL(undo_verfuegbar(bool)), this, SIGNAL(undo_verfuegbar(bool))); + +// verbindungen, die alle stapel betreffen +for (register int idx = 0; idx < allestapel.size(); idx++) +{ +// groessenanpassung aller stapel ermoeglichen +connect(this, SIGNAL(neue_groesse_karten(double)), allestapel.at(idx), SLOT(passe_groesse_an(double))); +} +} + + +Scene::~Scene() +{ +} + + +QList Scene::mischen() const +{ +QList gemischt, mischquelle(kartenliste); + +while (mischquelle.isEmpty() == false) gemischt.append(mischquelle.takeAt(Random::random(0, mischquelle.size() - 1))); + +if (mischquelle.isEmpty() == false) +{ +qDebug() << tr("Missing Cards in Scene !"); + +exit(1); +} + +return gemischt; +} + + +void Scene::neues_spiel() +{ +// zunaechst den spieltimer stoppen +stoppe_spieltimer(); + +// die verstrichenen sekunden ohne den spieltimer auf 0 setzen, weil die startzeit noch vom letzten spiel stammt und dies zu falschen werten fuehren wuerde. dies wird, wenn punktzaehler den ersten zug meldet angepasst +emit verstrichene_sekunden(0); + +// das spielfeld aufraeumen +setze_spiel_zurueck(); + +// die karten mischen +QList aufbauliste(mischen()); + +// 1 karte auf den ersten ablagestapel legen +ablagestapel.at(0)->initialisiere_karte(aufbauliste.takeFirst()); + +// 2 karte auf den zweiten ablagestapel legen +for (register int idx = 0; idx < 2; idx++) ablagestapel.at(1)->initialisiere_karte(aufbauliste.takeFirst()); + +// 3 karte auf den dritten ablagestapel legen +for (register int idx = 0; idx < 3; idx++) ablagestapel.at(2)->initialisiere_karte(aufbauliste.takeFirst()); + +// 4 karte auf den vierten ablagestapel legen +for (register int idx = 0; idx < 4; idx++) ablagestapel.at(3)->initialisiere_karte(aufbauliste.takeFirst()); + +// 5 karte auf den fuenften ablagestapel legen +for (register int idx = 0; idx < 5; idx++) ablagestapel.at(4)->initialisiere_karte(aufbauliste.takeFirst()); + +// 6 karte auf den sechsten ablagestapel legen +for (register int idx = 0; idx < 6; idx++) ablagestapel.at(5)->initialisiere_karte(aufbauliste.takeFirst()); + +// 7 karte auf den siebten ablagestapel legen +for (register int idx = 0; idx < 7; idx++) ablagestapel.at(6)->initialisiere_karte(aufbauliste.takeFirst()); + +// die restlichen karten auf den austeilstapel legen +while (aufbauliste.isEmpty() == false) austeilstapel->initialisiere_karte(aufbauliste.takeFirst()); + +// die obersten karten auf den ablagestapeln aufdecken +for (register int idx = 0; idx < ablagestapel.size(); idx++) +{ +if (ablagestapel.at(idx)->oberste_karte() != 0) ablagestapel.at(idx)->oberste_karte()->zeige_vorderseite(); +} + +// undo leeren. damit wird undo auch gleich blockiert. +undo->clear(); + +Laufendes_spiel = true; + +emit neues_spiel_gestartet(); +} + + +void Scene::alle_karten_verdecken() +{ +for (register int idx = 0; idx < kartenliste.size(); idx++) kartenliste.at(idx)->zeige_rueckseite(); +} + + +void Scene::setze_spiel_zurueck() +{ +// undo leeren. damit wird undo auch gleich blockiert. +undo->clear(); + +// alle karten sollen wieder die rueckseite zeigen +alle_karten_verdecken(); + +for (register int idx = 0; idx < kartenliste.size(); idx++) +{ +// meinstapel wieder zuruecksetzen +kartenliste.at(idx)->setze_meinstapel(0); + +// die rueckkehrkoordinaten zuruecksetzen +kartenliste.at(idx)->setze_rueckehrkoordinaten(QPointF(0, 0)); +} + +// die kartenlisten der stapel zuruecksetzen +for (register int idx = 0; idx < allestapel.size(); idx++) allestapel.at(idx)->setze_kartenliste_zurueck(); +} + + +void Scene::blockiere_alle_karten() +{ +// undo leeren. damit wird undo auch gleich blockiert. +undo->clear(); + +Laufendes_spiel = false; + +for (register int idx = 0; idx < kartenliste.size(); idx++) kartenliste.at(idx)->setFlag(QGraphicsItem::ItemIsMovable, false); +} + + +bool Scene::laufendes_spiel() const +{ +return Laufendes_spiel; +} + + +void Scene::lade_franzoesisches_deckblatt() +{ +// sicherstellen, das alle 52 karten vorhanden sind +if (kartenliste.size() == 52) +{ +int idx = 0; + +// die franzoesischen kartenbilder laden +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/01c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/01d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/01h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/01s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/02c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/02d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/02h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/02s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/03c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/03d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/03h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/03s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/04c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/04d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/04h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/04s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/05c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/05d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/05h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/05s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/06c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/06d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/06h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/06s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/07c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/07d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/07h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/07s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/08c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/08d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/08h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/08s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/09c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/09d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/09h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/09s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/10c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/10d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/10h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/10s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/11c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/11d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/11h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/11s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/12c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/12d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/12h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/12s.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/13c.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/13d.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/13h.gif"), QPixmap(":/french/karten/french/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/french/karten/french/13s.gif"), QPixmap(":/french/karten/french/back01.gif")); +} +} + + +void Scene::lade_deutsches_deckblatt() +{ +// sicherstellen, das alle 52 karten vorhanden sind +if (kartenliste.size() == 52) +{ +int idx = 0; + +// die deutschen kartenbilder laden +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/01c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/01d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/01h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/01s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/02c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/02d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/02h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/02s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/03c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/03d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/03h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/03s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/04c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/04d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/04h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/04s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/05c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/05d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/05h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/05s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/06c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/06d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/06h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/06s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/07c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/07d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/07h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/07s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/08c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/08d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/08h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/08s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/09c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/09d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/09h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/09s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/10c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/10d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/10h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/10s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/11c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/11d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/11h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/11s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/12c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/12d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/12h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/12s.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/13c.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/13d.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/13h.gif"), QPixmap(":/german/karten/german/back01.gif")); +kartenliste.at(idx++)->setze_kartenbilder(QPixmap(":/german/karten/german/13s.gif"), QPixmap(":/german/karten/german/back01.gif")); +} +} + + +void Scene::starte_spieltimer() +{ +// den startzeitpunkt erfassen +startzeitpunkt = QDateTime::currentDateTime(); + +// den timer zur aktualisierung der spielzeit starten +spieltimer->start(); + +// die berechnete zeit einmal sofort senden +reaktionen_auf_spieltimer(); +} + + +void Scene::stoppe_spieltimer() +{ +spieltimer->stop(); +} + + +void Scene::reaktionen_auf_spieltimer() +{ +emit verstrichene_sekunden(startzeitpunkt.secsTo(QDateTime::currentDateTime())); +} + + +void Scene::gewonnen_relay() +{ +// die daten fuer eine vollstaendige siegmeldung senden +emit gewonnen(punktezaehler->punktstand(), startzeitpunkt.secsTo(QDateTime::currentDateTime())); +} + + +void Scene::eine_ziehen() +{ +nur_eine_ziehen = true; + +emit relay_eine_ziehen(); +} + + +void Scene::drei_ziehen() +{ +nur_eine_ziehen = false; + +emit relay_drei_ziehen(); +} + + +bool Scene::nur_eine_wird_gezogen() const +{ +return nur_eine_ziehen; +} + + +void Scene::initialisiere_rahmen(bool wert) +{ +emit rahmen_anzeigen(wert); +} + + +void Scene::rueckgaengig() +{ +undo->undo(); +} + + +Karte* Scene::suche_karte(const QString& name) const +{ +Karte *erg = 0; + +if (kartenfinder.contains(name) == true) erg = kartenfinder.value(name); + +return erg; +} + + +const QStringList Scene::speichere() const +{ +QStringList erg; + +// die id speichern +erg.append(objectName()); + +// nur_eine_ziehen speichern +erg.append(QString::number(nur_eine_ziehen)); + +// die verstrichene zeit speichern +erg.append(QString::number(startzeitpunkt.secsTo(QDateTime::currentDateTime()))); + +return erg; +} + + +bool Scene::lade(const QStringList& daten) +{ +bool erg = false; + +if (daten.size() == SCENE_ANZAHL_SPEICHERELEMENTE && daten.first() == objectName()) +{ +erg = true; + +// nur_eine_ziehen laden +nur_eine_ziehen = daten.at(SCENE_EINE_ZIEHEN_IDX).toInt(); + +// eine zur verstrichenen zeit passende startzeit berechnen +startzeitpunkt = QDateTime::currentDateTime().addSecs(-daten.at(SCENE_VERSTRICHENE_ZEIT_IDX).toInt()); +} + +return erg; +} + + +void Scene::registriere_einstellungen(QSettings* einstellungen_) +{ +einstellungen = einstellungen_; +} + + +void Scene::lade_spielstand() +{ +bool erg = true; + +// den zustand der scene laden +erg = lade(einstellungen->value("Spielstand/" + objectName(), QStringList()).toStringList()); + +if (erg == false) qDebug() << tr("Unable to restore scene !"); + +// den zustand der stapel laden +if (erg == true) +{ +for (register int idx = 0; idx < allestapel.size() && erg == true; idx++) erg = allestapel.at(idx)->lade(einstellungen->value("Spielstand/" + allestapel.at(idx)->objectName(), QStringList()).toStringList()); + +if (erg == false) qDebug() << tr("Unable to restore stacks !"); +} + +// den zustand der karten laden +if (erg == true) +{ +for (register int idx = 0; idx < kartenliste.size() && erg == true; idx++) erg = kartenliste.at(idx)->lade(einstellungen->value("Spielstand/" + kartenliste.at(idx)->objectName(), QStringList()).toStringList()); + +if (erg == false) qDebug() << tr("Unable to restore cards !"); +} + +// den zustand von undo laden +if (erg == true) +{ +erg = undo->lade(einstellungen->value("Spielstand/" + undo->objectName(), QStringList()).toStringList()); + +if (erg == false) qDebug() << tr("Unable to restore undo !"); +} + +// den zustand des punktezaehlers laden +if (erg == true) +{ +erg = punktezaehler->lade(einstellungen->value("Spielstand/" + punktezaehler->objectName(), QStringList()).toStringList()); + +if (erg == false) qDebug() << tr("Unable to restore points !"); +} + +// testen, ob alle karten einen eigentuemer stapel haben +if (erg == true) +{ +for (register int idx = 0; idx < kartenliste.size() && erg == true; idx++) if (kartenliste.at(idx)->eigentuemer_stapel() == 0) erg = false; + +if (erg == false) qDebug() << tr("Card with 0 batch after restoring gamestate !"); +} + +// die pruefsumme des geladenen spiels testen +if (erg == true) +{ +if (berechne_pruefsumme_spielstand() != einstellungen->value(QString("Spielstand/") + "pruefsumme", QByteArray()).toByteArray()) +{ +erg = false; + +qDebug() << tr("Wrong checksumm while restoring saved game !"); +} +} + +if (erg == true) +{ +Laufendes_spiel = true; + +spieltimer->start(); + +emit verstrichene_sekunden(startzeitpunkt.secsTo(QDateTime::currentDateTime())); +} + +// wenn beim laden etwas schief gegangen ist ein neues spiel starten +else +{ +if (erg == false) qDebug() << tr("Unable to restore saved game. Trying to start a new game ..."); + +neues_spiel(); +} +} + + +void Scene::speichere_spielstand() +{ +// den zustand der scene speichern +einstellungen->setValue("Spielstand/" + objectName(), speichere()); + +// den zustand der stapel speichern +for (register int idx = 0; idx < allestapel.size(); idx++) einstellungen->setValue("Spielstand/" + allestapel.at(idx)->objectName(), allestapel.at(idx)->speichere()); + +// den zustand der karten speichern +for (register int idx = 0; idx < kartenliste.size(); idx++) einstellungen->setValue("Spielstand/" + kartenliste.at(idx)->objectName(), kartenliste.at(idx)->speichere()); + +// den zustand von undo speichern +einstellungen->setValue("Spielstand/" + undo->objectName(), undo->speichere()); + +// den zustand des punktezaehlers speichern +einstellungen->setValue("Spielstand/" + punktezaehler->objectName(), punktezaehler->speichere()); + +// die md5 des spielstands speichern +einstellungen->setValue(QString("Spielstand/") + "pruefsumme", berechne_pruefsumme_spielstand()); +} + + +bool Scene::begonnenes_spiel() const +{ +return punktezaehler->begonnenes_spiel(); +} + + +Basisstapel* Scene::suche_stapel(const QString& name) const +{ +Basisstapel *stapel = 0; + +if (stapelfinder.contains(name) == true) stapel = stapelfinder.value(name); + +return stapel; +} + + +bool Scene::enthaelt_karte(const QString& name) const +{ +return kartenfinder.contains(name); +} + + +bool Scene::enthaelt_stapel(const QString& name) const +{ +return stapelfinder.contains(name); +} + + +const QByteArray Scene::berechne_pruefsumme_spielstand() +{ +QByteArray erg; +QCryptographicHash hash(QCryptographicHash::Sha1); + +// den wert von scene abfragen +hash.addData(einstellungen->value("Spielstand/" + objectName(), QByteArray()).toByteArray()); + +// den wert der stapel abfragen +for (register int idx = 0; idx < allestapel.size(); idx++) hash.addData(einstellungen->value("Spielstand/" + allestapel.at(idx)->objectName(), QByteArray()).toByteArray()); + +// den wert von karten abfragen +for (register int idx = 0; idx < kartenliste.size(); idx++) hash.addData(einstellungen->value("Spielstand/" + kartenliste.at(idx)->objectName(), QByteArray()).toByteArray()); + +// den wert von undo abfragen +hash.addData(einstellungen->value("Spielstand/" + undo->objectName(), QByteArray()).toByteArray()); + +// den wert von punktezaehlers abfragen +hash.addData(einstellungen->value("Spielstand/" + punktezaehler->objectName(), QByteArray()).toByteArray()); + +erg = hash.result(); + +return erg; +} + + +void Scene::groessenanpassung(QResizeEvent* event) +{ +if (event->size().width() > 0 && event->size().height() > 0) +{ +double breite = event->size().width(), hoehe = event->size().height(); + +if (hoehe > (breite / SCENE_VERHAELTNIS_BREITE_ZU_HOEHE)) hoehe = breite / SCENE_VERHAELTNIS_BREITE_ZU_HOEHE; + +setSceneRect(QRectF(0, 0, event->size().width() - 5, event->size().height() - 5)); + +austeilstapel->setPos(breite / SCENE_AUSTEILSTAPEL_X_VERHAELTNIS, hoehe / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +austeilcostapel->setPos(breite / SCENE_AUSTEILCOSTAPEL_X_VERHAELTNIS, hoehe / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +kreutzzielstapel->setPos(breite / SCENE_KREUTZZIELSTAPEL_X_VERHAELTNIS, hoehe / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +pikzielstapel->setPos(breite / SCENE_PIKZIELSTAPEL_X_VERHAELTNIS, hoehe / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +karozielstapel->setPos(breite / SCENE_KAROZIELSTAPEL_X_VERHAELTNIS, hoehe / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +herzzielstapel->setPos(breite / SCENE_HERZZIELSTAPEL_X_VERHAELTNIS, hoehe / SCENE_OBERE_STAPEL_Y_VERHAELTNIS); +ablagestapel.at(0)->setPos(breite / SCENE_ABLAGESTAPEL_01_X_VERHAELTNIS, hoehe / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(1)->setPos(breite / SCENE_ABLAGESTAPEL_02_X_VERHAELTNIS, hoehe / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(2)->setPos(breite / SCENE_ABLAGESTAPEL_03_X_VERHAELTNIS, hoehe / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(3)->setPos(breite / SCENE_ABLAGESTAPEL_04_X_VERHAELTNIS, hoehe / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(4)->setPos(breite / SCENE_ABLAGESTAPEL_05_X_VERHAELTNIS, hoehe / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(5)->setPos(breite / SCENE_ABLAGESTAPEL_06_X_VERHAELTNIS, hoehe / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); +ablagestapel.at(6)->setPos(breite / SCENE_ABLAGESTAPEL_07_X_VERHAELTNIS, hoehe / SCENE_ABLAGESTAPEL_Y_VERHAELTNIS); + +emit neue_groesse_karten(hoehe / SCENE_HOEHE_ZU_KARTENHOEHE); +} +} diff --git a/plugins/patience_plugin/Patience/Scene.h b/plugins/patience_plugin/Patience/Scene.h new file mode 100644 index 000000000..de3250550 --- /dev/null +++ b/plugins/patience_plugin/Patience/Scene.h @@ -0,0 +1,90 @@ +#ifndef SCENE_H +#define SCENE_H + +#include +#include +#include +#include +#include + +class Karte; +class Basisstapel; +class Ablagestapel; +class Siegkontrolle; +class Punktezaehler; +class QTimer; +class Undo; +class QSettings; +class QResizeEvent; + +class Scene : public QGraphicsScene +{ +Q_OBJECT + +public: +Scene(const QString& deckblatt, QObject *parent = 0); +virtual ~Scene(); + +QList mischen() const; +void alle_karten_verdecken(); +bool laufendes_spiel() const; +bool nur_eine_wird_gezogen() const; +void initialisiere_rahmen(bool); +Karte* suche_karte(const QString&) const; +Basisstapel *suche_stapel(const QString&) const; +bool enthaelt_karte(const QString&) const; +bool enthaelt_stapel(const QString&) const; +const QStringList speichere() const; +bool lade(const QStringList&); +void registriere_einstellungen(QSettings*); +void lade_spielstand(); +void speichere_spielstand(); +bool begonnenes_spiel() const; +void groessenanpassung(QResizeEvent*); + +public slots: +void setze_spiel_zurueck(); +void neues_spiel(); +void lade_franzoesisches_deckblatt(); +void lade_deutsches_deckblatt(); +void eine_ziehen(); +void drei_ziehen(); +void rueckgaengig(); + +signals: +void gewonnen(int, long); +void neues_spiel_gestartet(); +void neue_punktzahl(int); +void verstrichene_sekunden(long); +void relay_eine_ziehen(); +void relay_drei_ziehen(); +void rahmen_anzeigen(bool); +void undo_verfuegbar(bool); +void neue_groesse_karten(double); + +private slots: +void blockiere_alle_karten(); +void starte_spieltimer(); +void stoppe_spieltimer(); +void reaktionen_auf_spieltimer(); +void gewonnen_relay(); + +private: +QList kartenliste; +QMap kartenfinder; +Basisstapel *austeilstapel, *austeilcostapel, *kreutzzielstapel, *pikzielstapel, *karozielstapel, *herzzielstapel; +QList ablagestapel; +QList allestapel; +QMap stapelfinder; +Siegkontrolle *siegkontrolle; +bool Laufendes_spiel, nur_eine_ziehen; +Punktezaehler *punktezaehler; +QTimer *spieltimer; +QDateTime startzeitpunkt; +Undo *undo; +QSettings *einstellungen; + +const QByteArray berechne_pruefsumme_spielstand(); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Screenshot unter OSX.png b/plugins/patience_plugin/Patience/Screenshot unter OSX.png new file mode 100644 index 000000000..634d17511 Binary files /dev/null and b/plugins/patience_plugin/Patience/Screenshot unter OSX.png differ diff --git a/plugins/patience_plugin/Patience/Siegkontrolle.cpp b/plugins/patience_plugin/Patience/Siegkontrolle.cpp new file mode 100644 index 000000000..1d240bcb6 --- /dev/null +++ b/plugins/patience_plugin/Patience/Siegkontrolle.cpp @@ -0,0 +1,29 @@ +#include "Siegkontrolle.h" +#include "Basisstapel.h" + +using namespace std; + +Siegkontrolle::Siegkontrolle(QObject *parent) : QObject(parent) +{ +} + + +Siegkontrolle::~Siegkontrolle() +{ +} + + +void Siegkontrolle::teste_auf_sieg() +{ +// wenn alle zielstapel 13 karten enthalten hat der spieler gewonnen +if (zielstapel.at(0)->karten() == 13 && zielstapel.at(1)->karten() == 13 && zielstapel.at(2)->karten() == 13 && zielstapel.at(3)->karten() == 13) emit gewonnen(); +} + + +void Siegkontrolle::registriere_zielstapel(Basisstapel* kreutzstapel, Basisstapel* pikstapel, Basisstapel* herzstapel, Basisstapel* karostapel) +{ +zielstapel.append(kreutzstapel); +zielstapel.append(pikstapel); +zielstapel.append(herzstapel); +zielstapel.append(karostapel); +} diff --git a/plugins/patience_plugin/Patience/Siegkontrolle.h b/plugins/patience_plugin/Patience/Siegkontrolle.h new file mode 100644 index 000000000..f2efb626d --- /dev/null +++ b/plugins/patience_plugin/Patience/Siegkontrolle.h @@ -0,0 +1,27 @@ +#ifndef SIEGKONTROLLE_H +#define SIEGKONTROLLE_H + +#include + +class Basisstapel; +class Karte; + +class Siegkontrolle : public QObject +{ +Q_OBJECT + +public: +Siegkontrolle(QObject *parent = 0); +virtual ~Siegkontrolle(); + +void teste_auf_sieg(); +void registriere_zielstapel(Basisstapel* kreutzstapel, Basisstapel* pikstapel, Basisstapel* herzstapel, Basisstapel *karostapel); + +signals: +void gewonnen(); + +private: +QList zielstapel; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Speichern_frage.cpp b/plugins/patience_plugin/Patience/Speichern_frage.cpp new file mode 100644 index 000000000..13bd77d2b --- /dev/null +++ b/plugins/patience_plugin/Patience/Speichern_frage.cpp @@ -0,0 +1,98 @@ +#include "Speichern_frage.h" + +using namespace std; + +Speichern_frage::Speichern_frage(QWidget *parent) : QDialog(parent), speichern_wert(true) +{ +setupUi(this); + +// das resultat voreinstellen +setResult(QDialog::Accepted); + +// die groesse des dialogs auf size hint feststellen +setFixedSize(sizeHint()); + +// signal - slot verbindungen +// die buttons ermoeglichen +connect(nein_button, SIGNAL(clicked()), this, SLOT(nicht_speichern())); +connect(cancel_button, SIGNAL(clicked()), this, SLOT(abbruch())); +connect(ok_button, SIGNAL(clicked()), this, SLOT(speichern())); + +connect(merk_box, SIGNAL(toggled(bool)), this, SLOT(releay_verbindung_merk_status(bool))); +} + + +Speichern_frage::~Speichern_frage() +{ +} + + +void Speichern_frage::speichern() +{ +speichern_wert = true; + +emit wird_gespeichert(true); + +accept(); +} + + +void Speichern_frage::nicht_speichern() +{ +speichern_wert = false; + +emit wird_nicht_gespeichert(true); + +accept(); +} + + +void Speichern_frage::abbruch() +{ +merk_box->setChecked(false); + +reject(); +} + + +void Speichern_frage::setze_merken(bool wert) +{ +if (wert == true) setResult(QDialog::Accepted); + +merk_box->setChecked(wert); + +emit verbindung_merk_status(!wert); +} + + +bool Speichern_frage::soll_merken() const +{ +return merk_box->isChecked(); +} + + +void Speichern_frage::setze_speichern(bool wert) +{ +speichern_wert = wert; + +if (wert == true) ok_button->click(); +else nein_button->click(); +} + + +bool Speichern_frage::soll_speichern() const +{ +return speichern_wert; +} + + +void Speichern_frage::verbindung_merken(bool wert) +{ +setze_merken(!wert); +} + + +void Speichern_frage::releay_verbindung_merk_status(bool wert) +{ +emit verbindung_merk_status(!wert); +} diff --git a/plugins/patience_plugin/Patience/Speichern_frage.h b/plugins/patience_plugin/Patience/Speichern_frage.h new file mode 100644 index 000000000..3ea690859 --- /dev/null +++ b/plugins/patience_plugin/Patience/Speichern_frage.h @@ -0,0 +1,38 @@ +#ifndef SPEICHERN_FRAGE_H +#define SPEICHERN_FRAGE_H + +#include +#include "ui_Speichern_frage.h" + +class Speichern_frage : public QDialog, private Ui::Speichern_frage +{ +Q_OBJECT + +public: +Speichern_frage(QWidget *parent = 0); +virtual ~Speichern_frage(); + +bool soll_merken() const; +bool soll_speichern() const; + +public slots: +void setze_merken(bool); +void setze_speichern(bool); +void verbindung_merken(bool); + +private slots: +void speichern(); +void nicht_speichern(); +void abbruch(); +void releay_verbindung_merk_status(bool); + +signals: +void verbindung_merk_status(bool); +void wird_gespeichert(bool); +void wird_nicht_gespeichert(bool); + +private: +bool speichern_wert; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Speichern_frage.ui b/plugins/patience_plugin/Patience/Speichern_frage.ui new file mode 100644 index 000000000..c9346f970 --- /dev/null +++ b/plugins/patience_plugin/Patience/Speichern_frage.ui @@ -0,0 +1,165 @@ + + + Speichern_frage + + + Qt::WindowModal + + + + 0 + 0 + 365 + 127 + + + + Patience - Save game and quit ? + + + + 5 + + + 5 + + + 5 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 21 + + + + Save the game and quit ? + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + Don't Save + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Cancel + + + false + + + true + + + + + + + OK + + + false + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 15 + + + + Qt::RightToLeft + + + Remember answer + + + + + + + + + + diff --git a/plugins/patience_plugin/Patience/Uebersetzung_de.qm b/plugins/patience_plugin/Patience/Uebersetzung_de.qm new file mode 100644 index 000000000..2db9e62a1 Binary files /dev/null and b/plugins/patience_plugin/Patience/Uebersetzung_de.qm differ diff --git a/plugins/patience_plugin/Patience/Uebersetzung_de.ts b/plugins/patience_plugin/Patience/Uebersetzung_de.ts new file mode 100644 index 000000000..9c0f9e680 --- /dev/null +++ b/plugins/patience_plugin/Patience/Uebersetzung_de.ts @@ -0,0 +1,364 @@ + + + + + Highscore + + + Patience + Patience + + + + You got a Highscore ! + Du hast eine Highscore ! + + + + + Unknown + Unbekannt + + + + Patience - Highscore + Patience - Highscore + + + + Name + Name + + + + Points + Poits + Punkte + + + + Time + Zeit + + + + Ok + Fertig + + + + Karte + + + + The Card + Die Karte + + + + + have more than one Child Card + hat mehr als eine Kinder Karte + + + + MainWindow + + + Patience - You won ! + Patience - Du hast gewonnen ! + + + + You won, but you don't reach a highscore. + Du hast gewonnen, es hat jedoch zu keiner Highscore gereicht. + + + + Patience - Start new game ? + Patience - Wirklich ein neues Spiel starten ? + + + + Start a new Game and break the current Game ? + Wirklich ein neues Spiel starten und das momentane Spiel beenden ? + + + + + About Patience + Über Patience + + + + Patience Version + Patience Version + + + + Points + Punkte + Punkte + + + + Patience + Patience + + + + Game + Spiel + + + + &Help + &Hilfe + + + + &Cardset + &Kartentyp + + + + &Highscore + &Highscore + + + + Gametype + Spieltyp + + + + &Settings + &Einstellungen + + + + Save Game + Spiel speichern + + + + &Edit + &Bearbeiten + + + + &New Game + &Neues Spiel + + + + Ctrl+N + Ctrl+N + + + + Close + Schliessen + + + + About QT + Über QT + + + + + French + Französisch + + + + + German + Deutsch + + + + &Show + &Anzeigen + + + + + Take One + Eine ziehen + + + + + Take Three + Drei ziehen + + + + Frame + Rahmen + + + + Ask + Fragen + + + + Save + Speichern + + + + Don't save + Nicht speichern + + + Ask for saving on quit. + Ask for saving on quit + Beim beenden wegen speichern fragen. + + + Disable for slow computers. + Für langsame Computer deaktivieren. + + + + Undo + Rückgängig + + + + Punktezaehler + + + Invalid move in Punktzaehler::neuer_zug() + Ungültiger zug in Punktzaehler::neuer_zug() + + + + Invalid move in Punktzaehler::kalkuliere_punkte(const Zug& zug) + Ungültiger zug in Punktzaehler::kalkuliere_punkte(const Zug& zug) + + + + Invalid move in Punktzaehler::bringt_zeitaufschub(const Zug& zug) + Ungültiger zug in Punktzaehler::bringt_zeitaufschub(const Zug& zug) + + + + QObject + + + min is bigger than max ! + min ist größer als max ! + + + + Scene + + + Missing Cards in Scene ! + Fehlende Karte in Scene ! + + + + Unable to restore scene ! + Kann Scene nicht wiederherstellen ! + + + + Unable to restore stacks ! + Kann Stapel nicht wiederherstellen ! + + + + Unable to restore cards ! + Kann Karten nicht wiederherstellen ! + + + + Unable to restore undo ! + Kann Undo nicht wiederherstellen ! + + + + Unable to restore points ! + Kann Punkte nicht wiederherstellen ! + + + + Card with 0 batch after restoring gamestate ! + Karte mit 0 Eigentümer Stapel nach dem wiederherstellen eines Spielstandes ! + + + + Wrong checksumm while restoring saved game ! + Falsche Prüfsumme beim wiederherstellen des Spielstandes ! + + + + Unable to restore saved game. Trying to start a new game ... + Das gespeicherte Spiel kann nicht wiederhergestellt werden. Versuche ein neues Spiel zu starten ... + + + + Speichern_frage + + + Patience - Save game and quit ? + Patience - Spiel beenden und speichern ? + + + + Save the game and quit ? + Spiel beenden & speichern ? + + + + Don't Save + Nicht speichern + + + + Cancel + Abbrechen + + + + OK + OK + + + + Remember answer + Antwort merken + + + + Undo + + + + Invalid move in Undo::undo() + Ungültiger zug in Undo::undo() + + + Invalid cover in Undo::undo() + Ungültige Karten zudeckung in Undo::undo() + + + Invalid history entry in Undo + Ungültiger History Eintrag in Undo + + + + Zielstapel + + + Destination not found in Zielstapel::lege_karte_ab(Karte* karte) + Zielstapel nicht auffindbar in Zielstapel::lege_karte_ab(Karte* karte) + + + diff --git a/plugins/patience_plugin/Patience/Undo.cpp b/plugins/patience_plugin/Patience/Undo.cpp new file mode 100644 index 000000000..28cfc9a0c --- /dev/null +++ b/plugins/patience_plugin/Patience/Undo.cpp @@ -0,0 +1,194 @@ +#include "Undo.h" +#include "Karte.h" +#include "Basisstapel.h" +#include "Scene.h" +#include "Proportionen.h" +#include +#include + +using namespace std; + +Undo::Undo(Scene *parent) : QObject(parent), scene(parent) +{ +} + + +Undo::~Undo() +{ +} + + +void Undo::speichere_zug(const Zug& zug) +{ +if (zug.ist_bewegung() == true) +{ +verlauf.append(zug); + +// wenn es sich um den ersten gespeicherten zug handelt +if (verlauf.size() == 1) emit undo_verfuegbar(true); +} + +else if (zug.ist_aufdeckgung() == true) +{ +verlauf.append(zug); + +// wenn es sich um den ersten gespeicherten zug handelt +if (verlauf.size() == 1) emit undo_verfuegbar(true); +} + +else +{ +qDebug() << tr("Invalid move in Undo::undo()"); + +exit(1); +} + +// ueberschuessige undoelemente loeschen +loesche_ueberschuessige_undoelemente(); +} + + +void Undo::undo() +{ +// wenn der verlauf nicht leer ist +if (verlauf.isEmpty() == false) +{ +Zug zugelement(verlauf.takeLast()); + +// wenn das zug element ungueltig ist eine fehlermeldung ausgeben und das programm abbrechen +if (zugelement.ist_gueltig() == false) +{ +qDebug() << tr("Invalid move in Undo::undo()"); + +exit(1); +} + +// wenn es sich um eine bewegung handelt +if (zugelement.ist_bewegung() == true) +{ +// den zug unter umgehung der ueberpruefungen und signale rueckgaengig machen. +zugelement.herkunft()->undo_karten_ablage(zugelement.karte()); + +scene->update(); +} + +// wenn es sich um eine karten aufdeckung handelt +else if (zugelement.ist_aufdeckgung() == true) +{ +// die karten aufdeckung unter umgehung der ueberpruefungen und signale rueckgaengig machen. +zugelement.karte()->zeige_rueckseite(); + +scene->update(); +} + +emit undo_verfuegbar(!verlauf.isEmpty()); +emit undo_meldung(zugelement); +} +} + +void Undo::clear() +{ +emit undo_verfuegbar(false); + +verlauf.clear(); +} + + +void Undo::loesche_ueberschuessige_undoelemente() +{ +float summe = 0; + +// den wert der zuege, die sich derzeit in verlauf befinden berechnen +for (register int idx = 0; idx < verlauf.size(); idx++) +{ +if (verlauf.at(idx).ist_bewegung() == true) summe += ZUEGE_PRO_BEWEGUNG; +else if (verlauf.at(idx).ist_aufdeckgung() == true) summe += ZUEGE_PRO_AUFDECKUNG; +} + +// den ueberschuss entfernen +float ueberschuss = summe - UNDO_LIMIT; + +// wenn ein ueberschuss vorhanden ist ... +if (ueberschuss > 0.1) +{ +// solange, wie ein ueberschuss vorhanden ist +while (verlauf.isEmpty() == false && ueberschuss > 0.1) +{ +// dem zug entsprechende punktzahl abziehen +if (verlauf.first().ist_bewegung() == true) ueberschuss -= ZUEGE_PRO_BEWEGUNG; +else if (verlauf.first().ist_aufdeckgung() == true) ueberschuss -= ZUEGE_PRO_AUFDECKUNG; + +// das aelteste element entfernen +verlauf.removeFirst(); +} +} +} + + +const QStringList Undo::speichere() const +{ +QStringList erg; + +// die id speichern +erg.append(objectName()); + +// die verlauf liste speichern +QString verlauf_string; + +for (register int idx = 0; idx < verlauf.size(); idx++) +{ +if (idx > 0) verlauf_string.append(ZUEGE_SPLITTER); + +verlauf_string.append(verlauf.at(idx).karte_name()); +verlauf_string.append(ZUEGE_NACH_SPLITTER); +verlauf_string.append(verlauf.at(idx).herkunft_name()); + +if (verlauf.at(idx).ist_bewegung() == true) +{ +verlauf_string.append(ZUEGE_NACH_SPLITTER); +verlauf_string.append(verlauf.at(idx).ziel_name()); +} +} + +erg.append(verlauf_string); + +return erg; +} + + +bool Undo::lade(const QStringList& daten) +{ +bool erg = false; + +if (daten.size() == UNDO_ANZAHL_SPEICHERELEMENTE && daten.first() == objectName()) +{ +erg = true; + +QStringList tmp_daten(daten.at(UNDO_VERLAUF_IDX).split(ZUEGE_SPLITTER, QString::SkipEmptyParts)); + +for (register int idx = 0; idx < tmp_daten.size(); idx++) +{ +QStringList tmp_zug(tmp_daten.at(idx).split(ZUEGE_NACH_SPLITTER, QString::SkipEmptyParts)); + +if (tmp_zug.size() == 2) +{ +if (scene->enthaelt_karte(tmp_zug.at(0)) == true && scene->enthaelt_stapel(tmp_zug.at(1)) == true) verlauf.append(Zug(scene->suche_karte(tmp_zug.at(0)), scene->suche_stapel(tmp_zug.at(1)))); + +else erg = false; +} + +else if (tmp_zug.size() == 3) +{ +if (scene->enthaelt_karte(tmp_zug.at(0)) == true && scene->enthaelt_stapel(tmp_zug.at(1)) == true && scene->enthaelt_stapel(tmp_zug.at(2)) == true) verlauf.append(Zug(scene->suche_karte(tmp_zug.at(0)), scene->suche_stapel(tmp_zug.at(1)), scene->suche_stapel(tmp_zug.at(2)))); + +else erg = false; +} + +else erg = false; +} +} + +if (erg == true && verlauf.isEmpty() == false) emit undo_verfuegbar(true); + +return erg; +} diff --git a/plugins/patience_plugin/Patience/Undo.h b/plugins/patience_plugin/Patience/Undo.h new file mode 100644 index 000000000..a1013ad2a --- /dev/null +++ b/plugins/patience_plugin/Patience/Undo.h @@ -0,0 +1,40 @@ +#ifndef UNDO_H +#define UNDO_H + +#include +#include +#include +#include "Zug.h" + +class Karte; +class Basisstapel; +class Scene; + +class Undo : public QObject +{ +Q_OBJECT + +public: +Undo(Scene *parent); +virtual ~Undo(); + +const QStringList speichere() const; +bool lade(const QStringList&); + +public slots: +void speichere_zug(const Zug&); +void undo(); +void clear(); + +signals: +void undo_meldung(const Zug&); +void undo_verfuegbar(bool); + +private: +QList verlauf; +Scene *scene; + +void loesche_ueberschuessige_undoelemente(); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Viewer.cpp b/plugins/patience_plugin/Patience/Viewer.cpp new file mode 100644 index 000000000..19f394174 --- /dev/null +++ b/plugins/patience_plugin/Patience/Viewer.cpp @@ -0,0 +1,22 @@ +#include "Viewer.h" +#include "Scene.h" +#include + +using namespace std; + +Viewer::Viewer(QWidget *parent) : QGraphicsView(parent) +{ +} + + +Viewer::~Viewer() +{ +} + + +void Viewer::resizeEvent(QResizeEvent* event) +{ +QGraphicsView::resizeEvent(event); + +if (scene() != 0) ((Scene*) scene())->groessenanpassung(event); +} diff --git a/plugins/patience_plugin/Patience/Viewer.h b/plugins/patience_plugin/Patience/Viewer.h new file mode 100644 index 000000000..d89d963b5 --- /dev/null +++ b/plugins/patience_plugin/Patience/Viewer.h @@ -0,0 +1,18 @@ +#ifndef VIEWER_H +#define VIEWER_H + +#include + +class Viewer : public QGraphicsView +{ +Q_OBJECT + +public: +Viewer(QWidget *parent = 0); +virtual ~Viewer(); + +private: +virtual void resizeEvent(QResizeEvent*); +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Zielstapel.cpp b/plugins/patience_plugin/Patience/Zielstapel.cpp new file mode 100644 index 000000000..789ca001c --- /dev/null +++ b/plugins/patience_plugin/Patience/Zielstapel.cpp @@ -0,0 +1,80 @@ +#include "Zielstapel.h" +#include "Karte.h" +#include "Siegkontrolle.h" +#include + +using namespace std; + +Zielstapel::Zielstapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent) : Basisstapel(pixmap, oparent, gparent), siegkontrolle(0) +{ +} + + +Zielstapel::~Zielstapel() +{ +} + + +bool Zielstapel::ablage_moeglich(Karte* karte) const +{ +bool erg = false; + +if (Basisstapel::ablage_moeglich(karte) == true && ((oberste_karte() == 0 && karte->wert() == 1) || (oberste_karte() != 0 &&oberste_karte()->farbe() == karte->farbe() && karte->wert() == (oberste_karte()->wert() + 1))) && karte->hat_kinderkarten() == false) erg = true; + +return erg; +} + + +void Zielstapel::registriere_siegkontrolle(Siegkontrolle* siegkontrolle_) +{ +siegkontrolle = siegkontrolle_; +} + + +void Zielstapel::ablage_erfolgt() +{ +siegkontrolle->teste_auf_sieg(); +} + + +void Zielstapel::registriere_nachbar_zielstapel(Basisstapel* erster, Basisstapel* zweiter, Basisstapel* dritter) +{ +nachbarn.append(erster); +nachbarn.append(zweiter); +nachbarn.append(dritter); +} + + +bool Zielstapel::lege_karte_ab(Karte* karte) +{ +bool erg = false; +Basisstapel *ziel = 0; + +QString quelle(karte->eigentuemer_stapel()->objectName()); + +// wenn dieser stapel der richtige ist ... +if (objectName().contains(karte->farbe()) == true) erg = Basisstapel::lege_karte_ab(karte); + +// ansonsten den richtigen stapel suchen ... +else +{ +for (register int idx = 0; idx < nachbarn.size() && ziel == 0; idx++) if (nachbarn.at(idx)->objectName().contains(karte->farbe()) == true) ziel = nachbarn.at(idx); + +// ... und die karte auf diesem ablegen +if (ziel != 0) erg = ziel->lege_karte_ab(karte); + +else +{ +qDebug() << tr("Destination not found in Zielstapel::lege_karte_ab(Karte* karte)"); +} +} + +return erg; +} + + +void Zielstapel::hilfsanfrage_start(Karte* karte) +{ +// dafuer sorgen, das der hilfspfeil nur uber dem richtigen zielstapel erscheint +if (objectName().contains(karte->farbe()) == true) Basisstapel::hilfsanfrage_start(karte); +} diff --git a/plugins/patience_plugin/Patience/Zielstapel.h b/plugins/patience_plugin/Patience/Zielstapel.h new file mode 100644 index 000000000..c0b930ec7 --- /dev/null +++ b/plugins/patience_plugin/Patience/Zielstapel.h @@ -0,0 +1,32 @@ +#ifndef ZIELSTAPEL_H +#define ZIELSTAPEL_H + +#include "Basisstapel.h" +#include + +class Siegkontrolle; + +class Zielstapel : public Basisstapel +{ +Q_OBJECT + +public: +Zielstapel(const QPixmap& pixmap, Scene* oparent, QGraphicsItem* gparent = 0); +virtual ~Zielstapel(); + +virtual void registriere_siegkontrolle(Siegkontrolle*); +virtual void registriere_nachbar_zielstapel(Basisstapel*, Basisstapel*, Basisstapel*); + +virtual void ablage_erfolgt(); +virtual bool ablage_moeglich(Karte *) const; +virtual bool lege_karte_ab(Karte*); + +public slots: +virtual void hilfsanfrage_start(Karte*); + +private: +Siegkontrolle *siegkontrolle; +QList nachbarn; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/Zug.cpp b/plugins/patience_plugin/Patience/Zug.cpp new file mode 100644 index 000000000..e65786862 --- /dev/null +++ b/plugins/patience_plugin/Patience/Zug.cpp @@ -0,0 +1,131 @@ +#include "Zug.h" +#include "Karte.h" +#include "Basisstapel.h" +#include + +using namespace std; + +Zug::Zug() : Karte_(0), Herkunft(0), Ziel(0) +{ +} + + +Zug::~Zug() +{ +} + + +bool Zug::ist_gueltig() const +{ +bool erg = false; + +if (ist_bewegung() == true) erg = true; + +else if (ist_aufdeckgung() == true) erg = true; + +return erg; +} + + +bool Zug::ist_bewegung() const +{ +bool erg = false; + +if (Karte_ != 0 && Herkunft != 0 && Ziel != 0) erg = true; + +return erg; +} + + +bool Zug::ist_aufdeckgung() const +{ +bool erg = false; + +if (Karte_ != 0 && Herkunft != 0 && Ziel == 0) erg = true; + +return erg; +} + + +void Zug::setze_bewegung(Karte* karte, Basisstapel *herkunft_, Basisstapel *ziel_) +{ +Karte_ = karte; +Herkunft = herkunft_; +Ziel = ziel_; +} + + +void Zug::setze_aufdeckung(Karte* karte, Basisstapel *ort) +{ +Karte_ = karte; +Herkunft = ort; +Ziel = 0; +} + + +Karte* Zug::karte() const +{ +return Karte_; +} + + +Basisstapel* Zug::herkunft() const +{ +return Herkunft; +} + + +Basisstapel* Zug::ziel() const +{ +return Ziel; +} + + +QString Zug::karte_name() const +{ +QString erg; + +if (Karte_ != 0) erg = Karte_->objectName(); + +return erg; +} + + +QString Zug::herkunft_name() const +{ +QString erg; + +if (Herkunft != 0) erg = Herkunft->objectName(); + +return erg; +} + + +QString Zug::ziel_name() const +{ +QString erg; + +if (Ziel != 0) erg = Ziel->objectName(); + +return erg; +} + + +Zug::Zug(Karte* karte, Basisstapel *herkunft, Basisstapel *ziel) : Karte_(karte), Herkunft(herkunft), Ziel(ziel) +{ +} + + +Zug::Zug(Karte* karte, Basisstapel *ort) : Karte_(karte), Herkunft(ort), Ziel(0) +{ +} + + +bool Zug::operator==(const Zug& anderer) const +{ +bool erg = false; + +if (karte() == anderer.karte() && herkunft() == anderer.herkunft() && ziel() == anderer.ziel()) erg = true; + +return erg; +} diff --git a/plugins/patience_plugin/Patience/Zug.h b/plugins/patience_plugin/Patience/Zug.h new file mode 100644 index 000000000..6dc18fb82 --- /dev/null +++ b/plugins/patience_plugin/Patience/Zug.h @@ -0,0 +1,40 @@ +#ifndef ZUG_H +#define ZUG_H + +#include + +class Karte; +class Basisstapel; + +class Zug +{ +public: +Zug(); +Zug(Karte* karte, Basisstapel *herkunft, Basisstapel *ziel); +Zug(Karte* karte, Basisstapel *ort); +virtual ~Zug(); + +bool ist_gueltig() const; +bool ist_bewegung() const; +bool ist_aufdeckgung() const; + +void setze_bewegung(Karte* karte, Basisstapel *herkunft_, Basisstapel *ziel_); +void setze_aufdeckung(Karte* karte, Basisstapel *ort); + +Karte* karte() const; +Basisstapel* herkunft() const; +Basisstapel* ziel() const; + + +QString karte_name() const; +QString herkunft_name() const; +QString ziel_name() const; + +bool operator==(const Zug& anderer) const; + +private: +Karte *Karte_; +Basisstapel *Herkunft, *Ziel; +}; + +#endif diff --git a/plugins/patience_plugin/Patience/gpl.txt b/plugins/patience_plugin/Patience/gpl.txt new file mode 100644 index 000000000..94a9ed024 --- /dev/null +++ b/plugins/patience_plugin/Patience/gpl.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/plugins/patience_plugin/Patience/icon.icns b/plugins/patience_plugin/Patience/icon.icns new file mode 100644 index 000000000..abf9c44a4 Binary files /dev/null and b/plugins/patience_plugin/Patience/icon.icns differ diff --git a/plugins/patience_plugin/Patience/icon.ico b/plugins/patience_plugin/Patience/icon.ico new file mode 100644 index 000000000..0c4881759 Binary files /dev/null and b/plugins/patience_plugin/Patience/icon.ico differ diff --git a/plugins/patience_plugin/Patience/karten/french/01c.gif b/plugins/patience_plugin/Patience/karten/french/01c.gif new file mode 100644 index 000000000..5d6f17e90 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/01c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/01d.gif b/plugins/patience_plugin/Patience/karten/french/01d.gif new file mode 100644 index 000000000..6921fbbd3 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/01d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/01h.gif b/plugins/patience_plugin/Patience/karten/french/01h.gif new file mode 100644 index 000000000..de1463493 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/01h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/01s.gif b/plugins/patience_plugin/Patience/karten/french/01s.gif new file mode 100644 index 000000000..e736e0384 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/01s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/02c.gif b/plugins/patience_plugin/Patience/karten/french/02c.gif new file mode 100644 index 000000000..96c72fb28 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/02c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/02d.gif b/plugins/patience_plugin/Patience/karten/french/02d.gif new file mode 100644 index 000000000..c767600f4 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/02d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/02h.gif b/plugins/patience_plugin/Patience/karten/french/02h.gif new file mode 100644 index 000000000..c05260ffb Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/02h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/02s.gif b/plugins/patience_plugin/Patience/karten/french/02s.gif new file mode 100644 index 000000000..bca720b36 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/02s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/03c.gif b/plugins/patience_plugin/Patience/karten/french/03c.gif new file mode 100644 index 000000000..8a123585b Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/03c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/03d.gif b/plugins/patience_plugin/Patience/karten/french/03d.gif new file mode 100644 index 000000000..78e9fe3dc Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/03d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/03h.gif b/plugins/patience_plugin/Patience/karten/french/03h.gif new file mode 100644 index 000000000..7601b6b0f Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/03h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/03s.gif b/plugins/patience_plugin/Patience/karten/french/03s.gif new file mode 100644 index 000000000..a2d6d48e0 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/03s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/04c.gif b/plugins/patience_plugin/Patience/karten/french/04c.gif new file mode 100644 index 000000000..f56f522de Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/04c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/04d.gif b/plugins/patience_plugin/Patience/karten/french/04d.gif new file mode 100644 index 000000000..88bc6c3c2 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/04d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/04h.gif b/plugins/patience_plugin/Patience/karten/french/04h.gif new file mode 100644 index 000000000..23e85858a Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/04h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/04s.gif b/plugins/patience_plugin/Patience/karten/french/04s.gif new file mode 100644 index 000000000..f5c82e21a Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/04s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/05c.gif b/plugins/patience_plugin/Patience/karten/french/05c.gif new file mode 100644 index 000000000..34aa41845 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/05c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/05d.gif b/plugins/patience_plugin/Patience/karten/french/05d.gif new file mode 100644 index 000000000..94b8e6084 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/05d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/05h.gif b/plugins/patience_plugin/Patience/karten/french/05h.gif new file mode 100644 index 000000000..2b42dc602 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/05h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/05s.gif b/plugins/patience_plugin/Patience/karten/french/05s.gif new file mode 100644 index 000000000..34349820c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/05s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/06c.gif b/plugins/patience_plugin/Patience/karten/french/06c.gif new file mode 100644 index 000000000..89f60a920 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/06c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/06d.gif b/plugins/patience_plugin/Patience/karten/french/06d.gif new file mode 100644 index 000000000..94be5a09b Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/06d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/06h.gif b/plugins/patience_plugin/Patience/karten/french/06h.gif new file mode 100644 index 000000000..455d37ae8 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/06h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/06s.gif b/plugins/patience_plugin/Patience/karten/french/06s.gif new file mode 100644 index 000000000..3281dcbf1 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/06s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/07c.gif b/plugins/patience_plugin/Patience/karten/french/07c.gif new file mode 100644 index 000000000..e624b13c6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/07c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/07d.gif b/plugins/patience_plugin/Patience/karten/french/07d.gif new file mode 100644 index 000000000..727b03425 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/07d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/07h.gif b/plugins/patience_plugin/Patience/karten/french/07h.gif new file mode 100644 index 000000000..0ea9b3f83 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/07h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/07s.gif b/plugins/patience_plugin/Patience/karten/french/07s.gif new file mode 100644 index 000000000..f3ed5f49c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/07s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/08c.gif b/plugins/patience_plugin/Patience/karten/french/08c.gif new file mode 100644 index 000000000..539a65e23 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/08c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/08d.gif b/plugins/patience_plugin/Patience/karten/french/08d.gif new file mode 100644 index 000000000..dcc28c525 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/08d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/08h.gif b/plugins/patience_plugin/Patience/karten/french/08h.gif new file mode 100644 index 000000000..2410476cf Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/08h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/08s.gif b/plugins/patience_plugin/Patience/karten/french/08s.gif new file mode 100644 index 000000000..cb4992b30 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/08s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/09c.gif b/plugins/patience_plugin/Patience/karten/french/09c.gif new file mode 100644 index 000000000..6f75d70ee Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/09c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/09d.gif b/plugins/patience_plugin/Patience/karten/french/09d.gif new file mode 100644 index 000000000..08fe38c80 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/09d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/09h.gif b/plugins/patience_plugin/Patience/karten/french/09h.gif new file mode 100644 index 000000000..2f819439e Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/09h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/09s.gif b/plugins/patience_plugin/Patience/karten/french/09s.gif new file mode 100644 index 000000000..cb7ad69a8 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/09s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/10c.gif b/plugins/patience_plugin/Patience/karten/french/10c.gif new file mode 100644 index 000000000..59b980a3e Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/10c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/10d.gif b/plugins/patience_plugin/Patience/karten/french/10d.gif new file mode 100644 index 000000000..357733124 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/10d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/10h.gif b/plugins/patience_plugin/Patience/karten/french/10h.gif new file mode 100644 index 000000000..1a7ee6ddf Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/10h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/10s.gif b/plugins/patience_plugin/Patience/karten/french/10s.gif new file mode 100644 index 000000000..d31d9878c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/10s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/11c.gif b/plugins/patience_plugin/Patience/karten/french/11c.gif new file mode 100644 index 000000000..96b717547 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/11c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/11d.gif b/plugins/patience_plugin/Patience/karten/french/11d.gif new file mode 100644 index 000000000..5c545603b Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/11d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/11h.gif b/plugins/patience_plugin/Patience/karten/french/11h.gif new file mode 100644 index 000000000..4f0773456 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/11h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/11s.gif b/plugins/patience_plugin/Patience/karten/french/11s.gif new file mode 100644 index 000000000..7c2359e6c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/11s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/12c.gif b/plugins/patience_plugin/Patience/karten/french/12c.gif new file mode 100644 index 000000000..39fd11ca1 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/12c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/12d.gif b/plugins/patience_plugin/Patience/karten/french/12d.gif new file mode 100644 index 000000000..44351acf5 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/12d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/12h.gif b/plugins/patience_plugin/Patience/karten/french/12h.gif new file mode 100644 index 000000000..d3bc62397 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/12h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/12s.gif b/plugins/patience_plugin/Patience/karten/french/12s.gif new file mode 100644 index 000000000..c8d0fbf62 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/12s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/13c.gif b/plugins/patience_plugin/Patience/karten/french/13c.gif new file mode 100644 index 000000000..dacd466c8 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/13c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/13d.gif b/plugins/patience_plugin/Patience/karten/french/13d.gif new file mode 100644 index 000000000..2c8e77dea Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/13d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/13h.gif b/plugins/patience_plugin/Patience/karten/french/13h.gif new file mode 100644 index 000000000..2104c258b Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/13h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/13s.gif b/plugins/patience_plugin/Patience/karten/french/13s.gif new file mode 100644 index 000000000..5688bcd81 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/13s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/COPYRIGHT.txt b/plugins/patience_plugin/Patience/karten/french/COPYRIGHT.txt new file mode 100644 index 000000000..dc217dc3f --- /dev/null +++ b/plugins/patience_plugin/Patience/karten/french/COPYRIGHT.txt @@ -0,0 +1,8 @@ +This PySol cardset was adapted from the game XSkat 4.0 + +Copyright (C) 2004 Gunter Gerhardt (http://www.xskat.de) + +This cardset 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. diff --git a/plugins/patience_plugin/Patience/karten/french/back01.gif b/plugins/patience_plugin/Patience/karten/french/back01.gif new file mode 100644 index 000000000..d98c699d1 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/back01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/bottom01.gif b/plugins/patience_plugin/Patience/karten/french/bottom01.gif new file mode 100644 index 000000000..45f16b206 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/bottom01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/bottom02.gif b/plugins/patience_plugin/Patience/karten/french/bottom02.gif new file mode 100644 index 000000000..11332ae4c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/bottom02.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/bottom03.gif b/plugins/patience_plugin/Patience/karten/french/bottom03.gif new file mode 100644 index 000000000..75d817ed9 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/bottom03.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/bottom04.gif b/plugins/patience_plugin/Patience/karten/french/bottom04.gif new file mode 100644 index 000000000..2531b7e4c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/bottom04.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/bottom05.gif b/plugins/patience_plugin/Patience/karten/french/bottom05.gif new file mode 100644 index 000000000..173a9f989 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/bottom05.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/bottom06.gif b/plugins/patience_plugin/Patience/karten/french/bottom06.gif new file mode 100644 index 000000000..3fed1f427 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/bottom06.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/bottom07.gif b/plugins/patience_plugin/Patience/karten/french/bottom07.gif new file mode 100644 index 000000000..e3c20d648 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/bottom07.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/config.txt b/plugins/patience_plugin/Patience/karten/french/config.txt new file mode 100644 index 000000000..8398ca926 --- /dev/null +++ b/plugins/patience_plugin/Patience/karten/french/config.txt @@ -0,0 +1,6 @@ +PySol solitaire cardset;5;.gif;1;52;7,1006;2004 +12442-xskat-french-large;XSkat-French-Large +90 140 8 +18 18 9 9 +back01.gif +back01.gif diff --git a/plugins/patience_plugin/Patience/karten/french/l01.gif b/plugins/patience_plugin/Patience/karten/french/l01.gif new file mode 100644 index 000000000..57b03e3c3 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/l01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/l02.gif b/plugins/patience_plugin/Patience/karten/french/l02.gif new file mode 100644 index 000000000..f86683951 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/l02.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/l03.gif b/plugins/patience_plugin/Patience/karten/french/l03.gif new file mode 100644 index 000000000..31b426556 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/l03.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/l04.gif b/plugins/patience_plugin/Patience/karten/french/l04.gif new file mode 100644 index 000000000..4323285af Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/l04.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shade.gif b/plugins/patience_plugin/Patience/karten/french/shade.gif new file mode 100644 index 000000000..7e0085f61 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shade.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow00.gif b/plugins/patience_plugin/Patience/karten/french/shadow00.gif new file mode 100644 index 000000000..8eb2d7d73 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow00.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow01.gif b/plugins/patience_plugin/Patience/karten/french/shadow01.gif new file mode 100644 index 000000000..ae8eb168d Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow02.gif b/plugins/patience_plugin/Patience/karten/french/shadow02.gif new file mode 100644 index 000000000..5bd510faa Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow02.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow03.gif b/plugins/patience_plugin/Patience/karten/french/shadow03.gif new file mode 100644 index 000000000..cad23b5a9 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow03.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow04.gif b/plugins/patience_plugin/Patience/karten/french/shadow04.gif new file mode 100644 index 000000000..69b0b55a6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow04.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow05.gif b/plugins/patience_plugin/Patience/karten/french/shadow05.gif new file mode 100644 index 000000000..d6b59f5eb Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow05.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow06.gif b/plugins/patience_plugin/Patience/karten/french/shadow06.gif new file mode 100644 index 000000000..89331c1cc Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow06.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow07.gif b/plugins/patience_plugin/Patience/karten/french/shadow07.gif new file mode 100644 index 000000000..f2f05d1d6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow07.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow08.gif b/plugins/patience_plugin/Patience/karten/french/shadow08.gif new file mode 100644 index 000000000..fd9773326 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow08.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow09.gif b/plugins/patience_plugin/Patience/karten/french/shadow09.gif new file mode 100644 index 000000000..0fc862f55 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow09.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow10.gif b/plugins/patience_plugin/Patience/karten/french/shadow10.gif new file mode 100644 index 000000000..e949e23c6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow10.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow11.gif b/plugins/patience_plugin/Patience/karten/french/shadow11.gif new file mode 100644 index 000000000..812eca48d Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow11.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow12.gif b/plugins/patience_plugin/Patience/karten/french/shadow12.gif new file mode 100644 index 000000000..dad065377 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow12.gif differ diff --git a/plugins/patience_plugin/Patience/karten/french/shadow13.gif b/plugins/patience_plugin/Patience/karten/french/shadow13.gif new file mode 100644 index 000000000..25eae560e Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/french/shadow13.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/01c.gif b/plugins/patience_plugin/Patience/karten/german/01c.gif new file mode 100644 index 000000000..b3c40d72e Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/01c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/01d.gif b/plugins/patience_plugin/Patience/karten/german/01d.gif new file mode 100644 index 000000000..eb4a6f899 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/01d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/01h.gif b/plugins/patience_plugin/Patience/karten/german/01h.gif new file mode 100644 index 000000000..99f8fc903 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/01h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/01s.gif b/plugins/patience_plugin/Patience/karten/german/01s.gif new file mode 100644 index 000000000..2e9b211bc Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/01s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/02c.gif b/plugins/patience_plugin/Patience/karten/german/02c.gif new file mode 100644 index 000000000..2cc3ac4bc Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/02c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/02d.gif b/plugins/patience_plugin/Patience/karten/german/02d.gif new file mode 100644 index 000000000..8bff1256a Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/02d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/02h.gif b/plugins/patience_plugin/Patience/karten/german/02h.gif new file mode 100644 index 000000000..d18f3f7c0 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/02h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/02s.gif b/plugins/patience_plugin/Patience/karten/german/02s.gif new file mode 100644 index 000000000..0346bc38a Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/02s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/03c.gif b/plugins/patience_plugin/Patience/karten/german/03c.gif new file mode 100644 index 000000000..2d12bcd8e Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/03c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/03d.gif b/plugins/patience_plugin/Patience/karten/german/03d.gif new file mode 100644 index 000000000..324c12be0 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/03d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/03h.gif b/plugins/patience_plugin/Patience/karten/german/03h.gif new file mode 100644 index 000000000..6b300fefe Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/03h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/03s.gif b/plugins/patience_plugin/Patience/karten/german/03s.gif new file mode 100644 index 000000000..3750eaa14 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/03s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/04c.gif b/plugins/patience_plugin/Patience/karten/german/04c.gif new file mode 100644 index 000000000..0d7b92db6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/04c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/04d.gif b/plugins/patience_plugin/Patience/karten/german/04d.gif new file mode 100644 index 000000000..4298cdb97 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/04d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/04h.gif b/plugins/patience_plugin/Patience/karten/german/04h.gif new file mode 100644 index 000000000..15ee2eaac Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/04h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/04s.gif b/plugins/patience_plugin/Patience/karten/german/04s.gif new file mode 100644 index 000000000..2c1b441f5 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/04s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/05c.gif b/plugins/patience_plugin/Patience/karten/german/05c.gif new file mode 100644 index 000000000..6b284db16 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/05c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/05d.gif b/plugins/patience_plugin/Patience/karten/german/05d.gif new file mode 100644 index 000000000..19fa424a6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/05d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/05h.gif b/plugins/patience_plugin/Patience/karten/german/05h.gif new file mode 100644 index 000000000..82ece7c25 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/05h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/05s.gif b/plugins/patience_plugin/Patience/karten/german/05s.gif new file mode 100644 index 000000000..a45e1a8a1 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/05s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/06c.gif b/plugins/patience_plugin/Patience/karten/german/06c.gif new file mode 100644 index 000000000..096901be7 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/06c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/06d.gif b/plugins/patience_plugin/Patience/karten/german/06d.gif new file mode 100644 index 000000000..63a4402df Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/06d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/06h.gif b/plugins/patience_plugin/Patience/karten/german/06h.gif new file mode 100644 index 000000000..e2bb4bd92 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/06h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/06s.gif b/plugins/patience_plugin/Patience/karten/german/06s.gif new file mode 100644 index 000000000..16e866bd3 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/06s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/07c.gif b/plugins/patience_plugin/Patience/karten/german/07c.gif new file mode 100644 index 000000000..951c08d72 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/07c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/07d.gif b/plugins/patience_plugin/Patience/karten/german/07d.gif new file mode 100644 index 000000000..696c86af7 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/07d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/07h.gif b/plugins/patience_plugin/Patience/karten/german/07h.gif new file mode 100644 index 000000000..9a86c613d Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/07h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/07s.gif b/plugins/patience_plugin/Patience/karten/german/07s.gif new file mode 100644 index 000000000..6702ebd6a Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/07s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/08c.gif b/plugins/patience_plugin/Patience/karten/german/08c.gif new file mode 100644 index 000000000..af8f06afe Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/08c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/08d.gif b/plugins/patience_plugin/Patience/karten/german/08d.gif new file mode 100644 index 000000000..7c3a77f48 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/08d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/08h.gif b/plugins/patience_plugin/Patience/karten/german/08h.gif new file mode 100644 index 000000000..c1151c717 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/08h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/08s.gif b/plugins/patience_plugin/Patience/karten/german/08s.gif new file mode 100644 index 000000000..7f49f46f5 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/08s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/09c.gif b/plugins/patience_plugin/Patience/karten/german/09c.gif new file mode 100644 index 000000000..a1cdd15a8 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/09c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/09d.gif b/plugins/patience_plugin/Patience/karten/german/09d.gif new file mode 100644 index 000000000..bf7e793c8 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/09d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/09h.gif b/plugins/patience_plugin/Patience/karten/german/09h.gif new file mode 100644 index 000000000..4784c6101 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/09h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/09s.gif b/plugins/patience_plugin/Patience/karten/german/09s.gif new file mode 100644 index 000000000..e649f6dc6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/09s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/10c.gif b/plugins/patience_plugin/Patience/karten/german/10c.gif new file mode 100644 index 000000000..5395d2699 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/10c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/10d.gif b/plugins/patience_plugin/Patience/karten/german/10d.gif new file mode 100644 index 000000000..17cf41a7e Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/10d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/10h.gif b/plugins/patience_plugin/Patience/karten/german/10h.gif new file mode 100644 index 000000000..0a652db02 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/10h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/10s.gif b/plugins/patience_plugin/Patience/karten/german/10s.gif new file mode 100644 index 000000000..2d56f51a9 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/10s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/11c.gif b/plugins/patience_plugin/Patience/karten/german/11c.gif new file mode 100644 index 000000000..48675d218 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/11c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/11d.gif b/plugins/patience_plugin/Patience/karten/german/11d.gif new file mode 100644 index 000000000..a3d880120 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/11d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/11h.gif b/plugins/patience_plugin/Patience/karten/german/11h.gif new file mode 100644 index 000000000..914ef7d4d Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/11h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/11s.gif b/plugins/patience_plugin/Patience/karten/german/11s.gif new file mode 100644 index 000000000..a9bfccf32 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/11s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/12c.gif b/plugins/patience_plugin/Patience/karten/german/12c.gif new file mode 100644 index 000000000..72c787f48 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/12c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/12d.gif b/plugins/patience_plugin/Patience/karten/german/12d.gif new file mode 100644 index 000000000..b928c8862 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/12d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/12h.gif b/plugins/patience_plugin/Patience/karten/german/12h.gif new file mode 100644 index 000000000..f9793595a Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/12h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/12s.gif b/plugins/patience_plugin/Patience/karten/german/12s.gif new file mode 100644 index 000000000..9f50f3c20 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/12s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/13c.gif b/plugins/patience_plugin/Patience/karten/german/13c.gif new file mode 100644 index 000000000..982285885 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/13c.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/13d.gif b/plugins/patience_plugin/Patience/karten/german/13d.gif new file mode 100644 index 000000000..321dd4a91 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/13d.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/13h.gif b/plugins/patience_plugin/Patience/karten/german/13h.gif new file mode 100644 index 000000000..73a38a5c2 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/13h.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/13s.gif b/plugins/patience_plugin/Patience/karten/german/13s.gif new file mode 100644 index 000000000..5ec887991 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/13s.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/COPYRIGHT b/plugins/patience_plugin/Patience/karten/german/COPYRIGHT new file mode 100644 index 000000000..dc217dc3f --- /dev/null +++ b/plugins/patience_plugin/Patience/karten/german/COPYRIGHT @@ -0,0 +1,8 @@ +This PySol cardset was adapted from the game XSkat 4.0 + +Copyright (C) 2004 Gunter Gerhardt (http://www.xskat.de) + +This cardset 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. diff --git a/plugins/patience_plugin/Patience/karten/german/back01.gif b/plugins/patience_plugin/Patience/karten/german/back01.gif new file mode 100644 index 000000000..d98c699d1 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/back01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/bottom01.gif b/plugins/patience_plugin/Patience/karten/german/bottom01.gif new file mode 100644 index 000000000..45f16b206 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/bottom01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/bottom02.gif b/plugins/patience_plugin/Patience/karten/german/bottom02.gif new file mode 100644 index 000000000..11332ae4c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/bottom02.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/bottom03.gif b/plugins/patience_plugin/Patience/karten/german/bottom03.gif new file mode 100644 index 000000000..75d817ed9 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/bottom03.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/bottom04.gif b/plugins/patience_plugin/Patience/karten/german/bottom04.gif new file mode 100644 index 000000000..2531b7e4c Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/bottom04.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/bottom05.gif b/plugins/patience_plugin/Patience/karten/german/bottom05.gif new file mode 100644 index 000000000..173a9f989 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/bottom05.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/bottom06.gif b/plugins/patience_plugin/Patience/karten/german/bottom06.gif new file mode 100644 index 000000000..3fed1f427 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/bottom06.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/bottom07.gif b/plugins/patience_plugin/Patience/karten/german/bottom07.gif new file mode 100644 index 000000000..e3c20d648 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/bottom07.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/config.txt b/plugins/patience_plugin/Patience/karten/german/config.txt new file mode 100644 index 000000000..e782358c6 --- /dev/null +++ b/plugins/patience_plugin/Patience/karten/german/config.txt @@ -0,0 +1,6 @@ +PySol solitaire cardset;5;.gif;1;52;7,1006;2004 +12442-xskat-german-large;XSkat-German-Large +90 140 8 +18 18 9 9 +back01.gif +back01.gif diff --git a/plugins/patience_plugin/Patience/karten/german/l01.gif b/plugins/patience_plugin/Patience/karten/german/l01.gif new file mode 100644 index 000000000..57b03e3c3 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/l01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/l02.gif b/plugins/patience_plugin/Patience/karten/german/l02.gif new file mode 100644 index 000000000..f86683951 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/l02.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/l03.gif b/plugins/patience_plugin/Patience/karten/german/l03.gif new file mode 100644 index 000000000..31b426556 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/l03.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/l04.gif b/plugins/patience_plugin/Patience/karten/german/l04.gif new file mode 100644 index 000000000..4323285af Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/l04.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shade.gif b/plugins/patience_plugin/Patience/karten/german/shade.gif new file mode 100644 index 000000000..7e0085f61 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shade.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow00.gif b/plugins/patience_plugin/Patience/karten/german/shadow00.gif new file mode 100644 index 000000000..8eb2d7d73 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow00.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow01.gif b/plugins/patience_plugin/Patience/karten/german/shadow01.gif new file mode 100644 index 000000000..ae8eb168d Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow01.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow02.gif b/plugins/patience_plugin/Patience/karten/german/shadow02.gif new file mode 100644 index 000000000..5bd510faa Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow02.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow03.gif b/plugins/patience_plugin/Patience/karten/german/shadow03.gif new file mode 100644 index 000000000..cad23b5a9 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow03.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow04.gif b/plugins/patience_plugin/Patience/karten/german/shadow04.gif new file mode 100644 index 000000000..69b0b55a6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow04.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow05.gif b/plugins/patience_plugin/Patience/karten/german/shadow05.gif new file mode 100644 index 000000000..d6b59f5eb Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow05.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow06.gif b/plugins/patience_plugin/Patience/karten/german/shadow06.gif new file mode 100644 index 000000000..89331c1cc Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow06.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow07.gif b/plugins/patience_plugin/Patience/karten/german/shadow07.gif new file mode 100644 index 000000000..f2f05d1d6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow07.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow08.gif b/plugins/patience_plugin/Patience/karten/german/shadow08.gif new file mode 100644 index 000000000..fd9773326 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow08.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow09.gif b/plugins/patience_plugin/Patience/karten/german/shadow09.gif new file mode 100644 index 000000000..0fc862f55 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow09.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow10.gif b/plugins/patience_plugin/Patience/karten/german/shadow10.gif new file mode 100644 index 000000000..e949e23c6 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow10.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow11.gif b/plugins/patience_plugin/Patience/karten/german/shadow11.gif new file mode 100644 index 000000000..812eca48d Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow11.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow12.gif b/plugins/patience_plugin/Patience/karten/german/shadow12.gif new file mode 100644 index 000000000..dad065377 Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow12.gif differ diff --git a/plugins/patience_plugin/Patience/karten/german/shadow13.gif b/plugins/patience_plugin/Patience/karten/german/shadow13.gif new file mode 100644 index 000000000..25eae560e Binary files /dev/null and b/plugins/patience_plugin/Patience/karten/german/shadow13.gif differ diff --git a/plugins/patience_plugin/Patience/main.cpp b/plugins/patience_plugin/Patience/main.cpp new file mode 100644 index 000000000..5113ebf14 --- /dev/null +++ b/plugins/patience_plugin/Patience/main.cpp @@ -0,0 +1,66 @@ +/* + +Name: Patience +Autor: Andreas Konarski +Begonnen: 05.08.2009. +Erstellt: 08.02.2010. +Version: 0.81 +Lizenz: GPL v3 or later +Plattformen: Alle Systeme, auf denen QT 4.5 verfuegbar ist. + +Kontakt: programmieren@konarski-wuppertal.de +home: www.konarski-wuppertal.de + +Falls ich mit diesem Programm die Rechte von irgend jemand verletzen sollte, bitte ich um einen Hinweis. Wenn dies Tatsaechlich der Fall ist, entferne ich es schnellstmoeglich von meiner Homepage. + + +Zu den Kartenbildern: + +This PySol cardset was adapted from the game XSkat 4.0 + +Copyright (C) 2004 Gunter Gerhardt (http://www.xskat.de) + +This cardset 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 +#include +#include +#include +#include "MainWindow.h" + +using namespace std; + +int main(int argc, char *argv[]) +{ +QApplication anwendung(argc, argv); + +// die anwendung uebersetzen +QTranslator uebersetzer, uebersetzer2; + +QString dateiname_eigene_uebersetzung; +dateiname_eigene_uebersetzung = QString(":/translations/Uebersetzung_%1").arg(QLocale::system().name()); + +// die uebersetzungs dateien in die uebersetzer laden +uebersetzer.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); +uebersetzer2.load(dateiname_eigene_uebersetzung); + +// die uebersetzer installieren +anwendung.installTranslator(&uebersetzer); +anwendung.installTranslator(&uebersetzer2); + +// den anwendungsnamen setzen +anwendung.setApplicationName("Patience"); + +// das hauptfenster erzeugen ... +MainWindow hauptfenster; + +// ... und anzeigen +hauptfenster.show(); + +return anwendung.exec(); +} diff --git a/plugins/patience_plugin/Patience/patience_plugin.pro b/plugins/patience_plugin/Patience/patience_plugin.pro new file mode 100644 index 000000000..78be1d883 --- /dev/null +++ b/plugins/patience_plugin/Patience/patience_plugin.pro @@ -0,0 +1,81 @@ +###################################################################### +# Automatically generated by qmake (2.01a) Mo. Feb 8 10:09:24 2010 +###################################################################### + +# ------------------------------------------------- +# Project created by QtCreator 2009-12-21T21:25:25 +# ------------------------------------------------- +#=== this part is common (similar) for all plugin projects ===================== +TEMPLATE = lib +CONFIG += plugin release + +# this is directory, where PluginInterface.h is located +INCLUDEPATH += ../../ + +# and, the result (*.so or *.dll) should appear in this directory +DESTDIR = ../../bin +OBJECTS_DIR = temp/obj +RCC_DIR = temp/qrc +UI_DIR = temp/ui +MOC_DIR = temp/moc + + +# the name of the result file; +TARGET = $$qtLibraryTarget(patience_plugin) + +HEADERS += ../../PluginInterface.h \ + PatiencePlugin.h +SOURCES += PatiencePlugin.cpp + +#=============================================================================== + +TARGET = +DEPENDPATH += . +INCLUDEPATH += . + +ICON = icon.icns + +RC_FILE = Patience.rc + +# Input +HEADERS += Ablagestapel.h \ + Austeilcostapel.h \ + Austeilstapel.h \ + Basisstapel.h \ + Highscore.h \ + Hilfszeiger.h \ + Karte.h \ + MainWindow.h \ + Proportionen.h \ + Punktezaehler.h \ + Rahmen.h \ + Random.h \ + Scene.h \ + Siegkontrolle.h \ + Speichern_frage.h \ + Undo.h \ + Viewer.h \ + Zielstapel.h \ + Zug.h +FORMS += Highscore.ui MainWindow.ui Speichern_frage.ui +SOURCES += Ablagestapel.cpp \ + Austeilcostapel.cpp \ + Austeilstapel.cpp \ + Basisstapel.cpp \ + Highscore.cpp \ + Hilfszeiger.cpp \ + Karte.cpp \ + main.cpp \ + MainWindow.cpp \ + Punktezaehler.cpp \ + Rahmen.cpp \ + Random.cpp \ + Scene.cpp \ + Siegkontrolle.cpp \ + Speichern_frage.cpp \ + Undo.cpp \ + Viewer.cpp \ + Zielstapel.cpp \ + Zug.cpp +RESOURCES += resourcen.qrc +TRANSLATIONS += Uebersetzung_de.ts diff --git a/plugins/patience_plugin/Patience/readme.txt b/plugins/patience_plugin/Patience/readme.txt new file mode 100644 index 000000000..f247ff051 --- /dev/null +++ b/plugins/patience_plugin/Patience/readme.txt @@ -0,0 +1,18 @@ +Readme File for Patience + +Autor: Andreas Konarski +Contact: andreaskw@gmx.de + programmieren@konarski-wuppertal.de +Licence: GPL V3 + +Windows XP: +Just extract the zip file and launch Patience.exe. Place the Patience Folder where you want, but don’t change the internal structure of the folder, or the application will stop working. + +MacOSX 10.6 Snow Leopard: +Just place the bundle where you want. It should solve all dependencies, but i don’t have a second mac without qt installed to check this. + +Linux: +You have to build the application fro scratch. First install the latest version of qt4, if not already happened. Extract the sources and run qmake and make inside the folder with the sources. + +Other operating systems supported by qt4: +You have to build the application from scratch. Install the latest version of qt4 if not already happened and build the application the way, it should be done on your platform. \ No newline at end of file diff --git a/plugins/patience_plugin/Patience/resourcen.qrc b/plugins/patience_plugin/Patience/resourcen.qrc new file mode 100644 index 000000000..0cfa58d0f --- /dev/null +++ b/plugins/patience_plugin/Patience/resourcen.qrc @@ -0,0 +1,167 @@ + + + karten/french/01c.gif + karten/french/01d.gif + karten/french/01h.gif + karten/french/01s.gif + karten/french/02c.gif + karten/french/02d.gif + karten/french/02h.gif + karten/french/02s.gif + karten/french/03c.gif + karten/french/03d.gif + karten/french/03h.gif + karten/french/03s.gif + karten/french/04c.gif + karten/french/04d.gif + karten/french/04h.gif + karten/french/04s.gif + karten/french/05c.gif + karten/french/05d.gif + karten/french/05h.gif + karten/french/05s.gif + karten/french/06c.gif + karten/french/06d.gif + karten/french/06h.gif + karten/french/06s.gif + karten/french/07c.gif + karten/french/07d.gif + karten/french/07h.gif + karten/french/07s.gif + karten/french/08c.gif + karten/french/08d.gif + karten/french/08h.gif + karten/french/08s.gif + karten/french/09c.gif + karten/french/09d.gif + karten/french/09h.gif + karten/french/09s.gif + karten/french/10c.gif + karten/french/10d.gif + karten/french/10h.gif + karten/french/10s.gif + karten/french/11c.gif + karten/french/11d.gif + karten/french/11h.gif + karten/french/11s.gif + karten/french/12c.gif + karten/french/12d.gif + karten/french/12h.gif + karten/french/12s.gif + karten/french/13c.gif + karten/french/13d.gif + karten/french/13h.gif + karten/french/13s.gif + karten/french/back01.gif + karten/french/bottom01.gif + karten/french/bottom02.gif + karten/french/bottom03.gif + karten/french/bottom04.gif + karten/french/bottom05.gif + karten/french/bottom06.gif + karten/french/bottom07.gif + karten/french/l01.gif + karten/french/l02.gif + karten/french/l03.gif + karten/french/l04.gif + karten/french/shade.gif + karten/french/shadow00.gif + karten/french/shadow01.gif + karten/french/shadow02.gif + karten/french/shadow03.gif + karten/french/shadow04.gif + karten/french/shadow05.gif + karten/french/shadow06.gif + karten/french/shadow07.gif + karten/french/shadow08.gif + karten/french/shadow09.gif + karten/french/shadow10.gif + karten/french/shadow11.gif + karten/french/shadow12.gif + karten/french/shadow13.gif + + + Uebersetzung_de.qm + + + karten/german/01c.gif + karten/german/01d.gif + karten/german/01h.gif + karten/german/01s.gif + karten/german/02c.gif + karten/german/02d.gif + karten/german/02h.gif + karten/german/02s.gif + karten/german/03c.gif + karten/german/03d.gif + karten/german/03h.gif + karten/german/03s.gif + karten/german/04c.gif + karten/german/04d.gif + karten/german/04h.gif + karten/german/04s.gif + karten/german/05c.gif + karten/german/05d.gif + karten/german/05h.gif + karten/german/05s.gif + karten/german/06c.gif + karten/german/06d.gif + karten/german/06h.gif + karten/german/06s.gif + karten/german/07c.gif + karten/german/07d.gif + karten/german/07h.gif + karten/german/07s.gif + karten/german/08c.gif + karten/german/08d.gif + karten/german/08h.gif + karten/german/08s.gif + karten/german/09c.gif + karten/german/09d.gif + karten/german/09h.gif + karten/german/09s.gif + karten/german/10c.gif + karten/german/10d.gif + karten/german/10h.gif + karten/german/10s.gif + karten/german/11c.gif + karten/german/11d.gif + karten/german/11h.gif + karten/german/11s.gif + karten/german/12c.gif + karten/german/12d.gif + karten/german/12h.gif + karten/german/12s.gif + karten/german/13c.gif + karten/german/13d.gif + karten/german/13h.gif + karten/german/13s.gif + karten/german/back01.gif + karten/german/bottom01.gif + karten/german/bottom02.gif + karten/german/bottom03.gif + karten/german/bottom04.gif + karten/german/bottom05.gif + karten/german/bottom06.gif + karten/german/bottom07.gif + karten/german/l01.gif + karten/german/l02.gif + karten/german/l03.gif + karten/german/l04.gif + karten/german/shade.gif + karten/german/shadow00.gif + karten/german/shadow01.gif + karten/german/shadow02.gif + karten/german/shadow03.gif + karten/german/shadow04.gif + karten/german/shadow05.gif + karten/german/shadow06.gif + karten/german/shadow07.gif + karten/german/shadow08.gif + karten/german/shadow09.gif + karten/german/shadow10.gif + karten/german/shadow11.gif + karten/german/shadow12.gif + karten/german/shadow13.gif + + diff --git a/plugins/patience_plugin/Patience/ui_Highscore.h b/plugins/patience_plugin/Patience/ui_Highscore.h new file mode 100644 index 000000000..9f9e5a7ae --- /dev/null +++ b/plugins/patience_plugin/Patience/ui_Highscore.h @@ -0,0 +1,107 @@ +/******************************************************************************** +** Form generated from reading ui file 'Highscore.ui' +** +** Created: Mon 8. Feb 22:40:48 2010 +** by: Qt User Interface Compiler version 4.5.2 +** +** WARNING! All changes made in this file will be lost when recompiling ui file! +********************************************************************************/ + +#ifndef UI_HIGHSCORE_H +#define UI_HIGHSCORE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_Highscore +{ +public: + QVBoxLayout *verticalLayout; + QTableWidget *tabelle; + QHBoxLayout *horizontalLayout; + QSpacerItem *horizontalSpacer; + QPushButton *ok_button; + + void setupUi(QDialog *Highscore) + { + if (Highscore->objectName().isEmpty()) + Highscore->setObjectName(QString::fromUtf8("Highscore")); + Highscore->setWindowModality(Qt::WindowModal); + Highscore->resize(528, 300); + Highscore->setMinimumSize(QSize(528, 300)); + verticalLayout = new QVBoxLayout(Highscore); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + tabelle = new QTableWidget(Highscore); + if (tabelle->columnCount() < 3) + tabelle->setColumnCount(3); + QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem(); + tabelle->setHorizontalHeaderItem(0, __qtablewidgetitem); + QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem(); + tabelle->setHorizontalHeaderItem(1, __qtablewidgetitem1); + QTableWidgetItem *__qtablewidgetitem2 = new QTableWidgetItem(); + tabelle->setHorizontalHeaderItem(2, __qtablewidgetitem2); + tabelle->setObjectName(QString::fromUtf8("tabelle")); + tabelle->setEditTriggers(QAbstractItemView::NoEditTriggers); + tabelle->setSelectionBehavior(QAbstractItemView::SelectRows); + tabelle->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); + tabelle->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); + tabelle->horizontalHeader()->setStretchLastSection(true); + + verticalLayout->addWidget(tabelle); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer); + + ok_button = new QPushButton(Highscore); + ok_button->setObjectName(QString::fromUtf8("ok_button")); + ok_button->setAutoDefault(false); + ok_button->setDefault(true); + + horizontalLayout->addWidget(ok_button); + + + verticalLayout->addLayout(horizontalLayout); + + + retranslateUi(Highscore); + QObject::connect(ok_button, SIGNAL(clicked()), Highscore, SLOT(accept())); + + QMetaObject::connectSlotsByName(Highscore); + } // setupUi + + void retranslateUi(QDialog *Highscore) + { + Highscore->setWindowTitle(QApplication::translate("Highscore", "Patience - Highscore", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem = tabelle->horizontalHeaderItem(0); + ___qtablewidgetitem->setText(QApplication::translate("Highscore", "Name", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem1 = tabelle->horizontalHeaderItem(1); + ___qtablewidgetitem1->setText(QApplication::translate("Highscore", "Points", 0, QApplication::UnicodeUTF8)); + QTableWidgetItem *___qtablewidgetitem2 = tabelle->horizontalHeaderItem(2); + ___qtablewidgetitem2->setText(QApplication::translate("Highscore", "Time", 0, QApplication::UnicodeUTF8)); + ok_button->setText(QApplication::translate("Highscore", "Ok", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(Highscore); + } // retranslateUi + +}; + +namespace Ui { + class Highscore: public Ui_Highscore {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_HIGHSCORE_H diff --git a/plugins/patience_plugin/Patience/ui_MainWindow.h b/plugins/patience_plugin/Patience/ui_MainWindow.h new file mode 100644 index 000000000..c71bda704 --- /dev/null +++ b/plugins/patience_plugin/Patience/ui_MainWindow.h @@ -0,0 +1,231 @@ +/******************************************************************************** +** Form generated from reading ui file 'MainWindow.ui' +** +** Created: Mon 8. Feb 22:40:48 2010 +** by: Qt User Interface Compiler version 4.5.2 +** +** WARNING! All changes made in this file will be lost when recompiling ui file! +********************************************************************************/ + +#ifndef UI_MAINWINDOW_H +#define UI_MAINWINDOW_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Viewer.h" + +QT_BEGIN_NAMESPACE + +class Ui_MainWindow +{ +public: + QAction *action_neues_spiel; + QAction *action_beenden; + QAction *action_about; + QAction *action_about_qt; + QAction *action_french_; + QAction *action_german_; + QAction *action_highscore; + QAction *action_eine_ziehen_; + QAction *action_drei_ziehen_; + QAction *action_french; + QAction *action_german; + QAction *action_eine_ziehen; + QAction *action_drei_ziehen; + QAction *action_rahmen; + QAction *action_undo; + QAction *action_fragen; + QAction *action_speichern; + QAction *action_nicht_speichern; + QWidget *centralwidget; + QGridLayout *gridLayout; + Viewer *viewer; + QMenuBar *menubar; + QMenu *menuSpiel; + QMenu *menu_Hilfe; + QMenu *menu_Einstellungen; + QMenu *menu_Cardset; + QMenu *menu_Gametype; + QMenu *menuSave_Game; + QMenu *menu_Highscore; + QMenu *menu_Edit; + QStatusBar *statusbar; + + void setupUi(QMainWindow *MainWindow) + { + if (MainWindow->objectName().isEmpty()) + MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->resize(810, 653); + action_neues_spiel = new QAction(MainWindow); + action_neues_spiel->setObjectName(QString::fromUtf8("action_neues_spiel")); + action_beenden = new QAction(MainWindow); + action_beenden->setObjectName(QString::fromUtf8("action_beenden")); + action_about = new QAction(MainWindow); + action_about->setObjectName(QString::fromUtf8("action_about")); + action_about_qt = new QAction(MainWindow); + action_about_qt->setObjectName(QString::fromUtf8("action_about_qt")); + action_french_ = new QAction(MainWindow); + action_french_->setObjectName(QString::fromUtf8("action_french_")); + action_french_->setCheckable(true); + action_german_ = new QAction(MainWindow); + action_german_->setObjectName(QString::fromUtf8("action_german_")); + action_german_->setCheckable(true); + action_highscore = new QAction(MainWindow); + action_highscore->setObjectName(QString::fromUtf8("action_highscore")); + action_eine_ziehen_ = new QAction(MainWindow); + action_eine_ziehen_->setObjectName(QString::fromUtf8("action_eine_ziehen_")); + action_eine_ziehen_->setCheckable(true); + action_drei_ziehen_ = new QAction(MainWindow); + action_drei_ziehen_->setObjectName(QString::fromUtf8("action_drei_ziehen_")); + action_drei_ziehen_->setCheckable(true); + action_french = new QAction(MainWindow); + action_french->setObjectName(QString::fromUtf8("action_french")); + action_french->setCheckable(true); + action_german = new QAction(MainWindow); + action_german->setObjectName(QString::fromUtf8("action_german")); + action_german->setCheckable(true); + action_eine_ziehen = new QAction(MainWindow); + action_eine_ziehen->setObjectName(QString::fromUtf8("action_eine_ziehen")); + action_eine_ziehen->setCheckable(true); + action_drei_ziehen = new QAction(MainWindow); + action_drei_ziehen->setObjectName(QString::fromUtf8("action_drei_ziehen")); + action_drei_ziehen->setCheckable(true); + action_rahmen = new QAction(MainWindow); + action_rahmen->setObjectName(QString::fromUtf8("action_rahmen")); + action_rahmen->setCheckable(true); + action_rahmen->setChecked(true); + action_undo = new QAction(MainWindow); + action_undo->setObjectName(QString::fromUtf8("action_undo")); + action_fragen = new QAction(MainWindow); + action_fragen->setObjectName(QString::fromUtf8("action_fragen")); + action_fragen->setCheckable(true); + action_fragen->setChecked(true); + action_speichern = new QAction(MainWindow); + action_speichern->setObjectName(QString::fromUtf8("action_speichern")); + action_speichern->setCheckable(true); + action_speichern->setChecked(false); + action_nicht_speichern = new QAction(MainWindow); + action_nicht_speichern->setObjectName(QString::fromUtf8("action_nicht_speichern")); + action_nicht_speichern->setCheckable(true); + centralwidget = new QWidget(MainWindow); + centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + gridLayout = new QGridLayout(centralwidget); + gridLayout->setMargin(5); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + viewer = new Viewer(centralwidget); + viewer->setObjectName(QString::fromUtf8("viewer")); + viewer->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + viewer->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + viewer->setRenderHints(QPainter::Antialiasing|QPainter::HighQualityAntialiasing|QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing); + viewer->setCacheMode(QGraphicsView::CacheBackground); + viewer->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); + + gridLayout->addWidget(viewer, 0, 0, 1, 1); + + MainWindow->setCentralWidget(centralwidget); + menubar = new QMenuBar(MainWindow); + menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setGeometry(QRect(0, 0, 810, 22)); + menuSpiel = new QMenu(menubar); + menuSpiel->setObjectName(QString::fromUtf8("menuSpiel")); + menu_Hilfe = new QMenu(menubar); + menu_Hilfe->setObjectName(QString::fromUtf8("menu_Hilfe")); + menu_Einstellungen = new QMenu(menubar); + menu_Einstellungen->setObjectName(QString::fromUtf8("menu_Einstellungen")); + menu_Cardset = new QMenu(menu_Einstellungen); + menu_Cardset->setObjectName(QString::fromUtf8("menu_Cardset")); + menu_Gametype = new QMenu(menu_Einstellungen); + menu_Gametype->setObjectName(QString::fromUtf8("menu_Gametype")); + menuSave_Game = new QMenu(menu_Einstellungen); + menuSave_Game->setObjectName(QString::fromUtf8("menuSave_Game")); + menu_Highscore = new QMenu(menubar); + menu_Highscore->setObjectName(QString::fromUtf8("menu_Highscore")); + menu_Edit = new QMenu(menubar); + menu_Edit->setObjectName(QString::fromUtf8("menu_Edit")); + MainWindow->setMenuBar(menubar); + statusbar = new QStatusBar(MainWindow); + statusbar->setObjectName(QString::fromUtf8("statusbar")); + MainWindow->setStatusBar(statusbar); + + menubar->addAction(menuSpiel->menuAction()); + menubar->addAction(menu_Edit->menuAction()); + menubar->addAction(menu_Einstellungen->menuAction()); + menubar->addAction(menu_Highscore->menuAction()); + menubar->addAction(menu_Hilfe->menuAction()); + menuSpiel->addAction(action_neues_spiel); + menuSpiel->addSeparator(); + menuSpiel->addAction(action_beenden); + menu_Hilfe->addAction(action_about); + menu_Hilfe->addAction(action_about_qt); + menu_Einstellungen->addAction(menu_Cardset->menuAction()); + menu_Einstellungen->addAction(menu_Gametype->menuAction()); + menu_Einstellungen->addAction(menuSave_Game->menuAction()); + menu_Einstellungen->addSeparator(); + menu_Einstellungen->addAction(action_rahmen); + menu_Einstellungen->addSeparator(); + menu_Cardset->addAction(action_french); + menu_Cardset->addAction(action_german); + menu_Gametype->addAction(action_eine_ziehen); + menu_Gametype->addAction(action_drei_ziehen); + menuSave_Game->addAction(action_speichern); + menuSave_Game->addAction(action_nicht_speichern); + menuSave_Game->addSeparator(); + menuSave_Game->addAction(action_fragen); + menu_Highscore->addAction(action_highscore); + menu_Edit->addAction(action_undo); + + retranslateUi(MainWindow); + + QMetaObject::connectSlotsByName(MainWindow); + } // setupUi + + void retranslateUi(QMainWindow *MainWindow) + { + MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Patience", 0, QApplication::UnicodeUTF8)); + action_neues_spiel->setText(QApplication::translate("MainWindow", "&New Game", 0, QApplication::UnicodeUTF8)); + action_neues_spiel->setShortcut(QApplication::translate("MainWindow", "Ctrl+N", 0, QApplication::UnicodeUTF8)); + action_beenden->setText(QApplication::translate("MainWindow", "Close", 0, QApplication::UnicodeUTF8)); + action_about->setText(QApplication::translate("MainWindow", "About Patience", 0, QApplication::UnicodeUTF8)); + action_about_qt->setText(QApplication::translate("MainWindow", "About QT", 0, QApplication::UnicodeUTF8)); + action_french_->setText(QApplication::translate("MainWindow", "French", 0, QApplication::UnicodeUTF8)); + action_german_->setText(QApplication::translate("MainWindow", "German", 0, QApplication::UnicodeUTF8)); + action_highscore->setText(QApplication::translate("MainWindow", "&Show", 0, QApplication::UnicodeUTF8)); + action_eine_ziehen_->setText(QApplication::translate("MainWindow", "Take One", 0, QApplication::UnicodeUTF8)); + action_drei_ziehen_->setText(QApplication::translate("MainWindow", "Take Three", 0, QApplication::UnicodeUTF8)); + action_french->setText(QApplication::translate("MainWindow", "French", 0, QApplication::UnicodeUTF8)); + action_german->setText(QApplication::translate("MainWindow", "German", 0, QApplication::UnicodeUTF8)); + action_eine_ziehen->setText(QApplication::translate("MainWindow", "Take One", 0, QApplication::UnicodeUTF8)); + action_drei_ziehen->setText(QApplication::translate("MainWindow", "Take Three", 0, QApplication::UnicodeUTF8)); + action_rahmen->setText(QApplication::translate("MainWindow", "Frame", 0, QApplication::UnicodeUTF8)); + action_undo->setText(QApplication::translate("MainWindow", "Undo", 0, QApplication::UnicodeUTF8)); + action_fragen->setText(QApplication::translate("MainWindow", "Ask", 0, QApplication::UnicodeUTF8)); + action_speichern->setText(QApplication::translate("MainWindow", "Save", 0, QApplication::UnicodeUTF8)); + action_nicht_speichern->setText(QApplication::translate("MainWindow", "Don't save", 0, QApplication::UnicodeUTF8)); + menuSpiel->setTitle(QApplication::translate("MainWindow", "Game", 0, QApplication::UnicodeUTF8)); + menu_Hilfe->setTitle(QApplication::translate("MainWindow", "&Help", 0, QApplication::UnicodeUTF8)); + menu_Einstellungen->setTitle(QApplication::translate("MainWindow", "&Settings", 0, QApplication::UnicodeUTF8)); + menu_Cardset->setTitle(QApplication::translate("MainWindow", "&Cardset", 0, QApplication::UnicodeUTF8)); + menu_Gametype->setTitle(QApplication::translate("MainWindow", "Gametype", 0, QApplication::UnicodeUTF8)); + menuSave_Game->setTitle(QApplication::translate("MainWindow", "Save Game", 0, QApplication::UnicodeUTF8)); + menu_Highscore->setTitle(QApplication::translate("MainWindow", "&Highscore", 0, QApplication::UnicodeUTF8)); + menu_Edit->setTitle(QApplication::translate("MainWindow", "&Edit", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class MainWindow: public Ui_MainWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_MAINWINDOW_H diff --git a/plugins/patience_plugin/Patience/ui_Speichern_frage.h b/plugins/patience_plugin/Patience/ui_Speichern_frage.h new file mode 100644 index 000000000..1afc8a579 --- /dev/null +++ b/plugins/patience_plugin/Patience/ui_Speichern_frage.h @@ -0,0 +1,158 @@ +/******************************************************************************** +** Form generated from reading ui file 'Speichern_frage.ui' +** +** Created: Mon 8. Feb 22:40:48 2010 +** by: Qt User Interface Compiler version 4.5.2 +** +** WARNING! All changes made in this file will be lost when recompiling ui file! +********************************************************************************/ + +#ifndef UI_SPEICHERN_FRAGE_H +#define UI_SPEICHERN_FRAGE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_Speichern_frage +{ +public: + QVBoxLayout *verticalLayout; + QHBoxLayout *horizontalLayout_4; + QSpacerItem *horizontalSpacer_3; + QLabel *label; + QSpacerItem *horizontalSpacer_4; + QHBoxLayout *horizontalLayout_5; + QHBoxLayout *horizontalLayout_2; + QPushButton *nein_button; + QSpacerItem *horizontalSpacer; + QHBoxLayout *horizontalLayout; + QPushButton *cancel_button; + QPushButton *ok_button; + QHBoxLayout *horizontalLayout_3; + QSpacerItem *horizontalSpacer_2; + QCheckBox *merk_box; + + void setupUi(QDialog *Speichern_frage) + { + if (Speichern_frage->objectName().isEmpty()) + Speichern_frage->setObjectName(QString::fromUtf8("Speichern_frage")); + Speichern_frage->setWindowModality(Qt::WindowModal); + Speichern_frage->resize(365, 127); + verticalLayout = new QVBoxLayout(Speichern_frage); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setContentsMargins(5, -1, 5, 5); + horizontalLayout_4 = new QHBoxLayout(); + horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_4->addItem(horizontalSpacer_3); + + label = new QLabel(Speichern_frage); + label->setObjectName(QString::fromUtf8("label")); + QFont font; + font.setPointSize(21); + label->setFont(font); + + horizontalLayout_4->addWidget(label); + + horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_4->addItem(horizontalSpacer_4); + + + verticalLayout->addLayout(horizontalLayout_4); + + horizontalLayout_5 = new QHBoxLayout(); + horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); + horizontalLayout_2 = new QHBoxLayout(); + horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + nein_button = new QPushButton(Speichern_frage); + nein_button->setObjectName(QString::fromUtf8("nein_button")); + nein_button->setAutoDefault(false); + + horizontalLayout_2->addWidget(nein_button); + + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_2->addItem(horizontalSpacer); + + + horizontalLayout_5->addLayout(horizontalLayout_2); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + cancel_button = new QPushButton(Speichern_frage); + cancel_button->setObjectName(QString::fromUtf8("cancel_button")); + cancel_button->setAutoDefault(false); + cancel_button->setDefault(true); + + horizontalLayout->addWidget(cancel_button); + + ok_button = new QPushButton(Speichern_frage); + ok_button->setObjectName(QString::fromUtf8("ok_button")); + ok_button->setAutoDefault(false); + + horizontalLayout->addWidget(ok_button); + + + horizontalLayout_5->addLayout(horizontalLayout); + + + verticalLayout->addLayout(horizontalLayout_5); + + horizontalLayout_3 = new QHBoxLayout(); + horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_3->addItem(horizontalSpacer_2); + + merk_box = new QCheckBox(Speichern_frage); + merk_box->setObjectName(QString::fromUtf8("merk_box")); + QFont font1; + font1.setPointSize(15); + merk_box->setFont(font1); + merk_box->setLayoutDirection(Qt::RightToLeft); + + horizontalLayout_3->addWidget(merk_box); + + + verticalLayout->addLayout(horizontalLayout_3); + + + retranslateUi(Speichern_frage); + + QMetaObject::connectSlotsByName(Speichern_frage); + } // setupUi + + void retranslateUi(QDialog *Speichern_frage) + { + Speichern_frage->setWindowTitle(QApplication::translate("Speichern_frage", "Patience - Save game and quit ?", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("Speichern_frage", "Save the game and quit ?", 0, QApplication::UnicodeUTF8)); + nein_button->setText(QApplication::translate("Speichern_frage", "Don't Save", 0, QApplication::UnicodeUTF8)); + cancel_button->setText(QApplication::translate("Speichern_frage", "Cancel", 0, QApplication::UnicodeUTF8)); + ok_button->setText(QApplication::translate("Speichern_frage", "OK", 0, QApplication::UnicodeUTF8)); + merk_box->setText(QApplication::translate("Speichern_frage", "Remember answer", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(Speichern_frage); + } // retranslateUi + +}; + +namespace Ui { + class Speichern_frage: public Ui_Speichern_frage {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_SPEICHERN_FRAGE_H diff --git a/plugins/patience_plugin/__MACOSX/Patience/._.DS_Store b/plugins/patience_plugin/__MACOSX/Patience/._.DS_Store new file mode 100644 index 000000000..460d887a2 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._.DS_Store differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Ablagestapel.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Ablagestapel.cpp new file mode 100644 index 000000000..9286eec14 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Ablagestapel.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Ablagestapel.h b/plugins/patience_plugin/__MACOSX/Patience/._Ablagestapel.h new file mode 100644 index 000000000..d34cefabe Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Ablagestapel.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Austeilcostapel.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Austeilcostapel.cpp new file mode 100644 index 000000000..68689ab17 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Austeilcostapel.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Austeilcostapel.h b/plugins/patience_plugin/__MACOSX/Patience/._Austeilcostapel.h new file mode 100644 index 000000000..238eddabb Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Austeilcostapel.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Austeilstapel.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Austeilstapel.cpp new file mode 100644 index 000000000..7eb36d58d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Austeilstapel.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Austeilstapel.h b/plugins/patience_plugin/__MACOSX/Patience/._Austeilstapel.h new file mode 100644 index 000000000..668801bdb Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Austeilstapel.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Basisstapel.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Basisstapel.cpp new file mode 100644 index 000000000..6edd16087 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Basisstapel.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Basisstapel.h b/plugins/patience_plugin/__MACOSX/Patience/._Basisstapel.h new file mode 100644 index 000000000..11e755cb7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Basisstapel.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Highscore.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Highscore.cpp new file mode 100644 index 000000000..0dc1939f0 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Highscore.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Highscore.h b/plugins/patience_plugin/__MACOSX/Patience/._Highscore.h new file mode 100644 index 000000000..11967dab2 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Highscore.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Highscore.ui b/plugins/patience_plugin/__MACOSX/Patience/._Highscore.ui new file mode 100644 index 000000000..a50685e47 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Highscore.ui differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Hilfszeiger.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Hilfszeiger.cpp new file mode 100644 index 000000000..5d859fcf5 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Hilfszeiger.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Hilfszeiger.h b/plugins/patience_plugin/__MACOSX/Patience/._Hilfszeiger.h new file mode 100644 index 000000000..3b42cdcdc Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Hilfszeiger.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Karte.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Karte.cpp new file mode 100644 index 000000000..301bb9784 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Karte.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Karte.h b/plugins/patience_plugin/__MACOSX/Patience/._Karte.h new file mode 100644 index 000000000..098b12b4f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Karte.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.cpp b/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.cpp new file mode 100644 index 000000000..a27773ffc Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.h b/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.h new file mode 100644 index 000000000..aad35968c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.ui b/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.ui new file mode 100644 index 000000000..efc8fed56 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._MainWindow.ui differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Patience.pro b/plugins/patience_plugin/__MACOSX/Patience/._Patience.pro new file mode 100644 index 000000000..f6c1d222c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Patience.pro differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Patience.rc b/plugins/patience_plugin/__MACOSX/Patience/._Patience.rc new file mode 100644 index 000000000..5bd659a1d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Patience.rc differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Proportionen.h b/plugins/patience_plugin/__MACOSX/Patience/._Proportionen.h new file mode 100644 index 000000000..71f6fce1f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Proportionen.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Punktezaehler.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Punktezaehler.cpp new file mode 100644 index 000000000..1f006e725 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Punktezaehler.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Punktezaehler.h b/plugins/patience_plugin/__MACOSX/Patience/._Punktezaehler.h new file mode 100644 index 000000000..e2fc366df Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Punktezaehler.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Rahmen.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Rahmen.cpp new file mode 100644 index 000000000..961462bb1 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Rahmen.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Rahmen.h b/plugins/patience_plugin/__MACOSX/Patience/._Rahmen.h new file mode 100644 index 000000000..c8670f6d4 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Rahmen.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Random.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Random.cpp new file mode 100644 index 000000000..9b11b1026 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Random.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Random.h b/plugins/patience_plugin/__MACOSX/Patience/._Random.h new file mode 100644 index 000000000..1f5d6c807 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Random.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Scene.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Scene.cpp new file mode 100644 index 000000000..420f2943c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Scene.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Scene.h b/plugins/patience_plugin/__MACOSX/Patience/._Scene.h new file mode 100644 index 000000000..2e915405e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Scene.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Screenshot unter OSX.png b/plugins/patience_plugin/__MACOSX/Patience/._Screenshot unter OSX.png new file mode 100644 index 000000000..cc7e4348f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Screenshot unter OSX.png differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Siegkontrolle.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Siegkontrolle.cpp new file mode 100644 index 000000000..fae831b03 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Siegkontrolle.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Siegkontrolle.h b/plugins/patience_plugin/__MACOSX/Patience/._Siegkontrolle.h new file mode 100644 index 000000000..a022c52eb Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Siegkontrolle.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Speichern_frage.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Speichern_frage.cpp new file mode 100644 index 000000000..54efed816 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Speichern_frage.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Speichern_frage.h b/plugins/patience_plugin/__MACOSX/Patience/._Speichern_frage.h new file mode 100644 index 000000000..6ccd00307 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Speichern_frage.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Uebersetzung_de.ts b/plugins/patience_plugin/__MACOSX/Patience/._Uebersetzung_de.ts new file mode 100644 index 000000000..423769c02 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Uebersetzung_de.ts differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Undo.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Undo.cpp new file mode 100644 index 000000000..33188635a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Undo.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Undo.h b/plugins/patience_plugin/__MACOSX/Patience/._Undo.h new file mode 100644 index 000000000..0f3c71031 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Undo.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Viewer.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Viewer.cpp new file mode 100644 index 000000000..681fcce9f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Viewer.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Viewer.h b/plugins/patience_plugin/__MACOSX/Patience/._Viewer.h new file mode 100644 index 000000000..c659ca58d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Viewer.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Zielstapel.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Zielstapel.cpp new file mode 100644 index 000000000..2dc662fbb Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Zielstapel.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Zielstapel.h b/plugins/patience_plugin/__MACOSX/Patience/._Zielstapel.h new file mode 100644 index 000000000..68f964334 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Zielstapel.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Zug.cpp b/plugins/patience_plugin/__MACOSX/Patience/._Zug.cpp new file mode 100644 index 000000000..613efa04d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Zug.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._Zug.h b/plugins/patience_plugin/__MACOSX/Patience/._Zug.h new file mode 100644 index 000000000..e264f54df Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._Zug.h differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._gpl.txt b/plugins/patience_plugin/__MACOSX/Patience/._gpl.txt new file mode 100644 index 000000000..6b4f86f6f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._gpl.txt differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._icon.icns b/plugins/patience_plugin/__MACOSX/Patience/._icon.icns new file mode 100644 index 000000000..82ba09e15 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._icon.icns differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._icon.ico b/plugins/patience_plugin/__MACOSX/Patience/._icon.ico new file mode 100644 index 000000000..0ddac7cfd Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._icon.ico differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._main.cpp b/plugins/patience_plugin/__MACOSX/Patience/._main.cpp new file mode 100644 index 000000000..2210d70ea Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._main.cpp differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/._readme.txt b/plugins/patience_plugin/__MACOSX/Patience/._readme.txt new file mode 100644 index 000000000..4ecfcf086 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/._readme.txt differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/._.DS_Store b/plugins/patience_plugin/__MACOSX/Patience/karten/._.DS_Store new file mode 100644 index 000000000..460d887a2 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/._.DS_Store differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/._french b/plugins/patience_plugin/__MACOSX/Patience/karten/._french new file mode 100644 index 000000000..fa1826534 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/._french differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/._german b/plugins/patience_plugin/__MACOSX/Patience/karten/._german new file mode 100644 index 000000000..4b323bba5 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/._german differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01d.gif new file mode 100644 index 000000000..1c2d37f4c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01h.gif new file mode 100644 index 000000000..e8a4c18dc Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01s.gif new file mode 100644 index 000000000..8f2894649 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._01s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02c.gif new file mode 100644 index 000000000..09bc909b7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02d.gif new file mode 100644 index 000000000..aaba750b7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02h.gif new file mode 100644 index 000000000..5cc546c75 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02s.gif new file mode 100644 index 000000000..809629866 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._02s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03c.gif new file mode 100644 index 000000000..fb3a4a201 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03d.gif new file mode 100644 index 000000000..a04910488 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03h.gif new file mode 100644 index 000000000..3d9677535 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03s.gif new file mode 100644 index 000000000..505b08018 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._03s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04c.gif new file mode 100644 index 000000000..446e83582 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04d.gif new file mode 100644 index 000000000..4f144168a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04h.gif new file mode 100644 index 000000000..2d27c68a8 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04s.gif new file mode 100644 index 000000000..892469320 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._04s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05c.gif new file mode 100644 index 000000000..fbad7b9a9 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05d.gif new file mode 100644 index 000000000..246612642 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05h.gif new file mode 100644 index 000000000..4515c15d9 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05s.gif new file mode 100644 index 000000000..288b64655 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._05s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06c.gif new file mode 100644 index 000000000..4ee2a0b30 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06d.gif new file mode 100644 index 000000000..589ae05c2 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06h.gif new file mode 100644 index 000000000..a27b26638 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06s.gif new file mode 100644 index 000000000..1b6b5ad39 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._06s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07c.gif new file mode 100644 index 000000000..ecbd112aa Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07d.gif new file mode 100644 index 000000000..ddd3dc468 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07h.gif new file mode 100644 index 000000000..c41b5dc6f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07s.gif new file mode 100644 index 000000000..530c3fa39 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._07s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08c.gif new file mode 100644 index 000000000..c2cf87933 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08d.gif new file mode 100644 index 000000000..d72214a02 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08h.gif new file mode 100644 index 000000000..c4203e253 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08s.gif new file mode 100644 index 000000000..bd2444246 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._08s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09c.gif new file mode 100644 index 000000000..1f3b83723 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09d.gif new file mode 100644 index 000000000..2b0b3a681 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09h.gif new file mode 100644 index 000000000..4d59a3ba7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09s.gif new file mode 100644 index 000000000..10bc8595e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._09s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10c.gif new file mode 100644 index 000000000..16cd68855 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10d.gif new file mode 100644 index 000000000..472d873e9 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10h.gif new file mode 100644 index 000000000..7814b8b54 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10s.gif new file mode 100644 index 000000000..012ea9a1d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._10s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11c.gif new file mode 100644 index 000000000..4eaa8b9c8 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11d.gif new file mode 100644 index 000000000..d39bed85c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11h.gif new file mode 100644 index 000000000..fce3768ab Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11s.gif new file mode 100644 index 000000000..3ac02e30e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._11s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12c.gif new file mode 100644 index 000000000..56b961f9a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12d.gif new file mode 100644 index 000000000..6428a474f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12h.gif new file mode 100644 index 000000000..ea1bef649 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12s.gif new file mode 100644 index 000000000..f28e86d20 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._12s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13c.gif new file mode 100644 index 000000000..4b1808b95 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13d.gif new file mode 100644 index 000000000..cedfba261 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13h.gif new file mode 100644 index 000000000..348f9cdb9 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13s.gif new file mode 100644 index 000000000..c6bf399c0 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._13s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._back01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._back01.gif new file mode 100644 index 000000000..c71f93e3d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._back01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom01.gif new file mode 100644 index 000000000..c002d7993 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom02.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom02.gif new file mode 100644 index 000000000..0cb733a94 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom02.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom03.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom03.gif new file mode 100644 index 000000000..805ec099b Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom03.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom04.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom04.gif new file mode 100644 index 000000000..e1d1645c4 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom04.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom05.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom05.gif new file mode 100644 index 000000000..d7e143cd7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom05.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom06.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom06.gif new file mode 100644 index 000000000..2e41d8f8e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom06.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom07.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom07.gif new file mode 100644 index 000000000..a6b229f9d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._bottom07.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._config.txt b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._config.txt new file mode 100644 index 000000000..4bc1fde2d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._config.txt differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l01.gif new file mode 100644 index 000000000..ea024777b Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l02.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l02.gif new file mode 100644 index 000000000..03d15a3e3 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l02.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l03.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l03.gif new file mode 100644 index 000000000..f1db34b65 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l03.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l04.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l04.gif new file mode 100644 index 000000000..96715d15a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._l04.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shade.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shade.gif new file mode 100644 index 000000000..ce574ad5f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shade.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow00.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow00.gif new file mode 100644 index 000000000..afd372dfb Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow00.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow01.gif new file mode 100644 index 000000000..d23e5eaca Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow02.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow02.gif new file mode 100644 index 000000000..3d525f690 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow02.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow03.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow03.gif new file mode 100644 index 000000000..6948d8286 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow03.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow04.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow04.gif new file mode 100644 index 000000000..538875b53 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow04.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow05.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow05.gif new file mode 100644 index 000000000..ffb8b377e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow05.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow06.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow06.gif new file mode 100644 index 000000000..a12b30467 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow06.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow07.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow07.gif new file mode 100644 index 000000000..d044c3b3e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow07.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow08.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow08.gif new file mode 100644 index 000000000..eb42aee0b Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow08.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow09.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow09.gif new file mode 100644 index 000000000..223683ad7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow09.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow10.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow10.gif new file mode 100644 index 000000000..d722375c2 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow10.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow11.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow11.gif new file mode 100644 index 000000000..f214cf80d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow11.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow12.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow12.gif new file mode 100644 index 000000000..19236799b Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow12.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow13.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow13.gif new file mode 100644 index 000000000..3fb0f2d7c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/french/._shadow13.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01c.gif new file mode 100644 index 000000000..5c566bc8c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01d.gif new file mode 100644 index 000000000..1c79767c6 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01h.gif new file mode 100644 index 000000000..413ec4cee Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01s.gif new file mode 100644 index 000000000..6bb5e2862 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._01s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02c.gif new file mode 100644 index 000000000..1be0ccf59 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02d.gif new file mode 100644 index 000000000..0f0a63c54 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02h.gif new file mode 100644 index 000000000..8a24dfb0d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02s.gif new file mode 100644 index 000000000..12dab8af0 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._02s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03c.gif new file mode 100644 index 000000000..361fea91f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03d.gif new file mode 100644 index 000000000..ce6d0055a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03h.gif new file mode 100644 index 000000000..35c305d03 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03s.gif new file mode 100644 index 000000000..5e0cdfc8d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._03s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04c.gif new file mode 100644 index 000000000..1ecaf1aad Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04d.gif new file mode 100644 index 000000000..1b5568efe Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04h.gif new file mode 100644 index 000000000..15c110543 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04s.gif new file mode 100644 index 000000000..baf3bcbcb Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._04s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05c.gif new file mode 100644 index 000000000..12c020c6f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05d.gif new file mode 100644 index 000000000..c55906181 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05h.gif new file mode 100644 index 000000000..e1b96927a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05s.gif new file mode 100644 index 000000000..e19170e41 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._05s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06c.gif new file mode 100644 index 000000000..84c3ea960 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06d.gif new file mode 100644 index 000000000..85d93607e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06h.gif new file mode 100644 index 000000000..0626584ae Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06s.gif new file mode 100644 index 000000000..1535e99e6 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._06s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07c.gif new file mode 100644 index 000000000..91799770a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07d.gif new file mode 100644 index 000000000..fdcc0517c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07h.gif new file mode 100644 index 000000000..e4c78ae86 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07s.gif new file mode 100644 index 000000000..20ab085ea Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._07s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08c.gif new file mode 100644 index 000000000..5179d90cd Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08d.gif new file mode 100644 index 000000000..fff931201 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08h.gif new file mode 100644 index 000000000..29db67108 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08s.gif new file mode 100644 index 000000000..6d335165c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._08s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09c.gif new file mode 100644 index 000000000..955ec5fd7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09d.gif new file mode 100644 index 000000000..67cc6eea2 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09h.gif new file mode 100644 index 000000000..b1f8f92ec Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09s.gif new file mode 100644 index 000000000..60b18e164 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._09s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10c.gif new file mode 100644 index 000000000..4d445cbe7 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10d.gif new file mode 100644 index 000000000..16423e9db Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10h.gif new file mode 100644 index 000000000..4d50eae47 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10s.gif new file mode 100644 index 000000000..95f9e91d0 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._10s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11c.gif new file mode 100644 index 000000000..87729b752 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11d.gif new file mode 100644 index 000000000..9d3daba70 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11h.gif new file mode 100644 index 000000000..262b35dee Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11s.gif new file mode 100644 index 000000000..1198f78ea Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._11s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12c.gif new file mode 100644 index 000000000..7e8d51736 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12d.gif new file mode 100644 index 000000000..774bbe92c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12h.gif new file mode 100644 index 000000000..b09681753 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12s.gif new file mode 100644 index 000000000..670401a9c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._12s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13c.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13c.gif new file mode 100644 index 000000000..2829cca15 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13c.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13d.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13d.gif new file mode 100644 index 000000000..d5a17988e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13d.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13h.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13h.gif new file mode 100644 index 000000000..4a09f9675 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13h.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13s.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13s.gif new file mode 100644 index 000000000..56f3760cd Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._13s.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._COPYRIGHT b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._COPYRIGHT new file mode 100644 index 000000000..9846ec1a1 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._COPYRIGHT differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._back01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._back01.gif new file mode 100644 index 000000000..79e7714bd Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._back01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom01.gif new file mode 100644 index 000000000..00572576b Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom02.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom02.gif new file mode 100644 index 000000000..4e1fe3b3e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom02.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom03.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom03.gif new file mode 100644 index 000000000..adaee877f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom03.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom04.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom04.gif new file mode 100644 index 000000000..602334de5 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom04.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom05.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom05.gif new file mode 100644 index 000000000..2aecb671e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom05.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom06.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom06.gif new file mode 100644 index 000000000..dabd8e8bc Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom06.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom07.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom07.gif new file mode 100644 index 000000000..f4da60325 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._bottom07.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._config.txt b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._config.txt new file mode 100644 index 000000000..431729b1c Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._config.txt differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l01.gif new file mode 100644 index 000000000..30c48bf64 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l02.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l02.gif new file mode 100644 index 000000000..91c3e4fb1 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l02.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l03.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l03.gif new file mode 100644 index 000000000..d3a77f23e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l03.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l04.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l04.gif new file mode 100644 index 000000000..ec6376d2e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._l04.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shade.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shade.gif new file mode 100644 index 000000000..e4381735a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shade.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow00.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow00.gif new file mode 100644 index 000000000..f61ad9e5f Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow00.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow01.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow01.gif new file mode 100644 index 000000000..31aef25dd Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow01.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow02.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow02.gif new file mode 100644 index 000000000..93b133f0e Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow02.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow03.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow03.gif new file mode 100644 index 000000000..87a748fe4 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow03.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow04.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow04.gif new file mode 100644 index 000000000..b2fa5aa8a Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow04.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow05.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow05.gif new file mode 100644 index 000000000..dff6ab809 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow05.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow06.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow06.gif new file mode 100644 index 000000000..5958a3b35 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow06.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow07.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow07.gif new file mode 100644 index 000000000..755db73eb Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow07.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow08.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow08.gif new file mode 100644 index 000000000..825238901 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow08.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow09.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow09.gif new file mode 100644 index 000000000..d5da68d4d Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow09.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow10.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow10.gif new file mode 100644 index 000000000..bfcfa5971 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow10.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow11.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow11.gif new file mode 100644 index 000000000..86802ed87 Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow11.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow12.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow12.gif new file mode 100644 index 000000000..23e9061fd Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow12.gif differ diff --git a/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow13.gif b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow13.gif new file mode 100644 index 000000000..b1fe22ebf Binary files /dev/null and b/plugins/patience_plugin/__MACOSX/Patience/karten/german/._shadow13.gif differ