diff --git a/embeddings/Wizard-Chess.pro b/embeddings/Wizard-Chess.pro index 7093e7b..ee5b63c 100644 --- a/embeddings/Wizard-Chess.pro +++ b/embeddings/Wizard-Chess.pro @@ -4,10 +4,6 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 -# You can make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - SOURCES += \ main.cpp \ mainwindow.cpp @@ -18,11 +14,13 @@ HEADERS += \ FORMS += \ mainwindow.ui +OTHER_FILES += \ + black_bishop.png + +RESOURCES += \ + resources.qrc + # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target - -RESOURCES += \ - GryffindorLogo.qrc \ - Resources/QTGryffindorLogo.qrc diff --git a/embeddings/black_bishop.png b/embeddings/black_bishop.png new file mode 100644 index 0000000..453cb32 Binary files /dev/null and b/embeddings/black_bishop.png differ diff --git a/embeddings/displaypiece.cpp b/embeddings/displaypiece.cpp new file mode 100644 index 0000000..16bd138 --- /dev/null +++ b/embeddings/displaypiece.cpp @@ -0,0 +1,6 @@ +#include "displaypiece.h" + +DisplayPiece::DisplayPiece() +{ + +} diff --git a/embeddings/images/black_bishop.png b/embeddings/images/black_bishop.png new file mode 100644 index 0000000..d612514 Binary files /dev/null and b/embeddings/images/black_bishop.png differ diff --git a/embeddings/images/black_king.png b/embeddings/images/black_king.png new file mode 100644 index 0000000..6b5f44a Binary files /dev/null and b/embeddings/images/black_king.png differ diff --git a/embeddings/images/black_knight.png b/embeddings/images/black_knight.png new file mode 100644 index 0000000..7c72c72 Binary files /dev/null and b/embeddings/images/black_knight.png differ diff --git a/embeddings/images/black_pawn.png b/embeddings/images/black_pawn.png new file mode 100644 index 0000000..8fd0bbb Binary files /dev/null and b/embeddings/images/black_pawn.png differ diff --git a/embeddings/images/black_queen.png b/embeddings/images/black_queen.png new file mode 100644 index 0000000..fa2fdd8 Binary files /dev/null and b/embeddings/images/black_queen.png differ diff --git a/embeddings/images/black_rook.png b/embeddings/images/black_rook.png new file mode 100644 index 0000000..4ee5f6b Binary files /dev/null and b/embeddings/images/black_rook.png differ diff --git a/embeddings/images/chessboardBackground.png b/embeddings/images/chessboardBackground.png new file mode 100644 index 0000000..d0927b4 Binary files /dev/null and b/embeddings/images/chessboardBackground.png differ diff --git a/embeddings/images/white_bishop.png b/embeddings/images/white_bishop.png new file mode 100644 index 0000000..a5fa752 Binary files /dev/null and b/embeddings/images/white_bishop.png differ diff --git a/embeddings/images/white_king.png b/embeddings/images/white_king.png new file mode 100644 index 0000000..527415f Binary files /dev/null and b/embeddings/images/white_king.png differ diff --git a/embeddings/images/white_knight.png b/embeddings/images/white_knight.png new file mode 100644 index 0000000..01c1b50 Binary files /dev/null and b/embeddings/images/white_knight.png differ diff --git a/embeddings/images/white_pawn.png b/embeddings/images/white_pawn.png new file mode 100644 index 0000000..03c7817 Binary files /dev/null and b/embeddings/images/white_pawn.png differ diff --git a/embeddings/images/white_queen.png b/embeddings/images/white_queen.png new file mode 100644 index 0000000..1379b42 Binary files /dev/null and b/embeddings/images/white_queen.png differ diff --git a/embeddings/images/white_rook.png b/embeddings/images/white_rook.png new file mode 100644 index 0000000..4d7643c Binary files /dev/null and b/embeddings/images/white_rook.png differ diff --git a/embeddings/mainwindow.cpp b/embeddings/mainwindow.cpp index a2e0059..d2ffe01 100644 --- a/embeddings/mainwindow.cpp +++ b/embeddings/mainwindow.cpp @@ -7,6 +7,8 @@ MainWindow::MainWindow(QWidget *parent) { ui->setupUi(this); ui->stackedWidget->setCurrentIndex(0); + setupBoard(); + setupInitialPositions(); } MainWindow::~MainWindow() @@ -54,6 +56,148 @@ void MainWindow::on_pushButton_EndGame_clicked() ui->stackedWidget->setCurrentIndex(8); } +void MainWindow::setupBoard() +{ + // Map each push button to its chessboard position + for (char col = 'A'; col <= 'H'; ++col) { + for (int row = 1; row <= 8; ++row) { + QString position = QString(col) + QString::number(row); + QString buttonName = "pushButton_" + position; + + // Find the button in the UI and connect its signal + QPushButton* button = findChild(buttonName); + if (button) { + boardMap[position] = button; + connect(button, &QPushButton::clicked, this, &MainWindow::onTileClicked); + } + } + } +} + + +// Add chess pieces to their starting positions +void MainWindow::setupInitialPositions() +{ + // ui->stackedWidget->setCurrentIndex(5); + // QLabel *background = new QLabel(this); + // background->setAlignment(Qt::AlignTop | Qt:: AlignRight); + // background->setGeometry(QRect(15, 20, 300, 320)); + // background->setStyleSheet("background-image:/images/images/chessBoardBackground"); + // Add white pieces + pieces.append(ChessPiece("rook", "white", "A1")); + pieces.append(ChessPiece("knight", "white", "B1")); + pieces.append(ChessPiece("bishop", "white", "C1")); + pieces.append(ChessPiece("queen", "white", "D1")); + pieces.append(ChessPiece("king", "white", "E1")); + pieces.append(ChessPiece("bishop", "white", "F1")); + pieces.append(ChessPiece("knight", "white", "G1")); + pieces.append(ChessPiece("rook", "white", "H1")); + for (char col = 'A'; col <= 'H'; ++col) + pieces.append(ChessPiece("pawn", "white", QString(col) + "2")); + + // Add black pieces + pieces.append(ChessPiece("rook", "black", "A8")); + pieces.append(ChessPiece("knight", "black", "B8")); + pieces.append(ChessPiece("bishop", "black", "C8")); + pieces.append(ChessPiece("queen", "black", "D8")); + pieces.append(ChessPiece("king", "black", "E8")); + pieces.append(ChessPiece("bishop", "black", "F8")); + pieces.append(ChessPiece("knight", "black", "G8")); + pieces.append(ChessPiece("rook", "black", "H8")); + for (char col = 'A'; col <= 'H'; ++col) + pieces.append(ChessPiece("pawn", "black", QString(col) + "7")); + + // Place pieces on the board + for (ChessPiece &piece : pieces) { + placePieceOnTile(piece.position, piece.type, piece.color); + } + // ui->stackedWidget->setCurrentIndex(0); +} + + +void MainWindow::placePieceOnTile(const QString& position, const QString& pieceType, const QString& color) +{ + QPushButton* button = boardMap[position]; + if (button) { + QString imagePath = ":/images/images/" + color + "_" + pieceType + ".png"; + qDebug() << "Attempting to open file at:" << imagePath; + + QFile file(imagePath); + if (!file.open(QIODevice::ReadOnly)) { + qDebug() << "Failed to open file at:" << imagePath; + return; + } + + QByteArray byteArray = file.readAll(); + qDebug() << "File read successfully. Bytes length:" << byteArray.length(); + + QImage img = QImage::fromData(byteArray); + if (img.isNull()) { + qDebug() << "Failed to load QImage instance for:" << imagePath; + return; + } + + QPixmap pixmap = QPixmap::fromImage(img); + QIcon icon(pixmap); + icon.addPixmap(pixmap, QIcon::Normal, QIcon::Off); + + + button->setIcon(icon); + button->setIconSize(QSize(30, 30)); + button->setStyleSheet("QPushButton { padding-left: 15px; }, setStyleSheet(QPushButton{background: transparent;});"); + } +} + + + + +// Handle tile clicks +void MainWindow::onTileClicked() +{ + QPushButton* clickedButton = qobject_cast(sender()); + if (!clickedButton) return; + + QString clickedPosition; + for (auto it = boardMap.begin(); it != boardMap.end(); ++it) { + if (it.value() == clickedButton) { + clickedPosition = it.key(); + break; + } + } + + if (selectedPiece) { + // Moving the selected piece + if (isValidMove(selectedPiece->type, selectedPiece->position, clickedPosition)) { + // Update the piece's position + placePieceOnTile(clickedPosition, selectedPiece->type, selectedPiece->color); + boardMap[selectedPiece->position]->setIcon(QIcon()); // Clear the old tile + selectedPiece->position = clickedPosition; + + // Deselect the piece + selectedPiece = nullptr; + } else { + qDebug() << "Invalid move!"; + } + } else { + // Selecting a piece + for (ChessPiece &piece : pieces) { + if (piece.position == clickedPosition) { + selectedPiece = &piece; + break; + } + } + } +} + + +bool MainWindow::isValidMove(const QString& pieceType, const QString& from, const QString& to) +{ + // Placeholder for move validation logic + return true; // Allow all moves for now +} + + + // End void MainWindow::on_pushButton_home_end_clicked() { diff --git a/embeddings/mainwindow.h b/embeddings/mainwindow.h index b086d9d..bc1d67c 100644 --- a/embeddings/mainwindow.h +++ b/embeddings/mainwindow.h @@ -2,6 +2,11 @@ #define MAINWINDOW_H #include +#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE namespace Ui { @@ -9,6 +14,15 @@ class MainWindow; } QT_END_NAMESPACE +class ChessPiece { +public: + QString type; // "pawn", "rook", etc. + QString color; // "white" or "black" + QString position; // Chess notation, e.g., "A1", "B2" + + ChessPiece(QString t, QString c, QString p) : type(t), color(c), position(p) {} +}; + class MainWindow : public QMainWindow { Q_OBJECT @@ -17,15 +31,16 @@ class MainWindow : public QMainWindow MainWindow(QWidget *parent = nullptr); ~MainWindow(); + + private slots: - //void on_pushButton_clicked(); + void onTileClicked(); -// <<<<<<< HEAD void on_pushButton_home_about_clicked(); void on_pushButton_home_end_clicked(); -// ======= + void on_pushButton_start_clicked(); void on_pushButton_tutorial_clicked(); @@ -33,7 +48,6 @@ private slots: void on_pushButton_settings_clicked(); void on_pushButton_about_clicked(); -// >>>>>>> ec80273e3b344ef1a23e998207c077d80fe31758 void on_pushButton_home_settings_clicked(); @@ -53,5 +67,16 @@ private slots: private: Ui::MainWindow *ui; + QMap boardMap; // Map positions (A1, B2) to QPushButtons + QList pieces; // List of chess pieces + QString selectedPiecePosition; // Position of selected piece + ChessPiece* selectedPiece = nullptr; // Currently selected piece + + void setupBoard(); + void setupInitialPositions(); + void placePieceOnTile(const QString& position, const QString& pieceType, const QString& color); + bool isValidMove(const QString& pieceType, const QString& from, const QString& to); + }; + #endif // MAINWINDOW_H diff --git a/embeddings/mainwindow.ui b/embeddings/mainwindow.ui index 66b6837..5e65947 100644 --- a/embeddings/mainwindow.ui +++ b/embeddings/mainwindow.ui @@ -68,7 +68,7 @@ rgb(0, 0, 0) } - 8 + 5 @@ -679,15 +679,40 @@ font: 900 12pt "Segoe UI Black"; - 10 - 20 - 351 - 381 + 20 + 40 + 312 + 312 - - + + QLayout::SizeConstraint::SetDefaultConstraint + + + 5 + + + + + + 30 + 30 + + + + + 30 + 30 + + + + 8 + + + + + 30 @@ -708,14 +733,14 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - A1 + G4 @@ -727,6 +752,12 @@ font: 900 12pt "Segoe UI Black"; 30 + + + 30 + 30 + + 30 @@ -746,14 +777,39 @@ font: 900 12pt "Segoe UI Black"; - - + + + + + 30 + 30 + + + + + 30 + 30 + + + + 2 + + + + + 30 30 + + + 30 + 30 + + 30 @@ -762,25 +818,37 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - C3 + B7 - - + + 30 30 + + + 30 + 30 + + + + + 30 + 30 + + QPushButton { background-color: #000000; @@ -790,12 +858,12 @@ font: 900 12pt "Segoe UI Black"; } - F4 + D4 - - + + 30 @@ -816,19 +884,38 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - B2 + F5 - - + + + + + 30 + 30 + + + + + 30 + 30 + + + + 5 + + + + + 30 @@ -856,12 +943,18 @@ font: 900 12pt "Segoe UI Black"; } - B6 + F4 - - + + + + + 30 + 30 + + 30 @@ -869,18 +962,43 @@ font: 900 12pt "Segoe UI Black"; - A + H - - + + + + + 30 + 30 + + + + + 30 + 30 + + + + E + + + + + 30 30 + + + 30 + 30 + + 30 @@ -889,19 +1007,19 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - H8 + E6 - - + + 30 @@ -929,12 +1047,12 @@ font: 900 12pt "Segoe UI Black"; } - B8 + B4 - - + + 30 @@ -962,12 +1080,12 @@ font: 900 12pt "Segoe UI Black"; } - F1 + C6 - - + + 30 @@ -988,38 +1106,31 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - D3 - - - - - - - - 30 - 30 - - - - G + D8 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1035,18 +1146,24 @@ font: 900 12pt "Segoe UI Black"; } - A8 + D1 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1062,12 +1179,12 @@ font: 900 12pt "Segoe UI Black"; } - F6 + F2 - - + + 30 @@ -1095,51 +1212,23 @@ font: 900 12pt "Segoe UI Black"; } - C1 - - - - - - - - 30 - 30 - - - - D + B8 - - + + 30 30 - - QPushButton { - background-color: #000000; - color: white; - border-radius: 5px; - padding: 5px; -} - - - G3 - - - - - - - - 30 - 30 - + + + 30 + 30 + @@ -1156,12 +1245,12 @@ font: 900 12pt "Segoe UI Black"; } - C6 + H1 - - + + 30 @@ -1182,24 +1271,24 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - B4 + D3 - - - - - 30 - 30 - + + + + + 30 + 30 + @@ -1207,21 +1296,13 @@ font: 900 12pt "Segoe UI Black"; 30 - - QPushButton { - background-color: #FFFFFF; - color: black; - border-radius: 5px; - padding: 5px; -} - - E6 + 7 - - + + 30 @@ -1249,12 +1330,18 @@ font: 900 12pt "Segoe UI Black"; } - E2 + F3 - - + + + + + 30 + 30 + + 30 @@ -1262,18 +1349,24 @@ font: 900 12pt "Segoe UI Black"; - 6 + 4 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1282,25 +1375,37 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - C8 + G1 - - + + 30 30 + + + 30 + 30 + + + + + 30 + 30 + + QPushButton { background-color: #000000; @@ -1310,31 +1415,57 @@ font: 900 12pt "Segoe UI Black"; } - G5 + C7 - - + + + + + 30 + 30 + + + + + 30 + 30 + + 30 30 + + QPushButton { + background-color: #000000; + color: white; + border-radius: 5px; + padding: 5px; +} + - H + H8 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1350,12 +1481,12 @@ font: 900 12pt "Segoe UI Black"; } - E5 + A3 - - + + 30 @@ -1376,25 +1507,37 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - C2 + D6 - - + + 30 30 + + + 30 + 30 + + + + + 30 + 30 + + QPushButton { background-color: #FFFFFF; @@ -1404,31 +1547,24 @@ font: 900 12pt "Segoe UI Black"; } - C4 - - - - - - - - 30 - 30 - - - - E + F1 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1444,31 +1580,24 @@ font: 900 12pt "Segoe UI Black"; } - E8 - - - - - - - - 30 - 30 - - - - 2 + E2 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1477,25 +1606,31 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - H6 + E8 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1511,18 +1646,30 @@ font: 900 12pt "Segoe UI Black"; } - H3 + A2 - - + + 30 30 + + + 30 + 30 + + + + + 30 + 30 + + QPushButton { background-color: #FFFFFF; @@ -1532,12 +1679,12 @@ font: 900 12pt "Segoe UI Black"; } - H5 + B1 - - + + 30 @@ -1565,18 +1712,24 @@ font: 900 12pt "Segoe UI Black"; } - G2 + F7 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1585,19 +1738,19 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - D5 + C1 - - + + 30 @@ -1625,12 +1778,12 @@ font: 900 12pt "Segoe UI Black"; } - B3 + H3 - - + + 30 @@ -1658,18 +1811,30 @@ font: 900 12pt "Segoe UI Black"; } - D2 + E3 - - + + 30 30 + + + 30 + 30 + + + + + 30 + 30 + + QPushButton { background-color: #000000; @@ -1679,18 +1844,24 @@ font: 900 12pt "Segoe UI Black"; } - F2 + G7 - - + + 30 30 + + + 30 + 30 + + 30 @@ -1699,24 +1870,24 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - F7 + H4 - - - - - 30 - 30 - + + + + + 30 + 30 + @@ -1724,27 +1895,44 @@ font: 900 12pt "Segoe UI Black"; 30 - - QPushButton { - background-color: #000000; - color: white; - border-radius: 5px; - padding: 5px; -} + + F + + + + + + + + 30 + 30 + + + + + 30 + 30 + - A3 + D - - + + 30 30 + + + 30 + 30 + + 30 @@ -1760,12 +1948,12 @@ font: 900 12pt "Segoe UI Black"; } - A5 + G5 - - + + 30 @@ -1793,12 +1981,12 @@ font: 900 12pt "Segoe UI Black"; } - H1 + E4 - - + + 30 @@ -1819,25 +2007,37 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - H2 + C8 - - + + 30 30 + + + 30 + 30 + + + + + 30 + 30 + + QPushButton { background-color: #FFFFFF; @@ -1847,17 +2047,17 @@ font: 900 12pt "Segoe UI Black"; } - F3 + G2 - - - - - 30 - 30 - + + + + + 30 + 30 + @@ -1865,27 +2065,25 @@ font: 900 12pt "Segoe UI Black"; 30 - - QPushButton { - background-color: #000000; - color: white; - border-radius: 5px; - padding: 5px; -} - - D8 + B - - + + 30 30 + + + 30 + 30 + + 30 @@ -1901,25 +2099,12 @@ font: 900 12pt "Segoe UI Black"; } - H7 - - - - - - - - 30 - 30 - - - - 8 + A6 - - + + 30 @@ -1947,12 +2132,31 @@ font: 900 12pt "Segoe UI Black"; } - B7 + B5 - - + + + + + 30 + 30 + + + + + 30 + 30 + + + + 1 + + + + + 30 @@ -1973,25 +2177,31 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - A6 + B2 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2007,18 +2217,24 @@ font: 900 12pt "Segoe UI Black"; } - D6 + A7 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2034,18 +2250,24 @@ font: 900 12pt "Segoe UI Black"; } - G8 + C2 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2061,12 +2283,12 @@ font: 900 12pt "Segoe UI Black"; } - E3 + C5 - - + + 30 @@ -2094,12 +2316,18 @@ font: 900 12pt "Segoe UI Black"; } - B5 + D5 - - + + + + + 30 + 30 + + 30 @@ -2107,12 +2335,12 @@ font: 900 12pt "Segoe UI Black"; - 7 + C - - + + 30 @@ -2133,19 +2361,25 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - D1 + C3 - - + + + + + 30 + 30 + + 30 @@ -2153,18 +2387,24 @@ font: 900 12pt "Segoe UI Black"; - B + G - - + + 30 30 + + + 30 + 30 + + 30 @@ -2180,18 +2420,24 @@ font: 900 12pt "Segoe UI Black"; } - F8 + E1 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2207,18 +2453,24 @@ font: 900 12pt "Segoe UI Black"; } - D4 + F8 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2234,18 +2486,43 @@ font: 900 12pt "Segoe UI Black"; } - H4 + E7 - - + + + + + 30 + 30 + + + + + 30 + 30 + + + + 3 + + + + + 30 30 + + + 30 + 30 + + 30 @@ -2261,44 +2538,57 @@ font: 900 12pt "Segoe UI Black"; } - E7 + H6 - - - + + + + + 30 + 30 + + + 30 30 - - 3 - - - - - 30 30 + + QPushButton { + background-color: #000000; + color: white; + border-radius: 5px; + padding: 5px; +} + - C + D2 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2307,26 +2597,19 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - G7 - - - - - - - 5 + C4 - - + + 30 @@ -2354,18 +2637,30 @@ font: 900 12pt "Segoe UI Black"; } - G1 + H2 - - + + 30 30 + + + 30 + 30 + + + + + 30 + 30 + + QPushButton { background-color: #FFFFFF; @@ -2375,18 +2670,24 @@ font: 900 12pt "Segoe UI Black"; } - A4 + H5 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2402,25 +2703,45 @@ font: 900 12pt "Segoe UI Black"; } - G4 + H7 - - + + + + + 30 + 30 + + + + + 30 + 30 + + 30 30 + + QPushButton { + background-color: #000000; + color: white; + border-radius: 5px; + padding: 5px; +} + - F + G3 - - + + 30 @@ -2441,19 +2762,19 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - D7 + A1 - - + + 30 @@ -2474,25 +2795,31 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - E1 + B3 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2508,25 +2835,45 @@ font: 900 12pt "Segoe UI Black"; } - C5 + A5 - - + + + + + 30 + 30 + + + + + 30 + 30 + + 30 30 + + QPushButton { + background-color: #FFFFFF; + color: black; + border-radius: 5px; + padding: 5px; +} + - 4 + G8 - - + + 30 @@ -2547,25 +2894,31 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - C7 + A4 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2574,19 +2927,19 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #000000; - color: white; + background-color: #FFFFFF; + color: black; border-radius: 5px; padding: 5px; } - A7 + D7 - - + + 30 @@ -2607,19 +2960,25 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - A2 + F6 - - + + + + + 30 + 30 + + 30 @@ -2627,18 +2986,24 @@ font: 900 12pt "Segoe UI Black"; - 1 + A - - + + 30 30 + + + 30 + 30 + + 30 @@ -2647,19 +3012,19 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - F5 + E5 - - + + 30 @@ -2687,18 +3052,24 @@ font: 900 12pt "Segoe UI Black"; } - B1 + A8 - - + + 30 30 + + + 30 + 30 + + 30 @@ -2707,14 +3078,33 @@ font: 900 12pt "Segoe UI Black"; QPushButton { - background-color: #FFFFFF; - color: black; + background-color: #000000; + color: white; border-radius: 5px; padding: 5px; } - E4 + B6 + + + + + + + + 30 + 30 + + + + + 30 + 30 + + + + 6 diff --git a/embeddings/resources.qrc b/embeddings/resources.qrc new file mode 100644 index 0000000..6b7f0aa --- /dev/null +++ b/embeddings/resources.qrc @@ -0,0 +1,21 @@ + + + black_bishop.png + + + + images/black_bishop.png + images/black_king.png + images/black_knight.png + images/black_pawn.png + images/black_queen.png + images/black_rook.png + images/white_bishop.png + images/white_king.png + images/white_knight.png + images/white_pawn.png + images/white_queen.png + images/white_rook.png + images/chessboardBackground.png + +