mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-22 03:04:09 -04:00
add parameterisation to the theme name.
This commit is contained in:
parent
0ba65a1050
commit
84c760fc93
3 changed files with 19 additions and 21 deletions
|
@ -1,12 +1,10 @@
|
|||
/* A file to test imorting C modules for handling arrays to Python */
|
||||
|
||||
#include "kcardgame.hpp"
|
||||
MyKCardDeck::MyKCardDeck()
|
||||
MyKCardDeck::MyKCardDeck(QString theme_name)
|
||||
{
|
||||
int argc = 1;
|
||||
char *argv[2] = {"pysol", NULL};
|
||||
app = new QGuiApplication(argc, argv);
|
||||
d = new KCardDeck( KCardTheme("svg-ancient-egyptians"), nullptr);
|
||||
d = new KCardDeck(KCardTheme(theme_name), nullptr);
|
||||
unsigned int number = 0;
|
||||
QList<quint32> ids;
|
||||
for (int i = 0; i < 1; ++i)
|
||||
|
|
|
@ -10,7 +10,7 @@ class Q_DECL_EXPORT MyKCardDeck: public QObject
|
|||
public:
|
||||
QGuiApplication *app;
|
||||
KCardDeck *d;
|
||||
explicit MyKCardDeck();
|
||||
explicit MyKCardDeck(QString);
|
||||
public slots:
|
||||
Q_DECL_EXPORT QPixmap *get_card_pixmap(int i);
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@ class SVGManager:
|
|||
def __init__(self, filename):
|
||||
self.filename = filename
|
||||
# self.svg = Rsvg.Handle().new_from_file(filename)
|
||||
self.d = MyKCardDeck()
|
||||
self.d = MyKCardDeck("svg-jolly-royal")
|
||||
|
||||
# Taken from https://stackoverflow.com/questions/44471795
|
||||
# Under MIT License - thanks.
|
||||
|
|
Loading…
Add table
Reference in a new issue