Add button icons, currently they dont resize though

This commit is contained in:
meepingsnesroms
2018-04-19 09:04:34 -07:00
parent 1df7d7d3ac
commit ffa94967a1
26 changed files with 265 additions and 118 deletions

View File

@@ -79,3 +79,17 @@ FORMS += \
CONFIG += mobility c++11
MOBILITY =
DISTFILES += \
images/addressBook.png \
images/calender.png \
images/center.png \
images/down.png \
images/left.png \
images/notes.png \
images/power.png \
images/right.png \
images/up.png \
images/todo.png
RESOURCES += \
mainwindow.qrc

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.6.0, 2018-04-18T17:16:44. -->
<!-- Written by QtCreator 4.6.0, 2018-04-19T07:29:41. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -29,6 +29,18 @@ static std::atomic<bool> emuOn;
static std::atomic<bool> emuInited;
static uint8_t romBuffer[ROM_SIZE];
/*
static QIcon calenderIcon(":/images/calender.png");
static QIcon addressBookIcon(":/images/addressBook.png");
static QIcon todoIcon(":/images/todo.png");
static QIcon notesIcon(":/images/notes.png");
static QIcon upIcon(":/images/up.png");
static QIcon downIcon(":/images/down.png");
static QIcon leftIcon(":/images/left.png");
static QIcon rightIcon(":/images/right.png");
static QIcon centerIcon(":/images/center.png");
*/
void popupErrorDialog(std::string error){
//add error dialog code
@@ -85,6 +97,10 @@ MainWindow::MainWindow(QWidget* parent) :
QMainWindow(parent),
ui(new Ui::MainWindow){
ui->setupUi(this);
//ui->addressBook->installEventFilter(this);
//ui->addressBook->eventFilter = resizeButtonIcons;
emuOn = false;
emuInited = false;
screenWidth = 160;
@@ -107,6 +123,14 @@ MainWindow::~MainWindow(){
delete ui;
}
bool MainWindow::eventFilter(QObject *object, QEvent *event){
if(std::string(object->metaObject()->className()) == "QPushButton" && event->type() == QEvent::Resize){
QPushButton* button = (QPushButton*)object;
button->setIconSize(button->size());
}
return QMainWindow::eventFilter(object, event);
}
void MainWindow::loadRom(){
std::string rom = settings.value("romPath", "").toString().toStdString();

View File

@@ -31,6 +31,7 @@ public:
~MainWindow();
private slots:
bool eventFilter(QObject *object, QEvent *event);
void loadRom();
void selectRom();
void on_install_pressed();

View File

@@ -0,0 +1,14 @@
<RCC>
<qresource prefix="/buttons">
<file>images/addressBook.png</file>
<file>images/calender.png</file>
<file>images/center.png</file>
<file>images/down.png</file>
<file>images/left.png</file>
<file>images/notes.png</file>
<file>images/power.png</file>
<file>images/right.png</file>
<file>images/toDo.png</file>
<file>images/up.png</file>
</qresource>
</RCC>

View File

@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>525</width>
<width>574</width>
<height>678</height>
</rect>
</property>
@@ -43,8 +43,8 @@
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
<width>320</width>
<height>320</height>
</size>
</property>
<property name="cursor">
@@ -89,7 +89,112 @@
</property>
<widget class="QWidget" name="buttons">
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="8">
<item row="2" column="4">
<widget class="QPushButton" name="center">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/center.png</normaloff>:/buttons/images/center.png</iconset>
</property>
<property name="iconSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="0" column="8">
<widget class="QPushButton" name="ctrlBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ctrl_btn</string>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QPushButton" name="right">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/right.png</normaloff>:/buttons/images/right.png</iconset>
</property>
<property name="iconSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QPushButton" name="calender">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/calender.png</normaloff>:/buttons/images/calender.png</iconset>
</property>
<property name="iconSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="addressBook">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/addressBook.png</normaloff>:/buttons/images/addressBook.png</iconset>
</property>
<property name="iconSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="5" column="7">
<widget class="QPushButton" name="todo">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
@@ -110,12 +215,16 @@
</size>
</property>
<property name="text">
<string>Td</string>
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/toDo.png</normaloff>:/buttons/images/toDo.png</iconset>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
<width>75</width>
<height>75</height>
</size>
</property>
<property name="autoDefault">
@@ -129,8 +238,8 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="addressBook">
<item row="5" column="8">
<widget class="QPushButton" name="notes">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
@@ -138,12 +247,62 @@
</sizepolicy>
</property>
<property name="text">
<string>Phn</string>
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/notes.png</normaloff>:/buttons/images/notes.png</iconset>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="left">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/left.png</normaloff>:/buttons/images/left.png</iconset>
</property>
<property name="iconSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="0" column="7">
<widget class="QPushButton" name="power">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/power.png</normaloff>:/buttons/images/power.png</iconset>
</property>
<property name="iconSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
@@ -161,38 +320,6 @@
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QPushButton" name="down">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="calender">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Clk</string>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="mainRight">
<property name="sizePolicy">
@@ -206,8 +333,8 @@
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QPushButton" name="right">
<item row="5" column="4">
<widget class="QPushButton" name="down">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
@@ -217,9 +344,32 @@
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/down.png</normaloff>:/buttons/images/down.png</iconset>
</property>
<property name="iconSize">
<size>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="0" column="5">
<item row="0" column="4">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="4">
<widget class="QPushButton" name="up">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
@@ -230,79 +380,18 @@
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QPushButton" name="center">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="9">
<widget class="QPushButton" name="notes">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Nts</string>
<property name="icon">
<iconset resource="mainwindow.qrc">
<normaloff>:/buttons/images/up.png</normaloff>:/buttons/images/up.png</iconset>
</property>
<property name="iconSize">
<size>
<width>30</width>
<height>30</height>
<width>75</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QPushButton" name="left">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="8">
<widget class="QPushButton" name="power">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Power</string>
</property>
</widget>
</item>
<item row="0" column="9">
<widget class="QPushButton" name="ctrlBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>ctrl_btn</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="misc">
@@ -399,6 +488,8 @@
<header location="global">touchscreen.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="mainwindow.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -1,7 +1,9 @@
These icons were made by:
http://icons.mysitemyway.com/
http://www.iconarchive.com/artist/everaldo.html
I got them here:
http://www.iconarchive.com/show/clean-3d-icons-by-mysitemyway.html
http://www.iconarchive.com/show/crystal-clear-icons-by-everaldo/App-palm-icon.html
I take no credit for these icons.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -1,4 +1,4 @@
# Palm m515/OS 4.1 emulator(Mu)
# Palm m515/OS 4.1 emulator(Mu)
This is a complete restart of my Palm OS emulator, with the last one the code got too messy and the goal too ambitious(to emulate every palm API in software and for compatibility with all Palm OS versions and devices).
@@ -47,8 +47,9 @@ Bonus: Has Adware(Addit)
The lack of ARM CPU will be fixed in my emulator see "OS improvements".
## Credits
Musashi v3.4(last version that builds outside of mame) (68k core)
http://www.iconarchive.com/show/clean-3d-icons-by-mysitemyway.html (Qt Button Icons)
Musashi v3.4(last version that builds outside of mame) (68k core)
http://www.iconarchive.com/show/clean-3d-icons-by-mysitemyway.html (Qt Button Icons)
http://www.iconarchive.com/show/crystal-clear-icons-by-everaldo/App-palm-icon.html (Desktop Icon)
## Building
#### For RetroArch