]> localhost Git - WindEmu.git/commitdiff
pdascreenwindow: add series7 navigation icons master
authorGeorge Wright <gw@gwright.org.uk>
Fri, 26 Jun 2026 04:18:20 +0000 (21:18 -0700)
committerGeorge Wright <gw@gwright.org.uk>
Fri, 26 Jun 2026 04:18:20 +0000 (21:18 -0700)
WindQt/pdascreenwindow.cpp

index 7207c865720d76dbf9962a35007c492f608c60ad..90e41bbd2fbe8770ad3bc48302e5189bfaa1b119 100644 (file)
@@ -1,6 +1,13 @@
 #include "pdascreenwindow.h"
 #include <QKeyEvent>
 
 #include "pdascreenwindow.h"
 #include <QKeyEvent>
 
+#define MAKE_ICON(NAME, LABEL, LEFT, TOP)                                      \
+  QLabel* label##NAME = new QLabel(LABEL, this);                               \
+  (label##NAME)->setGeometry(LEFT, TOP, bitW, bitH);                           \
+  (label##NAME)->setScaledContents(true);                                      \
+  (label##NAME)->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);            \
+  (label##NAME)->setFont(font);
+
 PDAScreenWindow::PDAScreenWindow(EmuBase* emu, QWidget* parent)
     : QWidget(parent), emu(emu), lcd(new QLabel(this)) {
   setWindowTitle("WindEmu");
 PDAScreenWindow::PDAScreenWindow(EmuBase* emu, QWidget* parent)
     : QWidget(parent), emu(emu), lcd(new QLabel(this)) {
   setWindowTitle("WindEmu");
@@ -10,6 +17,8 @@ PDAScreenWindow::PDAScreenWindow(EmuBase* emu, QWidget* parent)
 
   const char* who = emu->getDeviceName();
   if (strcmp(who, "Osaris") == 0) {
 
   const char* who = emu->getDeviceName();
   if (strcmp(who, "Osaris") == 0) {
+    mFormat = QImage::Format_Grayscale8;
+
     // some cheap and cheerful placeholders
     int bitW = (emu->getDigitiserWidth() - emu->getLCDWidth()) / 2;
     int bitH = emu->getDigitiserHeight() / 5;
     // some cheap and cheerful placeholders
     int bitW = (emu->getDigitiserWidth() - emu->getLCDWidth()) / 2;
     int bitH = emu->getDigitiserHeight() / 5;
@@ -26,6 +35,8 @@ PDAScreenWindow::PDAScreenWindow(EmuBase* emu, QWidget* parent)
     (new QLabel("Zoom In", this))->setGeometry(rightX, bitH * 3, bitW, bitH);
     (new QLabel("Zoom Out", this))->setGeometry(rightX, bitH * 4, bitW, bitH);
   } else if (strcmp(who, "Series 5mx") == 0) {
     (new QLabel("Zoom In", this))->setGeometry(rightX, bitH * 3, bitW, bitH);
     (new QLabel("Zoom Out", this))->setGeometry(rightX, bitH * 4, bitW, bitH);
   } else if (strcmp(who, "Series 5mx") == 0) {
+    mFormat = QImage::Format_Grayscale8;
+
     int leftW = emu->getLCDOffsetX();
     int leftH = emu->getLCDHeight() / 5;
     (new QLabel("➡️", this))->setGeometry(0, leftH * 0, leftW, leftH);
     int leftW = emu->getLCDOffsetX();
     int leftH = emu->getLCDHeight() / 5;
     (new QLabel("➡️", this))->setGeometry(0, leftH * 0, leftW, leftH);
@@ -51,12 +62,36 @@ PDAScreenWindow::PDAScreenWindow(EmuBase* emu, QWidget* parent)
         ->setGeometry(barX + barW * 6, barY, barW, barH);
     (new QLabel("Extras", this))
         ->setGeometry(barX + barW * 7, barY, barW, barH);
         ->setGeometry(barX + barW * 6, barY, barW, barH);
     (new QLabel("Extras", this))
         ->setGeometry(barX + barW * 7, barY, barW, barH);
-  }
-
-  if (strcmp(who, "Series 7") == 0) {
+  } else if (strcmp(who, "Series 7") == 0) {
     mFormat = QImage::Format_RGB444;
     mFormat = QImage::Format_RGB444;
-  } else {
-    mFormat = QImage::Format_Grayscale8;
+
+    int bitW = (emu->getDigitiserWidth() - emu->getLCDWidth()) / 2;
+    int bitH = emu->getDigitiserHeight() / 10;
+    int leftX = 0;
+    int rightX = bitW + emu->getLCDWidth();
+    QFont font("Arial", 24);
+
+    MAKE_ICON(menu, "▶️", leftX, bitH * 0);
+    MAKE_ICON(cut, "✂️", leftX, bitH * 1);
+    MAKE_ICON(irda, "📶", leftX, bitH * 2);
+    MAKE_ICON(zoomin, "🔎", leftX, bitH * 3);
+    MAKE_ICON(zoomout, "🔍", leftX, bitH * 4);
+    MAKE_ICON(macro1, "1️⃣", leftX, bitH * 5);
+    MAKE_ICON(macro2, "2️⃣", leftX, bitH * 6);
+    MAKE_ICON(macro3, "3️⃣", leftX, bitH * 7);
+    MAKE_ICON(macro4, "4️⃣", leftX, bitH * 8);
+    MAKE_ICON(system, "✋", leftX, bitH * 9);
+
+    MAKE_ICON(email, "📧", rightX, bitH * 0);
+    MAKE_ICON(web, "🌎", rightX, bitH * 1);
+    MAKE_ICON(word, "🗒️", rightX, bitH * 2);
+    MAKE_ICON(sheets, "📊", rightX, bitH * 3);
+    MAKE_ICON(contacts, "📇", rightX, bitH * 4);
+    MAKE_ICON(calendar, "🗓️", rightX, bitH * 5);
+    MAKE_ICON(clock, "🕰️", rightX, bitH * 6);
+    MAKE_ICON(calc, "🧮", rightX, bitH * 7);
+    MAKE_ICON(notes, "📝", rightX, bitH * 8);
+    MAKE_ICON(apps, "📚", rightX, bitH * 9);
   }
 }
 
   }
 }