initial port for Cevo game in C++ (libs)

This commit is contained in:
Geoffray Levasseur committed 2026-10-22 17:20:45 +02:00
commit 8436242032
375 files changed
+46282

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
#pragma once
#include <QIcon>
#include <QList>
#include <QPoint>
#include <Qt>
namespace Dpi {
// Type aliases kept for parity with Dpi.Controls.pas; Qt's own enums already
// cover these concepts so no custom type is introduced for them.
using Align = Qt::Alignment;
enum class BorderStyle {
None,
Single,
};
// TImageList equivalent: a simple named collection of icons at a given size.
class ImageList {
public:
explicit ImageList(int width = 16, int height = 16) : m_width(width), m_height(height) {}
int width() const { return m_width; }
void setWidth(int value) { m_width = value; }
int height() const { return m_height; }
void setHeight(int value) { m_height = value; }
int count() const { return m_icons.count(); }
int add(const QIcon &icon);
QIcon icon(int index) const;
void clear() { m_icons.clear(); }
private:
int m_width;
int m_height;
QList<QIcon> m_icons;
};
// TMouse equivalent.
class Mouse {
public:
static QPoint cursorPos();
static void setCursorPos(const QPoint &value);
};
} // namespace Dpi